summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2011-09-07* lib/yaml.rb: explicitly specify ::Object to avoid the collision withnaruse
Syck::Object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-06* lib/test/unit.rb (_run_suites): Now reports are written thesorah
following order: Skip, Failure, Error. [Feature #5282] * test_sorting.rb: test for above. * test4test_sorting.rb: Ditto. * lib/test/unit.rb (run): Put RUBY_DESCIPTION before quitting. [Feature #5282] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-06Use assert_operator to show clear message.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-06* encoding.c (load_encoding): predefined encoding names are safe.nobu
[ruby-dev:44469] [Bug #5279] * transcode.c (load_transcoder_entry): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-06* transcode.c: enabled econv newline option.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-05 * test/rinda/test_rinda.rb (test_core_03_notify): Fixed test failuresseki
[ruby-dev:44430] [Ruby 1.9 - Bug #372] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-05* test/ruby/test_float.rb (TestFloat#test_round): show the number in question.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-05* test/rubygems/test_gem_security.rbnaruse
(test_class_build_self_signed_cert): reset opt[:trust_dir] to apply temporary Gem.user_home. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-04* lib/net/imap.rb (default_port, default_imap_port,shugo
default_tls_port, default_ssl_port, default_imaps_port): added methods for consistency with Net::POP. based on the patch by art lussos. [ruby-core:38997] [Bug #5198] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-03* test/ruby/test_fiber.rb (TestFiber#test_no_valid_cfp):ktsj
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
2011-09-03* variable.c (rb_const_set): show the previous definitionnobu
location. [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-03* io.c (argf_next_argv): open in default text mode.nobu
[ruby-core:39234] [Bug #5268] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-03* lib/thread.rb (SizedQueue#max=) raise ArgumentError if max is notnagachika
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
2011-09-03* test/ruby/test_encoding.rb (test_find): mingw is not Unix, of course.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-02* vm_insnhelper.c (vm_search_const_defined_class): searchnobu
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
2011-09-02* parse.y (parser_tokadd_string, parser_yylex): ignore a backslashnobu
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
2011-09-01* ext/psych/lib/psych/visitors/yaml_tree.rb: emit strings tagged astenderlove
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-01* numeric.c (flo_round): substitute machine dependent magic number.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-01* insns.def (defineclass), vm_insnhelper.c (vm_get_cvar_base): seenobu
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
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-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* 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* 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-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* 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* 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* 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-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 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-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-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* 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* variable.c: Make autoload thread-safe. See #921.nahi
What's the problem? autoload is thread unsafe. When we define a constant to be autoloaded, we expect the constant construction is invariant. But current autoload implementation allows other threads to access the constant while the first thread is loading a file. What's happening inside? The current implementation uses Qundef as a marker of autoload in Constant table. Once the first thread find Qundef as a value at constant lookup, it starts loading a defined feature. Generally a loaded file overrides the Qundef in Constant table by module/class declaration at very beginning lines of the file, so other threads can see the new Module/Class object before feature loading is finished. It breaks invariant construction. How to solve? To ensure invariant constant construction, we need to override Qundef with defined Object after the feature loading. For keeping Qundef in Constant table, I expanded autoload_data struct in Module to have a slot for keeping the defined object while feature loading. And changed Module's constant lookup/update logic a little so that the slot is only visible from the thread which invokes feature loading. (== the first thread which accessed the autoload constant) Evaluation? All test passes (bootstrap test, test-all and RubySpec) and added 8 tests for threading behavior. Extra logics are executed only when Qundef is found, so no perf drop should happen except autoloading. * variable.c (rb_autoload): Prepare new autoload_data struct. * variable.c (rb_autoload_load): Load feature and update Constant table after feature loading is finished. * variable.c (rb_const_get_0): When the fetched constant is under autoloading, it returns the object only for the thread which starts autoloading. * variable.c (rb_const_defined_0): Ditto. * variable.c (rb_const_set): When the specified constant is under autoloading, it sets the object only for the thread which starts autoloading. Otherwise, simply overrides Qundef with constant override warning. * vm_insnhelper.c (vm_get_ev_const): Apply same change as rb_const_get_0 in variable.c. * test/ruby/test_autoload.rb: Added tests for threading behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-26* lib/rubygems: Update to RubyGems 1.8.10. Fixes security issue indrbrain
creating ruby-format gemspecs. Fixes Gem.dir not being at the front of Gem.path to fix uninstall and cleanup commands. Fixes gem uninstall stopping on the first missing gem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-25* time.c (strftimev): Make Time#to_s default to US-ASCII encoding buttenderlove
respect Encoding.default_internal. [ruby-core:39092] * test/ruby/test_time.rb (class TestTime): Corresponding test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-24* ext/psych/lib/psych/nodes/node.rb: default `to_yaml` encoding to betenderlove
UTF-8. * test/psych/test_encoding.rb: test yaml dump encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-24* test/fileutils/test_fileutils.rb (test_chmod_symbol_mode): Solarisngoto
seems to behave the same as FreeBSD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-24* test/ruby/test_rubyoptions.rb (test_script_from_stdin): slave ptyngoto
should be manipulated because master pty may not be a tty on some environment (e.g. Solaris). [Bug:#5222] [ruby-dev:44420] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-24* insns.def (defined): fix to checking class variable.ko1
A patch by Magnus Holm <judofyr@gmail.com>. Thanks! * test/ruby/test_variable.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-23* lib/rdoc: Update to RDoc 3.9.3. Fixes RDoc with `ruby -Ku`. Allowsdrbrain
HTTPS image paths to be turned into <img> tags. Prevents special markup inside <tt> from being processed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-23* lib/rubygems: Update to RubyGems 1.8.9. Fixes uninstalling multipledrbrain
gems and gem cleanup. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-23fixed tests broken by new minitest mixinryan
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-23Imported minitest 2.5.0 (r6557)ryan
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-23* thread.c (update_coverage): skip coverage count up if the currentmame
line is out of the way. rb_sourceline() is unreliable when source code is big. [ruby-dev:44413] * test/coverage/test_coverage.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-23* ext/zlib/zlib.c (gzfile_read_header): Ensure that each section ofnahi
gzip header is readable to avoid SEGV. * test/zlib/test_zlib.rb (test_corrupted_header): Test it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e