summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2015-03-26* test/test_observer.rb: add tests for Observable module.hsbt
[fix GH-859] Patch by @brightbits git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-23dir.c: don't raise after closenobu
* dir.c (dir_close): don't raise on dobule close for consistent to IO#close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-23json_index.rb: check zlibnobu
* lib/rdoc/generator/json_index.rb (generate_gzipped): do nothing unless zlib is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-22marshal.c: register symbol strings firstnobu
* marshal.c (r_symreal): register symbol names as strings first so that r_symlink always returns valid names. [ruby-core:68587] [Bug #10991] * marshal.c (r_ivar, r_object0): now need to intern symbol names. * marshal.c (r_object0): compare with symbol names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-20proc.c: respond_to_missing? at Methodnobu
* proc.c (respond_to_missing_p): check if the receiver responds to the given method by respond_to_missing?. * proc.c (mnew_missing): create Method object for method_missing. [ruby-core:68564] [Bug #10985] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-20test_inadvertent_creation.rb: fix messagesnobu
* test/-ext-/symbol/test_inadvertent_creation.rb (TestInadvertent): fix failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-20test_inadvertent_creation.rb: undefined singletonnobu
* test/-ext-/symbol/test_inadvertent_creation.rb (test_undefined_method): test Kernel#singleton_method too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-18* test/objspace/test_objspace.rb: flag name was changedko1
(long_lived -> uncollectible). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-18* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-18hash.c: same hash values with Float#hashnobu
* hash.c (rb_any_hash): use same hash values with Float#hash so that -0.0 and +0.0 will be identical. [ruby-core:68541] [Bug #10979] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-16* lib/webrick/server.rb: Fix regression bug in WEBrick'shsbt
:DoNotReverseLookup config option implementation. [fix GH-731] Patch by @vais * test/webrick/test_do_not_reverse_lookup.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-16* math.c (math_log1, math_log2, math_log10): refactoringgogotanaka
and tests for this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-15* test/ruby/test_lambda.rb: Fix typo yeild -> yieldgogotanaka
[fix GH-851][ci skip] Patch by @hanachin git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-15* test/ruby/test_proc.rb: Fix typo signle -> singlegogotanaka
[fix GH-852][ci skip] Patch by @hanachin git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-14* math.c (math_gamma): optimization for passed small integer.gogotanaka
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-13parse.y: empty parennobu
* parse.y (primary): empty parentheses at cmdarg can be null. [ruby-core:68477] [Bug #10957] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-13stringio.c: don't raise after closenobu
* ext/stringio/stringio.c (strio_close): don't raise on dobule close for consistent to IO#close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-13io.c: don't raise after closenobu
* io.c (rb_io_close_read, rb_io_close_write): don't raise after close same as IO#close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-13test_objspace.rb: better assertionsnobu
* test/objspace/test_objspace.rb: use assertions for better failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-13* test/readline/test_readline.rb: Restore environment variables:akr
COLUMNS LINES git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-12fix env leaksnobu
* lib/rubygems/test_case.rb (setup, teardown): fix environment variable change leaks. * test/cgi/update_env.rb: ditto. * test/rake/test_rake_application_options.rb (setup, teardown): ditto. * test/rake/test_rake_file_utils.rb (setup, teardown): ditto. * test/rubygems/test_gem_request.rb (setup): add https_proxy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-12* test/lib/leakchecker.rb: Check environment variables.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-12accept_nonblock supports "exception: false"normal
This is analogous to functionality found in IO#read_nonblock and IO#wait_nonblock. Raising exceptions for common failures on non-blocking servers is expensive and makes $DEBUG too noisy. Benchmark results: user system total real default 2.790000 0.870000 3.660000 ( 3.671597) exception: false 1.120000 0.800000 1.920000 ( 1.922032) exception: false (cached arg) 0.820000 0.770000 1.590000 ( 1.589267) --------------------- benchmark script ------------------------ require 'socket' require 'benchmark' require 'tmpdir' nr = 1000000 Dir.mktmpdir('nb_bench') do |path| sock_path = "#{path}/test.sock" s = UNIXServer.new(sock_path) Benchmark.bmbm do |x| x.report("default") do nr.times do begin s.accept_nonblock rescue IO::WaitReadable end end end x.report("exception: false") do nr.times do begin s.accept_nonblock(exception: false) rescue IO::WaitReadable abort "should not raise" end end end x.report("exception: false (cached arg)") do arg = { exception: false } nr.times do begin s.accept_nonblock(arg) rescue IO::WaitReadable abort "should not raise" end end end end end * ext/socket/init.c (rsock_s_accept_nonblock): support exception: false [ruby-core:66385] [Feature #10532] * ext/socket/init.c (rsock_init_socket_init): define new symbols * ext/socket/rubysocket.h: adjust prototype * ext/socket/socket.c (sock_accept_nonblock): support exception: false * ext/openssl/ossl_ssl.c (ossl_ssl_accept_nonblock): ditto * ext/socket/socket.c (Init_socket): adjust accept_nonblock definition * ext/openssl/ossl_ssl.c (Init_ossl_ssl): ditto * ext/socket/tcpserver.c (rsock_init_tcpserver): ditto * ext/socket/unixserver.c (rsock_init_unixserver): ditto * ext/socket/tcpserver.c (tcp_accept_nonblock): adjust rsock_s_accept_nonblock call * ext/socket/unixserver.c (unix_accept_nonblock): ditto * ext/openssl/ossl_ssl.c (ossl_start_ssl): support no_exception * ext/openssl/ossl_ssl.c (ossl_ssl_connect): adjust ossl_start_ssl call * ext/openssl/ossl_ssl.c (ossl_ssl_connect_nonblock): ditto * ext/openssl/ossl_ssl.c (ossl_ssl_accept): ditto * test/socket/test_nonblock.rb (test_accept_nonblock): test for "exception :false" * test/socket/test_tcp.rb (test_accept_nonblock): new test * test/socket/test_unix.rb (test_accept_nonblock): ditto * test/openssl/test_pair.rb (test_accept_nonblock_no_exception): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10* test/rubygems/test_gem_security_trust_dir.rb: The return value ofodaira
File::Stat#mode is OS dependent. In AIX, 0200000 is set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10* lib/webrick/server.rb: Invoke setup_shutdown_pipe in start methodakr
instead of listen method. [ruby-core:68476] [Bug #10956] Reported by Shintaro Kojima. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10test_math.rb: to_f testsnobu
* test/ruby/test_math.rb (test_{fixnum,bignum,rational}_to_f): refine to_f tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-09stringio.c: don't raise after closenobu
* ext/stringio/stringio.c (strio_close): don't raise on dobule close for consistent to IO#close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-09suppress warningsnobu
* test/ruby/beginmainend.rb: suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-09test_beginendblock.rb: assert_in_out_errnobu
* test/ruby/test_beginendblock.rb (TestBeginEndBlock): simplify with assert_in_out_err. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08* ext/zlib/zlib.c (rb_gzfile_close): Don't raise on doubleakr
close for consistent to IO#close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08dir.c: glob short namesnobu
* dir.c (glob_helper): match patterns against legacy short names too, not only ordinary names. [ruby-core:67954] [Bug #10819] * win32/dir.h (struct direct): add short name members. * win32/win32.c (opendir_internal, readdir_internal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08test_extlibs.rb: skip excluded librariesnobu
* test/ruby/test_extlibs.rb (TestExtLibs.check_existence): ignore tests for explicitly excluded libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-06* fix namespace issue on singleton class expressions. [Bug #10943]ko1
* vm_core.h, method.h: remove rb_iseq_t::cref_stack. CREF is stored to rb_method_definition_t::body.iseq_body.cref. * vm_insnhelper.c: modify SVAR usage. When calling ISEQ type method, push CREF information onto method frame, SVAR located place. Before this fix, SVAR is simply nil. After this patch, CREF (or NULL == Qfalse for not iseq methods) is stored at the method invocation. When SVAR is requierd, then put NODE_IF onto SVAR location, and NDOE_IF::nd_reserved points CREF itself. * vm.c (vm_cref_new, vm_cref_dump, vm_cref_new_toplevel): added. * vm_insnhelper.c (vm_push_frame): accept CREF. * method.h, vm_method.c (rb_add_method_iseq): added. This function accepts iseq and CREF. * class.c (clone_method): use rb_add_method_iseq(). * gc.c (mark_method_entry): mark method_entry::body.iseq_body.cref. * iseq.c: remove CREF related codes. * insns.def (getinlinecache/setinlinecache): CREF should be cache key because a different CREF has a different namespace. * node.c (rb_gc_mark_node): mark NODE_IF::nd_reserved for SVAR. * proc.c: catch up changes. * struct.c: ditto. * insns.def: ditto. * vm_args.c (raise_argument_error): ditto. * vm_eval.c: ditto. * test/ruby/test_class.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-06* test/webrick/test_filehandler.rb: on vboxsf (on VirtualBoxko1
on Windows 7), file name and permissions are strange (can access by short file name and so on). Simply skip on such tests on such FS. To detect strange FS, this patch use a part of code `File.executable?(__FILE__)`. Please correct them if there are better ways. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-06* test/ruby/test_beginendblock.rb: do not change directory.ko1
Run system command in the directory mounted by vboxfs on Windows 7 and get warning like that "warning: Insecure world writable dir...". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-06vm_eval.c: next super class from the originalnobu
* vm_eval.c (vm_call_super): search next super class from the original class, to get rid of infinite recursion with prepending. a patch by Seiei Higa <hanachin AT gmail.com> at [ruby-core:68434]. [ruby-core:68093] [Bug #10847] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-05* lib/matrix.rb: Add Vector#round. Patch by Jordan Stephens.marcandre
[Fixes GH-802] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-05* test/ruby/test_rubyoptions.rb ↵usa
(TestRubyOptions#test_command_line_glob_with_dir): test for r49859. see [ruby-core:68430] [Bug #10941] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-05* vm_eval.c (eval_string_with_cref): A binding should keepshugo
refinements activation information and the refinements should be activated in subsequent eval calls with the binding. [ruby-core:67945] [Bug #10818] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-05* test/ruby/test_refinement.rb: There is no need anymore to supressshugo
warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-04* test/ruby/test_math.rb (assert_float_and_int): Refactor test casesgogotanaka
by introducing assert_float_and_int. [misc #10810] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-04envutil.rb: no need to sleepnobu
* test/lib/envutil.rb (assert_in_out_err): remove sleep to catch the just time, and it is unnecessary as diagnostic_reports waits for 3 seconds. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-04envutil.rb: diagnostic_reports for SIGTRAPnobu
* test/lib/envutil.rb (EnvUtil.diagnostic_reports): SIGTRAP also generate diagnostic report file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-03mkmf/base.rb: clean up tmpdirnobu
* test/mkmf/base.rb (TestMkmf#assert_separately): call teardown to clean up temporary directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-03* test/lib/envutil.rb (EnvUtil.invoke_ruby): need to rescue becauseusa
Signal.signame may raise exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-03test_rubyoptions.rb: use assert_in_out_errnobu
* test/ruby/test_rubyoptions.rb (assert_segv): assert_in_out_err with the pattern list instead of invoke_ruby. * test/-ext-/bug_reporter/test_bug_reporter.rb (test_bug_reporter_add): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-03envutil.rb: improve by assert_pattern_listnobu
* test/lib/envutil.rb (assert_in_out_err): improve to match by assert_pattern_list if expected result is other than Regexp or String list. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-03test_process.rb: use assert_in_out_errnobu
* test/ruby/test_process.rb (test_status_quit): use assert_in_out_err to simplify and clean diagnostic reports. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-03* test/ruby/test_math.rb: add tests for the above change.gogotanaka
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-03test_rubyoptions.rb: use assert_segvnobu
* test/ruby/test_rubyoptions.rb (test_segv_loaded_features): use assert_segv to simplify. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e