add a test. Unlike TestThread#test_no_valid_cfp,
this test succeeds even if win32ole is required (see r33153).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ancestors only when global scope. [ruby-core:39227] [Bug #5264]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
which prefixes an non-ascii character, which has no escape
syntax. [ruby-core:39222] [Ruby 1.9 - Bug #5262]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
also inherited constants for classes without superclass and
modules. [ruby-core:37698] [Bug #3423]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
t = Thread.new { print "."; sleep 0.1 }
key = OpenSSL::PKey::RSA.new(2048)
#=> Thread t works in parallel with public key generation if
OS/machine allows it.
This works with OpenSSL >= 0.9.8. From this version, it has new
public key generation function which allows us to interrupt the
execution while pkey generation iterations.
* ext/openssl/extconf.rb: Check existence of OpenSSL's new public key
generation function. (DH_generate_parameters_ex,
DSA_generate_parameters_ex and RSA_generate_key_ex.
* ext/openssl/ossl_pkey.{h,c} (ossl_generate_cb_2,
ossl_generate_cb_stop): Added new callback function for OpenSSL pkey
generation which handles Thread interruption by Ruby.
ossl_generate_cb_stop is the unblock function(ubf) for Ruby which
sets a stop flag. New pkey generation callback ossl_generate_cb_2
checks the stop flag at each iterations of OpenSSL and interrupts
pkey generation when the flag is set.
* ext/openssl/ossl_pkey_dsa.c (dsa_generate): Call
rb_thread_blocking_region with the above unblock function to release
GVL while pkey generation.
* ext/openssl/ossl_pkey_rsa.c (rsa_generate): ditto.
* ext/openssl/ossl_pkey_dh.c (dh_generate): ditto.
* test/openssl/test_pkey_{dh,dsa,rsa}.rb: Test it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
win32ole is required. in such case, win32ole redefines
Thread#initialize, and the block argument becomes to be not the top
of the thread, then this testcase always fails.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
default_mode_on_unix,text_mode,binary_mode}): sorry for wrong test
committed in r33144. I'd misunderstood the spec of ruby's universal
newline.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_str_new2()) before finishing autoload_data_i construction. It
caused SEGV at rb_gc_mark() at autoload_i_mark.
* variable.c (rb_autoload_load): Move RB_GC_GUARD() to proper
position based on suggestion by CHIKANAGA Tomoyuki at
http://d.hatena.ne.jp/nagachika/20110826/ruby_trunk_changes_33070_33078
* variable.c (autoload_defined_p): Fix incompatible autoload behavior
that causes Rails crash. Class deifnition instruction defined in
'defineclass' in insns.def always invokes rb_autoload_load for a
constant. It's invoked for every class definition regardless of
existence of autoload definition. rb_autoload_load checkes if a
constant is defined as autoloaded, but new thread-safe autoload
returned different value if the constant is under autoloading.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(TestOldThreadSelect#test_old_select_read_timeout): if the machine
is fast enough, the time used by code around IO.select may be smaller
than Time implement threshold.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
typo.
* test/-ext-/old_thread_select/test_old_thread_select.rb
(TestOldThreadSelect#test_old_select_signal_safe): use SIGINT instead
of SIGUSR1 because the former is general and the latter is platform
dependent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
for rb_thread_select() in thread.c. the use of rb_fd_copy() is
introduced in r33117.
[Bug #5229] [ruby-core:39102]
* thread.c (rb_thread_select): must call rb_fd_init() before using
rb_fdset_t. see the implementations of rb_fd_init()s if you want to
know the reason.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
protect a VALUE from GC. It's not for general anti-optimizing
purpose.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_thread_fd_select(). old one is EINTR unsafe.
Patch by Eric Wong. [Bug #5229] [ruby-core:39102]
* test/-ext-/old_thread_select/test_old_thread_select.rb:
a testcase for rb_thread_select().
* ext/-test-/old_thread_select/old_thread_select.c: ditto.
* ext/-test-/old_thread_select/depend: ditto.
* ext/-test-/old_thread_select/extconf.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e