Граф коммитов

32017 Коммитов

Автор SHA1 Сообщение Дата
naruse 1a61e05d01 it may stuck with console on readline 5.1 + CentOS 5
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 16:17:58 +00:00
naruse 4c4347e698 * ext/openssl/extconf.rb (CRYPTO_THREADID): check exist or not.
* ext/openssl/ossl.c (ossl_thread_id): use rb_nativethread_self()
  implemented at r42137 to allow threads which doesn't associated with
  Ruby thread to use openssl functions.

* ext/openssl/ossl.c (Init_ossl_locks): If CRYPTO_THREADID is defined
  (OpenSSL 1.0.0 or later has it) use CRYPTO_THREADID_set_callback()
  instead of CRYPTO_set_id_callback() because its argument is
  unsigned long; it may cause id collision on mswin64
  whose sizeof(unsigned long) < sizeof(void*).
  http://www.openssl.org/docs/crypto/threads.html

* ext/openssl/ossl.c (ossl_threadid_func): defined for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 14:19:51 +00:00
akr a84ea11986 * bignum.c: Move functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 11:49:25 +00:00
akr ca3f5b533d * bignum.c (bary_divmod): Add special cases for x < y easily detected
and nx == 2 && ny == 2.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 11:16:39 +00:00
ko1 4d3feac974 * thread_(pthread|win32).h: rename rb_thread_cond_t to
rb_nativethread_cond_t.
* thread.c, thread_pthread.c, thread_win32.c, vm_core.h: catch up
  renaming.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 10:50:32 +00:00
