summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2017-03-25merge revision(s) 57515: [Backport #13169]usa
lib/ostruct.rb: Fix returned value of each_pair. From a patch by Marcus Stollsteimer. [Fixes #13169] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57278,57279: [Backport #12855]usa
fix optimization for hash aset/aref with fstring Patch by Eric Wong [ruby-core:78797]. I don't like the idea of making insns.def any bigger to support a corner case, and "test_hash_aref_fstring_identity" shows how contrived this is. [ruby-core:78783] [Bug #12855] adjust indent [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57374: [Backport #13135]usa
string.c: rindex(//) should set $~. This seems a bug introduced by r520 (1.4.0). [ruby-core:79110] [Bug #13135] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57589: [Backport #13205]usa
parallel.rb: fix intervention * test/lib/test/unit/parallel.rb (_report): send a response and a newline atomically, to get rid of intervention with "p" which runs in a separate thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57422: [Backport #13158]usa
io.c: close before wait * io.c (io_close_fptr): notify then close, and wait for other threads before free fptr. [ruby-core:79262] [Bug #13158] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57199,57202,57206,57224: [Backport #13076]usa
io.c: fix race between read and close * io.c (io_fillbuf): fix race between read and close, in the case the IO gets closed before the reading thread achieve the lock. [ruby-core:78845] [Bug #13076] thread.c: fix race between read and close * thread.c (rb_thread_fd_close): wait until all threads using the fd finish the operation, not to free the buffer in use. [ruby-core:78845] [Bug #13076] revert a part of r57199 * io.c (io_fillbuf): revert a part of r57199 because it broke IO#getch. see also [Bug #13076] io.c: fix race between read and close * io.c (io_fillbuf): fix race between read and close and bail out in the case the IO gets closed before the reading thread achieve the lock. [ruby-core:78845] [Bug #13076] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57360: [Backport #12884]usa
class.c: non-keyword hash class * class.c (rb_extract_keywords): keep the class of non-keyword elements hash as the original. [ruby-core:77813] [Bug #12884] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57302,57303,57304: [Backport #13119]usa
string.c: block for scrub with ASCII-incompatible * string.c (rb_enc_str_scrub): honor the given block with ASCII-incompatible encoding. [ruby-core:79039] [Bug #13120] string.c: yield invalid part * string.c (rb_enc_str_scrub): yield the invalid part only with ASCII-incompatible. [ruby-core:79039] [Bug #13120] string.c: replacement and block * string.c (rb_enc_str_scrub): only one of replacement and block is allowed. [ruby-core:79038] [Bug #13119] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57368: [Backport #12613]usa
compile.c: check err_info * compile.c (iseq_setup): bail out if any errors found. [ruby-core:76531] [Bug #12613] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57236: [Backport #13089]usa
rational.c: memory leak in gcd * rational.c (rb_gcd_gmp): fix memory leak. patched by KISHIMOTO, Makoto <ksmakoto AT dd.iij4u.or.jp> in [ruby-dev:49934]. [Bug #13089] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57187,57234: [Backport #13075]usa
pack.c: avoid returning uninitialized String Fix unpacking with 'b', 'B', 'h' and 'H' format. Do not return an uninitialized String to Ruby before filling the content bytes. Fixes r11175 ("pack.c (pack_unpack): execute block if given with unpacked value instead of creating an array", 2006-10-15). [ruby-core:78841] [Bug #13075] test/ruby/test_pack.rb: fix test case added by r57187 The test case for String#unpack added by r57187 is not properly testing because the String will be filled after the block invocation. [ruby-core:78841] [Bug #13075] Thanks to nagachika for pointing this out: http://d.hatena.ne.jp/nagachika/20161226/ruby_trunk_changes_57184_57194#r57187 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 53383,55366: [Backport #12478]usa
* lib/forwardable.rb (def_instance_delegator): adjust backtrace of method body by tail call optimization. adjusting the delegated target is still done by deleting backtrace. * lib/forwardable.rb (def_single_delegator): ditto. * lib/forwardable.rb (Forwardable._delegator_method): extract method generator and deal with non-module objects. [ruby-dev:49656] [Bug #12478] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-04Revert r57229 and finally giving up backporting [Bug #13043]usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-28merge revision(s) 57137: [Backport #13043]usa
eval.c: fix circular cause * eval.c (exc_setup_cause): always set cause of cause to get rid of circular references. [ruby-core:78688] [Bug #13043] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-27revert r57222 because of SEGVusa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-27merge revision(s) 56884,56892: [Backport #12910]usa
test_fileutils.rb: Use primary group too * test/fileutils/test_fileutils.rb (TestFileUtils#setup): Use primary group as well as supplementary groups. based on the patch by Vit Ondruch at [ruby-core:78053]. [Bug #12910] It might happen in certain environments (systemd-nspawn) that process has no supplementary groups, but primary groups should be enough to pass most of the tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-27merge revision(s) 57137: [Backport #13043]usa
eval.c: fix circular cause * eval.c (exc_setup_cause): always set cause of cause to get rid of circular references. [ruby-core:78688] [Bug #13043] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-27merge revision(s) 57123: [Backport #13054]usa
re.c: consider the case of RMatch::regexp is nil Follow r49675, r57098 and r57110. Don't assume RMatch::regexp always contains a valid Regexp instance; it will be Qnil if the MatchData is created by rb_backref_set_string(). [ruby-core:78741] [Bug #13054] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-27merge revision(s) 57119: [Backport #13052]usa
array.c: check array length every time after yielding Since the Array may be modified during rb_yield(), the length before invoking the block can't be trusted. Fix possible out-of-bounds read in Array#combination and Array#repeated_combination. It may better to make a defensive copy of the Array, but for now let's follow what Array#permutation does. [ruby-core:78738] [Bug #13052] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-27merge revision(s) 57108: [Backport #13049]usa
sprintf.c: fix width underflow * sprintf.c (rb_str_format): fix memory corruption by width underflow. https://github.com/mruby/mruby/issues/3347 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-27merge revision(s) 57098: [Backport #13042]usa
re.c: non-regexp name reference * re.c (rb_reg_regsub): other than regexp has no name references. [ruby-core:78686] [Bug #13042] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-27merge revision(s) 57078: [Backport #13034]usa
encoding.c: handle needmore error from rb_enc_precise_mbclen() rb_enc_ascget() erroneously reports success even if the given byte sequence is incomplete, for non-ASCII compatible encoding strings. rb_enc_precise_mbclen() may return a negative value on error, and thus rb_enc_ascget() must not store the return value in 'unsigned int'; otherwise the subsequent MBCLEN_CHARFOUND_P() check won't catch the error. [ruby-core:78646] [Bug #13034] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-27merge revision(s) 56980,56981: [Backport #13004]usa
extension.rdoc: fix rb_get_kwargs [ci skip] * doc/extension.rdoc: [DOC] optional keyword arguments are defaulted to Qundef. ignored keys are kept in the hash but a new Hash is not created. [ruby-dev:49893] [Bug #13004] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-27merge revision(s) 56894: [Backport #12974]usa
marshal.c: fix infinite recursion * marshal.c (check_userdump_arg): marshal_dump should not return an instance of the same class, otherwise it causes infinite recursion. [ruby-core:78289] [Bug #12974] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-27merge revision(s) 56469: [Backport #12860]usa
* compile.c (setup_args): duplicate splatting array if more arguments present to obey left-to-right execution order. [ruby-core:77701] [Bug# 12860] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-27merge revision(s) 56224: [Backport #12785]usa
* test/misc/test_ruby_mode.rb (assert_indent): since write-region in Emacs 25.1 no longer displays the "Wrote file" message, shows the explicit message to check if successfully finished. [ruby-core:77355] [Bug #12785] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-14merge revision(s) 56559,56582,56584,56585: [Backport #12903]usa
* test/ruby/test_file.rb (TestFile#test_stat): fix noatime case. [ruby-core:77943] [Bug #12903] * ext/-test/file/fs.c (get_atime_p): Updating of file access times is enabled or not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-14merge revision(s) 56625: [Backport #12936]usa
* test/rinda/test_rinda.rb (test_make_socket_ipv6_multicast, test_make_socket_ipv6_multicast_hops): skip if IPv6 multicast address is not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-14merge revision(s) 56596: [Backport #12890]usa
* lib/net/http.rb (transport_request): other than HTTPContinue in 1xx (HTTPInformation) also needs to continue. [Bug #12890] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-14merge revision(s) 56766,56767: [Backport #12925]usa
error.c: rb_get_backtrace * error.c (rb_get_backtrace): move from eval_error.c to call exc_backtrace directly. [ruby-core:78097] [Bug #12925] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-11merge revision(s) 56489: [Backport #12832]usa
* proc.c (mnew_internal): follow the original class, not to loop the prepended module. [ruby-core:77591] [Bug #12832] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-11merge revision(s) 56684: [Backport #12909]usa
test_process.rb: fix pgroup test * test/ruby/test_process.rb (TestProcess#test_execopts_pgroup): use dynamically assigned pid for the process group, instead of a magic number 2. [ruby-core:78051] [Bug #12909] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-11merge revision(s) 53533: [Backport #12895]usa
* sprintf.c (rb_str_format): format exact number more exactly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-11merge revision(s) 53449: [Backport #11959]usa
* thread.c (rb_thread_pending_interrupt_p): no pending interrupt before initialization. * thread.c (thread_raise_m, rb_thread_kill): uninitialized thread cannot interrupt. [ruby-core:72732] [Bug #11959] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-27merge revision(s) 56252,56254: [Backport #12743]usa
* eval_intern.h (TH_PUSH_TAG): Initialize struct rb_vm_tag::tag with Qundef rather than 0 which is equal to Qfalse. Since Kernel#throw(obj) searches a tag with rb_vm_tag::tag == obj, throw(false) can accidentally find an unrelated tag which is not created by Kernel#catch. [ruby-core:77229] [Bug #12743] * test/ruby/test_exception.rb (test_throw_false): Add a test case for this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-27merge revision(s) 56374: [Backport #12822]usa
* lib/logger.rb (Logger::Period#next_rotate_time): fix monthly log rotate when DST is applied during a month of 31 days. [Fix GH-1458] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-30merge revision(s) 56117: [Backport #12742]usa
* variable.c (rb_const_search): raise with the actual class/module name which defines the private constant. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-30merge revision(s) 56166: [Backport #12766]usa
* lib/uri/generic.rb (def check_password): don't include bad password in URI exception output * test/uri/test_generic.rb (def test_set_component): test for behavior git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-30merge revision(s) 56111: [Backport #12738]usa
* array.c (flatten): use rb_obj_class instead of rb_class_of because rb_class_of may return a singleton class. [ruby-dev:49781] [Bug #12738] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-30merge revision(s) 55554: [Backport #12537]usa
* test/fiddle/test_pointer.rb (test_to_str, test_to_s, test_aref_aset): Attempt to use independent strings for destructive tests that directly modify values on memory by using Fiddle::Pointer. [Bug #12537] [ruby-dev:49700] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-30merge revision(s) 55822: [Backport #12660]usa
* ext/openssl/ossl_ssl.c (ossl_ssl_write_internal): avoid undefined behavior * test/openssl/test_pair.rb (test_write_zero): new test [ruby-core:76751] [Bug #12660] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-16merge revision(s) 53424,55509: [Backport #12517]usa
* test/coverage/test_coverage.rb: ignored test when enabled to coverage. It lead to crash with `make test-all`. * compile.c (ADD_TRACE): ignore trace instruction on non-positive line. * parse.y (coverage): get rid of ArgumentError when the starting line number is not positive. [ruby-core:76141] [Bug #12517] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-16merge revision(s) 55563: [Backport #12498]usa
* lib/uri/mailto.rb (initialize): RFC3986_Parser#split sets opaque only if the URI has path-rootless, not path-empty. [ruby-core:76055] [Bug #12498] patched by Chris Heisterkamp <cheister@squareup.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-16merge revision(s) 55410: [Backport #12488]usa
* ext/date/date_strftime.c (date_strftime_with_tmx): reject too large precision to get rid of buffer overflow. reported by Guido Vranken <guido AT guidovranken.nl>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-16merge revision(s) 55562: [Backport #12454]usa
* regcomp.c (noname_disable_map): don't optimize out group 0 Ruby's Regexp doesn't allow normal numbered groups if the regexp has named groups. On such case it optimizes out related NT_ENCLOSE. But even on the case it can use \g<0>. This fix not to remove NT_ENCLOSE whose regnum is 0. [ruby-core:75828] [Bug #12454] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-16merge revision(s) 55047: [Backport #12441]usa
* ext/openssl/ossl_bn.c (try_convert_to_bnptr): Extracted from GetBNPtr(). This doesn't raise exception but returns NULL on error. (GetBNPtr): Raise TypeError if conversion fails. (ossl_bn_eq): Implement BN#==. (ossl_bn_eql): #eql? should not raise TypeError even if the argument is not compatible with BN. (ossl_bn_hash): Implement BN#hash. * ext/openssl/ossl_bn.c (Init_ossl_bn): Define #== and #hash. * test/openssl/test_bn.rb: Test BN#eql?, #== and #hash git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-16merge revision(s) 55181: [Backport #12431]usa
* transcode.c (str_transcode0): scrub in the given encoding when the source encoding is given, not in the encoding of the receiver. [ruby-core:75732] [Bug #12431] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-16merge revision(s) 55705: [Backport #12345]usa
* variable.c (rb_local_constants_i): exclude private constants when excluding inherited constants too. [Bug #12345] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-16merge revision(s) 55008: [Backport #12342]usa
* lib/drb/timeridconv.rb: don't use keeper thread. [Bug #12342] * test/drb/ut_timerholder.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-16merge revision(s) 55731: [Backport #12610]usa
* lib/webrick/httpservlet/cgihandler.rb (do_GET): delete HTTP_PROXY * test/webrick/test_cgi.rb (test_cgi_env): new test * test/webrick/webrick.cgi (do_GET): new endpoint to dump env [ruby-core:76511] [Bug #12610] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e