summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
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
2015-11-21fix r52690naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-21* thread_sync.c: reduce the specification of Queue#close.ko1
* Queue#close accepts no arguments. * deq'ing on closed queue returns nil, always. [Feature #10600] * test/thread/test_queue.rb: catch up this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-21Visual C++ 14 (2015) uses ucrtbase.dll as c runtimenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-20read may return nilnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-20* compile.c (iseq_compile_each): add debug information to NODE_STRko1
strings as default. [Feature #11725] * insns.def (freezestring): add new instruction to support adding debug information for dynamically constracted strings. * compile.c (iseq_compile_each): support adding debug information for NODE_DSTR with freezestring instruction. * error.c (rb_error_frozen): change the debug information ID name id_debug_created_info and this field should have a 2 element array containing path and line information. * defs/id.def: ditto. * test/ruby/test_rubyoptions.rb: catch up this fix. * test/ruby/test_iseq.rb: now frozen strings are not same. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-20symbol.c: not freeze the receivernobu
* symbol.c (rb_str_intern): should not freeze the receiver itself unexpectedly. [ruby-core:71611] [Bug #11721] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-20* lib/net/http.rb: Fixed regression for Net::HTTP::PUT with "Expect-100"hsbt
header. * test/net/http/test_http.rb: added test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-20* vm.c (rb_vm_cref_replace_with_duplicated_cref): added.ko1
CREFs should not be shared by methods between `using'. [Bug #11247] * vm_insnhelper.c (vm_cref_replace_with_duplicated_cref): ditto. * vm.c (vm_cref_dup): should copy refinements correctly. * eval.c: use rb_vm_cref_replace_with_duplicated_cref(). * eval_intern.h: add a decl. of rb_vm_cref_replace_with_duplicated_cref(). * vm_eval.c (eval_string_with_cref): do not need to pass scope's CREF because VM can find out CREF from stack frames. * test/ruby/test_refinement.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19* gc.c (gc_start): force to invoke GC by GC.startko1
even if it is GC.disable'd. * test/ruby/test_gc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19* lib/rubygems: Update to RubyGems 2.5.0+ HEAD(c6b4946).hsbt
this version includes #1114, #1314, #1322, #1375, #1383, #1387 * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18* test/socket/test_socket.rb (test_udp_recvmsg_truncation): rflags isakr
nil on Solaris 10 which have no HAVE_STRUCT_MSGHDR_MSG_CONTROL. Reported by Naohisa Goto. [ruby-core:71557] [Bug #11709] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18* vm_method.c (rb_class_clear_method_cache): should clear allko1
RCLASS_CALLABLE_M_TBLs of all sub-classes (T_ICLASS). RCLASS_CALLABLE_M_TBL() caches complemented method entries. It should be cleared when the modules are cleared. On previous version clears only for direct children. It is enough for normal modules because corresponding T_ICLASSes are direct children. However, refinements create complex data structure. So that we need to clear all children (and descendants). [ruby-core:71423] [Bug #11672] * vm_method.c (rb_clear_method_cache_by_class): rb_mKernel doesn't call rb_class_clear_method_cache, so that clear child T_ICLASSes. * test/ruby/test_refinement.rb: enable disabled test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18add tests.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18* method.h: introduce the folliwing field and macros.ko1
* rb_method_definition_t::complemented_count to count shared method entries because of complemented method entries and separate from alias_count. Shared `def' only by complemented method entries should not prevent method re-definition warning. * METHOD_ENTRY_COMPLEMENTED(me) to represent complemented method entry. * METHOD_ENTRY_COMPLEMENTED_SET(me) to check it as complemented me. * vm_insnhelper.c (aliased_callable_method_entry): should also check me->def->complemented_count. * vm_method.c (method_definition_addref_complement): add to count complemented method entries number. * vm_method.c (rb_method_definition_release): release `def' iff alias_count == 0 and complemented_count == 0. * test/ruby/test_module.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18* test/logger/test_logdevice.rb: Fix tests of logger to make it work onsonots
windows (windows can not remove opened file) [Bug #11702] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17socket: fix recvmsg without argumentnormal
* ext/socket/ancdata.c (bsock_recvmsg_internal): grow buffer on unspecified maxdatlen [ruby-core:71517] [Bug #11701] * ext/socket/lib/socket.rb (Socket#recvmsg): nil default for dlen (Socket#recvmsg_nonblock): ditto * test/socket/test_socket.rb (test_recvmsg_udp_no_arg): new test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17* lib/logger.rb: support symbol and string log level settingsonots
[fix GH-1101] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17lib/logger.rb: Add Logger#reopensonots
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17revert r52614, r52615, r52617 because they cause serious errorsko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17* method.h: introduce rb_method_definition_t::complemented_count.ko1
* vm_method.c (method_definition_addref_complement): introduced. def->alias_count is used to decide warn or do not warn at method redefinition. Complented methods should not prevent redefiniton warnings. * vm_method.c (rb_method_definition_release): release def iff alias_count == 0 && complemented_count == 0. * test/ruby/test_module.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17OpenStruct#dignobu
* lib/ostruct.rb (dig): Implement OpenStruct#dig [Feature #11688] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16* test/dtrace/helper.rb (Dtrace::TestCase#trap_probe): dtrace buffer size is ↵ngoto
set as 8m on Solaris (default 4m). [Bug #11697] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16struct.c: dignobu
* object.c (rb_obj_dig): dig in nested structs too. * struct.c (rb_struct_dig): new method Struct#dig. [Feature #11688] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16* lib/set.rb (#>=, #>, #<=, #<): Make use of Hash#>=, #>, #<, andknu
#<= when comparing against an instance of the same kind. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-16struct.c: fix index in messagenobu
* struct.c (rb_struct_aref, rb_struct_aset): show the given index, not offset index, in the error messages when the offset is out of the range. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-15vm_method.c: check if frozen [Fix GH-1096]nobu
* vm_method.c (set_method_visibility): should fail if the receiver is frozen. [ruby-core:71489] [Bug #11687] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14* ext/socket/lib/socket.rb: Specify frozen_string_literal: true.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14test/test_tsort.rb: Specify frozen_string_literal: true.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14* lib/time.rb: Specify frozen_string_literal: true.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14* lib/open3.rb: Specify frozen_string_literal: true.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13* vm.c (vm_define_method): do not use current CREF immediately,ko1
but check CREF in environment or methods. Methods defined in methods should be public. [Bug #11571] * vm_method.c (rb_scope_module_func_check): check CREF in env or me. if CREF is contained by `me', then return FALSE. * test/ruby/test_method.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13* ext/openssl/ossl_ssl.c: Merge ruby/openssl@81e1a30zzak
* test/openssl/test_ssl.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e