Commit graph

42330 commits

Author SHA1 Message Date
nagachika
9b651bea97 merge revision(s) 56036,56041: [Backport #12713]
* 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_3@56234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-25 07:37:34 +00:00
nagachika
8833bfbd0b merge revision(s) 56111: [Backport #12738]
* 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_3@56233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-25 07:36:06 +00:00
nagachika
0b51978528 merge revision(s) 55984: [Backport #12692]
* man/irb.1: remove useless -width option.
	  [ruby-dev:49767] [Bug #12692]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-25 06:07:29 +00:00
nagachika
18f287a36d backport additional fix memory leak from openssl upstream.
e76f076f09
patches are provided by rhe (Kazuki Yamaguchi).

* ext/openssl/ossl_x509ext.c: additional fix memory leak.
  [ruby-core:76922] [Bug #12680]

* text/openssl/test_x509ext.rb: test for above.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-29 20:36:38 +00:00
nagachika
53369d7e4d * vm_method.c: revert r55869. it breaks Integer#days with
ActiveSupport-4.1.x. [ruby-core:76949] [Bug #12353]

* test/ruby/test_marshal.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-27 15:41:12 +00:00
nagachika
2d17694de7 merge revision(s) 55896: [Backport #12614]
* id_table.c (hash_table_extend): should not shrink the table than
	  the previous capacity.  [ruby-core:76534] [Bug #12614]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-26 19:01:49 +00:00
nagachika
ea5e22d102 backport fix memory leak from upstream.
3a2840e80d...1e30cd395b
patches are provided by rhe (Kazuki Yamaguchi).

* ext/openssl/ossl_config.c: fix memory leak.  [ruby-core:76922] [Bug #12680]

* ext/openssl/ossl_ocsp.c: ditto.

* ext/openssl/ossl_pkcs12.c: ditto.

* ext/openssl/ossl_pkcs7.c: ditto.

* ext/openssl/ossl_pkey_ec.c: ditto.

* ext/openssl/ossl_x509.h: ditto.

* ext/openssl/ossl_x509attr.c: ditto.

* ext/openssl/ossl_x509crl.c: ditto.

* ext/openssl/ossl_x509ext.c: ditto.

* ext/openssl/ossl_x509req.c: ditto.

* ext/openssl/ossl_x509revoked.c: ditto.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-26 18:48:55 +00:00
nagachika
996b1bfa95 merge revision(s) 53707,53708,53709,53712,53777,53781: [Backport #12326]
* lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.5.2.
	  It supports to enable frozen string literal and add `--norc` option for
	  disable to `.gemrc` configuration.
	  See 2.5.2 release notes for other fixes and enhancements.
	  a8aa3bac72/History.txt (L3)

	* lib/rubygems/specification.rb: `coding` is affect only first line except
	  shebang.

	* lib/rubygems/package.rb, lib/rubygems/package/*: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-24 15:28:23 +00:00
nagachika
ce8729feb6 merge revision(s) 53586,53587,54030: [Backport #12331]
increase timeout for ARMv7

	20160113T091704Z.diff.html.gz
	* test/ruby/test_array.rb: split out the test for no stack error
	  on large input for test_permutation, test_repeated_permutation,
	  and test_repeated_combination, and make them all timeout:30.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-24 14:56:53 +00:00
nagachika
7e58a50983 merge revision(s) 55554: [Backport #12537]
* 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_3@55989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-22 18:25:19 +00:00
nagachika
6f122a4f10 merge revision(s) 55547,55551,55552,55555,55557,55559,55575,55691,55568: [Backport #12536]
* string.c: Fix memory corruptions when using UTF-16/32 strings.
	  [Bug #12536] [ruby-dev:49699]

	* string.c (TERM_LEN_MAX): Macro for the longest TERM_FILL length,
	  the same as largest value of rb_enc_mbminlen(enc) among encodings.

	* string.c (str_new, rb_str_buf_new, str_shared_replace): Allocate
	  +TERM_LEN_MAX bytes instead of +1. This change may increase memory
	  usage.

	* string.c (rb_str_new_with_class): Use TERM_LEN of the "obj".

	* string.c (rb_str_plus, rb_str_justify): Use str_new0 which is aware
	  of termlen.

	* string.c (str_shared_replace): Copy +termlen bytes instead of +1.

	* string.c (rb_str_times): termlen should not be included in capa.

	* string.c (RESIZE_CAPA_TERM): When using RSTRING_EMBED_LEN_MAX,
	  termlen should be counted with it because embedded strings are
	  also processed by TERM_FILL.

	* string.c (rb_str_capacity, str_shared_replace, str_buf_cat): ditto.

	* string.c (rb_str_drop_bytes, rb_str_setbyte, str_byte_substr): ditto.

	* string.c (rb_str_subseq, str_substr): When RSTRING_EMBED_LEN_MAX
	  is used, TERM_LEN(str) should be considered with it because
	  embedded strings are also processed by TERM_FILL.
	  Additional fix for [Bug #12536] [ruby-dev:49699].
	  Additional fix for [Bug #12536] [ruby-dev:49699].

	* string.c (rb_usascii_str_new, rb_utf8_str_new): Specify termlen
	  which is apparently 1 for the encodings.

	* string.c (str_new0_cstr): New static function to create a String
	  object from a C string with specifying termlen.

	* string.c (rb_usascii_str_new_cstr, rb_utf8_str_new_cstr): Specify
	  termlen by using new str_new0_cstr().

	* string.c (str_new_static): Specify termlen from the given encoding
	  when creating a new String object is needed.

	* string.c (rb_tainted_str_new_with_enc): New function to create a
	  tainted String object with the given encoding. This means that
	  the termlen is correctly specified. Curretly static function.
	  The function name might be renamed to rb_tainted_enc_str_new
	  or rb_enc_tainted_str_new.

	* string.c (rb_external_str_new_with_enc): Use encoding by using the
	  above rb_tainted_str_new_with_enc().

	* string.c (str_fill_term): When termlen increases, re-allocation
	  of memory for termlen should always be needed.
	  In this fix, if possible, decrease capa instead of realloc.
	  [Bug #12536] [ruby-dev:49699]

	* string.c: Partially reverts r55547 and r55555.
	  ChangeLog about the reverted changes are also deleted in this file.
	  [Bug #12536] [ruby-dev:49699] [ruby-dev:49702]

	* string.c (rb_str_change_terminator_length): New function to change
	  termlen and resize heap for the terminator. This is split from
	  rb_str_fill_terminator (str_fill_term) because filling terminator
	  and changing terminator length are different things. [Bug #12536]

	* internal.h: declaration for rb_str_change_terminator_length.

	* string.c (str_fill_term): Simplify only to zero-fill the terminator.
	  For non-shared strings, it assumes that (capa + termlen) bytes of
	  heap is allocated. This partially reverts r55557.

	* encoding.c (rb_enc_associate_index): rb_str_change_terminator_length
	  is used, and it should be called whenever the termlen is changed.

	* string.c (str_capacity): New static function to return capacity
	  of a string with the given termlen, because the termlen may
	  sometimes be different from TERM_LEN(str) especially during
	  changing termlen or filling terminator with specific termlen.

	* string.c (rb_str_capacity): Use str_capacity.

	* string.c (str_buf_cat): Fix capa size for embed string.
	  Fix bug in r55547. [Bug #12536]

	* string.c: Specify termlen as far as possible.
	  the termlen is correctly specified. Currently static function.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-22 18:18:50 +00:00
nagachika
0b8b3a8296 merge revision(s) 53433: [Backport #12668]
test_ostruct.rb: sort method names

	* test/ostruct/test_ostruct.rb (test_accessor_defines_method):
  should not depend on the order of methods.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-21 05:52:25 +00:00
nagachika
a9e98cf7d4 merge revision(s) 55822: [Backport #12660]
* 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_3@55961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-18 14:54:40 +00:00
nagachika
6d37aaab9a merge revision(s) 55797: [Backport #12645]
* ext/socket/option.c, ext/socket/rubysocket.h (inet_ntop): share
	  the fallback definition.  [ruby-core:76646] [Bug #12645]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-18 14:26:36 +00:00
nagachika
4c3d49e917 merge revision(s) 55729: [Backport #12611]
* vm.c (vm_set_main_stack): remove unnecessary check.  toplevel
	  binding must be initialized.  [Bug #12611] (N1)

	* win32/win32.c (w32_symlink): fix return type.  [Bug #12611] (N3)

	* string.c (rb_str_split_m): simplify the condition.
	  [Bug #12611](N4)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-18 14:17:22 +00:00
nagachika
f376d0efe2 merge revision(s) 55726,55727: [Backport #12609]
* lib/rexml/attribute.rb (REXML::Attribute#to_string): Fix wrong
	  entry reference name of double quote.
	  [Bug#12609][ruby-core:76509]
	  Patch by Joseph Marrero. Thanks!!!
	  [Bug #12609][ruby-core:76509]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-18 14:06:38 +00:00
nagachika
7dd1ce9190 merge revision(s) 55613: [Backport #12575]
* thread.c (rb_wait_for_single_fd): Clean up fds.revents every time
	  before calling ppoll(2). [Bug #12575] [ruby-dev:49725]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-18 14:05:06 +00:00
nagachika
2c07970dd7 merge revision(s) 55609: [Backport #12568]
* vm_args.c (setup_parameters_complex): don't raise ArgumentError
	  if an array is given for instance_exec with optional argument.
	  [ruby-core:76300] [Bug #12568]
	  https://github.com/rails/rails/pull/25699


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-18 14:03:36 +00:00
nagachika
7f7360a885 merge revision(s) 55663: [Backport #12583]
* gc.c (gc_mark_roots): should mark the VM object itself to mark
	  singleton class of the VM object.
	  Before this patch, we only set mark bit for the VM object and
	  invoke mark function separately.
	  [Bug #12583]

	* test/ruby/test_gc.rb: add a test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-16 04:29:37 +00:00
nagachika
2f0555c3a1 merge revision(s) 55523: [Backport #12524]
* ext/digest/md5/md5ossl.h: Remove excess semicolons.
	  Suppress warning on Solaris with Oracle Solaris Studio 12.
	  [ruby-dev:49692] [Bug #12524]

	* ext/digest/md5/md5cc.h: ditto.

	* ext/digest/sha1/sha1cc.h: ditto.

	* ext/digest/sha1/sha1ossl.h: ditto.

	* ext/digest/sha2/sha2cc.h: ditto.

	* ext/digest/sha2/sha2ossl.h: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-16 03:13:24 +00:00
nagachika
bb6e171adb merge revision(s) 53424,55509: [Backport #12517]
* 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_3@55917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-16 03:00:20 +00:00
nagachika
eed566debe merge revision(s) 55563: [Backport #12498]
* 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_3@55916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-16 02:48:59 +00:00
nagachika
55992aa430 merge revision(s) 55581,55582,55880: [Backport #12557]
* lib/net/http/generic_request.rb (write_header): A Request-Line must
	  not contain CR or LF.

	* lib/net/http/generic_request.rb (write_header): A Request-Line must


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15 20:00:09 +00:00
nagachika
94231bdf79 merge revision(s) 55579: [Backport #12556]
* lib/net/ftp.rb (putline): raise an ArgumentError when
	  CR or LF is included in a line.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15 19:56:19 +00:00
nagachika
38e722f741 merge revision(s) 55410: [Backport #12488]
* 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_3@55910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15 19:47:39 +00:00
nagachika
12b6cd61c0 merge revision(s) 55385,55390: [Backport #12483]
* file.c (append_fspath): normalize directory name to be appended
	  on OS X.  [ruby-core:75957] [Ruby trunk Bug#12483]
	  https://github.com/rails/rails/issues/25303#issuecomment-224834804


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15 19:37:18 +00:00
nagachika
ab61e5c932 merge revision(s) 55562: [Backport #12454]
* 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_3@55908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15 19:24:47 +00:00
nagachika
b7c5eba722 merge revision(s) 55233: [Backport #12446]
* missing/crypt.c: fix size macros to use configured values
	  for platforms long is larger than 32bit.
	  [ruby-core:75792] [Bug #12446]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15 19:15:10 +00:00
nagachika
31dc77ae7f merge revision(s) 55047: [Backport #12441]
* 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_3@55906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15 19:06:03 +00:00
nagachika
9b71251e1e merge revision(s) 55181: [Backport #12431]
* 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_3@55905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15 19:02:10 +00:00
nagachika
243d224f28 merge revision(s) 55175: [Backport #12428]
* ext/openssl/ossl_pkey_dh.c (ossl_dh_compute_key): Check that the DH
	  has 'p' (the prime) before calling DH_size(). We can create a DH with
	  no parameter but DH_size() does not check and dereferences NULL.
	  [ruby-core:75720] [Bug #12428]

	* ext/openssl/ossl_pkey_dsa.c (ossl_dsa_sign): Ditto. DSA_size() does
	  not check dsa->q.

	* ext/openssl/ossl_pkey_rsa.c (ossl_rsa_public_encrypt,
	  ossl_rsa_public_decrypt, ossl_rsa_private_encrypt,
	  ossl_rsa_private_decrypt): Ditto. RSA_size() does not check rsa->n.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15 18:49:32 +00:00
nagachika
83dc591546 merge revision(s) 55115: [Backport #12411]
* transcode.c (enc_arg, str_transcode_enc_args, econv_args):
	  remove volatile, and add GC guards in callers.
	  [ruby-core:75664] [Bug #12411]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15 18:40:16 +00:00
nagachika
686fbc8e5f merge revision(s) 55497,55498,55504: [Backport #11988]
* ext/psych/*, test/psych/*: Upate psych 2.1.0
	  This version fixed [Bug #11988][ruby-core:72850]

	* ext/psych/*, test/psych/*: Update psych 2.1.0


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15 17:56:05 +00:00
nagachika
72e63983e6 merge revision(s) 55434: [Backport #12401]
* common.mk (build-ext), ext/extmk.rb: use variable EXTENCS
	  different than ENCOBJS, to get rid of circular dependency.
	  build libencs when linking encodings statically.
	  [ruby-core:75618] [Bug #12401]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11 19:26:43 +00:00
nagachika
395340fa30 merge revision(s) 55090,55091: [Backport #12398]
io.c: conditionally used functions

	* io.c (pipe_atexit): only used on Windows

	* io.c (rb_execarg_fixup_v): wrapper only used fork or spawnv is
  available.
	* process.c (rb_execarg_commandline): build command line string
	  from argument vector in rb_execarg.
	  [ruby-core:75611] [Bug #12398]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11 19:13:38 +00:00
nagachika
8dc8bba42d merge revision(s) 54142,55500: [Backport #12353]
assertions.rb: fix result of assert_nothing_raised

	* test/lib/test/unit/assertions.rb (assert_nothing_raised): do not
  discard the result of the given block.
	* vm_method.c (vm_respond_to): try method_missing if respond_to?
	  is undefined, as if it is the default definition.
	  [ruby-core:75377] [Bug #12353]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11 18:58:11 +00:00
nagachika
717f31e075 merge revision(s) 55705: [Backport #12345]
* 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_3@55868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11 18:39:06 +00:00
nagachika
c20b07d535 merge revision(s) 55008: [Backport #12342]
* 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_3@55867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11 18:30:09 +00:00
nagachika
88d76cfdcd merge revision(s) 55100: [Backport #12292]
* ext/openssl/ossl_ssl.c (ossl_ssl_stop): Don't free the SSL struct
	  here. Since some methods such as SSLSocket#connect releases GVL,
	  there is a chance of use after free if we free the SSL from another
	  thread. SSLSocket#stop was documented as "prepares it for another
	  connection" so this is a slightly incompatible change. However when
	  this sentence was added (r30090, Add toplevel documentation for
	  OpenSSL, 2010-12-06), it didn't actually. The current behavior is
	  from r40304 (Correct shutdown behavior w.r.t GC., 2013-04-15).
	  [ruby-core:74978] [Bug #12292]

	* ext/openssl/lib/openssl/ssl.rb (sysclose): Update doc.

	* test/openssl/test_ssl.rb: Test this.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11 17:58:25 +00:00
nagachika
a3600fc377 merge revision(s) 55380: [Backport #12255]
* ext/json/lib/*.rb: Removed some comments. Because these are unnecessary
	  class description. [ci skip][Bug #12255][ruby-core:74835]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-10 16:30:43 +00:00
nagachika
ada634ac0f merge revision(s) 55573: [Backport #12209]
* pack.c (pack_pack): use union instead of bare variable to ease
	  optimizations and avoid assigning x87 floating point number.
	  [ruby-core:74496] [Bug #12209]

	* pack.c (pack_unpack): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-10 16:19:50 +00:00
nagachika
1bc8bf2766 merge revision(s) 55731: [Backport #12610]
* 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_3@55791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-01 17:26:35 +00:00
nagachika
be2763092d merge revision(s) 55532: [Backport #12491]
* test/ruby/test_refinement.rb: skip
	  test_prepend_after_refine_wb_miss on ARM or MIPS.
	  [ruby-core:76031] [Bug #12491]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-01 16:33:20 +00:00
nagachika
aeb980bdc6 merge revision(s) 55605: [Backport #12565]
* vm_args.c (vm_caller_setup_arg_block): disable symbol block
	  argument optimization when tail call optimization is enabled,
	  in order to avoid SEGV.  [ruby-core:76288] [Bug #12565]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-30 03:31:58 +00:00
nagachika
446bb33fa3 merge revision(s) 54909,55531: [Backport #12531]
proc.c: passed_block

	* proc.c (passed_block): extract conversion from passed proc value
  to rb_block_t pointer.
	* proc.c (passed_block): convert passed block symbol to proc.
	  based on the patch by Daisuke Sato in [ruby-dev:49695].
	  [Bug #12531]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-30 03:21:51 +00:00
nagachika
e561fc44a4 merge revision(s) 55297: [Backport #12462]
* vm_insnhelper.c (vm_throw_start): check if the iseq is symbol
	  proc, class definition should not be a symbol proc.
	  [ruby-core:75856] [Bug #12462]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-30 02:26:30 +00:00
nagachika
4431d7a724 merge revision(s) 55602: [Backport #12560]
require "rbconfig/sizeof"

	They may fail parallel test-all

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-11 14:22:08 +00:00
nagachika
7dafaea0ef merge revision(s) 54168: [Backport #12391]
* bignum.c (rb_big_hash): make it public function to be available in
	  other source files, and remove documentation comment for Bignum#hash.

	* bignum.c (Bignum#hash): remove its definition because it is unified
	  with Object#hash.

	* include/ruby/intern.h (rb_big_hash): add a prototype declaration.

	* hash.c (any_hash): treat Bignum values directly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-11 13:50:32 +00:00
nagachika
840a4573af merge revision(s) 55427: [Backport #12503]
* string.c (tr_trans): consider terminator length and fix heap
	  overflow.  reported by Guido Vranken <guido AT guidovranken.nl>.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-01 19:09:29 +00:00
nagachika
62586a95d3 merge revision(s) 55462: [Backport #11954]
* vm.c (invoke_bmethod, invoke_block_from_c_0): revert r52104
	  partially to avoid "self has wrong type to call super in this
	  context" errors.
	  [ruby-core:72724] [Bug #11954]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-01 18:59:06 +00:00