* 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
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
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
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
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
(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
* 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
* 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
* 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
* 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
* 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
(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
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