summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-09-01* Release GVL while OpenSSL's public key generation.nahi
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
2011-09-01* test/ruby/test_thread.rb (TestThread#test_no_valid_cfp): skip whenusa
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
2011-09-01* test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,usa
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
2011-09-01* variable.c (rb_autoloading_value) Fix the order of definitions.naruse
It is used by autoload_defined_p. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-01* 2011-09-01svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-01Remove tests of json/add/{complex, rational}.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-31* variable.c (rb_autoload): There was a chance to run GC (fromnahi
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
2011-08-31* Re-apply r33078, thread-safe autoload which is reverted at r33093.nahi
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-31* ChangeLog: wrong ticket number and ML number.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-31* test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,usa
default_mode_on_unix,text_mode,binary_mode}): tests for [Bug # 5164]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-31* ext/json: Merge json gem v1.5.4 (3dab4c5a6a97fac03dac).naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-31* numeric.c (flo_round): Avoid overflow by optimizing for trivial casesmarcandre
[Bug #5227] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30* win32/win32.c (rb_w32_select_with_thread): and my typo. we all mustusa
be more careful. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30* thread.c (rb_thread_select): critical typo in r33117.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30* test/-ext-/old_thread_select/test_old_thread_select.rbusa
(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
2011-08-30* ext/-test-/old_thread_select/old_thread_select.c (old_thread_select):usa
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
2011-08-30* 2011-08-31svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30* win32/win32.c, include/ruby/intern.h (rb_w32_fd_copy): implementusa
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
2011-08-30* test/dl/test_callback.rb (test_callback_with_string): preventsnagachika
temporary string from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30* vm_insnhelper.c (vm_call_cfunc): revert r33112. RB_GC_GUARD macrousa
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
2011-08-30Don't include complex and rational; fix r33122.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30* ext/json: Merge json gem 1.5.4+ (2149f4185c598fb97db1).naruse
[Bug #5173] [ruby-core:38866] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30* lib/thread.rb (Queue#pop): fix a race against Thread.wakeup.kosaki
Patch by Masaki Matsushita <glass.saga at gmail dot com> [Bug #5195] [ruby-dev:44400] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30* cont.c (fiber_entry): fix stack allocation failure on Debiankosaki
GNU/kFreeBSD. Patch by Lucas Nussbaum <lucas at lucas-nussbaum dot net>. [Bug #5241] [ruby-core:39147] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30* thread.c (rb_thread_select): rewrite by usingkosaki
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
2011-08-30* 2011-08-30svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30* configure.in: fix a build failure on GNU Hurd.kosaki
Patch by Samuel Thibault <sthibault at debian dot org>. Thank you! [Bug #5250] [ruby-core:39185] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-29* test/ruby/test_numeric.rb (test_num2long): modify a test agaist themrkn
change by r33108. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-29Use RB_GC_GUARD.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-29Use psych_yaml_as to avoid collision with Syck.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-29Use PRIdSIZE.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-29* 2011-08-29svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-29* numeric.c (bit_coerce): A Fixnum and a Bignum are only permitted formrkn
bitwise arithmetic with a Fixnum. #1792 * test/ruby/test_fixnum.rb: add tests for the above change. * bignum.c (bit_coerce): A Fixnum and a Bignum are only permitted for bitwise arithmetic with a Bignum. #1792 * test/ruby/test_bignum.rb: add tests for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-28* ext/date/date_parse.c (date_zone_to_diff): keep a temporary stringnagachika
stored in variable while the contents buffer is beeing used. * ext/date/date_parse.c (date_zone_to_diff): get rid of out of bounds memory read. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-27* 2011-08-28svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-27Imported minitest 2.5.1 (r6596)ryan
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-27* vm.c (rb_vm_rewrite_dfp_in_errinfo): change return typektsj
to suppress a warning. * vm_core.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-27* internal.h (rb_strftime_timespec): moved from time.c and define onlynaruse
if ruby/encoding.h is included. * internal.h (rb_strftime): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-27* proc.c (proc_new): force to rewrite errinfo when calling Proc.new in ensure.ktsj
[Bug #5234] [ruby-core:39125] This code will be removed after changing throw mechanism (see r33064). * vm.c (rb_vm_rewrite_dfp_in_errinfo): new function. * vm.c (vm_make_env_each): changed accordingly. * vm_core.h: ditto. * bootstraptest/test_flow.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-27* internal.h (rb_strftime_timespec): move to time.c because it dependsnaruse
encoding.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-27* strftime.c (rb_strftime_with_timespec): get enc argument to specifynaruse
the encoding of the format. On Windows (at least Japanese Windows), Time#strftime("%Z") includes non ASCII in locale encoding (CP932). So convert locale to default internal. [ruby-core:39092] [Bug #5226] * strftime.c (rb_strftime): ditto. * strftime.c (rb_strftime_timespec): ditto. * internal.h (rb_strftime_timespec): follow above. * time.c (rb_strftime_alloc): ditto. * time.c (strftimev): ditto. * time.c (time_strftime): ditto. * time.c (time_to_s): the resulted string of Time#to_s is always ascii only, so this should be US-ASCII. * time.c (time_asctime): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-27* Revert r33078. It caused a Rails application NoMethodError.nahi
/home/nahi/git/emptyApp/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/utils.rb:157: warning: toplevel constant ScanError referenced by Regin::Parser::ScanError /home/nahi/git/emptyApp/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/vendor/regin/regin/parser.rb:17:in `parse_regexp': undefined method `scan_str' for #<Regin::Parser:0x00000002344548> (NoMethodError) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-26* lib/rdoc: Import RDoc 3.9.4. Typo and grammar fixes by Luke Gruber.drbrain
[Ruby 1.9 - Bug #5203] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-26* lib/open-uri.rb: Fix indentation of OpenURI::OpenRead#open. Use ++drbrain
instead of `' for method arguments in open-uri.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-26* ext/pathname/lib/pathname.rb: Fix typos and grammar mistakes. Patchdrbrain
by Luke Gruber. [#5203] * ext/pty/lib/expect.rb: ditto * lib/mathn.rb: ditto * lib/net/http.rb: ditto * lib/open-uri.rb: ditto * lib/ostruct.rb: ditto * lib/tempfile.rb: ditto * lib/thread.rb: ditto * lib/weakref.rb: ditto * sample/webrick/httpproxy.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-26ugh. sorryryan
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-26Added gem activation for minitest/autoload to help users keep currentryan
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-26* iseq.c (iseq_data_to_ary): fix type of variableko1
(long -> unsigned long) to suppress a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-26* 2011-08-27svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-26* vm_core.h: add a decl. of rb_autoloading_value().ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e