summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2015-12-08test_io_console.rb: separate master and slavenobu
* test/io/console/test_io_console.rb (test_getpass): separate master side and slave side in each threads. r52937 deadlocked on OS X. [Bug #11780] [ruby-dev:49412] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08* test/io/console/test_io_console.rb (test_getpass): s.getpassngoto
should be tested. Narrow ensure block. This reverts r52911. [Bug #11780] [ruby-dev:49412] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08compile optimized case dispatch for nil/true/falsenormal
nil/true/false are special literals just like floats, integers, literal strings, and symbols. Optimize when statements with them by using a jump table, too. target 0: a (ruby 2.3.0dev (2015-12-08 trunk 52928) [x86_64-linux]) at "/home/ew/rrrr/b/ruby" target 1: b (ruby 2.3.0dev (2015-12-08 master 52928) [x86_64-linux]) at "/home/ew/ruby/b/ruby" benchmark results: minimum results in each 5 measurements. Execution time (sec) name a b loop_whileloop2 0.102 0.103 vm2_case_lit* 1.657 0.549 Speedup ratio: compare with the result of `a' (greater is better) name b loop_whileloop2 0.988 vm2_case_lit* 3.017 * benchmark/bm_vm2_case_lit.rb: new benchmark * compile.c (case_when_optimizable_literal): add nil/true/false * insns.def (opt_case_dispatch): ditto * vm.c (vm_redefinition_check_flag): ditto * vm.c (vm_init_redefined_flag): ditto * vm_core.h: ditto * object.c (InitVM_Object): define === explicitly for nil/true/false * test/ruby/test_case.rb (test_deoptimize_nil): new test * test/ruby/test_optimization.rb (test_opt_case_dispatch): update (test_eqq): new test [ruby-core:71923] [Feature #11769] Original patch by Aaron Patterson <tenderlove@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07insns.def (opt_case_dispatch): check Float#=== redefinitionnormal
The missing check for Float#=== redefinition was noticed while working on enhancing optimized case dispatch for nil/true/false in [ruby-core:71818] https://bugs.ruby-lang.org/issues/11769 So no, I don't normally redefine core classes like this :P * insns.def (opt_case_dispatch): check Float#=== redefinition * test/ruby/test_optimization.rb (test_opt_case_dispatch): new [ruby-core:71920] [Bug #11784] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07* test/lib/iseq_loader_checker.rb: add iseq dumper/loader checker.ko1
If you enable this checker (remove `#' in test/runner.rb), you can see comparison results between an original iseq disassembed result and dumped and loaded iseq disassembed result. There are several bugs around there, because of inexact stack depth calculation. Now, I leave these bugs because they are not critical and difficult to solve completely. * test/runner.rb: require test/lib/iseq_loader_checker.rb but disabled at default (commented out). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07socket: expand docs+tests for recv_io/send_ionormal
* ext/socket/unixsocket.c (unix_send_io): document args (unix_recv_io): ditto * test/socket/test_unix.rb (test_fd_passing_class_mode): added I was working on these when I encountered the problem in with BasicSocket.for_fd not handling mode args: https://bugs.ruby-lang.org/issues/11778 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07* ext/psych/*: update psych to 2.0.16tenderlove
* test/psych/*: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07* string.c: introduce String#+@ and String#-@ to controlko1
String mutability. [Feature #11782] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07parse.y: indented hereocnobu
* parse.y: add heredoc <<~ syntax. [Feature #9098] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07temporally remove prompt to pass the testnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-06test_io_console.rb: waitnobu
* test/io/console/test_io_console.rb (test_getpass): wait slave thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-06* test/webrick/test_cgi.rb (TestWEBrickCGI#test_cgi): gave up the testusa
of binary path info test on Windows because the test had passed occasionally as the comment said. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-06* test/fileutils/test_fileutils.rb: add debug output to investigate the ↵usa
error that occur at random on Windows CI. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-06console.c: console_getpassnobu
* ext/io/console/console.c (console_getpass): add IO#getpass method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-06test_env.rb: escapenobu
* test/ruby/test_env.rb (TestEnv#test_utf8): escape non-ASCII string with \u explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-05assertions.rb: fallback encoding errornobu
* test/lib/test/unit/assertions.rb (message): fallback when outputs from different encoding commands mixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-05hash.c: env encoding fallback on Windowsnobu
* hash.c (env_str_new, env_path_str_new): make default string UTF-8 for the case conversion is not possible. [Bug #8822] * hash.c (get_env_cstr): convert non-ASCII string to UTF-8 string. * hash.c (ruby_setenv): use wide char version to put environment variable to deal with non-ASCII value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-04string.c: should not taint fstringnobu
* string.c (rb_obj_as_string): fstring should not be infected. re-apply r52872 and fix a typo. TODO: other frozen strings also may not be. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-04* lib/rubygems: Update to RubyGems 2.5.0+ HEAD(fdab4c4).hsbt
this version includes #1396, #1397, #1398, #1399 * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-04Revert r52872 "string.c: should not taint fstring"naruse
This reverts commit b887c7c20ab81b50ed7cb8c7db3218c443985d6b. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-04thread.c: name must be ascii-compatiblenobu
* thread.c (rb_thread_setname): name must be ascii-compatible, as pthread APIs do not accept legacy wide char strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-03string.c: should not taint fstringnobu
* string.c (rb_obj_as_string): fstring should not be infected. TODO: other frozen strings also may not be. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-03* test/ruby/test_mixed_unicode_escapes.rb: fixed typo.hsbt
[fix GH-1122] Patch by @davydovanton * test/ruby/test_object.rb: ditto. * test/socket/test_tcp.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-03sprintf.c: fix garbage inserted with Rationalnobu
* sprintf.c (rb_str_format): fix wrong shifting position in Rational conversion when not at the beginning of the result. [ruby-core:71806] [Bug #11766] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-03range.c: infected by the receivernobu
* range.c (range_to_s): should be infected by the receiver. str2 infects by appending. [ruby-core:71811] [Bug #11767] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-02* vm_core.h, iseq.h: remove rb_iseq_t::variable_body.ko1
Fields in rb_iseq_t::variable_body are contained by rb_iseq_t::body::mark_ary (hidden Array object). Index 0 to 2 of mark_ary are reserved by these objects. * iseq.c: catch up this fix. * compile.c (rb_iseq_original_iseq): trivial rewrite. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-02encoding.c: defer finding encodingnobu
* encoding.c (enc_m_loader): defer finding encoding object not to be infected by marshal source. [ruby-core:71793] [Bug #11760] * marshal.c (r_object0): enable compatible loader on USERDEF class. the loader function is called with the class itself, instead of an allocated object, and the loaded data. * marshal.c (compat_allocator_table): intialize compat_allocator_tbl on demand. * object.c (rb_undefined_alloc): extract from rb_obj_alloc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-02* test/ruby/test_string.rb: removed non executing tests.hsbt
[Misc #11757][ruby-dev:49397] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-01thread.c: reset namenobu
* thread.c (rb_thread_setname): allow to reset thread name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-01thread.c: check name argumentnobu
* thread.c (rb_thread_setname): check the argument if valid string. [ruby-core:71774] [Bug #11756] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-01string.c: no frozen error at cstrnobu
* string.c (rb_string_value_cstr): should not raise on frozen string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-01cstr.c: split bug_str_cstr_untermnobu
* ext/-test-/string/cstr.c (bug_str_cstr_unterm): split unterminating from bug_str_cstr_term. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30* test/ruby/test_rand.rb (TestRand#test_default_seed): addkosaki
srand case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30* random.c (Init_RandomSeed): move all Random::DEFAULTkosaki
construction bits to Init_RandomSeed2. Random::DEFAULT and Ruby internal hashes are no longer shared their seed. * random.c (Init_RandomSeed2): ditto. And, kill evil rb_obj_reveal() stuff. * random.c (init_hashseed): add MT argument. * random.c: (init_siphash): ditto. * test/ruby/test_rand.rb (TestRand#test_default_seed): new test for Random::DEFAULT::seed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-29SIGTERM should be also capturednaruse
because it will terminate the whole test process when it is re-raised from this assertion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-28parse.y: last content of heredocnobu
* parse.y (parser_here_document): store dispatched result of on_tstring_content at the last fragment of a here document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-27test_parser_events.rb: suppress a warningnobu
* test/ripper/test_parser_events.rb (test_warn_cr_in_middle): remove unused variable to suppress assigned-but-unused-variable warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-27* lib/net/http.rb (connect): detect closed connection and reconnectnaruse
If the server closes a keep-alive http connection, the client socket reaches EOF. To avoid an EOFError, detect the closed connection and reconnect. Added test to ensure HTTP#post succeeds even if the keep-alive-connection has been closed by the server. by Kristian Hanekamp <kris.hanekamp@gmail.com> https://github.com/ruby/ruby/pull/1089 fix GH-1089 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-26increase additional nfilesnaruse
On recent my environment, it must be more than 11. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-26* test/coverage/test_coverage.rb: Added test-case for Coverage.restart.hsbt
[Misc #11732][ruby-dev:49379] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-26* test/coverage/test_coverage.rb: Added test-case for Coverage.peek_resulthsbt
without Coverage.start. [Misc #11726][ruby-core:71622] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-25test/openssl/test_ssl.rb (test_copy_stream): new testnormal
I was worried r52750 would break IO.copy_stream with things like OpenSSL sockets which wrap IOs, but require data to be run through through encryption/decryption filters. Apparently my worry was unfounded, but perhaps this test will ensure this case continues to work. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-25io.c: try to_io firstnobu
* io.c (copy_stream_body): try to_io conversion before read, readpartial, and write methods. [ruby-dev:49008] [Bug #11199] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-25test_objectspace.rb: missing tests from rubyspecnobu
* test/ruby/test_objectspace.rb (test_each_object): incorporated from rubyspec. * test/ruby/test_objectspace.rb (test_each_object_enumerator): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-25* io.c (argf_getpartial): should not resize str if the secondshugo
argument is not given. [ruby-core:71668] [Bug #11738] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-24parse.y: ripper for warningsnobu
* parse.y (parser_yylex): deal with magic comment warnings also in ripper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-23fiddle: release GVL for ffi_callnormal
Some external functions I wish to call may take a long time and unnecessarily block other threads. This may lead to performance regressions for fast functions as releasing/acquiring the GVL is not cheap, but can improve performance for long-running functions in multi-threaded applications. This also means we must reacquire the GVL when calling Ruby-defined callbacks for Fiddle::Closure, meaning we must detect whether the current thread has the GVL by exporting ruby_thread_has_gvl_p in internal.h * ext/fiddle/function.c (struct nogvl_ffi_call_args): new struct for GVL release (nogvl_ffi_call): new function (function_call): adjust for GVL release [ruby-core:71642] [Feature #11607] * ext/fiddle/closure.c (struct callback_args): new struct for GVL acquire (with_gvl_callback): adjusted original callback function (callback): wrapper for conditional GVL acquire * ext/fiddle/depend: add dependencies * ext/fiddle/extconf.rb: include top_srcdir for internal.h * internal.h (ruby_thread_has_gvl_p): expose for fiddle * vm_core.h (ruby_thread_has_gvl_p): moved to internal.h * test/fiddle/test_function.rb (test_nogvl_poll): new test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-22compile.c: move logop DCEnobu
* compile.c (iseq_peephole_optimize): remove unreachable code chunk after jump/leave. * parse.y: move dead code elimination of logical operation to compile.c. not to warn logical operation of literal constants. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-21* test/socket/test_socket.rb (test/socket/test_socket.rb): skip the test ↵ngoto
when Socket::SO_TIMESTAMP is not defined. Fix error on Solaris 10. [Bug #11728] [ruby-dev:49377] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-21ruby.c: --debug=frozen-string-literal optionnobu
* ruby.c (need_argument): move frozen-string-literal-debug option from --enable to --debug. [Feature #11725] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e