aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * ext/io/console/console.c (console_set_winsize): removenobu2011-09-031-0/+2
| | | | | | unused variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (argf_next_argv): open in default text mode.nobu2011-09-033-5/+28
| | | | | | [ruby-core:39234] [Bug #5268] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/thread.rb (SizedQueue#max=) raise ArgumentError if max is notnagachika2011-09-033-0/+28
| | | | | | | | | | positive number. patch by Masaki Matsushita. [ruby-dev:44449] [Bug #5259] * test/thread/test_queue.rb (test_sized_queue_initialize, test_sized_queue_assign_max): add tests for it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_encoding.rb (test_find): mingw is not Unix, of course.nobu2011-09-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-09-03svn2011-09-021-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_fd_copy): cast explicitly to suppress warnings.nobu2011-09-021-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (validate_enc_binmode, prep_stdio): default to text mode onnobu2011-09-023-3/+12
| | | | | | | | | dosish platforms. [ruby-core:38822] [Bug #5164] * transcode.c (rb_econv_prepare_options): keep default ecflags unchanged if no options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typoskazu2011-09-021-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_search_const_defined_class): searchnobu2011-09-024-22/+38
| | | | | | | 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
* * parse.y (parser_tokadd_string, parser_yylex): ignore a backslashnobu2011-09-023-2/+34
| | | | | | | | 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
* * ext/psych/lib/psych/visitors/yaml_tree.rb: emit strings tagged astenderlove2011-09-013-1/+22
| | | | | | | ascii-8bit as binary in YAML. * test/psych/test_string.rb: corresponding test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-09-02svn2011-09-011-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (flo_round): substitute machine dependent magic number.nobu2011-09-013-5/+23
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def (defineclass), vm_insnhelper.c (vm_get_cvar_base): seenobu2011-09-015-5/+39
| | | | | | | | 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
* properties.nobu2011-09-010-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * Release GVL while OpenSSL's public key generation.nahi2011-09-0110-10/+284
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* * test/ruby/test_thread.rb (TestThread#test_no_valid_cfp): skip whenusa2011-09-012-0/+8
| | | | | | | | | 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
* * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,usa2011-09-012-6/+13
| | | | | | | | | 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
* * variable.c (rb_autoloading_value) Fix the order of definitions.naruse2011-09-012-12/+17
| | | | | | 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-01svn2011-09-011-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove tests of json/add/{complex, rational}.naruse2011-09-011-5/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * variable.c (rb_autoload): There was a chance to run GC (fromnahi2011-08-312-6/+24
| | | | | | | | | | | | | | | | | | | | 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
* * Re-apply r33078, thread-safe autoload which is reverted at r33093.nahi2011-08-314-32/+279
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: wrong ticket number and ML number.usa2011-08-311-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,usa2011-08-312-1/+33
| | | | | | | 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
* * ext/json: Merge json gem v1.5.4 (3dab4c5a6a97fac03dac).naruse2011-08-317-37/+54
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (flo_round): Avoid overflow by optimizing for trivial casesmarcandre2011-08-312-6/+33
| | | | | | [Bug #5227] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_select_with_thread): and my typo. we all mustusa2011-08-302-1/+6
| | | | | | | be more careful. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_thread_select): critical typo in r33117.usa2011-08-302-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/-ext-/old_thread_select/test_old_thread_select.rbusa2011-08-302-1/+8
| | | | | | | | | (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
* * ext/-test-/old_thread_select/old_thread_select.c (old_thread_select):usa2011-08-303-6/+16
| | | | | | | | | | | | 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-31svn2011-08-301-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c, include/ruby/intern.h (rb_w32_fd_copy): implementusa2011-08-304-1/+33
| | | | | | | | | | | | | 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
* * test/dl/test_callback.rb (test_callback_with_string): preventsnagachika2011-08-302-2/+10
| | | | | | temporary string from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_call_cfunc): revert r33112. RB_GC_GUARD macrousa2011-08-302-2/+7
| | | | | | | | 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
* Don't include complex and rational; fix r33122.naruse2011-08-301-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json: Merge json gem 1.5.4+ (2149f4185c598fb97db1).naruse2011-08-3013-275/+715
| | | | | | [Bug #5173] [ruby-core:38866] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/thread.rb (Queue#pop): fix a race against Thread.wakeup.kosaki2011-08-302-1/+9
| | | | | | | | | 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
* * cont.c (fiber_entry): fix stack allocation failure on Debiankosaki2011-08-302-1/+9
| | | | | | | | | 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
* * thread.c (rb_thread_select): rewrite by usingkosaki2011-08-306-19/+166
| | | | | | | | | | | | | | | 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-30svn2011-08-301-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: fix a build failure on GNU Hurd.kosaki2011-08-302-0/+11
| | | | | | | | | 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
* * test/ruby/test_numeric.rb (test_num2long): modify a test agaist themrkn2011-08-292-1/+6
| | | | | | change by r33108. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use RB_GC_GUARD.naruse2011-08-291-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use psych_yaml_as to avoid collision with Syck.naruse2011-08-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use PRIdSIZE.naruse2011-08-291-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-08-29svn2011-08-291-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (bit_coerce): A Fixnum and a Bignum are only permitted formrkn2011-08-295-7/+104
| | | | | | | | | | 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
* * ext/date/date_parse.c (date_zone_to_diff): keep a temporary stringnagachika2011-08-282-3/+14
| | | | | | | | | 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-28svn2011-08-271-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e