Commit graph

42330 commits

Author SHA1 Message Date
usa
687763bc4f merge revision(s) 56558,59116,59136: [Backport #12670]
* gc.c (heap_page_resurrect): do not return tomb_pages when
	  page->freelist == NULL.
	  [Bug #12670]

	test for [Bug #12670]

	heap corruption by deferred free.
	gc.c: expand sorted pages

	* gc.c (heap_page_allocate): expand sorted pages before inserting
	  allocated new page.  [Bug #12670]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 12:35:49 +00:00
usa
896d9fb995 merge revision(s) 58210: [Backport #8916]
vsnprintf.c: prefix with precision

	* vsnprintf.c (BSD_vfprintf): sign and hex-prefix should not be
	  counted in precision.  [ruby-dev:47714] [Bug #8916]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 12:24:21 +00:00
usa
75b1146985 merge revision(s) 58334,58346,58349: [Backport #13425] [Backport #13432]
thread.c: disable VM events when stack overflow

	* thread.c (ruby_thread_stack_overflow): disable VM events when
	  stack overflow occurred; it causes another stack overflow again
	  in making backtrace object, and crashes.
	  [ruby-core:80662] [Bug #13425]
	increase timeout seconds.

	* test/ruby/test_trace.rb (test_trace_stackoverflow): on some platforms
	  this test fails because of timeout.

	disable rewind hooks.

	* vm.c (hook_before_rewind): skip rewind hooks if err is SystemStackError
	  because rewind hooks can cause stack overflow again and again.

	* thread.c (ruby_thread_stack_overflow): do not disable all hooks.
	  Additionally, clearing ruby_vm_event_flags is not suitable way
	  to disable hooks.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 12:21:37 +00:00
usa
2459af8603 merge revision(s) 59080,59082: [Backport #13656]
proc.c: skip prepended modules

	* proc.c (method_super_method): skip prepended modules and
	  continue from the super class of the original class.
	  [ruby-core:81666] [Bug #13656]
	test/ruby/test_method.rb: refined  [ruby-core:81666] [Bug #13656]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 12:13:56 +00:00
usa
1b5f534487 merge revision(s) 55324,55325: [Backport #13651]
* lib/net/smtp.rb (getok, get_response): raise an ArgumentError when
	  CR or LF is included in a line, because they are not allowed in
	  RFC5321.
	  RFC5321.  Thanks, Jeremy Daer.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 12:10:59 +00:00
usa
4757e396d2 merge revision(s) 59030,59031: [Backport #13638]
thread.c: avoid busy looping on rb_thread_fd_close

	We no longer use it this function, but extensions do, and
	we need to ensure it continues to work for them.

	* thread.c (rb_thread_fd_close): schedule other threads in loop
	* ext/-test-/thread_fd_close/thread_fd_close.c: new file
	* ext/-test-/thread_fd_close/depend: ditto
	* ext/-test-/thread_fd_close/extconf.rb: ditto
	* test/-ext-/thread_fd_close/test_thread_fd_close.rb: new test
	* properties.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 12:09:10 +00:00
usa
188ae0dbb1 merge revision(s) 57530: [Backport #13191]
sample/pty/shl.rb: update sample

	* Specify frozen_string_literal: true.
	* Fix TypeError of raise.
	* Use a character literal instead of Integer.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 11:38:03 +00:00
usa
37cce5ae90 merge revision(s) 59002: [Backport #13621]
string.c: docs for String#split

	* string.c: [DOC] clarify docs for String#split when called
	  with limit and capture groups.
	  Reported by Cichol Tsai.  [ruby-core:81505] [Bug #13621]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 11:32:44 +00:00
usa
17b77906af merge revision(s) 58825,58826: [Backport #5339]
erb.rb: Allow explicit trimming carriage return

	when trim_mode is "-", for Windows environments.

	[ruby-core:39625] [Bug #5339]
	erb.rb: Allow trimming CR in all trim_modes

	to unify a behavior with r58823 and r58825.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 11:24:41 +00:00
usa
2d909334c0 merge revision(s) 58823: [Backport #11464]
erb.rb: Allow trimming carriage return

	when trim_mode is "<>", for Windows environments.

	[Bug #11464]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 11:18:02 +00:00
usa
d058c8a270 merge revision(s) 58796: [Backport #13545]
Merge latest dtoa.c [Bug #13545]

	Apply some part of http://www.netlib.org/fp/dtoa.c with my eyes...

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 11:08:35 +00:00
usa
1f106a915e merge revision(s) 57248: [Backport #13573]
dir.c: getattrlist on OSX 10.5

	* dir.c (is_case_sensitive): use getattrlist() if fgetattrlist()
	  is unavailable, on OSX 10.5.  [ruby-core:68829] [Bug #11054]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 11:00:50 +00:00
usa
538ba38983 merge revision(s) 53400: [Backport #13572]
* tool/mkconfig.rb (RbConfig): prefix SDKROOT to oldincludedir
	  not includedir, the latter is outside the ruby installation.
	  [ruby-core:72496] [Bug #11881]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 10:58:32 +00:00
usa
e9ce3e744d merge revision(s) 58696: [Backport #11384]
autoload: always wait on loading thread

	We cannot assume autoload_provided/rb_feature_provided returning
	TRUE means it is safe to proceed without waiting.  Another
	thread may call rb_provide_feature before setting the constant
	(via autoload_const_set).  So we must wait until autoload is
	completed by another thread.

	Note: this patch was tested with an explicit rb_thread_schedule
	in rb_provide_feature to make the race condition more apparent
	as suggested by <s.wanabe@gmail.com>:
	> --- a/load.c
	> +++ b/load.c
	> @@ -563,6 +563,7 @@ rb_provide_feature(VALUE feature)
	>      rb_str_freeze(feature);
	>
	>      rb_ary_push(features, rb_fstring(feature));
	> +rb_thread_schedule();
	>      features_index_add(feature, INT2FIX(RARRAY_LEN(features)-1));
	>      reset_loaded_features_snapshot();
	>  }

	* variable.c (check_autoload_required): do not assume a provided
	  feature means autoload is complete, always wait if autoload is
	  being performed by another thread.
	  [ruby-core:81105] [Bug #11384] Thanks to <s.wanabe@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 10:56:33 +00:00
usa
d4f03fab29 merge revision(s) 58658: [Backport #13554]
process.c: temporary string for buffer

	* process.c (obj2uid, obj2gid): use temporary string as the buffer
	  instead of `rb_alloc_tmp_buffer`, which is `NODE_ALLOCA` since
	  r51492.  [ruby-core:81084] [Bug #13554]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 10:53:59 +00:00
usa
8f01d618e8 merge revision(s) 58587,58588: [Backport #13526]
variable.c: cleanup waitq upon thread death

	* variable.c (autoload_reset): use idempotent list_del_init
	  (autoload_sleep): moved code from rb_autoload_load
	  (autoload_sleep_done): cleanup for use with rb_ensure
	  (rb_autoload_load): ensure list delete happens in case the
	  thread dies during sleep
	* test/ruby/bug-13526.rb: new script for separate execution
	* test/ruby/test_autoload.rb (test_bug_13526): new test
	  [ruby-core:81016] [Bug #13526]
	* properties.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 10:52:04 +00:00
usa
d25b9efdaa merge revision(s) 58453,58454: [Backport #13499]
Fix space flag when Inf/NaN and width==3

	* sprintf.c (rb_str_format): while `"% 2f"` and `"% 4f"` result in
	  `" Inf"` and `" Inf"` respectively, `"% 3f"` results in
	  `"Inf"` (no space).
	Refactor "%f" % Inf/NaN

	* sprintf.c (rb_str_format): as for non-finite float, calculate
	  the exact needed size with the space flag.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 10:47:34 +00:00
usa
ef763e7d0c merge revision(s) 58370,58382: [Backport #13530]
thread_win32.c: no GVL for interrupt_event

	* thread_win32.c (w32_wait_events): do not acquire GVL, to fix
	  deadlock at read/close race condition.  instead, just ignore
	  interrupt_event if it is closed.
	thread_win32.c: fix index

	* thread_win32.c (w32_wait_events): fix wait object index in the
	  case of interrupt_event is not usable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 10:44:46 +00:00
usa
9bff2dd7bb merge revision(s) 58534: [Backport #13533]
nogvl_wait_for_single_fd must wait as its name

	poll(fds, n, 0) mean no timeout and immediately return. If you want to
	wait something, you need to use -1 instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 10:40:59 +00:00
usa
996e702b1a merge revision(s) 55429: [Backport #12492]
* class.c (Init_class_hierarchy): prevent rb_cObject which is the
	  class tree root, from GC.  [ruby-dev:49666] [Bug #12492]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 10:36:04 +00:00
usa
5024abe0cf merge revision(s) 58545,58584: [Backport #13536]
ripper/lexer.rb: nested indented heredoc

	* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): fix for
	  nested indedented here documents, where `Elem`s are nested too.
	  [ruby-core:80977] [Bug #13536]
	ripper/lexer.rb: nested indented heredoc

	* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): insert
	  stripped leading spaces as `on_ignored_sp` elements, so that the
	  original source can be reconsructed.
	  [ruby-core:80977] [Bug #13536]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 10:30:56 +00:00
usa
6aac76353a * parse.y (parser_parse_string): set the mark of term to nd_func
because in this version `u2.id` is not used for this purpose.
  fixed failure of ruby/spec introduced at r58518.
  see also [Backport #13363]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-30 21:39:04 +00:00
usa
6334ff3858 merge revision(s) 58082,58083: [Backport #13236]
class.c: ensure_includable

	* class.c (ensure_includable): extract checks to include and
	  prepend.
	class.c: prohibit refinement module

	* class.c (ensure_includable): cannot include refinement
	  module, or the type and the class do not match.
	  [ruby-core:79632] [Bug #13236]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-30 14:05:14 +00:00
usa
c884cbd810 merge revision(s) 58080,58138: [Backport #13363]
keep line number after unterminated string literal

	* parse.y (parser_parse_string): keep line number even after an
	  unterminated string literal.  it does not matter in the parser,
	  ripper needs this value after this error.
	parse.y: unterminated content token

	* parse.y (parser_parse_string): defer the end token to next
	  reading, to yield tSTRING_CONTENT with the unterminated content.
	  [Bug #13363]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-30 13:59:21 +00:00
usa
410c048a3a merge revision(s) 58062: [Backport #13306]
io.c: [DOC] expand docs for IO#puts

	[ruby-core:80081] [Bug #13306]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-30 13:53:30 +00:00
usa
657a806711 merge revision(s) 57531,57532,57533,57537: [Backport #13191]
pty/shl.rb: update [ci skip]

	* sample/pty/shl.rb: stop writer loop when the child exited.
	  PTY::ChildExited no longer raises asynchronously since r20298.
	  [ruby-dev:49974] [Bug #13191]
	pty/shl.rb: update [ci skip]

	* sample/pty/shl.rb: use io/console instead of stty.
	  [ruby-dev:49974] [Bug #13191]
	pty/shl.rb: update [ci skip]

	* sample/pty/shl.rb: do not manage array length separately.
	  [ruby-dev:49974] [Bug #13191]
	pty/shl.rb: update [ci skip]

	* sample/pty/shl.rb: leap exited child process.
	  [ruby-dev:49974] [Bug #13191]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-30 13:40:08 +00:00
usa
bf34bdf5c2 merge revision(s) 57490: [Backport #13175]
configure.in: use AC_SEARCH_LIBS

	* configure.in (--with-gmp, --with-jemalloc): use AC_SEARCH_LIBS
	  to check if no library is required, instead of AC_CHECK_LIB.
	  [ruby-core:79368] [Bug #13175]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-30 13:35:33 +00:00
usa
2dfde7e858 merge revision(s) 55604,55612: [Backport #13138]
* numeric.c (flo_round): [EXPERIMENTAL] adjust the case that the
	  receiver is close to the exact but unrepresentable middle value
	  of two values in the given precision.
	  http://d.hatena.ne.jp/hnw/20160702

	numeric.c: round as double

	* numeric.c (flo_round): compare as double, not long double with
	  i387.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-30 13:27:17 +00:00
usa
44e329ea7f * version.h: bump to 2.3.5
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-09 13:35:43 +00:00
usa
3f7e008443 merge revision(s) 57948,57949,57950:
thread.c: rb_thread_fd_close [ci skip]

	* thread.c (rb_thread_fd_close): re-define only for abi-check,
	  abort if called.  [ruby-core:80078] [Bug #13304]
	thread.c: rb_thread_fd_close no longer returns
	thread.c: rb_thread_fd_close [ci skip]

	* thread.c (rb_thread_fd_close): remove deprecated. a couple of
	  external libraries used it.  [ruby-core:80078] [Bug #13304]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-09 13:26:01 +00:00
nagachika
0ad1685513 * hash.c (any_hash): fix CI failure on L32LLP64 architecture.
The patch was provided by usa. [ruby-core:80484] [Bug #13376]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-29 15:00:45 +00:00
nagachika
4634c34db3 merge revision(s) 58200: [Backport #13376]
* hash.c (any_hash): fix Symbol#hash to be nondeterministic.
	  The patch was provided by Eric Wong. [ruby-core:80433] [Bug #13376]

	test/ruby/test_symbol.rb: new test for nondeterminism

	We need to ensure hashes for static symbols remain
	non-deterministic to avoid DoS attacks.   This is currently the
	case since 2.4+, but was not for the 2.3 series.

	* test/ruby/test_symbol.rb (test_hash_nondeterministic): new test
	  [ruby-core:80430] [Bug #13376]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-28 21:29:16 +00:00
nagachika
5264f6d848 merge revision(s) 57289: [Backport #13112]
test_io_console.rb: fix of old CentOS5

	* test/io/console/test_io_console.rb (test_winsize): on old CentOS5
	  window size seems unable to be set across a pty.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 22:31:28 +00:00
nagachika
945c600a6d * regcomp.c (set_bm_skip): Need to check the end of the string.
this patch is from e5c0e6c361. [Backport #12997]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 18:12:18 +00:00
nagachika
e6e4d2e158 merge revision(s) 58084: [Backport #13361]
configure.in: syscall is deprecated on macOS

	* configure.in: syscall is no longer supported on macOS since
	  10.12.  [ruby-core:80300] [Bug #13361]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 17:59:49 +00:00
nagachika
da9963b5cf bump teeny version to 2.3.4.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 17:45:42 +00:00
nagachika
2334147eab merge revision(s) 57765: [Backport #13273]
proc.c: documentation for Proc#{call,yield,[]}

	* proc.c: [DOC] fix and improve docs for Proc#{call,yield,[]}:

	  * change order of Document-method directives as workaround for an
	    RDoc rendering problem where the documentation for Proc#call displays
	    a "Document-method: []" code block.  [ruby-core:79887] [Bug #13273]
	  * add missing call-seq and example for Proc#yield
	  * remove pointless cross reference to Proc#yield
	  * update description for handling of extra or missing arguments,
	    improve examples and add cross reference to #lambda?

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 17:38:08 +00:00
nagachika
e88d0b324b merge revision(s) 57352: [Backport #13132]
doc: improve documentation for Binding [ci skip]

	* remove explicit return from code examples
	* grammar fixes
	* other small fixes

	Patch by: Marcus Stollsteimer <sto.mar@web.de>

	[ruby-core:79082] [Bug #13132]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 17:35:38 +00:00
nagachika
909331e26e merge revision(s) 57816,57817: [Backport #13292]
fix UTF-32 valid_encoding?

	* enc/utf_32be.c (utf32be_mbc_enc_len): check arguments precisely.
	  [ruby-core:79966] [Bug #13292]

	* enc/utf_32le.c (utf32le_mbc_enc_len): ditto.

	* regenc.h (UNICODE_VALID_CODEPOINT_P): predicate for valid
	  Unicode codepoints.
	fix UTF-32 valid_encoding?

	* test/ruby/test_io_m17n.rb (TestIO_M17N#test_puts_widechar): do
	  not use invalid codepoint.  [ruby-core:79966] [Bug #13292]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 17:34:10 +00:00
nagachika
ff6e8710ee merge revision(s) 57762: [Backport #13267]
broken mingw

	* configure.in: check whether frexp and modf are broken.

	* include/ruby/win32.h (frexp, modf): ignore bad declarations when
	  compiling as C++.  [ruby-core:79859] [Bug #13267]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 17:11:48 +00:00
nagachika
06103f2c1a merge revision(s) 57741: [Backport #13254]
disable critical-error-handler

	* win32/win32.c (rb_w32_sysinit): disable critical-error-handler
	  message box even on mswin, regardless of runtime DLL version.
	  [ruby-dev:49988] [Bug #13254]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 16:58:42 +00:00
nagachika
0dc5e45028 merge revision(s) 57640: [Backport #13214]
fileutils.rb: do not make root

	* lib/fileutils.rb (FileUtils#mkdir_p): no need to make root
	  directory which should be exist and cannot be made with mkdir
	  recent Cygwin can make a directory contains a colon.
	  [Bug #13214]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 16:57:39 +00:00
nagachika
e3a295cd50 merge revision(s) 57589: [Backport #13205]
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_3@58179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 16:56:03 +00:00
nagachika
7f04247e6d merge revision(s) 57515: [Backport #13169]
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_3@58178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 16:55:20 +00:00
nagachika
65639d44e9 merge revision(s) 57422: [Backport #13158]
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_3@58177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 16:54:09 +00:00
nagachika
d8a1986a05 merge revision(s) 57374: [Backport #13135]
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_3@58176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 16:41:00 +00:00
nagachika
39ee1e953f merge revision(s) 57302,57303,57304: [Backport #13119]
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_3@58175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 16:37:09 +00:00
nagachika
f8e37f5771 merge revision(s) 57362: [Backport #13096]
vm_method.c: resolve refined method to undef

	* vm_method.c (rb_undef): resolve the method entry which refines a
	  prepended method entry.  [ruby-core:78944] [Bug #13096]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 16:28:28 +00:00
nagachika
648ee72d18 merge revision(s) 57236: [Backport #13089]
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_3@58173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 16:17:42 +00:00
nagachika
7b509a5c0c merge revision(s) 57265,57266: [Backport #13081]
win32/resolv.rb: ad hoc workaround

	* ext/win32/lib/win32/resolv.rb (Win32::Resolv::SZ): an ad hoc
	  workaround for broken registry.  SearchList and other registry
	  values must be REG_SZ, or Windows ignores anything in those
	  values otherwise.  [ruby-dev:49924] [Bug #13081]
	  https://github.com/rubygems/rubygems/issues/1700
	win32/registry.rb: registry type names

	* ext/win32/lib/win32/registry.rb (Win32::Registry#read): show
	  registry type names instead of numeric values.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 16:15:52 +00:00