ko1 b2bcef7294 * thread_native.h: add rb_nativethread_self() which returns
current running native thread identifier.
* thread_[pthread|win32].c: implement rb_nativethread_self().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 10:46:37 +00:00
ko1 2b1088c89f * thread_pthread.h, thread_win32.h: rename rb_thread_id_t to
rb_nativethread_id_t.
* thread_pthread.c, vm_core.h: use rb_nativethread_id_t.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 10:38:36 +00:00
ko1 55201cac9e * ext/openssl/ossl.c: use system native (system provided)
thread locking APIs added by last commit.
  This patch fixes [Bug #8386].
  "rb_mutex_*" APIs control only "Ruby" threads.
  Not for native threads.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 09:59:28 +00:00
nobu db22d280e1 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 09:58:34 +00:00
ko1 bd058912da * thread_native.h: added.
Move native thread related lines from vm_core.h.
  And declare several functions "rb_nativethread_lock_*",
  manipulate locking.
* common.mk: add thread_native.h.
* thread.c: add functions "rb_nativethread_lock_*".
* thraed.c, thread_[pthread,win32].[ch]: rename rb_thread_lock_t
  to rb_nativethread_lock_t to make it clear that this lock is for
  native thraeds, not for ruby threads.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 09:53:14 +00:00
ko1 3742192919 * gc.c (gc_before_sweep): fix spacing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 07:15:34 +00:00
ko1 511e155e24 * gc.c (heap_get_freeobj): clear slot->freelist here.
This means that this slot doesn't have any free objects.
  And store this slot with objspace->heap.using_slot.
* gc.c (gc_before_sweep): restore objspace->freelist
  into objspace->heap.using_slot->freelist.
  This means that using_slot has free objects which are
  pointed from objspace->freelist.
* gc.c (gc_slot_sweep): do not need to clear slot->freelist.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 07:02:44 +00:00
nobu 792b6fd8a2 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 01:12:41 +00:00
nobu 3b4134cadb * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 00:37:35 +00:00
zzak 65f69855c5 * sample/drb/README*.rdoc: [DOC] migrate DRb sample READMEs to rdoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 00:35:57 +00:00
zzak 982245a623 * lib/drb/invokemethod.rb: [DOC] nodoc InvokeMethod18Mixin
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 00:28:24 +00:00
drbrain bdbef403a1 * ext/openssl/ossl_asn1.c (asn1time_to_time): Implement YYMMDDhhmmZ
format for ASN.1 UTCTime.  [ruby-trunk - Bug #8664]
* test/openssl/test_asn1.rb:  Test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 23:44:53 +00:00
zzak d4314719d4 * lib/rexml/streamlistener.rb: [DOC] Fix examples in
REXML::StreamListener#entitydecl patch by Ippei Obayashi [Bug #8665]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 23:15:15 +00:00
drbrain 4c2304f000 * lib/rubygems: Import RubyGems from master as of commit b165260
* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 22:46:50 +00:00
akr 66cc0fa4ab * bignum.c (bary_mulsub_1xN): New function.
(bary_mul_toom3): Use bary_mulsub_1xN.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 22:16:45 +00:00
akr fdb991b9a0 * bignum.c (KARATSUBA_BALANCED): New macro.
(TOOM3_BALANCED): Ditto.
  (bary_mul_balance_with_mulfunc): Use KARATSUBA_BALANCED and
  TOOM3_BALANCED.
  (rb_big_mul_balance): Relax a condition.
  (rb_big_mul_karatsuba): Use KARATSUBA_BALANCED.
  (rb_big_mul_toom3): Use TOOM3_BALANCED.
  (bary_mul_karatsuba_branch): Use KARATSUBA_BALANCED.
  (bary_mul_toom3_branch): Use TOOM3_BALANCED.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 18:35:27 +00:00
svn 2c2cb6852b * 2013-07-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 16:36:40 +00:00
akr 685e4c67bf * bignum.c (bigdivrem_mulsub): Extracted from bigdivrem1.
(bigdivrem1): Use bary_add.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 16:36:36 +00:00
nagachika 1daf909bd7 * test/ruby/tes_io.rb (test_copy_stream_bigcontent_fpos): rename duplicated
test method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 14:53:20 +00:00
nobu 39b5931d74 readline.c: $SAFE 4
* ext/readline/readline.c (readline_s_delete_text): call rb_secure
  only if level 4 is allowed.  otherwise do nothing.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 14:24:41 +00:00
glass 0780974482 * string.c (rb_str_enumerate_chars): specify array capa
with str_strlen().

* string.c (rb_str_enumerate_codepoints): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 09:42:15 +00:00
glass fa20fb3728 * string.c (rb_str_enumerate_chars): specify array capa.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 09:03:44 +00:00
glass efacdb43dc * ChangeLog: fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 08:42:52 +00:00
glass f775a27bd3 * string.c (rb_str_each_char_size): performance implement by
using rb_str_length().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 08:37:46 +00:00
nobu 265de6677c fix commit miss
* ext/win32/lib/win32/importer.rb: miss to add at r41936.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 07:56:38 +00:00
nobu 03813f6dac vm_eval.c: Check_TypedStruct
* vm_eval.c (eval_string_with_cref): check by Check_TypedStruct
  instead of rb_obj_is_kind_of.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 07:32:52 +00:00
kazu 62b8b4df78 fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 04:29:32 +00:00
ko1 8160fab8bc * array.c (ary_resize_capa): use RARRAY_RAWPTR() because
this code creates no new references.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 04:21:01 +00:00
ko1 8eb0a3cd50 * array.c (ary_memfill): added.
* array.c (rb_ary_initialize): use ary_memfill().
* array.c (rb_ary_fill): ditto.
* array.c (rb_ary_slice_bang): use RARRAY_RAWPTR() because
  this code creates no new references.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 04:00:12 +00:00
ko1 4132ac3762 * gc.c (gc_slot_sweep): need to add empty RVALUE as freeobj.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 01:10:46 +00:00
nobu c7a56bd6d0 vm_eval.c: use file argument
* vm_eval.c (eval_string_with_cref): use the given file name unless
  eval even if scope is given.  additional fix for [Bug #8436].
  based on the patch by srawlins at [ruby-core:56099] [Bug #8662].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 00:48:38 +00:00
nobu 38eb518feb readline.c: $SAFE
* ext/readline/readline.c (readline_s_delete_text): $SAFE=4 is
  obsolete.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 00:48:35 +00:00
kouji 56af74277c * ext/readline/readline.c (Init_readline): added
Readline.delete_text. [ruby-dev:45789] [Feature #6626]
* ext/readline/extconf.rb: check for rl_delete_text() in Readline library.

  Thanks, Nobuyoshi Nakada, for the patch.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 00:37:10 +00:00
nobu ff7772062f date_parse.c: missing wday
* ext/date/date_parse.c (rfc2822_cb): check if wday is given, since it
  can be omitted.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-21 18:16:00 +00:00
nobu 7234f04b42 opttest.rb: adust styles
* sample/optparse/opttest.rb: adjust indent and block stypes.  use
  do/end wholly, put spaces around operators, and deep indent in
  parentheses.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-21 17:27:40 +00:00
svn a1e6d55462 * 2013-07-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-21 15:17:13 +00:00
akr d3845ef8db * bignum.c (bary_sq_fast): Refine expressions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-21 15:17:09 +00:00
akr 5cf931d65e * bignum.c (bary_mul): Use simple multiplication if yl is small.
(rb_cstr_to_inum): Invoke bigsq instead of bigmul0.
  (bigsq): Re-implemented.
  (bigmul0): Invoke bigsq if two arguments are identical.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-21 12:13:47 +00:00
akr a2116ef2cd * bignum.c (bary_mul_toom3): New function based on bigmul1_toom3.
(bary_mul_toom3_branch): Call bary_mul_toom3.
  (rb_big_mul_toom3): Ditto.
  (bigmul1_toom3): Removed.
  (big_real_len): Ditto.
  (big_split): Ditto.
  (big_split3): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-21 01:01:26 +00:00
ktsj 92084a8b23 * proc.c (proc_to_s): use PRIsVALUE to preserve the result encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-20 23:14:48 +00:00
naruse f262909cba * hash.c (rb_hash_flatten): use NUM2INT to raise TypeError on 32bit
platform. it's introduced by r42039

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-20 20:44:49 +00:00
svn 32ee210345 * 2013-07-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-20 16:08:54 +00:00
eregon f293fa8d63 * common.mk (help): Fix environment variable name and argument.
Actually it can also be a directory or any argument for
  test/unit runner. [Fixes GH-363]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-20 16:08:49 +00:00
zzak d0fd9aa246 * common.mk: Document running a single test [Fixes GH-363]
Patch by Avdi Grimm https://github.com/ruby/ruby/pull/363


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-20 13:46:34 +00:00
zzak b4489ae953 * sample/*: whitespace patch by Sergio Campama [Fixes GH-364]
https://github.com/ruby/ruby/pull/364


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-20 13:41:02 +00:00