summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-25* 2017-03-26svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25merge revision(s) 57027: [Backport #13012]usa
ruby-lex.rb: fix for label * lib/irb/ruby-lex.rb (identify_identifier): treat identifier just followed by a colon as a lable. this is not a precise solution but enough for the time being. [ruby-core:78526] [Bug #13012] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58086 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) 57172: [Backport #13066]usa
time.c: fix type of usec2subsecx * time.c (usec2subsecx): fix return type, which is a numeric object but not a long int. [ruby-dev:49912] [Bug #13066] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57225 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) 57020,57021: [Backport #13014]usa
Add clang volatile fixes from FreeBSD and NetBSD. Use volatile instead of optnone to avoid optimization which causes segmentation faults. Patch by Dimitry Andric. [ruby-core:78531] [Bug #13014] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57216 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) 56938: [Backport #12988]usa
Stop reading past the end of `ivptr` array If you have code like this: ```ruby class A def initialize @a = nil @b = nil @c = nil @d = nil @e = nil end end x = A.new y = x.clone 100.times { |z| x.instance_variable_set(:"@foo#{z}", nil) } puts y.inspect ``` `x` and `y` will share `iv_index_tbl` hashes. However, the size of the hash will grow larger than the number if entries in `ivptr` in `y`. Before this commit, `rb_ivar_count` would use the size of the hash to determine how far to read in to the array, but this means that it could read past the end of the array and cause the program to segv [ruby-core:78403] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-27merge revision(s) 56928: [Backport #12991]usa
thread.c: fix doc of abort_on_exception [ci skip] * thread.c (rb_thread_s_abort_exc, rb_thread_s_abort_exc_set): [DOC] the raised exception will be re-raised in the main thread, and then follows the ordinary exception sequence, exit status is not 0. [ruby-core:78415] [Bug #12991] * thread.c (rb_thread_abort_exc_set): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-27merge revision(s) 56905: [Backport #12983]usa
Reverse compatibility_version and current_version for Darwin The `compatibility_version` should have an API version and the `current_version` should have a program version of Ruby, but they have been reversed and the binary compatibility has never worked. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57212 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-27* ChangeLog: for r57207 and r57208.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-27merge revision(s) 56832: [Backport #12956]usa
dln.c: raise LoadError * dln.c (dln_load): raise LoadError instead of fatal error on recent OSX, dlclose seems fixed in El Capitan or later. [ruby-core:78200] [Bug #12956] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57208 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-15* version.h: Bump up version to 2.2.7.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-15merge revision(s) 53064: [Backport #11810]usa
* ext/openssl/ossl_ssl.c (ssl_npn_select_cb_common): fix parsing protocol list. The protocol list from OpenSSL is not null-terminated. patched by Kazuki Yamaguchi [Bug #11810] [ruby-core:72082] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56798 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) 56682: [Backport #12922]usa
default.mspec: end of options * spec/default.mspec (MSpecScript): add the end of options to runruby.rb, to fix failure at ruby/spec@a0e55db. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56732 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) 56561: [Backport #12893]usa
* cont.c (cont_new): disable optimization if clang's version is 3.8.0. [ruby-core:77894] [Bug #12893] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56730 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) 55074: [Backport #12868]usa
* ext/openssl/ossl.c (Init_openssl): register an ex_data index for X509_STORE and X509_STORE_CTX respectively. Since they don't share the ex_data index registry, we can't use the same index. (ossl_verify_cb): use the the correct index. * ext/openssl/ossl_ssl.c (ossl_ssl_verify_callback): ditto. * ext/openssl/ossl_x509store.c (ossl_x509store_set_vfy_cb): ditto. (ossl_x509stctx_verify): ditto. * ext/openssl/ossl.h (void ossl_clear_error): add extern declarations of ossl_store_{ctx_,}ex_verify_cb_idx. * ext/openssl/openssl_missing.c: remove X509_STORE_set_ex_data and X509_STORE_get_ex_data. * ext/openssl/openssl_missing.h: implement X509_STORE_get_ex_data, X509_STORE_set_ex_data and X509_STORE_get_ex_new_index as macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56727 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-10-27merge revision(s) 55232: [Backport #12823]usa
crypt.c: protoize * missing/crypt.c: protoize function definitions and make always-zero functions void. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-27merge revision(s) 56421,56422: [Backport #11736]usa
* object.c: Improve documentation for Integer conversion. [ruby-core:71661][Bug #11736][ci skip] * object.c: Improve documentation for Float conversion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-06* version.h: patchlevel.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-06* 2016-10-07svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-06* lib/rubygems/ssl_certs/GlobalSignRootCA.pem: add for RubyGems.org.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56367 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) 56030,56035: [Backport #12711]usa
* vm_dump.c (backtrace): use rip in the saved context for the case the SIGSEGV is received when the process is in userland. Note that ip in the stack should be used if the signal is received when it is in kernel (when it is calling syscall) [Bug #12711] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56308 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) 56036,56041: [Backport #12713]usa
* io.c (nogvl_fsync, nogvl_fdatasync): on Windows, just ignore if the fd is associated to non-disk device. if call fsync and/or fdatasync with such fds, it causes Errno::EBADF exception and the behavior is incomatible with ruby 2.1 and earlier unintendedly introduced. incompatible with ruby 2.1 and earlier unintentionally introduced. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56306 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