ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/opt/alt/ruby24/share/doc/alt-ruby24-2.4.5/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/opt/alt/ruby24/share/doc/alt-ruby24-2.4.5/ChangeLog

------------------------------------------------------------------------
r65137 | usa | 2018-10-18 00:34:55 +0900 (Thu, 18 Oct 2018) | 1 line

add tag v2_4_5
------------------------------------------------------------------------
r65134 | usa | 2018-10-18 00:30:28 +0900 (Thu, 18 Oct 2018) | 2 lines

updated ext/openssl to 2.0.9

------------------------------------------------------------------------
r65129 | usa | 2018-10-18 00:08:59 +0900 (Thu, 18 Oct 2018) | 8 lines

merge revision(s) 65125:

	infect taint flag on Array#pack and String#unpack
	with the directives "B", "b", "H" and "h".

		* pack.c (pack_pack, pack_unpack_internal): infect taint flag.

		* test/ruby/test_pack.rb: add test for above.
------------------------------------------------------------------------
r65118 | usa | 2018-10-17 18:25:11 +0900 (Wed, 17 Oct 2018) | 14 lines

merge revision(s) 63067,63068: [Backport #14658]

	Fix Kernel#singleton_method with Module#Prepend

	* proc.c (rb_obj_singleton_method): search the method entry from
	  the origin class, for fix prepended modules.  [Bug #14658]

	From: Vasiliy Ermolovich <younash@gmail.com>

	proc.c: fix segfault when no singleton class

	* proc.c (rb_obj_singleton_method): bail out if the receiver does
	  not have the singleton class without accessing the origin class
	  not to segfault.  [Bug #14658]
------------------------------------------------------------------------
r65117 | usa | 2018-10-17 18:22:24 +0900 (Wed, 17 Oct 2018) | 12 lines

merge revision(s) 62007,62024: [Backport #13069]

	mkmf.rb: ignore linker warnings

	* lib/mkmf.rb (try_ldflags): ignore linker warnings.  they cause
	  unexpected failures on OpenBSD.  [ruby-core:78827] [Bug #13069]

	mkmf.rb: werror on mswin

	* lib/mkmf.rb (MakeMakefile#try_ldflags): enable warning checking
	  on mswin, link.exe warns -l options but does not fail.
	  [Bug #13069]
------------------------------------------------------------------------
r65116 | usa | 2018-10-17 18:10:26 +0900 (Wed, 17 Oct 2018) | 11 lines

merge revision(s) 64745: [Backport #15118]

	Use opt_{aref,aset} over opt_{aref,aset}_with

	* compile.c (iseq_compile_each0): Use `opt_aref`/`opt_aset` over
	  `opt_aref_with`/`opt_aset_with` when frozen_string_literal: true,
	  not to resurrect the index string on non-Hash receiver.

	[Fix GH-1957]

	From: chopraanmol1 <chopraanmol1@gmail.com>
------------------------------------------------------------------------
r65115 | usa | 2018-10-17 17:40:36 +0900 (Wed, 17 Oct 2018) | 22 lines

merge revision(s) 63711,64398: [Backport #14841]

	thread_sync.c (rb_mutex_lock): fix deadlock

	* thread_sync.c (rb_mutex_lock): fix deadlock
	  [ruby-core:87467] [Bug #14841]

	thread_sync.c (rb_mutex_lock): acquire lock before being killed

	We (the thread acquiring the mutex) need to acquire the mutex
	before being killed to work with ConditionVariable#wait.

	Thus we reinstate the acquire-immediately-after-sleeping logic
	from pre-r63711 while still retaining the
	acquire-after-checking-for-interrupts logic from r63711.

	This regression was introduced in
	commit 501069b8a4013f2e3fdde35c50e9527ef0061963 (r63711)
	("thread_sync.c (rb_mutex_lock): fix deadlock") for
	[Bug #14841]

	[ruby-core:88503] [Bug #14999] [Bug #14841]
------------------------------------------------------------------------
r65114 | usa | 2018-10-17 17:30:28 +0900 (Wed, 17 Oct 2018) | 2 lines

revert r65112, because of fearing an imcompatibility

------------------------------------------------------------------------
r65113 | usa | 2018-10-17 17:27:39 +0900 (Wed, 17 Oct 2018) | 5 lines

merge revision(s) 64900: [Backport #15190]

	Just a shebang is valid code

	[ruby-core:89240] [Bug #15190]
------------------------------------------------------------------------
r65112 | usa | 2018-10-17 17:18:44 +0900 (Wed, 17 Oct 2018) | 8 lines

merge revision(s) 60018: [Backport #13931]

	configure.in: install_name without teeny

	* configure.in (RUBY_API_VERSION): remove teeny from install_name
	  to allow link extension libraries for the same minor version.
	  patched by kimuraw (Wataru Kimura) at [ruby-dev:50262].
	  [Bug #13931]
------------------------------------------------------------------------
r65111 | usa | 2018-10-17 17:15:47 +0900 (Wed, 17 Oct 2018) | 7 lines

merge revision(s) 64915: [Backport #15205]

	check argument type.

	* iseq.c (iseqw_s_compile): check argument type (T_STRING) to
	  avoid SEGV.

------------------------------------------------------------------------
r65110 | usa | 2018-10-17 17:11:45 +0900 (Wed, 17 Oct 2018) | 6 lines

merge revision(s) 64913: [Backport #15223]

	Support ubasecrt.dll 10.0.17763.1 included in Windows 10 October 2018 Update



------------------------------------------------------------------------
r65109 | usa | 2018-10-17 16:56:26 +0900 (Wed, 17 Oct 2018) | 3 lines

merge revision(s) 61323: [Backport #15069]

	suppress warning: 'const' attribute on function returning 'void'
------------------------------------------------------------------------
r64649 | usa | 2018-09-06 18:24:18 +0900 (Thu, 06 Sep 2018) | 3 lines

re-patched r50599 because of test failure on TravisCI.
[Backport #14060]

------------------------------------------------------------------------
r64564 | usa | 2018-08-27 23:18:59 +0900 (Mon, 27 Aug 2018) | 7 lines

merge revision(s) 64092: [Backport #14942]

	win32.c: limit write size on console

	* win32/win32.c (constat_parse): split long buffer and limit write
	  size on a console, as well as rb_w32_write.
	  [ruby-dev:50597] [Bug #14942]
------------------------------------------------------------------------
r64563 | usa | 2018-08-27 23:15:43 +0900 (Mon, 27 Aug 2018) | 6 lines

merge revision(s) 64071: [Backport #14941]

	ruby.c: taint ARGV on Windows

	* ruby.c (external_str_new_cstr): strings come from the external
	  should be tainted.  [ruby-dev:50596] [Bug #14941]
------------------------------------------------------------------------
r64562 | usa | 2018-08-27 23:11:19 +0900 (Mon, 27 Aug 2018) | 8 lines

merge revision(s) 64014: [Backport #14926]

	fix sum on infinity

	* array.c (rb_ary_sum): consider non-finite floats.
	  [ruby-core:88024] [Bug #14926]

	* enum.c (sum_iter): ditto.
------------------------------------------------------------------------
r64561 | usa | 2018-08-27 23:08:56 +0900 (Mon, 27 Aug 2018) | 21 lines

merge revision(s) 64007,64019,64020: [Backport #14929]

	thread.c (do_select): fix leak on exception

	When do_select is interrupted and raise happens from
	RUBY_VM_CHECK_INTS_BLOCKING, the original FD sets we copied
	do not get freed, leading to a memory leak.  Wrap up all the
	FD sets into a Ruby object to ensure the GC can release an
	allocations made for rb_fdset_t.

	This leak existed since Ruby 2.0.0 (r36430)

	[Bug #14929]

	increase timeout seconds.
	* test/ruby/test_io.rb (test_select_leak): increase timeout seconds
	  to pass this test on a high-load machine.


	60 sec is not enough at all

------------------------------------------------------------------------
r64560 | usa | 2018-08-27 22:59:09 +0900 (Mon, 27 Aug 2018) | 6 lines

merge revision(s) 63994: [Backport #14920]

	reduce tzset

	* time.c (rb_localtime_r): call tzset() only after TZ environment
	  variable is changed.
------------------------------------------------------------------------
r64559 | usa | 2018-08-27 22:48:53 +0900 (Mon, 27 Aug 2018) | 7 lines

merge revision(s) 63696: [Backport #14853]

	variable.c: fix receiver on private constant

	* variable.c (rb_const_search): fix NameError :receiver attribute
	  on private constant, should raise with the included module, not
	  the ICLASS.
------------------------------------------------------------------------
r64558 | usa | 2018-08-27 22:47:40 +0900 (Mon, 27 Aug 2018) | 27 lines

merge revision(s) 62731,62735: [Backport #14495]

	Bug Fix Enumerator::Lazy#uniq state for multiple call

	* enumerator.c (lazy_uniq_i): create new hash for each calls.
	  [Fix GH-1820]

	Currently

		2.5.0-preview1 :001 > arr = (0..100).lazy.uniq{|i| i % 10}
		 => #<Enumerator::Lazy: #<Enumerator::Lazy: 0..100>:uniq>
		2.5.0-preview1 :002 > arr.to_a
		 => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
		2.5.0-preview1 :003 > arr.to_a
		 => []

	Expected

	arr.to_a to always return same output

	From: Anmol Chopra <anmolchopra@rocketbox.in>

	test_enumerator.rb: duplicate assertions

	* test/ruby/test_enumerator.rb (test_uniq): remove assertions
	  which ared duplicate of lazy enumerator tests in
	  test_lazy_enumerator.rb.
------------------------------------------------------------------------
r64149 | usa | 2018-07-31 23:21:59 +0900 (Tue, 31 Jul 2018) | 6 lines

merge revision(s) 60011:

	test_gc.rb: relax criterion

	* test/ruby/test_gc.rb (TestGc#test_expand_heap): relax the
	  criterion and compare by epsilon.
------------------------------------------------------------------------
r64148 | usa | 2018-07-31 23:12:08 +0900 (Tue, 31 Jul 2018) | 12 lines

merge revision(s) 63512,63514: [Backport #14790]

	time.rb: fix parsing time zone in iso8601

	* lib/time.rb (Time.xmlschema): a colon in time zone designator
	  can be omitted.  [ruby-core:87277] [Bug #14790]

	time.rb: fix parsing time zone in iso8601

	* lib/time.rb (Time.xmlschema): the minute in time zone designator
	  can be omitted together with the preceding colon.
	  [ruby-core:87277] [Bug #14790]
------------------------------------------------------------------------
r64147 | usa | 2018-07-31 23:01:54 +0900 (Tue, 31 Jul 2018) | 6 lines

merge revision(s) 63417: [Backport #14756]

	error.c: check redefined backtrace result

	* error.c (rb_get_backtrace): check the result of `backtrace` even
	  if the method is redefined.  [ruby-core:87013] [Bug #14756]
------------------------------------------------------------------------
r64146 | usa | 2018-07-31 22:54:40 +0900 (Tue, 31 Jul 2018) | 2 lines

backport openssl v2.0.8 [Backport #14754]

------------------------------------------------------------------------
r64130 | usa | 2018-07-30 23:15:00 +0900 (Mon, 30 Jul 2018) | 9 lines

merge revision(s) 63741: [Backport #14868]

	process.c (ruby_fork_ruby): fix race in signal handling

	We must block signals before stopping timer-thread, otherwise
	signal handing may be delayed until (and if) another signal
	is received after timer-thread is restarted.

	[ruby-core:87622] [Bug #14868] [Bug #13916]
------------------------------------------------------------------------
r64129 | usa | 2018-07-30 23:11:50 +0900 (Mon, 30 Jul 2018) | 8 lines

merge revision(s) 63727: [Backport #14865]

	vm.c: fix infinite loop

	* vm.c: use EXEC_EVENT_HOOK_AND_POP_FRAME. While exception handling, if an exception
	  is raised in hooks, need to pop current frame and raise this raised exception by hook.

	[ruby-dev:50582] [Bug #14865]
------------------------------------------------------------------------
r64128 | usa | 2018-07-30 23:06:52 +0900 (Mon, 30 Jul 2018) | 15 lines

merge revision(s) 63698: [Backport #14856]

	lib/drb/extservm.rb (service): do not return `false'

	invoke_service_command may set entries in @servers to `false',
	making it incompatible with the intended use of the
	safe navigation operator.

	This caused occasional DRb test failures, but they were hidden
	with automatic retry.

	[ruby-core:87524] [Bug #14856]

	Fixes: r53111 ("use safe navigation operator")
		commit 059c9c1cf371e049c7481c78b76e9620da52757f [GH-1142]
------------------------------------------------------------------------
r64127 | usa | 2018-07-30 23:00:13 +0900 (Mon, 30 Jul 2018) | 9 lines

merge revision(s) 63112: [Backport #14818]

	Remove outdated example from Numeric documentation

	Since 2.5, Numeric instances can be cloned and duplicated.

	[Fix GH-1850]

	From: Miguel Landaeta <miguel@miguel.cc>
------------------------------------------------------------------------
r64126 | usa | 2018-07-30 22:57:35 +0900 (Mon, 30 Jul 2018) | 24 lines

merge revision(s) 63571,63572: [Backport #14816]

	`int isnan(double)` is a POSIXism

	- `isnan` is something relatively new.  We need to provide one for
	  those systems without it.  However:
	- X/Open defines `int isnan(double)`. Note the `int`.
	- C99 defines `isnan(x)` to be a macro.
	- C++11 nukes them all, undefines all the "masking macro"s, and
	  defines its own `bool isnan(double)`.  Note the `bool`.
	- In C++, `int isnan(double)` and `bool isnan(double)` are
	  incompatible.
	- So the mess.

	[Bug #14816][ruby-core:87364]
	further reading: https://developers.redhat.com/blog/2016/02/29/why-cstdlib-is-more-complicated-than-you-might-think/


	include/ruby/missing.h: defined(__cplusplus) before using __cplusplus

	* include/ruby/missing.h (isinf, isnan): For non-C++ programs,
	  defined(__cplusplus) may be needed before using __cplusplus.
	  [Bug #14816]

------------------------------------------------------------------------
r64125 | usa | 2018-07-30 22:54:27 +0900 (Mon, 30 Jul 2018) | 21 lines

merge revision(s) 63549,63551,63554: [Backport #14805]

	memo->u3.cnt is long not int [Bug #14805]

	enum.c: mitigate overflows

	* enum.c (enum_count): convert counters to Integer as unsigned
	  long, instead of long, to mitigate overflows.
	  [ruby-core:87348] [Bug #14805]

	* enum.c (ary_inject_op): ditto.

	* enum.c (each_with_index_i): ditto, instead of int.

	* enum.c (find_index_i, find_index_iter_i): ditto, instead of
	  unsigned int.

	enum.c: bignum counter

	* enum.c (imemo_count_up, imemo_count_value): promote the counter
	  value to a bignum on overflow.  [Bug #14805]
------------------------------------------------------------------------
r63809 | usa | 2018-06-30 22:24:21 +0900 (Sat, 30 Jun 2018) | 5 lines

Fix path checks for case insensitive filesystem

see https://github.com/rubygems/rubygems/pull/2211
[ruby-core:86745] [Backport #14721]

------------------------------------------------------------------------
r63808 | usa | 2018-06-30 22:08:51 +0900 (Sat, 30 Jun 2018) | 19 lines

merge revision(s) 63054,63055,63056: [Backport #14655]

	test_time_tz.rb: Kiritimati tzdata fix

	* test/ruby/test_time_tz.rb (TestTimeTZ#test_pacific_kiritimati):
	  fix the expected data at the skip of New Year's Eve 1994.
	  [Bug #14655]

	test_time_tz.rb: Kiritimati tzdata fix

	* test/ruby/test_time_tz.rb (gen_zdump_test): fix the expected
	  data at the Kiritimati's skip of New Year's Eve 1994.
	  [Bug #14655]

	test_time_tz.rb: Lisbon tzdata fix

	* test/ruby/test_time_tz.rb (gen_variational_zdump_test): Update
	  Lisbon zdump data, which fixed the 1912-01-01 transition for
	  Portugual and its colonies.  [Bug #14655]
------------------------------------------------------------------------
r63807 | usa | 2018-06-30 22:06:35 +0900 (Sat, 30 Jun 2018) | 13 lines

merge revision(s) 60596,60599: [Backport #14060]

	file.c: infect from arguments

	* file.c (rb_check_realpath_internal): infetct the result with
	  arguments, no taint if none are tainted and cwd is not used.
	  [ruby-core:83583] [Bug #14060]

	file.c: infect from arguments

	* file.c (rb_check_realpath_internal): infetct the result with
	  arguments, no taint if none are tainted and cwd is not used.
	  [ruby-core:83583] [Bug #14060]
------------------------------------------------------------------------
r63806 | usa | 2018-06-30 22:00:09 +0900 (Sat, 30 Jun 2018) | 7 lines

merge revision(s) 62952: [Backport #14638]

	win32/file.c: relative path with drive letter

	* win32/file.c (IS_ABSOLUTE_PATH_P): home directory should not be
	  a relative path regardless a drive letter.   PathIsRelativeW
	  returns FALSE on such path.  [ruby-core:86356] [Bug #14638]
------------------------------------------------------------------------
r63805 | usa | 2018-06-30 21:56:17 +0900 (Sat, 30 Jun 2018) | 37 lines

merge revision(s) 62396: [Backport #14357]

	st.c: retry operations if rebuilt

	Calling the .eql? and .hash methods during a Hash operation can
	result in a thread switch or a signal handler to run: allowing
	one execution context to rebuild the hash table while another is
	still reading or writing the table.  This results in a
	use-after-free bug affecting the thread_safe-0.3.6 test suite
	and likely other bugs.

	This bug did not affect users of commonly keys (String, Symbol,
	Fixnum) as those are optimized to avoid method dispatch
	for .eql? and .hash methods.

	A separate version of this change needs to be ported to Ruby 2.3.x
	which had a different implementation of st.c but was affected
	by the same bug.

	* st.c: Add comment about table rebuilding during comparison.
	  (DO_PTR_EQUAL_CHECK): New macro.
	  (REBUILT_TABLE_ENTRY_IND, REBUILT_TABLE_BIN_IND): New macros.
	  (find_entry, find_table_entry_ind, find_table_bin_ind): Use new
	  macros.  Return the rebuild flag.
	  (find_table_bin_ptr_and_reserve): Ditto.
	  (st_lookup, st_get_key, st_insert, st_insert2): Retry the
	  operation if the table was rebuilt.
	  (st_general_delete, st_shift, st_update, st_general_foreach):
	  Ditto.
	  (st_rehash_linear, st_rehash_indexed): Use DO_PTR_EQUAL_CHECK.
	  Return the rebuild flag.
	  (st_rehash): Retry the operation if the table was rebuilt.
	  [ruby-core:85510] [Ruby trunk Bug#14357]

	Thanks to Vit Ondruch for reporting the bug.

	From: Vladimir Makarov <vmakarov@redhat.com>
------------------------------------------------------------------------
r63804 | usa | 2018-06-30 21:34:19 +0900 (Sat, 30 Jun 2018) | 10 lines

merge revision(s) 62513: [Backport #12762]

	Update url with 404 status on LEGAL file.

	  * Update redirected and upstream url.
	  * Added the Wayback Machine url for missing link.

	  [Bug #12762][ruby-dev:49802]

	From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r63691 | usa | 2018-06-18 23:11:34 +0900 (Mon, 18 Jun 2018) | 2 lines

Forgotten to update RUBY_PATCHLEVEL

------------------------------------------------------------------------
r63690 | svn | 2018-06-18 22:50:01 +0900 (Mon, 18 Jun 2018) | 1 line

* 2018-06-18
------------------------------------------------------------------------
r63689 | usa | 2018-06-18 22:50:00 +0900 (Mon, 18 Jun 2018) | 6 lines

Fixed tempfile leaks

* lib/rubygems.rb (Gem::VERSION): 2.6.14.2

* lib/rubygems/ext/ext_conf_builder.rb: merge from 2.7.7.

------------------------------------------------------------------------
r63626 | usa | 2018-06-10 17:59:17 +0900 (Sun, 10 Jun 2018) | 6 lines

merge revision(s) 58455:

	use $(srcdir).

	* win32/Makefile.sub (enc/jis/props.h): build it in not builddir,
	  but in srcdir.
------------------------------------------------------------------------
r63036 | nagachika | 2018-03-29 21:15:11 +0900 (Thu, 29 Mar 2018) | 1 line

bump up teeny version to 2.4.5.
------------------------------------------------------------------------
r63012 | nagachika | 2018-03-28 22:54:58 +0900 (Wed, 28 Mar 2018) | 80 lines

merge revision(s) 60584,62954,62955,62956,62957,62958,62959,63008:

	webrick: support Proc objects as body responses

	* lib/webrick/httpresponse.rb (send_body): call send_body_proc
	  (send_body_proc): new method
	  (class ChunkedWrapper): new class

	* test/webrick/test_httpresponse.rb (test_send_body_proc): new test
	  (test_send_body_proc_chunked): ditto
	  [Feature #855]

	webrick/httpresponse: IO.copy_stream for regular files

	Remove the redundant _send_file method since its functionality
	is unnecessary with IO.copy_stream.  IO.copy_stream also allows
	the use of sendfile under some OSes to speed up copies to
	non-TLS sockets.

	Testing with "curl >/dev/null" and "ruby -run -e httpd" to
	read a 1G file over Linux loopback reveals a reduction from
	around ~0.770 to ~0.490 seconds on the client side.

	* lib/webrick/httpresponse.rb (send_body_io): use IO.copy_stream
	  (_send_file): remove
	  [Feature #14237]

	webrick: use IO.copy_stream for single range response

	This is also compatible with range responses generated
	by Rack::File (tested with rack 2.0.3).

	* lib/webrick/httpresponse.rb (send_body_io): use Content-Range
	* lib/webrick/httpservlet/filehandler.rb (make_partial_content):
	  use File object for the single range case
	* test/webrick/test_filehandler.rb (get_res_body): use send_body
	  to test result

	test/webrick/test_filehandler.rb: stricter multipart range test

	We need to ensure we generate compatibile output in
	the face of future changes

	* test/webrick/test_filehandler.rb (test_make_partial_content):
	  check response body

	webrick: quiet warning for multi-part ranges

	Content-Length is ignored by WEBrick::HTTPResponse even if we
	calculate it, so instead we chunk responses to HTTP/1.1 clients
	and terminate HTTP/1.0 connections.

	* lib/webrick/httpservlet/filehandler.rb (make_partial_content):
	  quiet warning

	webrick/httpresponse: make ChunkedWrapper copy_stream-compatible

	The .write method needs to return the number of bytes written
	to avoid confusing IO.copy_stream.

	* lib/webrick/httpresponse.rb (ChunkedWrapper#write): return bytes written
	  (ChunkedWrapper#<<): return self

	webrick: use IO.copy_stream for multipart response

	Use the new Proc response body feature to generate a multipart
	range response dynamically.  We use a flat array to minimize
	object overhead as much as possible; as many ranges may fit
	into an HTTP request header.

	* lib/webrick/httpservlet/filehandler.rb (multipart_body): new method
	  (make_partial_content): use multipart_body

	get rid of test error/failure on Windows introduced at r62955

	* lib/webrick/httpresponse.rb (send_body_io): use seek if NotImplementedError
	  is raised in IO.copy_stream with offset.

	* lib/webrick/httpservlet/filehandler.rb (multipart_body): ditto.

------------------------------------------------------------------------
r63004 | nagachika | 2018-03-28 21:23:29 +0900 (Wed, 28 Mar 2018) | 72 lines

merge revision(s) 62960,62961,62962,62963,62964,62965:

	webrick/httprequest: limit request headers size

	We use the same 112 KB limit started (AFAIK) by Mongrel, Thin,
	and Puma to prevent malicious users from using up all the memory
	with a single request.  This also limits the damage done by
	excessive ranges in multipart Range: requests.

	Due to the way we rely on IO#gets and the desire to keep
	the code simple, the actual maximum header may be 4093 bytes
	larger than 112 KB, but we're splitting hairs at that point.

	* lib/webrick/httprequest.rb: define MAX_HEADER_LENGTH
	  (read_header): raise when headers exceed max length

	webrick/httpservlet/cgihandler: reduce memory use

	WEBrick::HTTPRequest#body can be passed a block to process the
	body in chunks.  Use this feature to avoid building a giant
	string in memory.

	* lib/webrick/httpservlet/cgihandler.rb (do_GET):
	  avoid reading entire request body into memory
	  (do_POST is aliased to do_GET, so it handles bodies)

	webrick/httprequest: raise correct exception

	"BadRequest" alone does not resolve correctly, it is in the
	HTTPStatus namespace.

	* lib/webrick/httprequest.rb (read_chunked): use correct exception
	* test/webrick/test_httpserver.rb (test_eof_in_chunk): new test

	webrick/httprequest: use InputBufferSize for chunked requests

	While WEBrick::HTTPRequest#body provides a Proc interface
	for streaming large request bodies, clients must not force
	the server to use an excessively large chunk size.

	* lib/webrick/httprequest.rb (read_chunk_size): limit each
	  read and block.call to :InputBufferSize in config.
	* test/webrick/test_httpserver.rb (test_big_chunks): new test

	webrick: add test for Digest auth-int

	No changes to the actual code, this is a new test for
	a feature for which no tests existed.  I don't understand
	the Digest authentication code well at all, but this is
	necessary for the subsequent change.

	* test/webrick/test_httpauth.rb (test_digest_auth_int): new test
	  (credentials_for_request): support bodies with POST

	webrick/httpauth/digestauth: stream req.body

	WARNING! WARNING! WARNING!  LIKELY BROKEN CHANGE

	Pass a proc to WEBrick::HTTPRequest#body to avoid reading a
	potentially large request body into memory during
	authentication.

	WARNING! this will break apps completely which want to do
	something with the body besides calculating the MD5 digest
	of it.

	Also, keep in mind that probably nobody uses "auth-int".
	Servers such as Apache, lighttpd, nginx don't seem to
	support it; nor does curl when using POST/PUT bodies;
	and we didn't have tests for it until now...

	* lib/webrick/httpauth/digestauth.rb (_authenticate): stream req.body
------------------------------------------------------------------------
r63003 | nagachika | 2018-03-28 21:07:05 +0900 (Wed, 28 Mar 2018) | 11 lines

merge revision(s) 62991,63000:

	unixsocket.c: check NUL bytes

	* ext/socket/unixsocket.c (rsock_init_unixsock): check NUL bytes.
	  https://hackerone.com/reports/302997

	unixsocket.c: abstract namespace

	* ext/socket/unixsocket.c (unixsock_path_value): fix r62991 for
	  Linux abstract namespace.
------------------------------------------------------------------------
r63002 | nagachika | 2018-03-28 20:49:00 +0900 (Wed, 28 Mar 2018) | 11 lines

merge revision(s) 62968:

	webrick: prevent response splitting and header injection

	Original patch by tenderlove (with minor style adjustments).

	* lib/webrick/httpresponse.rb (send_header): call check_header
	  (check_header): raise on embedded CRLF in header value
	* test/webrick/test_httpresponse.rb
	  (test_prevent_response_splitting_headers): new test
	* (test_prevent_response_splitting_cookie_headers): ditto
------------------------------------------------------------------------
r63001 | nagachika | 2018-03-28 20:44:55 +0900 (Wed, 28 Mar 2018) | 6 lines

merge revision(s) 62992:

	pack.c: fix underflow

	* pack.c (pack_unpack_internal): get rid of underflow.
	  https://hackerone.com/reports/298246
------------------------------------------------------------------------
r62999 | nagachika | 2018-03-28 20:16:19 +0900 (Wed, 28 Mar 2018) | 9 lines

merge revision(s) 62989:

	dir.c: check NUL bytes

	* dir.c (GlobPathValue): should be used in rb_push_glob only.
	  other methods should use FilePathValue.
	  https://hackerone.com/reports/302338

	* dir.c (rb_push_glob): expand GlobPathValue
------------------------------------------------------------------------
r62998 | nagachika | 2018-03-28 19:52:33 +0900 (Wed, 28 Mar 2018) | 5 lines

merge revision(s) 62990:

	Ignore file separator from tmpfile/tmpdir name.

	From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r62988 | nagachika | 2018-03-28 18:39:53 +0900 (Wed, 28 Mar 2018) | 17 lines

merge revision(s) 62953:

	webrick: favor .write over << method

	This will make the next change to use IO.copy_stream
	easier-to-read.  When we can drop Ruby 2.4 support in a few
	years, this will allow us to use writev(2) with multiple
	arguments for headers and chunked responses.

	* lib/webrick/cgi.rb (write): new wrapper method
	  lib/webrick/httpresponse.rb: (send_header): use socket.write
	  (send_body_io): ditto
	  (send_body_string): ditto
	  (send_body_proc): ditto
	  (_write_data): ditto
	  (ChunkedWrapper#write): ditto
	  (_send_file): ditto
------------------------------------------------------------------------
r62918 | nagachika | 2018-03-25 15:11:14 +0900 (Sun, 25 Mar 2018) | 9 lines

merge revision(s) 62725: [Backport #14604]

	Fix setting method visibility on method wrapped with prepend

	Ignore prepended modules when looking for already defined methods on a
	class to set the visibility on.
	[Fix GH-1834]

	From: Dylan Thacker-Smith <Dylan.Smith@shopify.com>
------------------------------------------------------------------------
r62917 | nagachika | 2018-03-25 14:54:39 +0900 (Sun, 25 Mar 2018) | 7 lines

merge revision(s) 62673: [Backport #14577]

	thread.c: deadlock in backtrace

	* thread.c (unblock_function_set): check interrupts just once
	  during raising exceptions, as they are deferred since r16651.
	  [ruby-core:85939] [Bug #14577]
------------------------------------------------------------------------
r62916 | nagachika | 2018-03-25 14:35:17 +0900 (Sun, 25 Mar 2018) | 15 lines

merge revision(s) 62394,62395: [Backport #14469]

	vm_insnhelper.c: rb_autoloading_value flag

	* vm_insnhelper.c (vm_get_ev_const): add flag argument of
	  `rb_autoloading_value`.

	* constant.h (rb_autoloading_value): moved the declaration from
	  vm_core.h for `rb_const_flag_t`.  [ruby-core:85516] [Bug #14469]

	variable.c: flags at autoloading

	* variable.c (const_tbl_update): flags by deprecate_constant /
	  private_constant set during autoloading should be preserved
	  after required.  [ruby-core:85516] [Bug #14469]
------------------------------------------------------------------------
r62915 | nagachika | 2018-03-25 13:12:57 +0900 (Sun, 25 Mar 2018) | 18 lines

merge revision(s) 62671: [Backport #14571]

	resolv.rb: close socket

	* lib/resolv.rb (UnconnectedUDP#lazy_initialize): store new
	  sockets before binding, so the sockets get closed when the
	  requester is closing.

	* lib/resolv.rb (ConnectedUDP#lazy_initialize): ditto.

	* lib/resolv.rb (UnconnectedUDP#close): synchronize to get rid of
	  race condition.

	* lib/resolv.rb (ConnectedUDP#close): ditto.

	[ruby-core:85901] [Bug #14571]

	From: quixoten (Devin Christensen) <quixoten@gmail.com>
------------------------------------------------------------------------
r62904 | nagachika | 2018-03-23 21:42:58 +0900 (Fri, 23 Mar 2018) | 7 lines

merge revision(s) 60162: [Backport #13994]

	socket.c: null byte at Socket.getnameinfo

	* ext/socket/socket.c (sock_s_getnameinfo): check null byte.
	  patched by tommy (Masahiro Tomita) in [ruby-dev:50286].
	  [Bug #13994]
------------------------------------------------------------------------
r62903 | nagachika | 2018-03-23 21:03:58 +0900 (Fri, 23 Mar 2018) | 7 lines

merge revision(s) 62607: [Backport #14557]

	file.c: realpath on special symlink

	* file.c (realpath_rec): fallback to symlink path when it is
	  accessible but the link target is not actual entry on file
	  systems.  [ruby-dev:50487] [Bug #14557]
------------------------------------------------------------------------
r62883 | nagachika | 2018-03-22 01:17:09 +0900 (Thu, 22 Mar 2018) | 8 lines

merge revision(s) 62572: [Backport #14549]

	date_core.c: defensive code

	* ext/date/date_core.c (f_cmp): check comparison failure.

	* ext/date/date_core.c (d_lite_step): deal with the comparison
	  result more defensively.  [ruby-core:85796] [Bug #14549]
------------------------------------------------------------------------
r62880 | nagachika | 2018-03-22 00:57:56 +0900 (Thu, 22 Mar 2018) | 6 lines

merge revision(s) 61862: [Backport #14368]

	parse.y (new_regexp): Fix SEGV of `/#{"\u3042"}#{'{U+3044}'}/` in non UTF-8

	Mixing other encoding string literals in one Regexp caused SEGV.
	This bug was found by CoverityScan.
------------------------------------------------------------------------
r62877 | nagachika | 2018-03-22 00:27:09 +0900 (Thu, 22 Mar 2018) | 8 lines

merge revision(s) 62107: [Backport #14420]

	force fixable

	* complex.c (nucomp_hash): force hash values fixable.
	  [ruby-core:85224] [Bug #14420]

	* rational.c (nurat_hash): ditto.
------------------------------------------------------------------------
r62876 | svn | 2018-03-22 00:04:01 +0900 (Thu, 22 Mar 2018) | 1 line

* 2018-03-22
------------------------------------------------------------------------
r62875 | nagachika | 2018-03-22 00:04:00 +0900 (Thu, 22 Mar 2018) | 7 lines

merge revision(s) 62040: [Backport #14388]

	string.c: clear substring code range

	* string.c (str_substr): substring of broken code range string may
	  be valid or broken.  patch by tommy (Masahiro Tomita) at
	  [ruby-dev:50430] [Bug #14388].
------------------------------------------------------------------------
r62874 | nagachika | 2018-03-21 23:26:48 +0900 (Wed, 21 Mar 2018) | 8 lines

merge revision(s) 57637: [Backport #14453]

	win32.c: memcpy instead of strlcpy

	* win32/win32.c (cmdglob): memcpy the exact size instead of
	  strlcpy with +1.

	* win32/win32.c (w32_cmdvector): ditto, with NUL-terminating.
------------------------------------------------------------------------
r62868 | nagachika | 2018-03-21 03:07:27 +0900 (Wed, 21 Mar 2018) | 9 lines

merge revision(s) 61603: [Backport #14279]

	check array for zsuper. [Bug #14279]

	* compile.c (iseq_compile_each0): for zsuper (NODE_ZSUPER), we need to check
	  given argument is Array or not.

	* test/ruby/test_super.rb: add a test for this bug.

------------------------------------------------------------------------
r62867 | nagachika | 2018-03-21 02:55:34 +0900 (Wed, 21 Mar 2018) | 13 lines

merge revision(s) 61639: [Backport #14323]

	net/ftp: fix FrozenError in BufferedSocket

	I noticed this bug while working on something else with
	RUBYOPT=-d on, existing test cases all passed with it.

	Note: I use String.new because it is the local style, here,
	I prefer +'' (or ''.b, for a future commit)

	* lib/net/ftp.rb (BufferedSocket#read): use String.new
	* test/net/ftp/test_buffered_socket.rb (test_read_nil): new test
	  [ruby-core:84675] [Bug #14323]
------------------------------------------------------------------------
r62866 | nagachika | 2018-03-21 01:21:06 +0900 (Wed, 21 Mar 2018) | 8 lines

merge revision(s) 62115: [Backport #14421]

	proc: fix super_method segfault after bind

	* proc.c: handle undefined iclass
	  [ruby-core:85231] [Bug #14421]

	From: Eric Wong <e@80x24.org>
------------------------------------------------------------------------
r62865 | nagachika | 2018-03-21 00:53:38 +0900 (Wed, 21 Mar 2018) | 12 lines

merge revision(s) 58245,60127: [Backport #13973]

	Refactored using Method#owner.


	proc.c: super_method of included method

	* proc.c (method_super_method): search the next super method along
	  the included ancestor chain.  [ruby-core:83114] [Bug #13973]

	* vm_method.c (rb_callable_method_entry_without_refinements):
	  return the defined class.
------------------------------------------------------------------------
r62864 | nagachika | 2018-03-20 23:18:34 +0900 (Tue, 20 Mar 2018) | 108 lines

merge revision(s) 61564,61565,61571: [Backport #14270]

	fix SEGV touching uninitialized memory

	This function can be called from Init_VM().
	No assumption can be made about object internals.

	(lldb) run
	Process 15734 launched: './miniruby' (x86_64)
	Process 15734 stopped
	* thread #1: tid = 0x1441d4, 0x00000001000bdfcb miniruby`rb_raw_iseq_info(buff="0x0000000100f61f48 [0    ] T_IMEMO iseq", buff_size=256, iseq=0x0000000100f61f48) + 27 at gc.c:9273, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x50)
	    frame #0: 0x00000001000bdfcb miniruby`rb_raw_iseq_info(buff="0x0000000100f61f48 [0    ] T_IMEMO iseq", buff_size=256, iseq=0x0000000100f61f48) + 27 at gc.c:9273
	   9270 static void
	   9271 rb_raw_iseq_info(char *buff, const int buff_size, const rb_iseq_t *iseq)
	   9272 {
	-> 9273     if (iseq->body->location.label) {
	   9274         VALUE path = rb_iseq_path(iseq);
	   9275         snprintf(buff, buff_size, "%s %s@%s:%d", buff,
	   9276                  RSTRING_PTR(iseq->body->location.label),
	(lldb) p *iseq
	(rb_iseq_t) $0 = {
	  flags = 28698
	  reserved1 = 0
	  body = 0x0000000000000000
	  aux = {
	    compile_data = 0x0000000000000000
	    loader = (obj = 0, index = 0)
	    trace_events = 0
	  }
	}
	(lldb) bt
	* thread #1: tid = 0x1441d4, 0x00000001000bdfcb miniruby`rb_raw_iseq_info(buff="0x0000000100f61f48 [0    ] T_IMEMO iseq", buff_size=256, iseq=0x0000000100f61f48) + 27 at gc.c:9273, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x50)
	  * frame #0: 0x00000001000bdfcb miniruby`rb_raw_iseq_info(buff="0x0000000100f61f48 [0    ] T_IMEMO iseq", buff_size=256, iseq=0x0000000100f61f48) + 27 at gc.c:9273
	    frame #1: 0x00000001000bde72 miniruby`rb_raw_obj_info(buff="0x0000000100f61f48 [0    ] T_IMEMO iseq", buff_size=256, obj=4311097160) + 2786 at gc.c:9396
	    frame #2: 0x00000001000b7c5f miniruby`obj_info(obj=4311097160) + 95 at gc.c:9428
	    frame #3: 0x00000001000c16a8 miniruby`newobj_init(klass=0, flags=28698, v1=0, v2=0, v3=0, wb_protected=1, objspace=0x00000001007ee280, obj=4311097160) + 424 at gc.c:1887
	    frame #4: 0x00000001000b44c9 miniruby`newobj_of(klass=0, flags=28698, v1=0, v2=0, v3=0, wb_protected=1) + 217 at gc.c:1970
	    frame #5: 0x00000001000b464b miniruby`rb_imemo_new(type=imemo_iseq, v1=0, v2=0, v3=0, v0=0) + 75 at gc.c:2017
	    frame #6: 0x00000001000fd914 miniruby`iseq_imemo_alloc + 36 at iseq.h:156
	    frame #7: 0x00000001000f6e1d miniruby`iseq_alloc + 13 at iseq.c:211
	    frame #8: 0x00000001000f6bf8 miniruby`rb_iseq_new_with_opt(node=0x0000000000000000, name=4311097200, path=4311097200, realpath=8, first_lineno=1, parent=0x0000000000000000, type=ISEQ_TYPE_TOP, option=0x0000000100335c30) + 56 at iseq.c:519
	    frame #9: 0x00000001000f6bb6 miniruby`rb_iseq_new(node=0x0000000000000000, name=4311097200, path=4311097200, realpath=8, parent=0x0000000000000000, type=ISEQ_TYPE_TOP) + 86 at iseq.c:480
	    frame #10: 0x0000000100284bb0 miniruby`Init_VM + 1040 at vm.c:3022
	    frame #11: 0x00000001000d4f7d miniruby`rb_call_inits + 189 at inits.c:55
	    frame #12: 0x000000010009fe06 miniruby`ruby_setup + 198 at eval.c:61
	    frame #13: 0x000000010009fe5d miniruby`ruby_init + 13 at eval.c:78
	    frame #14: 0x00000001000009ed miniruby`main(argc=2, argv=0x00007fff5fbfdbf0) + 93 at main.c:41
	    frame #15: 0x00007fff88eda5ad libdyld.dylib`start + 1
	(lldb)

	fix SEGV touching uninitialized memory

	This function can be called from rb_data_typed_object_zalloc().
	No assumption can be made about object internals.

	(lldb) run
	Process 22135 launched: './miniruby' (x86_64)
	Process 22135 stopped
	* thread #1: tid = 0x14a3af, 0x000000010008ac8a miniruby`vm_block_type(block=0x0000000000000000) + 12 at vm_core.h:1364, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x18)
	    frame #0: 0x000000010008ac8a miniruby`vm_block_type(block=0x0000000000000000) + 12 at vm_core.h:1364
	   1361         break;
	   1362     }
	   1363 #endif
	-> 1364     return block->type;
	   1365 }
	   1366
	   1367 static inline void
	(lldb) bt
	* thread #1: tid = 0x14a3af, 0x000000010008ac8a miniruby`vm_block_type(block=0x0000000000000000) + 12 at vm_core.h:1364, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x18)
	  * frame #0: 0x000000010008ac8a miniruby`vm_block_type(block=0x0000000000000000) + 12 at vm_core.h:1364
	    frame #1: 0x000000010008acdb miniruby`vm_block_iseq(block=0x0000000000000000) + 24 at vm_core.h:1399
	    frame #2: 0x000000010008acc1 miniruby`vm_proc_iseq(procval=4310866360) + 32 at vm_core.h:1387
	    frame #3: 0x000000010009cbed miniruby`rb_raw_obj_info(buff="0x0000000100f299b8 [0    ] proc (Proc)", buff_size=256, obj=4310866360) + 1513 at gc.c:9349
	    frame #4: 0x000000010009cf01 miniruby`obj_info(obj=4310866360) + 98 at gc.c:9428
	    frame #5: 0x000000010008ca1b miniruby`newobj_init(klass=4311027960, flags=12, v1=4298186080, v2=1, v3=0, wb_protected=32, objspace=0x00000001007cf280, obj=4310866360) + 338 at gc.c:1887
	    frame #6: 0x000000010008cce5 miniruby`newobj_of(klass=4311027960, flags=12, v1=4298186080, v2=1, v3=0, wb_protected=32) + 171 at gc.c:1970
	    frame #7: 0x000000010008d01d miniruby`rb_data_typed_object_wrap(klass=4311027960, datap=0x0000000000000000, type=0x0000000100311d60) + 133 at gc.c:2062
	    frame #8: 0x000000010008d04e miniruby`rb_data_typed_object_zalloc(klass=4311027960, size=40, type=0x0000000100311d60) + 42 at gc.c:2073
	    frame #9: 0x000000010011b459 miniruby`rb_proc_alloc(klass=4311027960) + 36 at proc.c:113
	    frame #10: 0x0000000100204d8e miniruby`vm_proc_create_from_captured(klass=4311027960, captured=0x00000001025003f8, block_type=block_type_iseq, is_from_method='\0', is_lambda='\x01') + 44 at vm.c:814
	    frame #11: 0x00000001002050d8 miniruby`rb_vm_make_proc_lambda(ec=0x00000001007cf548, captured=0x00000001025003f8, klass=4311027960, is_lambda='\x01') + 134 at vm.c:892
	    frame #12: 0x000000010011c0d2 miniruby`proc_new(klass=4311027960, is_lambda='\x01') + 445 at proc.c:752
	    frame #13: 0x000000010011c154 miniruby`rb_block_lambda + 27 at proc.c:808
	    frame #14: 0x00000001001ee7e3 miniruby`call_cfunc_0(func=(miniruby`rb_block_lambda at proc.c:807), recv=4310991600, argc=0, argv=0x0000000102400480) + 41 at vm_insnhelper.c:1729
	    frame #15: 0x00000001001ef2c3 miniruby`vm_call_cfunc_with_frame(ec=0x00000001007cf548, reg_cfp=0x00000001025003e0, calling=0x00007fff5fbfd4d0, ci=0x0000000102537be0, cc=0x000000010253e0f0) + 386 at vm_insnhelper.c:1918
	    frame #16: 0x00000001001ef412 miniruby`vm_call_cfunc(ec=0x00000001007cf548, reg_cfp=0x00000001025003e0, calling=0x00007fff5fbfd4d0, ci=0x0000000102537be0, cc=0x000000010253e0f0) + 149 at vm_insnhelper.c:1934
	    frame #17: 0x00000001001f0655 miniruby`vm_call_method_each_type(ec=0x00000001007cf548, cfp=0x00000001025003e0, calling=0x00007fff5fbfd4d0, ci=0x0000000102537be0, cc=0x000000010253e0f0) + 239 at vm_insnhelper.c:2232
	    frame #18: 0x00000001001f0ce0 miniruby`vm_call_method(ec=0x00000001007cf548, cfp=0x00000001025003e0, calling=0x00007fff5fbfd4d0, ci=0x0000000102537be0, cc=0x000000010253e0f0) + 117 at vm_insnhelper.c:2355
	    frame #19: 0x00000001001f0eb6 miniruby`vm_call_general(ec=0x00000001007cf548, reg_cfp=0x00000001025003e0, calling=0x00007fff5fbfd4d0, ci=0x0000000102537be0, cc=0x000000010253e0f0) + 59 at vm_insnhelper.c:2398
	    frame #20: 0x00000001001f6e61 miniruby`vm_exec_core(ec=0x00000001007cf548, initial=0) + 7480 at insns.def:850
	    frame #21: 0x0000000100207995 miniruby`vm_exec(ec=0x00000001007cf548) + 230 at vm.c:1771
	    frame #22: 0x0000000100208647 miniruby`rb_iseq_eval_main(iseq=0x0000000100f29fd0) + 52 at vm.c:2019
	    frame #23: 0x000000010007b750 miniruby`ruby_exec_internal(n=0x0000000100f29fd0) + 297 at eval.c:246
	    frame #24: 0x000000010007b876 miniruby`ruby_exec_node(n=0x0000000100f29fd0) + 36 at eval.c:310
	    frame #25: 0x000000010007b849 miniruby`ruby_run_node(n=0x0000000100f29fd0) + 62 at eval.c:302
	    frame #26: 0x0000000100000c05 miniruby`main(argc=2, argv=0x00007fff5fbfdbf0) + 113 at main.c:42
	    frame #27: 0x00007fff88eda5ad libdyld.dylib`start + 1
	(lldb)

	check an existence of block.

	* gc.c (rb_raw_obj_info): check block before using it.

	* vm_core.h (vm_block_iseq): r61565 introduced NULL check but this
	  check is only needed by `rb_raw_obj_info()` and it is called at GC
	  debug mode. Above fix for `rb_raw_obj_info()` solves this problem and
	  NULL check should not be needed any more.

------------------------------------------------------------------------
r62863 | nagachika | 2018-03-20 22:52:06 +0900 (Tue, 20 Mar 2018) | 23 lines

merge revision(s) 61471,61472: [Backport #14231]

	Use UINT128_T support flag from configure

	Current check for __uint128_t in hash.c is not valid, since it ignores
	compilers other than gcc. We hit this on lcc on e2k platform.

	Configure script properly checks from 128-bit data types support and
	sets HAVE_UINT128_T accordingly. This approach is already used within
	ruby at bignum.c, random.c, etc.

	Probably hash.c is an overlooked remnant of old days. This patch fixes
	this.

	[ruby-core:84438] [Bug #14231] [Fix GH-1781]
	From: Andrew Savchenko <bircoph@altlinux.org>

	hash.c: use uint128_t

	* hash.c (mult_and_mix): use uint128_t instead of __uint128_t.
	  [ruby-core:84438] [Bug #14231]

	From: Nobuyoshi Nakada <nobu@ruby-lang.org>
------------------------------------------------------------------------
r62862 | nagachika | 2018-03-20 22:38:19 +0900 (Tue, 20 Mar 2018) | 16 lines

merge revision(s) 58438,58439,58451: [Backport #13493]

	clean autogenerated files

	* enc/depend (clean, clean-srcs): fix path of name2ctype.h, and
	  remove casefold.h too.

	* enc/jis/props.h: autogenerated file.
	  [ruby-core:80823] [Bug #13493]

	use $(srcdir).

	* Makefile.in (enc/jis/props.h): build it in not builddir, but in srcdir.


	Ignore enc/jis/props.h
------------------------------------------------------------------------
r62850 | nagachika | 2018-03-20 03:16:42 +0900 (Tue, 20 Mar 2018) | 292 lines

merge revision(s) 61562,61563,61566,61568,61569: [Backport #14269]

	fix SEGV touching uninitialized memory

	This function can be called from boot_defclass().
	No assumption can be made about object internals.

	(lldb) run
	Process 2386 launched: './miniruby' (x86_64)
	Process 2386 stopped
	* thread #1: tid = 0x13f3b6, 0x00000001001e0b26 miniruby`rb_class_path_cached(klass=4311373720) + 20 at variable.c:321, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x8)
	    frame #0: 0x00000001001e0b26 miniruby`rb_class_path_cached(klass=4311373720) + 20 at variable.c:321
	   318  VALUE
	   319  rb_class_path_cached(VALUE klass)
	   320  {
	-> 321      st_table *ivtbl = RCLASS_IV_TBL(klass);
	   322      st_data_t n;
	   323
	   324      if (!ivtbl) return Qnil;
	(lldb) bt
	* thread #1: tid = 0x13f3b6, 0x00000001001e0b26 miniruby`rb_class_path_cached(klass=4311373720) + 20 at variable.c:321, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x8)
	  * frame #0: 0x00000001001e0b26 miniruby`rb_class_path_cached(klass=4311373720) + 20 at variable.c:321
	    frame #1: 0x000000010009cbd0 miniruby`rb_raw_obj_info(buff="0x0000000100fa5798 [2    ] T_CLASS", buff_size=256, obj=4311373720) + 1393 at gc.c:9341
	    frame #2: 0x000000010009cf16 miniruby`obj_info(obj=4311373720) + 98 at gc.c:9423
	    frame #3: 0x000000010008ca87 miniruby`newobj_init(klass=0, flags=66, v1=0, v2=0, v3=0, wb_protected=1, objspace=0x00000001007cf280, obj=4311373720) + 338 at gc.c:1887
	    frame #4: 0x000000010008cd51 miniruby`newobj_of(klass=0, flags=66, v1=0, v2=0, v3=0, wb_protected=1) + 171 at gc.c:1970
	    frame #5: 0x000000010008ce1b miniruby`rb_wb_protected_newobj_of(klass=0, flags=66) + 54 at gc.c:1990
	    frame #6: 0x0000000100027563 miniruby`class_alloc(flags=2, klass=0) + 46 at class.c:165
	    frame #7: 0x000000010002761a miniruby`rb_class_boot(super=0) + 35 at class.c:203
	    frame #8: 0x0000000100028612 miniruby`boot_defclass(name="BasicObject", super=0) + 28 at class.c:537
	    frame #9: 0x000000010002868b miniruby`Init_class_hierarchy + 26 at class.c:548
	    frame #10: 0x00000001000efe69 miniruby`InitVM_Object + 9 at object.c:3892
	    frame #11: 0x00000001000f138e miniruby`Init_Object + 57 at object.c:4122
	    frame #12: 0x00000001000a59bd miniruby`rb_call_inits + 29 at inits.c:23
	    frame #13: 0x000000010007af30 miniruby`ruby_setup + 229 at eval.c:61
	    frame #14: 0x000000010007af7e miniruby`ruby_init + 13 at eval.c:78
	    frame #15: 0x0000000100000c58 miniruby`main(argc=2, argv=0x00007fff5fbfdbf0) + 88 at main.c:41
	    frame #16: 0x00007fff88eda5ad libdyld.dylib`start + 1
	(lldb)

	fix SEGV touching uninitialized memory

	This function can be called from InitVM_Object().
	No assumption can be made about object internals.

	(lldb) run
	Process 10675 launched: './miniruby' (x86_64)
	Process 10675 stopped
	* thread #1: tid = 0x14252c, 0x00000001000bdda9 miniruby`rb_raw_obj_info(buff="0x0000000100fc1588 [0    ] T_IMEMO ment", buff_size=256, obj=4311487880) + 2489 at gc.c:9383, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
	    frame #0: 0x00000001000bdda9 miniruby`rb_raw_obj_info(buff="0x0000000100fc1588 [0    ] T_IMEMO ment", buff_size=256, obj=4311487880) + 2489 at gc.c:9383
	   9380                 const rb_method_entry_t *me = &RANY(obj)->as.imemo.ment;
	   9381                 snprintf(buff, buff_size, "%s (called_id: %s, type: %s, alias: %d, owner: %s, defined_class: %s)", buff,
	   9382                          rb_id2name(me->called_id),
	-> 9383                          method_type_name(me->def->type),
	   9384                          me->def->alias_count,
	   9385                          obj_info(me->owner),
	   9386                          obj_info(me->defined_class));
	(lldb) p *me
	(rb_method_entry_t) $0 = {
	  flags = 24602
	  defined_class = 4311488400
	  def = 0x0000000000000000
	  called_id = 3057
	  owner = 4311488400
	}
	(lldb) bt
	* thread #1: tid = 0x14252c, 0x00000001000bdda9 miniruby`rb_raw_obj_info(buff="0x0000000100fc1588 [0    ] T_IMEMO ment", buff_size=256, obj=4311487880) + 2489 at gc.c:9383, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
	  * frame #0: 0x00000001000bdda9 miniruby`rb_raw_obj_info(buff="0x0000000100fc1588 [0    ] T_IMEMO ment", buff_size=256, obj=4311487880) + 2489 at gc.c:9383
	    frame #1: 0x00000001000b7cbf miniruby`obj_info(obj=4311487880) + 95 at gc.c:9423
	    frame #2: 0x00000001000c16a8 miniruby`newobj_init(klass=4311488400, flags=24602, v1=0, v2=3057, v3=4311488400, wb_protected=1, objspace=0x00000001007ee280, obj=4311487880) + 424 at gc.c:1887
	    frame #3: 0x00000001000b4529 miniruby`newobj_of(klass=4311488400, flags=24602, v1=0, v2=3057, v3=4311488400, wb_protected=1) + 217 at gc.c:1970
	    frame #4: 0x00000001000b46ab miniruby`rb_imemo_new(type=imemo_ment, v1=0, v2=3057, v3=4311488400, v0=4311488400) + 75 at gc.c:2017
	    frame #5: 0x00000001002773b4 miniruby`rb_method_entry_alloc(called_id=3057, owner=4311488400, defined_class=4311488400, def=0x0000000000000000) + 52 at vm_method.c:368
	    frame #6: 0x0000000100277307 miniruby`rb_method_entry_create(called_id=3057, klass=4311488400, visi=METHOD_VISI_PRIVATE, def=0x0000000000000000) + 71 at vm_method.c:389
	    frame #7: 0x00000001002784c7 miniruby`rb_method_entry_make(klass=4311488400, mid=3057, defined_class=4311488400, visi=METHOD_VISI_PRIVATE, type=VM_METHOD_TYPE_CFUNC, def=0x0000000000000000, original_id=3057, opts=0x00007fff5fbfd9e8) + 1207 at vm_method.c:594
	    frame #8: 0x00000001002770f9 miniruby`rb_add_method(klass=4311488400, mid=3057, type=VM_METHOD_TYPE_CFUNC, opts=0x00007fff5fbfd9e8, visi=METHOD_VISI_PRIVATE) + 73 at vm_method.c:650
	    frame #9: 0x000000010027708a miniruby`rb_add_method_cfunc(klass=4311488400, mid=3057, func=(miniruby`rb_obj_dummy at object.c:1125), argc=0, visi=METHOD_VISI_PRIVATE) + 138 at vm_method.c:137
	    frame #10: 0x00000001000391e4 miniruby`rb_define_private_method(klass=4311488400, name="initialize", func=(miniruby`rb_obj_dummy at object.c:1125), argc=0) + 68 at class.c:1529
	    frame #11: 0x000000010013f5bf miniruby`InitVM_Object + 47 at object.c:3905
	    frame #12: 0x0000000100142ffd miniruby`Init_Object + 61 at object.c:4122
	    frame #13: 0x00000001000d4edd miniruby`rb_call_inits + 29 at inits.c:23
	    frame #14: 0x000000010009fe66 miniruby`ruby_setup + 198 at eval.c:61
	    frame #15: 0x000000010009febd miniruby`ruby_init + 13 at eval.c:78
	    frame #16: 0x0000000100000a4d miniruby`main(argc=2, argv=0x00007fff5fbfdbf0) + 93 at main.c:41
	    frame #17: 0x00007fff88eda5ad libdyld.dylib`start + 1
	(lldb)

	fix SEGV touching uninitialized local variable

	This imemo_name is used uninitialized because the switch
	above does not cover all possible imemo types.

	(lldb) run
	Process 26068 launched: './miniruby' (x86_64)
	Process 26068 stopped
	* thread #1: tid = 0x14ba96, 0x00007fff8a402132 libsystem_c.dylib`strlen + 18, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xfffffffffffffff0)
	    frame #0: 0x00007fff8a402132 libsystem_c.dylib`strlen + 18
	libsystem_c.dylib`strlen:
	->  0x7fff8a402132 <+18>: pcmpeqb (%rdi), %xmm0
	    0x7fff8a402136 <+22>: pmovmskb %xmm0, %esi
	    0x7fff8a40213a <+26>: andq   $0xf, %rcx
	    0x7fff8a40213e <+30>: orq    $-0x1, %rax
	(lldb) bt
	* thread #1: tid = 0x14ba96, 0x00007fff8a402132 libsystem_c.dylib`strlen + 18, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xfffffffffffffff0)
	  * frame #0: 0x00007fff8a402132 libsystem_c.dylib`strlen + 18
	    frame #1: 0x00000001001f1531 miniruby`BSD_vfprintf(fp=0x00007fff5fbfc9e0, fmt0="%s %s", ap=0x00007fff5fbfcbf0) + 5873 at vsnprintf.c:1026
	    frame #2: 0x00000001001ef213 miniruby`ruby_do_vsnprintf(str="0x0000000100f46450 [0    ] T_IMEMO", n=256, fmt="%s %s", ap=0x00007fff5fbfcbf0) + 131 at sprintf.c:1285
	    frame #3: 0x00000001001ef3ea miniruby`ruby_snprintf(str="0x0000000100f46450 [0    ] T_IMEMO", n=256, fmt="%s %s") + 426 at sprintf.c:1300
	    frame #4: 0x00000001000bdc61 miniruby`rb_raw_obj_info(buff="0x0000000100f46450 [0    ] T_IMEMO", buff_size=256, obj=4310983760) + 2353 at gc.c:9376
	    frame #5: 0x00000001000b7bff miniruby`obj_info(obj=4310983760) + 95 at gc.c:9428
	    frame #6: 0x00000001000c1658 miniruby`newobj_init(klass=0, flags=36890, v1=0, v2=4303040512, v3=4310983800, wb_protected=1, objspace=0x00000001007ee280, obj=4310983760) + 424 at gc.c:1887
	    frame #7: 0x00000001000b4469 miniruby`newobj_of(klass=0, flags=36890, v1=0, v2=4303040512, v3=4310983800, wb_protected=1) + 217 at gc.c:1970
	    frame #8: 0x00000001000b45eb miniruby`rb_imemo_new(type=imemo_ast, v1=0, v2=4303040512, v3=4310983800, v0=0) + 75 at gc.c:2017
	    frame #9: 0x000000010011daed miniruby`rb_ast_new + 61 at node.c:1146
	    frame #10: 0x0000000100160e15 miniruby`rb_parser_compile_file_path(vparser=4310984400, fname=4310984960, file=4310984080, start=1) + 53 at parse.y:5776
	    frame #11: 0x00000001001e18ea miniruby`load_file_internal(argp_v=140734799795024) + 1834 at ruby.c:1907
	    frame #12: 0x00000001000a1bb5 miniruby`rb_ensure(b_proc=(miniruby`load_file_internal at ruby.c:1795), data1=140734799795024, e_proc=(miniruby`restore_load_file at ruby.c:2007), data2=140734799795024) + 245 at eval.c:1037
	    frame #13: 0x00000001001df4a4 miniruby`load_file(parser=4310984400, fname=4310984960, f=4310984080, script=1, opt=0x00007fff5fbfda28) + 100 at ruby.c:2026
	    frame #14: 0x00000001001e084e miniruby`process_options(argc=0, argv=0x00007fff5fbfdc00, opt=0x00007fff5fbfda28) + 3454 at ruby.c:1682
	    frame #15: 0x00000001001dfaae miniruby`ruby_process_options(argc=2, argv=0x00007fff5fbfdbf0) + 238 at ruby.c:2257
	    frame #16: 0x000000010009ff43 miniruby`ruby_options(argc=2, argv=0x00007fff5fbfdbf0) + 211 at eval.c:105
	    frame #17: 0x0000000100000989 miniruby`main(argc=2, argv=0x00007fff5fbfdbf0) + 105 at main.c:42
	    frame #18: 0x00007fff88eda5ad libdyld.dylib`start + 1
	(lldb) up 4
	frame #4: 0x00000001000bdc61 miniruby`rb_raw_obj_info(buff="0x0000000100f46450 [0    ] T_IMEMO", buff_size=256, obj=4310983760) + 2353 at gc.c:9376
	   9373 #undef IMEMO_NAME
	   9374               default: UNREACHABLE;
	   9375             }
	-> 9376             snprintf(buff, buff_size, "%s %s", buff, imemo_name);
	   9377
	   9378             switch (imemo_type(obj)) {
	   9379               case imemo_ment: {
	(lldb) p imemo_name
	(const char *) $0 = 0xffffffffffffffff
	(lldb) p imemo_type(obj)
	(imemo_type) $1 = imemo_ast
	(lldb)

	fix SEGV inspecting already freed objects

	obj_info() assumes the given object is alive.  Passing freed
	objects to it results in SEGV.

	(lldb) run
	Process 29718 launched: './miniruby' (x86_64)
	Process 29718 stopped
	* thread #1: tid = 0x3082c5, 0x00000001000bfaab miniruby`pathobj_path(pathobj=4478683640) + 70 at vm_core.h:269, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
	    frame #0: 0x00000001000bfaab miniruby`pathobj_path(pathobj=4478683640) + 70 at vm_core.h:269
	   266      }
	   267      else {
	   268          VM_ASSERT(RB_TYPE_P(pathobj, T_ARRAY));
	-> 269          return RARRAY_AREF(pathobj, PATHOBJ_PATH);
	   270      }
	   271  }
	   272
	(lldb) bt
	* thread #1: tid = 0x3082c5, 0x00000001000bfaab miniruby`pathobj_path(pathobj=4478683640) + 70 at vm_core.h:269, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
	  * frame #0: 0x00000001000bfaab miniruby`pathobj_path(pathobj=4478683640) + 70 at vm_core.h:269
	    frame #1: 0x00000001000c25ff miniruby`rb_iseq_path(iseq=0x000000010af34a20) + 32 at iseq.c:723
	    frame #2: 0x000000010009db09 miniruby`rb_raw_iseq_info(buff="0x000000010af34a20 [1    ] T_IMEMO iseq", buff_size=256, iseq=0x000000010af34a20) + 69 at gc.c:9274
	    frame #3: 0x000000010009e45a miniruby`rb_raw_obj_info(buff="0x000000010af34a20 [1    ] T_IMEMO iseq", buff_size=256, obj=4478683680) + 2191 at gc.c:9397
	    frame #4: 0x000000010009e4d5 miniruby`obj_info(obj=4478683680) + 98 at gc.c:9429
	    frame #5: 0x0000000100091ae3 miniruby`gc_page_sweep(objspace=0x00000001007d3280, heap=0x00000001007d32a0, sweep_page=0x000000010ae07bc0) + 622 at gc.c:3529
	    frame #6: 0x000000010009206a miniruby`gc_sweep_step(objspace=0x00000001007d3280, heap=0x00000001007d32a0) + 188 at gc.c:3705
	    frame #7: 0x0000000100092254 miniruby`gc_sweep_continue(objspace=0x00000001007d3280, heap=0x00000001007d32a0) + 133 at gc.c:3772
	    frame #8: 0x000000010008d7f9 miniruby`heap_prepare(objspace=0x00000001007d3280, heap=0x00000001007d32a0) + 48 at gc.c:1746
	    frame #9: 0x000000010008d8a1 miniruby`heap_get_freeobj_from_next_freepage(objspace=0x00000001007d3280, heap=0x00000001007d32a0) + 37 at gc.c:1769
	    frame #10: 0x000000010008d98d miniruby`heap_get_freeobj(objspace=0x00000001007d3280, heap=0x00000001007d32a0) + 83 at gc.c:1803
	    frame #11: 0x000000010008dcb0 miniruby`newobj_slowpath(klass=4334386280, flags=5, v1=0, v2=0, v3=0, objspace=0x00000001007d3280, wb_protected=1) + 220 at gc.c:1930
	    frame #12: 0x000000010008dd6c miniruby`newobj_slowpath_wb_protected(klass=4334386280, flags=5, v1=0, v2=0, v3=0, objspace=0x00000001007d3280) + 76 at gc.c:1942
	    frame #13: 0x000000010008dea1 miniruby`newobj_of(klass=4334386280, flags=5, v1=0, v2=0, v3=0, wb_protected=1) + 221 at gc.c:1974
	    frame #14: 0x000000010008df39 miniruby`rb_wb_protected_newobj_of(klass=4334386280, flags=5) + 54 at gc.c:1990
	    frame #15: 0x0000000100195f7c miniruby`str_alloc(klass=4334386280) + 29 at string.c:692
	    frame #16: 0x0000000100195fe9 miniruby`str_new0(klass=4334386280, ptr="gitm", len=4, termlen=1) + 73 at string.c:714
	    frame #17: 0x000000010019633e miniruby`rb_enc_str_new(ptr="gitm", len=4, enc=0x00000001025d50a0) + 81 at string.c:766
	    frame #18: 0x000000010010a80a miniruby`parser_str_new(p="gitm", n=4, enc=0x00000001025d50a0, func=66, enc0=0x00000001025d50a0) + 50 at parse.y:5817
	    frame #19: 0x000000010010ce1a miniruby`parser_parse_string(parser=0x00000001042ac5c0, quote=0x000000010460c028) + 795 at parse.y:6675
	    frame #20: 0x00000001001120bd miniruby`parser_yylex(parser=0x00000001042ac5c0) + 159 at parse.y:8281
	    frame #21: 0x0000000100115068 miniruby`yylex(lval=0x00007fff5fbf9948, yylloc=0x00007fff5fbf9ab0, parser=0x00000001042ac5c0) + 55 at parse.y:8931
	    frame #22: 0x00000001000fc79f miniruby`ruby_yyparse(parser=0x00000001042ac5c0) + 1198 at parse.c:5798
	    frame #23: 0x0000000100109f5a miniruby`yycompile0(arg=4364879296) + 317 at parse.y:5595
	    frame #24: 0x0000000100214ef0 miniruby`rb_suppress_tracing(func=(miniruby`yycompile0 at parse.y:5565), arg=4364879296) + 349 at vm_trace.c:397
	    frame #25: 0x000000010010a1df miniruby`yycompile(parser=0x00000001042ac5c0, fname=4443743440, line=1) + 126 at parse.y:5637
	    frame #26: 0x000000010010a4c1 miniruby`parser_compile_string(vparser=4443743480, fname=4443743440, s=4443743520, line=1) + 191 at parse.y:5706
	    frame #27: 0x000000010010a5b7 miniruby`rb_parser_compile_string_path(vparser=4443743480, f=4443743440, s=4443743520, line=1) + 58 at parse.y:5730
	    frame #28: 0x0000000100206025 miniruby`eval_make_iseq(src=4443743520, fname=4443743440, line=1, bind=0x0000000000000000, base_block=0x00007fff5fbfb370) + 266 at vm_eval.c:1274
	    frame #29: 0x0000000100206153 miniruby`eval_string_with_cref(self=4334412520, src=4443743520, cref=0x0000000000000000, file=52, line=1) + 197 at vm_eval.c:1307
	    frame #30: 0x0000000100206389 miniruby`rb_f_eval(argc=1, argv=0x0000000102400eb8, self=4334412520) + 219 at vm_eval.c:1382
	    frame #31: 0x00000001001f247c miniruby`call_cfunc_m1(func=(miniruby`rb_f_eval at vm_eval.c:1364), recv=4334412520, argc=1, argv=0x0000000102400eb8) + 47 at vm_insnhelper.c:1723
	    frame #32: 0x00000001001f2f87 miniruby`vm_call_cfunc_with_frame(ec=0x00000001007d3548, reg_cfp=0x0000000102500d80, calling=0x00007fff5fbfbf50, ci=0x000000010263f240, cc=0x0000000100749b50) + 386 at vm_insnhelper.c:1918
	    frame #33: 0x00000001001f30d6 miniruby`vm_call_cfunc(ec=0x00000001007d3548, reg_cfp=0x0000000102500d80, calling=0x00007fff5fbfbf50, ci=0x000000010263f240, cc=0x0000000100749b50) + 149 at vm_insnhelper.c:1934
	    frame #34: 0x00000001001faf0e miniruby`vm_exec_core(ec=0x00000001007d3548, initial=0) + 8471 at insns.def:915
	    frame #35: 0x000000010020b75d miniruby`vm_exec(ec=0x00000001007d3548) + 230 at vm.c:1771
	    frame #36: 0x00000001002093f8 miniruby`invoke_block(ec=0x00000001007d3548, iseq=0x000000010252d7f0, self=4334412520, captured=0x0000000102500df8, cref=0x0000000000000000, type=572653569, opt_pc=0) + 224 at vm.c:988
	    frame #37: 0x0000000100209766 miniruby`invoke_iseq_block_from_c(ec=0x00000001007d3548, captured=0x0000000102500df8, self=4334412520, argc=0, argv=0x0000000000000000, passed_block_handler=0, cref=0x0000000000000000, is_lambda=0) + 389 at vm.c:1040
	    frame #38: 0x0000000100209824 miniruby`invoke_block_from_c_bh(ec=0x00000001007d3548, block_handler=4333768185, argc=0, argv=0x0000000000000000, passed_block_handler=0, cref=0x0000000000000000, is_lambda=0, force_blockarg=0) + 138 at vm.c:1058
	    frame #39: 0x00000001002099d0 miniruby`vm_yield(ec=0x00000001007d3548, argc=0, argv=0x0000000000000000) + 69 at vm.c:1103
	    frame #40: 0x0000000100205623 miniruby`rb_yield_0(argc=0, argv=0x0000000000000000) + 40 at vm_eval.c:970
	    frame #41: 0x0000000100205964 miniruby`loop_i + 19 at vm_eval.c:1049
	    frame #42: 0x000000010007db07 miniruby`rb_rescue2(b_proc=(miniruby`loop_i at vm_eval.c:1047), data1=0, r_proc=(miniruby`loop_stop at vm_eval.c:1056), data2=0) + 369 at eval.c:896
	    frame #43: 0x0000000100205a2e miniruby`rb_f_loop(self=4334412520) + 121 at vm_eval.c:1100
	    frame #44: 0x00000001001f24a7 miniruby`call_cfunc_0(func=(miniruby`rb_f_loop at vm_eval.c:1098), recv=4334412520, argc=0, argv=0x0000000102400e80) + 41 at vm_insnhelper.c:1729
	    frame #45: 0x00000001001f2f87 miniruby`vm_call_cfunc_with_frame(ec=0x00000001007d3548, reg_cfp=0x0000000102500de0, calling=0x00007fff5fbfd4d0, ci=0x000000010263bbf0, cc=0x0000000102642118) + 386 at vm_insnhelper.c:1918
	    frame #46: 0x00000001001f30d6 miniruby`vm_call_cfunc(ec=0x00000001007d3548, reg_cfp=0x0000000102500de0, calling=0x00007fff5fbfd4d0, ci=0x000000010263bbf0, cc=0x0000000102642118) + 149 at vm_insnhelper.c:1934
	    frame #47: 0x00000001001f4319 miniruby`vm_call_method_each_type(ec=0x00000001007d3548, cfp=0x0000000102500de0, calling=0x00007fff5fbfd4d0, ci=0x000000010263bbf0, cc=0x0000000102642118) + 239 at vm_insnhelper.c:2232
	    frame #48: 0x00000001001f4a2c miniruby`vm_call_method(ec=0x00000001007d3548, cfp=0x0000000102500de0, calling=0x00007fff5fbfd4d0, ci=0x000000010263bbf0, cc=0x0000000102642118) + 253 at vm_insnhelper.c:2366
	    frame #49: 0x00000001001f4b7a miniruby`vm_call_general(ec=0x00000001007d3548, reg_cfp=0x0000000102500de0, calling=0x00007fff5fbfd4d0, ci=0x000000010263bbf0, cc=0x0000000102642118) + 59 at vm_insnhelper.c:2398
	    frame #50: 0x00000001001fab2f miniruby`vm_exec_core(ec=0x00000001007d3548, initial=0) + 7480 at insns.def:850
	    frame #51: 0x000000010020b75d miniruby`vm_exec(ec=0x00000001007d3548) + 230 at vm.c:1771
	    frame #52: 0x000000010020c40f miniruby`rb_iseq_eval_main(iseq=0x000000010252dd90) + 52 at vm.c:2019
	    frame #53: 0x000000010007c768 miniruby`ruby_exec_internal(n=0x000000010252dd90) + 297 at eval.c:246
	    frame #54: 0x000000010007c88e miniruby`ruby_exec_node(n=0x000000010252dd90) + 36 at eval.c:310
	    frame #55: 0x000000010007c861 miniruby`ruby_run_node(n=0x000000010252dd90) + 62 at eval.c:302
	    frame #56: 0x000000010000138d miniruby`main(argc=2, argv=0x00007fff5fbfdbf0) + 113 at main.c:42
	    frame #57: 0x00007fff88eda5ad libdyld.dylib`start + 1
	(lldb) p ((struct RVALUE*)pathobj)->as.basic
	(RBasic) $0 = (flags = 0, klass = 4478683600)
	(lldb)

	fix SEGV inspecting uninitialized objects

	obj_info() assumes the given object is alive.  OTOH
	gc_writebarrier_incremental is called before or in middle of
	object initialization.  Can casue SEGV.

	(lldb) run
	Process 48188 launched: './miniruby' (x86_64)
	Process 48188 stopped
	* thread #1: tid = 0x30fd53, 0x00000001000bf7a9 miniruby`rb_array_const_ptr(a=5251291222225483145) + 12 at ruby.h:2072, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
	    frame #0: 0x00000001000bf7a9 miniruby`rb_array_const_ptr(a=5251291222225483145) + 12 at ruby.h:2072
	   2069 static inline const VALUE *
	   2070 rb_array_const_ptr(VALUE a)
	   2071 {
	-> 2072     return FIX_CONST_VALUE_PTR((RBASIC(a)->flags & RARRAY_EMBED_FLAG) ?
	   2073         RARRAY(a)->as.ary : RARRAY(a)->as.heap.ptr);
	   2074 }
	   2075
	(lldb) bt
	* thread #1: tid = 0x30fd53, 0x00000001000bf7a9 miniruby`rb_array_const_ptr(a=5251291222225483145) + 12 at ruby.h:2072, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
	  * frame #0: 0x00000001000bf7a9 miniruby`rb_array_const_ptr(a=5251291222225483145) + 12 at ruby.h:2072
	    frame #1: 0x00000001000bfaab miniruby`pathobj_path(pathobj=5251291222225483145) + 70 at vm_core.h:269
	    frame #2: 0x00000001000c25ff miniruby`rb_iseq_path(iseq=0x00000001025b71a8) + 32 at iseq.c:723
	    frame #3: 0x000000010009db09 miniruby`rb_raw_iseq_info(buff="0x00000001025b7158 [0    ] proc (Proc)", buff_size=256, iseq=0x00000001025b71a8) + 69 at gc.c:9274
	    frame #4: 0x000000010009e1d5 miniruby`rb_raw_obj_info(buff="0x00000001025b7158 [0    ] proc (Proc)", buff_size=256, obj=4334514520) + 1546 at gc.c:9351
	    frame #5: 0x000000010009e4d5 miniruby`obj_info(obj=4334514520) + 98 at gc.c:9429
	    frame #6: 0x0000000100096658 miniruby`gc_writebarrier_incremental(a=4334514520, b=4334514600, objspace=0x00000001007d3280) + 61 at gc.c:5963
	    frame #7: 0x00000001000968ca miniruby`rb_gc_writebarrier(a=4334514520, b=4334514600) + 127 at gc.c:6009
	    frame #8: 0x00000001001eabe0 miniruby`rb_obj_written(a=4334514520, oldv=52, b=4334514600, filename="/Users/urabe.shyouhei/data/src/pedantic/vm.c", line=821) + 72 at ruby.h:1472
	    frame #9: 0x00000001001eac2c miniruby`rb_obj_write(a=4334514520, slot=0x000000010259ff10, b=4334514600, filename="/Users/urabe.shyouhei/data/src/pedantic/vm.c", line=821) + 70 at ruby.h:1489
	    frame #10: 0x0000000100208b6f miniruby`vm_proc_create_from_captured(klass=4311027960, captured=0x0000000102500338, block_type=block_type_ifunc, is_from_method='\0', is_lambda='\x01') + 137 at vm.c:821
	    frame #11: 0x0000000100208e5c miniruby`rb_vm_make_proc_lambda(ec=0x00000001007d3548, captured=0x0000000102500338, klass=4311027960, is_lambda='\x01') + 134 at vm.c:892
	    frame #12: 0x000000010011f08e miniruby`proc_new(klass=4311027960, is_lambda='\x01') + 445 at proc.c:752
	    frame #13: 0x000000010011f110 miniruby`rb_block_lambda + 27 at proc.c:808
	    frame #14: 0x00000001001f24a7 miniruby`call_cfunc_0(func=(miniruby`rb_block_lambda at proc.c:807), recv=4310991600, argc=0, argv=0x0000000000000000) + 41 at vm_insnhelper.c:1729
	    frame #15: 0x00000001002033de miniruby`vm_call0_cfunc_with_frame(ec=0x00000001007d3548, calling=0x00007fff5fbfb080, ci=0x00007fff5fbfb070, cc=0x00007fff5fbfb0a0, argv=0x0000000000000000) + 370 at vm_eval.c:85
	    frame #16: 0x00000001002034d9 miniruby`vm_call0_cfunc(ec=0x00000001007d3548, calling=0x00007fff5fbfb080, ci=0x00007fff5fbfb070, cc=0x00007fff5fbfb0a0, argv=0x0000000000000000) + 59 at vm_eval.c:100
	    frame #17: 0x000000010020368f miniruby`vm_call0_body(ec=0x00000001007d3548, calling=0x00007fff5fbfb080, ci=0x00007fff5fbfb070, cc=0x00007fff5fbfb0a0, argv=0x0000000000000000) + 436 at vm_eval.c:131
	    frame #18: 0x000000010020326a miniruby`vm_call0(ec=0x00000001007d3548, recv=4310991600, id=2993, argc=0, argv=0x0000000000000000, me=0x0000000100f48110) + 142 at vm_eval.c:58
	    frame #19: 0x0000000100203c60 miniruby`rb_call0(ec=0x00000001007d3548, recv=4310991600, mid=2993, argc=0, argv=0x0000000000000000, scope=CALL_FCALL, self=4334514640) + 166 at vm_eval.c:296
	    frame #20: 0x0000000100204827 miniruby`rb_call(recv=4310991600, mid=2993, argc=0, argv=0x0000000000000000, scope=CALL_FCALL) + 84 at vm_eval.c:589
	    frame #21: 0x000000010020518b miniruby`rb_funcallv(recv=4310991600, mid=2993, argc=0, argv=0x0000000000000000) + 52 at vm_eval.c:815
	    frame #22: 0x000000010012242e miniruby`mlambda(method=0) + 45 at proc.c:2661
	    frame #23: 0x0000000100205bac miniruby`rb_iterate0(it_proc=(miniruby`mlambda at proc.c:2660), data1=0, ifunc=0x00000001025b71a8, ec=0x00000001007d3548) + 380 at vm_eval.c:1134
	    frame #24: 0x0000000100205d16 miniruby`rb_iterate(it_proc=(miniruby`mlambda at proc.c:2660), data1=0, bl_proc=(miniruby`bmcall at proc.c:2666), data2=4334514640) + 88 at vm_eval.c:1166
	    frame #25: 0x00000001001224c7 miniruby`method_to_proc(method=4334514640) + 43 at proc.c:2701
	    frame #26: 0x00000001001f24a7 miniruby`call_cfunc_0(func=(miniruby`method_to_proc at proc.c:2688), recv=4334514640, argc=0, argv=0x0000000102400568) + 41 at vm_insnhelper.c:1729
	    frame #27: 0x00000001001f2f87 miniruby`vm_call_cfunc_with_frame(ec=0x00000001007d3548, reg_cfp=0x0000000102500350, calling=0x00007fff5fbfc030, ci=0x0000000100f2ec70, cc=0x0000000102735718) + 386 at vm_insnhelper.c:1918
	    frame #28: 0x00000001001f30d6 miniruby`vm_call_cfunc(ec=0x00000001007d3548, reg_cfp=0x0000000102500350, calling=0x00007fff5fbfc030, ci=0x0000000100f2ec70, cc=0x0000000102735718) + 149 at vm_insnhelper.c:1934
	    frame #29: 0x00000001001f4319 miniruby`vm_call_method_each_type(ec=0x00000001007d3548, cfp=0x0000000102500350, calling=0x00007fff5fbfc030, ci=0x0000000100f2ec70, cc=0x0000000102735718) + 239 at vm_insnhelper.c:2232
	    frame #30: 0x00000001001f49a4 miniruby`vm_call_method(ec=0x00000001007d3548, cfp=0x0000000102500350, calling=0x00007fff5fbfc030, ci=0x0000000100f2ec70, cc=0x0000000102735718) + 117 at vm_insnhelper.c:2355
	    frame #31: 0x00000001001f4b7a miniruby`vm_call_general(ec=0x00000001007d3548, reg_cfp=0x0000000102500350, calling=0x00007fff5fbfc030, ci=0x0000000100f2ec70, cc=0x0000000102735718) + 59 at vm_insnhelper.c:2398
	    frame #32: 0x00000001001faf0e miniruby`vm_exec_core(ec=0x00000001007d3548, initial=0) + 8471 at insns.def:915
	    frame #33: 0x000000010020b75d miniruby`vm_exec(ec=0x00000001007d3548) + 230 at vm.c:1771
	    frame #34: 0x000000010020c3d1 miniruby`rb_iseq_eval(iseq=0x00000001007f8270) + 52 at vm.c:2008
	    frame #35: 0x00000001000caa4a miniruby`rb_load_internal0(ec=0x00000001007d3548, fname=4310799960, wrap=0) + 631 at load.c:611
	    frame #36: 0x00000001000cab36 miniruby`rb_load_internal(fname=4310799960, wrap=0) + 46 at load.c:642
	    frame #37: 0x00000001000cae1d miniruby`rb_f_load(argc=1, argv=0x00000001024004b8) + 217 at load.c:710
	    frame #38: 0x00000001001f247c miniruby`call_cfunc_m1(func=(miniruby`rb_f_load at load.c:695), recv=4311327440, argc=1, argv=0x00000001024004b8) + 47 at vm_insnhelper.c:1723
	    frame #39: 0x00000001001f2f87 miniruby`vm_call_cfunc_with_frame(ec=0x00000001007d3548, reg_cfp=0x00000001025003e0, calling=0x00007fff5fbfd3e0, ci=0x0000000102541070, cc=0x0000000100f9e918) + 386 at vm_insnhelper.c:1918
	    frame #40: 0x00000001001f30d6 miniruby`vm_call_cfunc(ec=0x00000001007d3548, reg_cfp=0x00000001025003e0, calling=0x00007fff5fbfd3e0, ci=0x0000000102541070, cc=0x0000000100f9e918) + 149 at vm_insnhelper.c:1934
	    frame #41: 0x00000001001f4319 miniruby`vm_call_method_each_type(ec=0x00000001007d3548, cfp=0x00000001025003e0, calling=0x00007fff5fbfd3e0, ci=0x0000000102541070, cc=0x0000000100f9e918) + 239 at vm_insnhelper.c:2232
	    frame #42: 0x00000001001f4a2c miniruby`vm_call_method(ec=0x00000001007d3548, cfp=0x00000001025003e0, calling=0x00007fff5fbfd3e0, ci=0x0000000102541070, cc=0x0000000100f9e918) + 253 at vm_insnhelper.c:2366
	    frame #43: 0x00000001001f4b7a miniruby`vm_call_general(ec=0x00000001007d3548, reg_cfp=0x00000001025003e0, calling=0x00007fff5fbfd3e0, ci=0x0000000102541070, cc=0x0000000100f9e918) + 59 at vm_insnhelper.c:2398
	    frame #44: 0x00000001001faf0e miniruby`vm_exec_core(ec=0x00000001007d3548, initial=0) + 8471 at insns.def:915
	    frame #45: 0x000000010020b75d miniruby`vm_exec(ec=0x00000001007d3548) + 230 at vm.c:1771
	    frame #46: 0x000000010020c40f miniruby`rb_iseq_eval_main(iseq=0x0000000100f21240) + 52 at vm.c:2019
	    frame #47: 0x000000010007c774 miniruby`ruby_exec_internal(n=0x0000000100f21240) + 297 at eval.c:246
	    frame #48: 0x000000010007c89a miniruby`ruby_exec_node(n=0x0000000100f21240) + 36 at eval.c:310
	    frame #49: 0x000000010007c86d miniruby`ruby_run_node(n=0x0000000100f21240) + 62 at eval.c:302
	    frame #50: 0x0000000100001399 miniruby`main(argc=9, argv=0x00007fff5fbfdae0) + 113 at main.c:42
	    frame #51: 0x00007fff88eda5ad libdyld.dylib`start + 1
	(lldb)
------------------------------------------------------------------------
r62849 | nagachika | 2018-03-20 02:30:19 +0900 (Tue, 20 Mar 2018) | 9 lines

merge revision(s) 61413: [Backport #14218]

	force hash values fixable

	* include/ruby/ruby.h (RB_ST2FIX): force fixable on LLP64 environment.

	* hash.c (any_hash): ditto.
	  [ruby-core:84395] [Bug #14218]

------------------------------------------------------------------------
r62848 | nagachika | 2018-03-20 02:13:41 +0900 (Tue, 20 Mar 2018) | 5 lines

merge revision(s) 61359: [Backport #14208]

	raise error if value contains CR/LF in iniheader of initialize_http_header

	like r59693, initialize_http_header also should raise error. [Bug #14208]
------------------------------------------------------------------------
r62847 | nagachika | 2018-03-20 01:59:47 +0900 (Tue, 20 Mar 2018) | 6 lines

merge revision(s) 61346: [Backport #14206]

	parse.y: end of script at newline

	* parse.y (parser_yylex): deal with end of script chars just after
	  ignored newline as other places.  [ruby-core:84349] [Bug #14206]
------------------------------------------------------------------------
r62846 | nagachika | 2018-03-20 01:27:40 +0900 (Tue, 20 Mar 2018) | 8 lines

merge revision(s) 61278,61281: [Backport #13655]

	IO.new doesn't recive "-" as external_encoding [Bug #13655]

	[DOC] `IO.new` accepts `external_encoding`

	Revert part of r61278 [Bug #13655]
	[ci skip]
------------------------------------------------------------------------
r62845 | nagachika | 2018-03-20 01:22:34 +0900 (Tue, 20 Mar 2018) | 17 lines

Update openssl to 2.0.7. [Bug #13935]
The patch is provided by Kazuki Yamaguchi.

From: Kazuki Yamaguchi <k@rhe.jp>
Date: Mon, 25 Sep 2017 01:32:02 +0900
Subject: [PATCH] openssl: import v2.0.7

Import Ruby/OpenSSL 2.0.7. This contains only bug fixes and test
improvements. The full commit log since v2.0.5 (imported at r59567, to
trunk) can be found at:

        https://github.com/ruby/openssl/compare/v2.0.5...v2.0.7

All the changes included in this changeset are already imported to trunk
by r61235 or earlier revisions.


------------------------------------------------------------------------
r62842 | nagachika | 2018-03-20 00:11:08 +0900 (Tue, 20 Mar 2018) | 17 lines

Update rubygems to 2.0.6. [Bug #13935]
The patch is provided by Kazuki Yamaguchi.

From: Kazuki Yamaguchi <k@rhe.jp>
Date: Mon, 25 Sep 2017 01:32:02 +0900
Subject: [PATCH] openssl: import v2.0.6

Import Ruby/OpenSSL 2.0.6. This contains only bug fixes and test
improvements. The full commit log since v2.0.5 (imported at r59567, to
trunk) can be found at:

        https://github.com/ruby/openssl/compare/v2.0.5...v2.0.6

All the changes included in this patch are already imported to trunk by
r59734, r59751, r59857, and r60013.


------------------------------------------------------------------------
r62804 | nagachika | 2018-03-18 13:03:07 +0900 (Sun, 18 Mar 2018) | 6 lines

merge revision(s) 60421: [Backport #14047]

	win32.c: unknown reparse tags

	* win32/win32.c (rb_w32_read_reparse_point): skip unknown reparse
	  tags.  [ruby-core:83539] [Bug #14047]
------------------------------------------------------------------------
r62803 | nagachika | 2018-03-18 13:00:13 +0900 (Sun, 18 Mar 2018) | 1 line

bump up patchlevel to 262 to skip reverted patchlevel.
------------------------------------------------------------------------
r62802 | svn | 2018-03-18 12:57:38 +0900 (Sun, 18 Mar 2018) | 1 line

* 2018-03-18
------------------------------------------------------------------------
r62801 | nagachika | 2018-03-18 12:57:37 +0900 (Sun, 18 Mar 2018) | 2 lines

revert r62797, r62784. [Bug #13863]

------------------------------------------------------------------------
r62797 | nagachika | 2018-03-17 23:23:09 +0900 (Sat, 17 Mar 2018) | 22 lines

merge revision(s) 57484,58767,58938,59041: [Backport #13863]

	ruby.c: forbid options

	* ruby.c (forbid_setid): constified.

	* ruby.c (process_options): forbid if setid earlier.

	ruby.c: encode script name

	* ruby.c (process_options): encode script name to locale encoding
	  instead of associate, if UTF-8 path.

	ruby.c: file in load_file argument

	* ruby.c (load_file): move opened file to an argument, to reduce
	  open/close calls in the near future.

	ruby.c: script name in UTF-8

	* ruby.c (process_options): keep script name in UTF-8 if UTF8_PATH
	  to get rid of loss by conversion.
------------------------------------------------------------------------
r62784 | nagachika | 2018-03-17 02:34:44 +0900 (Sat, 17 Mar 2018) | 25 lines

merge revision(s) 58745,58780,59040,60743: [Backport #13863]

	rb_w32_ugetcwd: UTF-8 version getcwd

	* dir.c (rb_dir_getwd): convert from UTF-8.

	* win32/win32.c (w32_getcwd): codepage aware getcwd using
	  GetCurrentDirectoryW.
	potential memory leak

	* dir.c (rb_dir_getwd): get rid of potential memory leak.

	* util.c (ruby_getcwd): ditto.
	file.c: realpath in OS path encoding

	* dir.c (rb_dir_getwd_ospath): return cwd path in the OS path
	  encoding.

	* file.c (rb_realpath_internal): work in the OS path encoding
	load.c: cwd encoding

	* load.c (rb_get_expanded_load_path): save cwd cache in OS path
	  encoding, to get rid of unnecessary conversion and infinite
	  loading when it needs encoding conversion.
	  [ruby-dev:50221] [Bug #13863]
------------------------------------------------------------------------
r62783 | svn | 2018-03-17 01:41:24 +0900 (Sat, 17 Mar 2018) | 1 line

* 2018-03-17
------------------------------------------------------------------------
r62782 | nagachika | 2018-03-17 01:41:23 +0900 (Sat, 17 Mar 2018) | 12 lines

merge revision(s) 60666,60667,60668: [Backport #14082]

	Fix size on Enumerable#cycle when the size is 0 [Bug #14082].

	Patch by Kenichi Kamiya

	test/ruby/test_lazy_enumerator.rb: test for [Bug #14082]

	enum.c: check argument first

	* enum.c (enum_cycle_size): check an argument before the size of
	  the receiver, if it is given.
------------------------------------------------------------------------
r62712 | nagachika | 2018-03-10 11:46:51 +0900 (Sat, 10 Mar 2018) | 12 lines

merge revision(s) 60384: [Backport #13887]

	thread_pthread: do not corrupt stack

	This fixes stuck test/ruby/test_io.rb with FIBER_USE_NATIVE=0 on
	GNU/Linux because linked-list pointers used by glibc get
	corrupted when fiber stacks are copied.

	Thanks to wanabe for finding the bug and original patch.

	* thread_pthread (native_thread_init_stack): fix stack corruption
	  [ruby-core:82737] [Bug #13387]
------------------------------------------------------------------------
r62711 | nagachika | 2018-03-10 11:32:56 +0900 (Sat, 10 Mar 2018) | 6 lines

merge revision(s) 59963: [Backport #13163]

	thread.c: report then abort

	* thread.c (thread_start_func_2): report then abort on exception,
	  if both are set.  [ruby-core:79280] [Bug #13163]
------------------------------------------------------------------------
r62694 | nagachika | 2018-03-08 00:10:47 +0900 (Thu, 08 Mar 2018) | 3 lines

merge revision(s) 60437: [Backport #14057]

	TracePoint#enable, #disable: Don't yield any argument. [Bug #14057]
------------------------------------------------------------------------
r62692 | nagachika | 2018-03-07 23:28:31 +0900 (Wed, 07 Mar 2018) | 8 lines

merge revision(s) 60294: [Backport #11638]

	Clarify the behavior of IO.write without offset in write mode.

	  https://github.com/ruby/ruby/pull/1571

	  Patch by @takanabe [fix GH-1571]
	  [Bug #11638][ruby-core:71277]
------------------------------------------------------------------------
r62691 | nagachika | 2018-03-07 23:26:14 +0900 (Wed, 07 Mar 2018) | 6 lines

merge revision(s) 60160: [Backport #13998]

	parse.y: token info with BOM

	* parse.y (parser_prepare): set token_info_enabled flag first,
	  before returning at BOM.  [ruby-dev:50288] [Bug #13998]
------------------------------------------------------------------------
r62690 | nagachika | 2018-03-07 23:05:38 +0900 (Wed, 07 Mar 2018) | 11 lines

merge revision(s) 60055: [Backport #13856]

	io.c: fix segfault with closing socket on Windows

	* io.c (fptr_finalize_flush): add an argument to keep GVL.
	* io.c (fptr_finalize): adjust for above change.
	* io.c (io_close_fptr): closing without GVL causes another
	  exception while raising exception in another thread. This causes
	  segfault on Windows. Keep GVL while closing when another thread
	  raises.
	  [Bug #13856] [ruby-core:82602]
------------------------------------------------------------------------
r62667 | nagachika | 2018-03-06 01:11:30 +0900 (Tue, 06 Mar 2018) | 22 lines

merge revision(s) 60000,60001,60002: [Backport #13925]

	dup String#partition return value

	* string.c (rb_str_partition): return duplicated receiver, when no
	  splits.  [ruby-core:82911] [Bug#13925]

	Author:    Seiei Miyagi <hanachin@gmail.com>

	dup String#rpartition return value

	* string.c (rb_str_rpartition): return duplicated receiver, when
	  no splits.  [ruby-core:82911] [Bug#13925]

	Author:    Seiei Miyagi <hanachin@gmail.com>

	dup String#split return value

	* string.c (rb_str_split): return duplicated receiver, when no
	  splits.  patched by tompng (tomoya ishida) in [ruby-core:82911],
	  and the test case by Seiei Miyagi <hanachin@gmail.com>.
	  [Bug#13925] [Fix GH-1705]
------------------------------------------------------------------------
r62666 | nagachika | 2018-03-06 00:58:01 +0900 (Tue, 06 Mar 2018) | 7 lines

merge revision(s) 59970: [Backport #13736]

	ruby.c: paragraph mode by -00

	* ruby.c (proc_options): set to paragraph mode, if -00 is given,
	  as well as perl and -R0 option in 0.49.
	  [ruby-core:81987] [Bug #13736]
------------------------------------------------------------------------
r62665 | nagachika | 2018-03-06 00:42:20 +0900 (Tue, 06 Mar 2018) | 13 lines

merge revision(s) 59975: [Backport #13916]

	process: block/unblock signals around fork

	As with forking for execve(2) in `spawn', we must block signals
	to ensure they are handled correctly in a freshly `fork'-ed child.

	* process.c (retry_fork_ruby): block/unblock signals around fork
	  (rb_fork_ruby): re-enable signals in forked child
	* test/ruby/test_process.rb (test_forked_child_signal): new test
	  [ruby-core:82883] [Bug #13916]

	  Thanks to Russell Davis for the bug report and test case.
------------------------------------------------------------------------
r62651 | nagachika | 2018-03-04 11:17:58 +0900 (Sun, 04 Mar 2018) | 7 lines

merge revision(s) 59956: [Backport #13705]

	vm.c: fix `cfp consistency error' which occurs
	when raising exception in bmethod call event

	* vm.c (invoke_bmethod): set FINISH flag just before calling vm_exec.
	  [ruby-dev:50162] [Bug #13705]
------------------------------------------------------------------------
r62647 | nagachika | 2018-03-04 07:09:20 +0900 (Sun, 04 Mar 2018) | 12 lines

merge revision(s) 59602,59887: [Backport #13816]

	High Sierra's APFS cannot use invalid filenames [Bug #13816]

	added workaround for APFS file format.

	  * TestFileExhaustive#test_atime: It fails with nano-sec precise.
	    I changed to use unixtime for this assertion for APFS.
	  * TestFileExhaustive#test_expand_path: skip assertion when given
	    invalid charactor on APFS.

	  [Bug #13816][ruby-core:82383]
------------------------------------------------------------------------
r62646 | nagachika | 2018-03-04 07:04:49 +0900 (Sun, 04 Mar 2018) | 16 lines

merge revision(s) 58431,58447: [Backport #13489]

	test_framework.rb: for case-sensitive filesystem

	* test/mkmf/test_framework.rb (test_single_framework): fix header
	  file name for case-sensitive filesystem.  it may not be same as
	  the framework name, but should be the actual file name.
	  [ruby-dev:50093] [Bug #13489]

	* test/mkmf/test_framework.rb (test_multi_frameworks): ditto.

	test_file_exhaustive.rb: check case-sensitive fs

	* test/ruby/test_file_exhaustive.rb (test_expand_path): dump
	  expanded file name, not only appended char, for case-sensitive
	  filesystem.  [ruby-dev:50093] [Bug #13489]
------------------------------------------------------------------------
r62645 | nagachika | 2018-03-04 06:54:45 +0900 (Sun, 04 Mar 2018) | 5 lines

merge revision(s) 59867: [Backport #13894]

	test/win32ole/test_word.rb: word quit without confirmation dialog to save 
	files. [Bug #13894] Thanks to h.shirosaki.

------------------------------------------------------------------------
r62640 | nagachika | 2018-03-03 11:39:47 +0900 (Sat, 03 Mar 2018) | 5 lines

merge revision(s) 59893,59922: [Backport #13895]

	fix the case High Sierra's mincore(2) may return -128 [Bug #13895]

	Fix typos [ci skip]
------------------------------------------------------------------------
r62639 | nagachika | 2018-03-03 11:25:41 +0900 (Sat, 03 Mar 2018) | 10 lines

merge revision(s) 58769,59710,59712: [Backport #13566]

	Treat NULL reference case [Bug #13566]

	Fix C level backtrace on Darwin

	SEGV caused by invalid instruction call.

	skip unless PLATFORM is darwin.

------------------------------------------------------------------------
r62638 | nagachika | 2018-03-03 11:07:18 +0900 (Sat, 03 Mar 2018) | 15 lines

merge revision(s) 57597,57951: [Backport #13232]

	bigdecimal: version 1.3.1

	Import bigdecimal version 1.3.1.  The full commit log is here:

	  https://github.com/ruby/bigdecimal/compare/v1.3.0...v1.3.1

	bigdecimal: version 1.3.2

	Import bigdecimal version 1.3.2.  The full commit log is here:

	  https://github.com/ruby/bigdecimal/compare/v1.3.1...v1.3.2

	This fixes [ruby-core:79603] [Bug #13232]
------------------------------------------------------------------------
r62636 | nagachika | 2018-03-02 21:59:11 +0900 (Fri, 02 Mar 2018) | 9 lines

merge revision(s) 59454,59954: [Backport #14118]

	configure.in: use libtool

	* configure.in: use libtool on macOS to suppress a warning against
	  debug_counter.o, which has no symbols unless USE_DEBUG_COUNTER
	  is set to non-zero.

	configure.in: use newer libtool only
------------------------------------------------------------------------
r62634 | nagachika | 2018-03-02 21:45:41 +0900 (Fri, 02 Mar 2018) | 12 lines

merge revision(s) 62506,62508: [Backport #14438]

	test_time_tz.rb: past Japanese DST tzdata fix

	* test/ruby/test_time_tz.rb (TestTimeTZ#test_asia_tokyo): follow
	  the tzdata 2018 fix of Japanese DST transitions (1948-1951).
	  [ruby-core:85373] [Bug #14438]

	test_time_tz.rb: past Japanese DST tzdata fix

	* test/ruby/test_time_tz.rb (TestTimeTZ#test_asia_tokyo): fix
	  the expected data at the end of DST.  [Bug #14438]
------------------------------------------------------------------------
r62444 | nagachika | 2018-02-17 01:40:57 +0900 (Sat, 17 Feb 2018) | 14 lines

merge revision(s) 57733,57734: [Backport #13782]

	kwrest arg name

	* compile.c (iseq_set_arguments_keywords): make keyword rest
	  argument name nd_vid consistently, regardless of whether other
	  keyword arguments are present.  [Fix GH-1529]

	* parse.y (new_args_tail_gen): ditto.

	fix nd_ainfo->kw_rest_arg

	[Fix GH-5129]
	Author:    fate0 <fate0@users.noreply.github.com>
------------------------------------------------------------------------
r62440 | nagachika | 2018-02-17 01:25:40 +0900 (Sat, 17 Feb 2018) | 13 lines

merge revision(s) 59983,59984: [Backport #10222] [Backport #14372] [Backport #14424]

	file.c: rb_check_realpath

	* file.c (rb_check_realpath): returns real path which has no
	  symbolic links.  similar to rb_realpath except for returning
	  Qnil if any parts did not exist.

	load.c: real path to load

	* load.c (rb_construct_expanded_load_path): expand load paths to
	  real paths to get rid of duplicate loading from symbolic-linked
	  directories.  [Feature #10222]
------------------------------------------------------------------------
r62438 | nagachika | 2018-02-17 01:10:17 +0900 (Sat, 17 Feb 2018) | 6 lines

merge revision(s) 62436: [Backport #14481]

	fix regexp literal warning.

	test/rubygems/test_gem_server.rb: eliminate duplicated character class warning.
	[Bug #14481]
------------------------------------------------------------------------
r62435 | nagachika | 2018-02-17 00:27:37 +0900 (Sat, 17 Feb 2018) | 13 lines

merge revision(s) 58471,58493: [Backport #13505]

	load.c: backtrace of circular require

	* load.c (load_lock): print backtrace of circular require via
	  `Warning.warn` [ruby-core:80850] [Bug #13505]

	Send the backtrace of the circular require warning as a single String to Warning.warn

	* load.c: send as a single string.
	* error.c: expose the string formatted by rb_warning as rb_warning_string().
	* test/ruby/test_exception.rb: update tests.
	  [ruby-core:80850] [Bug #13505]
------------------------------------------------------------------------
r62434 | nagachika | 2018-02-16 23:58:30 +0900 (Fri, 16 Feb 2018) | 7 lines

merge revision(s) 62422: [Backport #14481]

	Merge RubyGems 2.7.6 from upstream.

	  It fixed some security vulnerabilities.

	  http://blog.rubygems.org/2018/02/15/2.7.6-released.html
------------------------------------------------------------------------
r62234 | nagachika | 2018-02-05 23:21:12 +0900 (Mon, 05 Feb 2018) | 8 lines

merge revision(s) 61484: [Backport #14232]

	vm_method.c: fix super in refined module

	* vm_method.c (rb_method_entry_complement_defined_class): clone
	  the original method entry of refined module instance method with
	  the active ICLASS, to track super method chain.
	  [ruby-dev:50390] [Bug #14232]
------------------------------------------------------------------------
r62233 | nagachika | 2018-02-05 23:05:52 +0900 (Mon, 05 Feb 2018) | 13 lines

merge revision(s) 60980,60984: [Backport #14070]

	Modules should not have subclasses.

	When refining a module, the module was set to the superclass of its refinement,
	and a segmentation fault occurred.
	The superclass of the refinement should be an iclass of the module.
	[ruby-core:83617] [Bug #14070]

	The superclass of a refinement should have BasicObject as its ancestor.

	Otherwise, VM_ASSERT(callable_method_entry_p(cme)) in
	prepare_callable_method_entry() fails if VM_CHECK_MODE is 2.
------------------------------------------------------------------------
r62185 | nagachika | 2018-02-04 09:39:24 +0900 (Sun, 04 Feb 2018) | 28 lines

merge revision(s) 61149,61150,61151,61167: [Backport #14162]

	irb.rb: preserve ARGV on binding.irb

	This is not perfectly good solution (at least we don't want to have ARGV
	as default value of `argv` argument), but unfortunately IRB.setup and
	IRB.parse_opts are public methods and we can't make breaking change to
	those methods.

	We may deprecate using them and then make them private in the future,
	but the removal should not be in Ruby 2.5. So I kept their interface for
	now.

	[Bug #14162] [close GH-1770]

	* properties.

	irb/init.rb: make sure ARGV refers to toplevel one

	irb/test_init.rb: add test to ensure $0

	is not changed.

	At first `ARGV.unshift('something')` was suggested for r61149,
	but it wasn't sufficient because it modifies $0.

	Not only to preserve ARGV, but also r61149 intends to preserve $0.
	This test prevents future breakage of the behavior.
------------------------------------------------------------------------
r62174 | nagachika | 2018-02-03 11:51:00 +0900 (Sat, 03 Feb 2018) | 6 lines

merge revision(s) 60213: [Backport #14032]

	parse.y: indent at '#'

	* parse.y (parser_here_document): update indent at '#', which is
	  not a space.  [ruby-core:83368] [Bug #14032]
------------------------------------------------------------------------
r62173 | nagachika | 2018-02-03 11:39:42 +0900 (Sat, 03 Feb 2018) | 12 lines

merge revision(s) 60040,60188: [Backport #14014]

	complex.c: no overflow

	* complex.c (rb_complex_finite_p): get rid of overflow and
	  unnecessary multiplication.

	test_complex.rb: NaN Complex

	* test/ruby/test_complex.rb (test_finite_p): assertions for NaN
	  Complex.  NaN is not an infinite nor a finite number.
	  [ruby-core:83272] [Bug #14014]
------------------------------------------------------------------------
r62172 | nagachika | 2018-02-03 11:25:37 +0900 (Sat, 03 Feb 2018) | 14 lines

merge revision(s) 60042,60130,60131: [Backport #13982]

	ext: adjust indent [ci skip]

	zlib.c: memory leak in gunzip

	* ext/zlib/zlib.c (zlib_gunzip): clear zstream to fix memory leak.
	  [ruby-core:83162] [Bug #13982]

	zlib.c: ensure to free

	* ext/zlib/zlib.c (zlib_gunzip): gz0 is a structure variable on
	  the stack, no longer valid after exit by an exception.  ensure
	  to free instead.  [Bug #13982]
------------------------------------------------------------------------
r62171 | nagachika | 2018-02-03 11:05:17 +0900 (Sat, 03 Feb 2018) | 7 lines

merge revision(s) 59986: [Backport #13928]

	numeric.c: use NUM2DBL

	* numeric.c (fix_fdiv_double), bignum.c (rb_big_fdiv_double): use
	  NUM2DBL on unknown object.  RFLOAT_VALUE is only appliicable to
	  T_FLOAT object.  [ruby-core:82924] [Bug #13928]
------------------------------------------------------------------------
r61854 | nagachika | 2018-01-15 22:27:28 +0900 (Mon, 15 Jan 2018) | 8 lines

merge revision(s) 60079: [Backport #13794]

	thread_pthread.c: do not wakeup inside child processes

	* thread_pthread.c (rb_thread_wakeup_timer_thread): check
	  ownership before incrementing
	  (rb_thread_wakeup_timer_thread_low): ditto
	  [Bug #13794] [ruby-core:83064]
------------------------------------------------------------------------
r61456 | nagachika | 2017-12-25 05:06:32 +0900 (Mon, 25 Dec 2017) | 5 lines

merge revision(s) 60071: [Backport #13953] [Backport #13954] [Backport #13955] [Backport #13957]

	ext: check if null byte is contained

	[ruby-dev:50267] [Bug #13953]
------------------------------------------------------------------------
r61455 | nagachika | 2017-12-25 04:14:30 +0900 (Mon, 25 Dec 2017) | 7 lines

merge revision(s) 60066: [Backport #13952]

	string.c: fix ASCII-only on succ

	* string.c (str_succ): clear coderange cache when no alpha-numeric
	  character case, carried part may become ASCII-only.
	  [ruby-core:83062] [Bug #13952]
------------------------------------------------------------------------
r61454 | nagachika | 2017-12-25 03:59:53 +0900 (Mon, 25 Dec 2017) | 6 lines

merge revision(s) 60059: [Backport #13949]

	pack.c: unpack "M" may be ASCII only

	* pack.c (pack_unpack_internal): set ASCII only properly on "M",
	  may be ASCII only.  [ruby-core:83055] [Bug #13949]
------------------------------------------------------------------------
r61453 | nagachika | 2017-12-25 03:46:48 +0900 (Mon, 25 Dec 2017) | 6 lines

merge revision(s) 60060: [Backport #13950]

	string.c: ASCII-incompatible is not ASCII only

	* string.c (tr_trans): ASCII-incompatible encoding strings cannot
	  be ASCII-only even if valid.  [ruby-core:83056] [Bug #13950]
------------------------------------------------------------------------
r61440 | nagachika | 2017-12-24 12:01:35 +0900 (Sun, 24 Dec 2017) | 7 lines

merge revision(s) 60024: [Backport #13945]

	vm.c: fetch retval iff necessary

	* vm.c (rb_vm_make_jump_tag_but_local_jump): get rid of fetching
	  retval when it is not used.  it is necessary for local jump
	  state only.
------------------------------------------------------------------------
r61439 | nagachika | 2017-12-24 11:45:07 +0900 (Sun, 24 Dec 2017) | 13 lines

merge revision(s) 60099,60100: [Backport #13964]

	compile.c: fix stack consitency error

	* compile.c (iseq_compile_each0): fix stack consitency error on
	  attr-assign with safe navigation operator when the receiver is
	  nil, should pop it too.  [ruby-core:83078] [Bug #13964]

	test_call.rb: refine test_safe_call

	* test/ruby/test_call.rb (test_safe_call): rhs should not be
	  evaluated when the receiver is nil.  simplified the assertion
	  for  [Bug #13964].
------------------------------------------------------------------------
r61436 | nagachika | 2017-12-24 11:29:19 +0900 (Sun, 24 Dec 2017) | 14 lines

merge revision(s) 59444,59445: [Backport #13776]

	adjust indent [ci skip]

	* vm_insnhelper.c (vm_call_method_each_type): adjust indent of a
	  block in switch.

	visibility of inherited method

	* vm_insnhelper.c (vm_call_method_each_type): honor the original
	  visibility of inherited methods when a refinement is defined but
	  not activated.  [ruby-core:82209] [Bug #13776]

	Author:    Mon_Ouie (Mon ouie) <mon.ouie@gmail.com>
------------------------------------------------------------------------
r61414 | nagachika | 2017-12-22 20:43:00 +0900 (Fri, 22 Dec 2017) | 8 lines

merge revision(s) 57971: [Backport #13305]

	Fix a consistency bug of ISEQ_COVERAGE [Bug #13305]

	There is an invariant that ISEQ_COVERAGE(iseq) must be Qnil if and only
	if option->coverage_enabled is false.  This invariant was broken by
	NODE_PRELUDE which updates option->coverage_enabled but not
	ISEQ_COVERAGE(iseq).
------------------------------------------------------------------------
r61373 | nagachika | 2017-12-21 00:59:14 +0900 (Thu, 21 Dec 2017) | 3 lines

merge revision(s) 60021: [Backport #13926]

	HTTPHeader#add_field should allow binary [Bug #13926]
------------------------------------------------------------------------
r61370 | nagachika | 2017-12-21 00:34:37 +0900 (Thu, 21 Dec 2017) | 18 lines

merge revision(s) 58410,58411: [Backport #13487]

	ri.1: rewrite ri man page

	* man/ri.1: update the (very outdated) ri man page:
	  * update document date
	  * fix document title formatting and volume name
	  * update descriptions and options to current ri --help text
	  * fix some mdoc formatting errors (missing escaping of `\',
	    wrong macro for bullet list items)
	  * various rewordings and other improvements

	improve man pages

	* man/ruby.1, man/erb.1, man/goruby.1, man/irb.1:
	  fix document title formatting and volume name,
	  improve "REPORTING BUGS" section: fix mdoc formatting error
	  (wrong macro for bullet list items), small rewordings.
------------------------------------------------------------------------
r61369 | nagachika | 2017-12-21 00:31:18 +0900 (Thu, 21 Dec 2017) | 6 lines

merge revision(s) 59372: [Backport #13649]

	lib/net/imap.rb: Ignore trailing space for Microsoft Exchange Server

	Based on the patch by keysen (Jeremy Carlier).
	[ruby-core:81641] [Bug #13649]
------------------------------------------------------------------------
r61368 | nagachika | 2017-12-21 00:21:56 +0900 (Thu, 21 Dec 2017) | 7 lines

merge revision(s) 58208: [Backport #13386]

	Add documents on Process::CLOCK_* constants

	* process.c: Add documents on Process::CLOCK_* constants.
	  Patch by Sunao Komuro <sunao-komuro@cookpad.com>.
	  Closes [GH-1567] [Bug #13386]
------------------------------------------------------------------------
r61367 | nagachika | 2017-12-21 00:20:15 +0900 (Thu, 21 Dec 2017) | 27 lines

merge revision(s) 58146,58150,58156: [Backport #13276]

	error.c: refactor warning messages

	* error.c (with_warning_string): extract building warning message
	  string from variadic arguments.

	* error.c (syserr_warning): write warning message with the system
	  error message.

	error.c: warning functions

	* error.c: define warning functions in all combinations of
	  * no errno, system errno, argument
	  * without/with encoding
	  * enabled/disabled by default

	dir.c: err at glob failure

	* dir.c (glob_helper): raise a SystemCallError exception when
	  opendir() failed, except for ENOENT, ENOTDIR, and EACCES.  this
	  behavior predates 1.0; the comments in glob.c claimed that
	  glob() returned -1 on error but actualy the pointer to a global
	  variable, then dir_glob() did check only -1 as the comments, and
	  ignored actual errors.  [ruby-core:80226] [Bug #13276]

	dir.c: ruby_glob_funcs_t
------------------------------------------------------------------------
r61366 | nagachika | 2017-12-20 23:58:57 +0900 (Wed, 20 Dec 2017) | 8 lines

merge revision(s) 58409: [Backport #10838]

	ri.1: fix errors in ri man page

	* man/ri.1: fix some errors in ri man page (add missing options,
	  remove options that do not exist, fix formatter list).

	  Reported by Josh Cheek.  [ruby-core:68065] [Bug #10838]
------------------------------------------------------------------------
r61365 | nagachika | 2017-12-20 23:57:44 +0900 (Wed, 20 Dec 2017) | 9 lines

merge revision(s) 58020: [Backport #10936]

	date_core.c: fix error in DateTime docs

	* ext/date/date_core.c: [DOC] fix format string for DateTime#rfc3339.
	  Reported by Andreas Rayo Kniep.  [ruby-core:68418] [Bug #10936]

	* ext/date/date_core.c: [DOC] ditto for DateTime#iso8601 and
	  DateTime#xmlschema; other small improvements.
------------------------------------------------------------------------
r61364 | nagachika | 2017-12-20 23:56:48 +0900 (Wed, 20 Dec 2017) | 19 lines

merge revision(s) 57887: [Backport #13159]

	lib/ostruct.rb: [DOC] revise docs for OpenStruct

	* update paragraph on implementation:
	  define_singleton_method is used, not define_method
	* add call-seq with return values for each_pair
	* adopt description of dig from Array and Hash
	* fix description of the hash method
	* :nodoc: initialize_copy, respond_to_missing?
	* other small improvements, e.g. use the term `attribute' in the docs
	  (instead of `member'), which is clearer for users of the class
	* improve code examples: e.g. use more consistent style (always use
	  double quotes, drop `p' and `puts', ...), update inspect output,
	  use example data that is not prone to change (like population)
	* add more code examples
	* fix some small errors and grammar

	[ruby-core:79265] [Bug #13159]
------------------------------------------------------------------------
r61363 | nagachika | 2017-12-20 23:55:34 +0900 (Wed, 20 Dec 2017) | 10 lines

merge revision(s) 57686: [Backport #13233]

	rational.c: fix rdoc

	* rational.c: [DOC] fix wrong indentations and comment out some lines
	  in code examples to make them valid Ruby code and syntax highlighted
	  on the rendered page.

	[ci skip] [ruby-core:79607] [Bug #13233]
	Author:    Marcus Stollsteimer <sto.mar@web.de>
------------------------------------------------------------------------
r61362 | nagachika | 2017-12-20 23:54:56 +0900 (Wed, 20 Dec 2017) | 11 lines

merge revision(s) 57536: [Backport #13192]

	doc: Add example for Symbol#to_s

	* string.c: add example for Symbol#to_s.

	The docs for Symbol#to_s only include an example for
	Symbol#id2name, but not for #to_s which is an alias;
	the docs should include examples for both methods.

	From: Marcus Stollsteimer <sto.mar@web.de>
------------------------------------------------------------------------
r61361 | nagachika | 2017-12-20 23:53:56 +0900 (Wed, 20 Dec 2017) | 11 lines

merge revision(s) 57649,57651: [Backport #13222]

	array.c: finish_exact_sum

	* array.c (finish_exact_sum): extract duplicate code from
	  rb_ary_sum.

	array.c: check if numeric

	* array.c (finish_exact_sum): add 0 and the initial value to check
	  if the latter is numeric.  [ruby-core:79572] [Bug #13222]
------------------------------------------------------------------------
r61358 | nagachika | 2017-12-20 20:54:58 +0900 (Wed, 20 Dec 2017) | 7 lines

merge revision(s) 60182: [Backport #14009]

	configure.ac: link Foundation framework

	* configure.ac (XLDFLAGS): link against Foundation framework and
	  let __NSPlaceholderDictionary initialize, to get rid of crash
	  after fork on macOS High Sierra.  [ruby-core:83239] [Bug #14009]
------------------------------------------------------------------------
r61328 | nagachika | 2017-12-19 01:52:19 +0900 (Tue, 19 Dec 2017) | 6 lines

merge revision(s) 59748: [Backport #14073]

	st.c: fix num_entries

	* st.c (st_insert2): should manage num_entries when the key is
	  undefined, as well as st_insert().
------------------------------------------------------------------------
r61293 | nagachika | 2017-12-16 10:50:26 +0900 (Sat, 16 Dec 2017) | 1 line

bump up teeny version to 2.4.4.
------------------------------------------------------------------------
r61245 | nagachika | 2017-12-14 22:51:34 +0900 (Thu, 14 Dec 2017) | 3 lines

merge revision(s) 61242: [Backport #14185]

	Fix a command injection vulnerability in Net::FTP.
------------------------------------------------------------------------
r61239 | nagachika | 2017-12-14 22:31:41 +0900 (Thu, 14 Dec 2017) | 69 lines

merge revision(s) 60123,60172,60189,60208,60210,60211: [Backport #14005]

	webrick: avoid unnecessary IO#sync= call

	Sockets and pipes are always created with FMODE_SYNC flag
	already set (otherwise many things would be broken).

	* lib/webrick/server.rb (accept_client): remove unnecessary
	  IO#sync= call

	webrick: do not hang acceptor on slow TLS connections

	OpenSSL::SSL::SSLSocket#accept may block indefinitely on clients
	which negotiate the TCP connection, but fail (or are slow) to
	negotiate the subsequent TLS handshake.  This prevents the
	multi-threaded WEBrick server from accepting other connections.

	Since the TLS handshake (via OpenSSL::SSL::SSLSocket#accept)
	consists of normal read/write traffic over TCP, handle it in the
	per-client thread, instead.

	Furthermore, using non-blocking accept() is useful for non-TLS
	sockets anyways because spurious wakeups are possible from
	select(2).

	* lib/webrick/server.rb (accept_client): use TCPServer#accept_nonblock
	  and remove OpenSSL::SSL::SSLSocket#accept call
	* lib/webrick/server.rb (start_thread): call OpenSSL::SSL::SSLSocket#accept
	* test/webrick/test_ssl_server.rb (test_slow_connect): new test
	  [ruby-core:83221] [Bug #14005]

	webrick: fix up r60172

	By making the socket non-blocking in r60172, TLS/SSL negotiation
	via the SSL_accept function must handle non-blocking sockets
	properly and retry on SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE.
	OpenSSL::SSL::SSLSocket#accept cannot do that properly with a
	non-blocking socket, so it must use non-blocking logic of
	OpenSSL::SSL::SSLSocket#accept_nonblock.

	Thanks to MSP-Greg (Greg L) for finding this.

	* lib/webrick/server.rb (start_thread): use SSL_accept properly
	  with non-blocking socket.
	  [Bug #14013] [Bug #14005]

	webrick: fix up r60172 and revert r60189

	Thanks to MSP-Greg (Greg L) for helping with this.

	* lib/webrick/server.rb (start_thread): ignore ECONNRESET, ECONNABORTED,
	  EPROTO, and EINVAL on TLS negotiation errors the same way they
	  were ignored before r60172 in the accept_client method of the
	  main acceptor thread.
	  [Bug #14013] [Bug #14005]

	webrick: fix up r60172 and r60208

	Thanks to MSP-Greg (Greg L) for helping with this.

	* lib/webrick/server.rb (start_thread): fix non-local return
	  introduced in r60208

	webrick: fix up r60172 and r60210

	Thanks to MSP-Greg (Greg L) for helping with this.

	* lib/webrick/server.rb (start_thread): properly fix non-local return
	  introduced in r60208 and r60210
------------------------------------------------------------------------
r61238 | nagachika | 2017-12-14 22:14:12 +0900 (Thu, 14 Dec 2017) | 15 lines

merge revision(s) 61197: [Backport #14184]

	webrick: compile RE correctly for beginning and end match

	Using ^ and $ in regexps means we can accidentally get fooled
	by "%0a" in HTTP request paths being decoded to newline
	characters.  Use \A and \z to match beginning and end-of-string
	respectively, instead.

	Thanks to mame and hsbt for reporting.

	* lib/webrick/httpserver.rb (MountTable#compile):
	  use \A and \z instead of ^ and $
	* lib/webrick/httpserver.rb (MountTable#normalize): use \z instead of $
	* test/webrick/test_httpserver.rb (test_cntrl_in_path): new test
------------------------------------------------------------------------
r60626 | nagachika | 2017-11-03 10:46:59 +0900 (Fri, 03 Nov 2017) | 8 lines

merge revision(s) 58499,58500: [Backport #13181]

	parse.y: fix line in rescue

	* parse.y (set_line_body, primary): fix line number of bodystmt as
	  the beginning of the block.  [ruby-core:79388] [Bug #13181]

	parse.y: set_line_body is not used in ripper
------------------------------------------------------------------------
r60168 | nagachika | 2017-10-11 22:48:14 +0900 (Wed, 11 Oct 2017) | 5 lines

merge revision(s) 60149: [Backport #14003]

	Merge rubygems-2.6.14 changes.

	  It fixed http://blog.rubygems.org/2017/10/09/unsafe-object-deserialization-vulnerability.html
------------------------------------------------------------------------
r59914 | nagachika | 2017-09-15 07:22:39 +0900 (Fri, 15 Sep 2017) | 10 lines

merge revision(s) 58254: [Backport #13402]

	fix --with-gmp (broken by r57490)

	Looking at the generated shell script (also the autoconf manual), it
	seems AC_SEARCH_LIBS() m4 macro does not define HAVE_LIBsomething C
	preprocessor macros, unlike AC_CHECK_LIB() which does define them.
	This previous change effectively killed building with GMP because
	building that mode depends on existence of HAVE_LIBGMP. [Bug #13402]

------------------------------------------------------------------------
r59913 | nagachika | 2017-09-15 07:21:51 +0900 (Fri, 15 Sep 2017) | 1 line

bump up teeny version to 2.4.3.
------------------------------------------------------------------------
r59898 | nagachika | 2017-09-14 20:24:10 +0900 (Thu, 14 Sep 2017) | 6 lines

merge revision(s) 59897:

	lib/webrick/log.rb: sanitize any type of logs

	It had failed to sanitize some type of exception messages.  Reported and
	patched by Yusuke Endoh (mame) at https://hackerone.com/reports/223363
------------------------------------------------------------------------
r59841 | nagachika | 2017-09-12 02:27:01 +0900 (Tue, 12 Sep 2017) | 7 lines

merge revision(s) 59375: [Backport #13756]

	parse.y: empty hash in defined

	* parse.y (command): NODE_ARRAY with NULL is invalid.  traversal
	  in defined_expr0 is simplified than iseq_compile_each0.
	  [ruby-core:82113] [Bug #13756]
------------------------------------------------------------------------
r59823 | nagachika | 2017-09-10 21:33:09 +0900 (Sun, 10 Sep 2017) | 6 lines

merge revision(s) 59765: [Backport #13877]

	ruby.h: unnormalized Fixnum value

	* include/ruby/ruby.h (ST2FIX): fix unnormalized Fixnum value bug
	  on mingw/mswin.  [ruby-core:82687] [Bug #13877]
------------------------------------------------------------------------
r59822 | nagachika | 2017-09-10 21:17:49 +0900 (Sun, 10 Sep 2017) | 7 lines

merge revision(s) 59763: [Backport #13874]

	string.c: fix false coderange

	* string.c (rb_enc_str_scrub): enc can differ from the actual
	  encoding of the string, the cached coderange is useless then.
	  [ruby-core:82674] [Bug #13874]
------------------------------------------------------------------------
r59820 | nagachika | 2017-09-10 19:27:59 +0900 (Sun, 10 Sep 2017) | 6 lines

merge revision(s) 59644: [Backport #13836]

	parse.y: primary should not be 0

	* parse.y (primary): should not be 0, since it can be a receiver.
	  [ruby-core:82447] [Bug #13836]
------------------------------------------------------------------------
r59819 | nagachika | 2017-09-10 19:10:28 +0900 (Sun, 10 Sep 2017) | 7 lines

merge revision(s) 59613: [Backport #13817]

	vm_method.c: alias warning at refined method

	* vm_method.c (rb_method_entry_make): suppress a warning at
	  refined method which will not be redefined.
	  [ruby-core:82385] [Bug #13817]
------------------------------------------------------------------------
r59818 | nagachika | 2017-09-10 15:15:05 +0900 (Sun, 10 Sep 2017) | 2 lines

revert r59813 partially. TestGemRequire#test_realworld_default_gem is not contained in trunk. 
I would like to sync rubygems on ruby_2_4 branch to trunk
------------------------------------------------------------------------
r59817 | nagachika | 2017-09-10 15:03:12 +0900 (Sun, 10 Sep 2017) | 6 lines

merge revision(s) 59649: [Backport #13832]

	gc.c: restore cfp at finalizer

	* gc.c (run_finalizer): restore cfp for the case an exception
	  raised in a finalizer.  [ruby-core:82432] [Bug #13832]
------------------------------------------------------------------------
r59816 | nagachika | 2017-09-10 14:44:27 +0900 (Sun, 10 Sep 2017) | 1 line

revert r59815 partially.
------------------------------------------------------------------------
r59815 | nagachika | 2017-09-10 14:36:09 +0900 (Sun, 10 Sep 2017) | 1 line

bump up RUBY_PATCHLEVEL
------------------------------------------------------------------------
r59814 | nagachika | 2017-09-10 14:23:13 +0900 (Sun, 10 Sep 2017) | 3 lines

lib/rubygems: fix several vulnerabilities in RubyGems; bump to version 2.6.13.
[Backport #13842]

------------------------------------------------------------------------
r59813 | nagachika | 2017-09-10 14:10:55 +0900 (Sun, 10 Sep 2017) | 2 lines

lib/rubygems: bump up RubyGems version to 2.6.12. [Backport #13842]

------------------------------------------------------------------------
r59812 | nagachika | 2017-09-10 13:53:58 +0900 (Sun, 10 Sep 2017) | 6 lines

merge revision(s) 59708: [Backport #13844]

	compile.c: ensure after toplevel return

	* compile.c (iseq_compile_each0): toplevel returns should fire
	  ensures.  [ruby-core:82492] [Bug #13844]
------------------------------------------------------------------------
r59811 | nagachika | 2017-09-10 12:49:10 +0900 (Sun, 10 Sep 2017) | 15 lines

merge revision(s) 59624,59626: [Backport #13830]

	ruby.h: fix rb_scan_args_trail_idx

	* include/ruby/ruby.h (rb_scan_args_trail_idx): fix the case both
	  of optional and rest arguments are defined.
	  [ruby-core:82427] [Bug #13830]

	* include/ruby/ruby.h (rb_scan_args_n_trail): ditto.
	non-keywords hash

	* class.c (rb_scan_args), include/ruby/ruby.h (rb_scan_args_set):
	  return non-keywords elements only in the last hash when keyword
	  arguments are extracted from it, as well as methods defined in
	  ruby level.  [ruby-core:82427] [Bug #13830]
------------------------------------------------------------------------
r59809 | nagachika | 2017-09-10 11:58:23 +0900 (Sun, 10 Sep 2017) | 14 lines

merge revision(s) 59322,59325: [Backport #13744]

	process.c: handle dynamic :rlimit_* symbols in spawn execopts

	* process.c (rb_execarg_addopt_rlimit): hoist out of rb_execarg_addopt
	  (rlimit_type_by_sym): new wrapper for dynamic symbol
	  (rb_execarg_addopt): check for dsym via rlimit_type_by_sym
	* test/ruby/test_process.rb (test_execopts_rlimit): check dsym w/o pindown
	  Add extra check for bogus rlimit args, too.
	  [ruby-core:82033] [Bug #13744]
	process.c: null bytes

	* process.c (rlimit_type_by_sym): prohibit null bytes in key
	  names.  [ruby-core:82033] [Bug #13744]
------------------------------------------------------------------------
r59808 | nagachika | 2017-09-10 11:46:34 +0900 (Sun, 10 Sep 2017) | 7 lines

merge revision(s) 57944,57977,58062: [Backport #13306]

	io.c: [DOC] IO#puts uses IO#write
	io.c: [DOC] add missing `$`
	io.c: [DOC] expand docs for IO#puts

	[ruby-core:80081] [Bug #13306]
------------------------------------------------------------------------
r59807 | nagachika | 2017-09-10 11:40:45 +0900 (Sun, 10 Sep 2017) | 24 lines

merge revision(s) 58524,58525,58526,59333,59337: [Backport #13616]

	zlib.c: zstream_expand_buffer_non_stream

	* ext/zlib/zlib.c (zstream_expand_buffer_non_stream): rename from
	  zstream_expand_buffer_without_gvl() and replace duplicate code
	  in zstream_expand_buffer().
	zlib.c: zstream_buffer_ungetbyte

	* ext/zlib/zlib.c (zstream_buffer_ungetbyte): simplify by using
	  zstream_buffer_ungets().
	zlib.c: no buf_filled in zstream

	* ext/zlib/zlib.c (zstream): manage capacity and size of `buf`
	  instead of size and separated member `buf_filled`.  reported by
	  Christian Jalio (jalio) at https://hackerone.com/reports/211958
	Zlib::GzipReader#pos underflows after calling #ungetbyte or #ungetc at start of file [Bug #13616]

	patched by Andrew Haines <andrew@haines.org.nz> [ruby-core:81488]
	zlib.c: fix unnormalized Fixnum

	* ext/zlib/zlib.c (rb_gzfile_total_out): cast to long not to
	  result in an unsigned long to normalized to Fixnum on LLP64
	  platforms.  [ruby-core:81488]
------------------------------------------------------------------------
r59784 | nagachika | 2017-09-08 23:38:12 +0900 (Fri, 08 Sep 2017) | 28 lines

merge revision(s) 59567: [Backport #13796]

	openssl: import v2.0.5

	Import Ruby/OpenSSL 2.0.5. The full commit history since v2.0.4
	(imported at r59081) can be found at:

		https://github.com/ruby/openssl/compare/v2.0.4...v2.0.5

	This will fix the test failure on latest Debian sid and the "no
	OPENSSL_Applink" issue on mswin.

	----------------------------------------------------------------
	Kazuki Yamaguchi (11):
	      test/test_ssl: allow 3DES cipher suites in test_sslctx_set_params
	      bio: prevent possible GC issue in ossl_obj2bio()
	      bio: do not use the FILE BIO method in ossl_obj2bio()
	      Rakefile: install_dependencies: install only when needed
	      appveyor.yml: test against Ruby 2.4
	      ossl_pem_passwd_cb: relax passphrase length constraint
	      ossl_pem_passwd_cb: do not check for taintedness
	      ossl_pem_passwd_cb: handle nil from the block explicitly
	      ssl: remove unsupported TLS versions from SSLContext::METHODS
	      ssl: fix compile error with OpenSSL 1.0.0
	      Ruby/OpenSSL 2.0.5

	Lars Kanis (1):
	      Add msys2 library dependency tag in gem metadata
------------------------------------------------------------------------
r59783 | nagachika | 2017-09-08 23:27:38 +0900 (Fri, 08 Sep 2017) | 7 lines

merge revision(s) 59693,59695: [Backport #13852]

	A HTTP Header value must not contain CR or LF.
	to_str -> to_s

	* lib/net/http/header.rb (set_field): `val` can not have `to_str`.

------------------------------------------------------------------------
r59782 | nagachika | 2017-09-08 23:25:52 +0900 (Fri, 08 Sep 2017) | 8 lines

merge revision(s) 59584: [Backport #13850]

	REXML: Fix a bug that unexpected methods can be called as a XPath function

	[HackerOne:249295]

	Reported by Andrea Jegher. Thanks!!!

------------------------------------------------------------------------
r59520 | nagachika | 2017-08-05 16:00:33 +0900 (Sat, 05 Aug 2017) | 11 lines

merge revision(s) 59457: [Backport #13775]

	should not copy promoted flags.

	* include/ruby/ruby.h (rb_clone_setup): should not copy some flags
	  (FL_PROMOTED0|FL_PROMOTED1|FL_FINALIZE).
	  [Bug #13775]

	* test/ruby/test_object.rb: add a test (note that this test will fail
	  only when RGENGC_CHECK_MODE >= 2).

------------------------------------------------------------------------
r59517 | nagachika | 2017-08-05 15:46:23 +0900 (Sat, 05 Aug 2017) | 6 lines

merge revision(s) 59368: [Backport #13753]

	random.c: ensure initialized

	* random.c (get_rnd, try_get_rnd): ensure initialized to get rid
	  of crash in forked processes.  [ruby-core:82100] [Bug #13753]
------------------------------------------------------------------------
r59516 | nagachika | 2017-08-05 15:35:02 +0900 (Sat, 05 Aug 2017) | 30 lines

merge revision(s) 59462,59474: [Backport #13772]

	release VM stack properly.

	* cont.c: r55766 change the handling method of Fiber's VM stack.
	  Resumed Fiber points NULL as VM stack and running Thread has
	  responsibility to manage it (marking and releasing).

	  However, thread_start_func_2()@thread.c and thread_free()@vm.c
	  doesn't free the VM stack if corresponding root Fiber is exist.
	  This causes memory leak. [Bug #13772]

	* cont.c (root_fiber_alloc): fib->cont.saved_thread.ec.stack should be NULL
	  because running thread has responsibility to manage this stack.

	* vm.c (rb_thread_recycle_stack_release): assert given stack is not NULL
	  (callers should care it).

	fix stack storing for root fibers.

	* cont.c (root_fiber_alloc): this function is called by fiber_current()
	  and fiber_store(). fiber_current() should clear VM stack information
	  in a fiber data because runnning thread knows stack information and has
	  responsibility to manage it. However fiber_store() requires to remain
	  VM stack information in a fiber data because the responsibility to manage
	  VM stack is moved to the Fiber from the Thread (and switch to another
	  fiber).

	* cont.c (root_fiber_alloc): save thread's fiber and root_fiber information.

------------------------------------------------------------------------
r59515 | nagachika | 2017-08-05 12:24:54 +0900 (Sat, 05 Aug 2017) | 8 lines

merge revision(s) 59128: [Backport #13669]

	Fix Enumerable#uniq with non single yield arguments

	* enum.c (uniq_func, uniq_iter): need packed value as the unique
	  key.  [ruby-core:81734] [Bug #13669] [Fix GH-1658]

	Author:    Kenichi Kamiya <kachick1@gmail.com>
------------------------------------------------------------------------
r59514 | nagachika | 2017-08-05 11:43:08 +0900 (Sat, 05 Aug 2017) | 10 lines

merge revision(s) 58810,58894: [Backport #13578]

	compile.c: fix catch-table labels optimization

	* compile.c (remove_unreachable_chunk): do not eliminate chunks
	  followed by labels in catch-table entries.
	compile.c: fix possible use of uninitialized value

	LABEL::unremovable added by r58810 is not initialized by
	new_label_body(), making the optimization unstable.
------------------------------------------------------------------------
r59513 | nagachika | 2017-08-05 11:22:37 +0900 (Sat, 05 Aug 2017) | 7 lines

merge revision(s) 58561: [Backport #13540]

	parse.y: make shared string modifiable

	* parse.y (dedent_string): ensure that the string is modifiable,
	  not to set the length of shared string.
	  [ruby-core:80987] [Bug #13540]
------------------------------------------------------------------------
r59512 | nagachika | 2017-08-05 10:56:55 +0900 (Sat, 05 Aug 2017) | 11 lines

merge revision(s) 58205: [Backport #13380]

	Remove unused Init_frozen_strings declaration

	Init_frozen_strings definition is removed in r51511.
	https://bugs.ruby-lang.org/issues/11423

	Patch by Kohei Suzuki <eagletmt@gmail.com>

	* internal.h: Remove declaration of unexist function
	  [Fix GH-1558]
------------------------------------------------------------------------
r59511 | nagachika | 2017-08-05 10:53:44 +0900 (Sat, 05 Aug 2017) | 11 lines

merge revision(s) 57501,58576: [Backport #13539]

	escape.c: check argument

	* ext/cgi/escape/escape.c (optimized_unescape): check
	  accept_charset encoding argument.
	share `@@accept_charset`

	* lib/cgi/{core,util}.rb: include CGI::Util not only extending, to
	  share `@@accept_charset` class variable, so that it is always
	  accessible.  [ruby-core:80986] [Bug #13539]
------------------------------------------------------------------------
r59510 | nagachika | 2017-08-05 10:45:39 +0900 (Sat, 05 Aug 2017) | 9 lines

merge revision(s) 58523: [Backport #13528]

	rational.c: canonicalization case

	* rational.c (float_numerator, float_denominator): fix for
	  canonicalization case where `Float#to_r` could return an Integer
	  not a Rational.  although mathn.rb has been removed in the
	  trunk, fix for the backport purpose.
	  [ruby-core:80942] [Bug #13528]
------------------------------------------------------------------------
r59507 | nagachika | 2017-08-05 01:13:13 +0900 (Sat, 05 Aug 2017) | 7 lines

merge revision(s) 59374: [Backport #13755]

	compile.c: restore stack at return

	* compile.c (iseq_compile_each0): restore the stack depth after
	  return to the previous depth, to fix the stack depth at
	  returning from rescue iseq.  [ruby-core:82108] [Bug #13755]
------------------------------------------------------------------------
r59506 | nagachika | 2017-08-05 00:55:45 +0900 (Sat, 05 Aug 2017) | 7 lines

merge revision(s) 59384: [Backport #13759]

	strscan.c: fix segfault in aref

	* ext/strscan/strscan.c (strscan_aref): fix segfault after
	  get_byte or getch which do not apply regexp.
	  [ruby-core:82116] [Bug #13759]
------------------------------------------------------------------------
r59505 | nagachika | 2017-08-05 00:29:45 +0900 (Sat, 05 Aug 2017) | 6 lines

merge revision(s) 58913: [Backport #13599]

	numeric.c: fix for small number

	* numeric.c (flo_floor, flo_ceil): should not return zero for small
	  number.  [ruby-core:81394] [Bug #13599]
------------------------------------------------------------------------
r59504 | svn | 2017-08-05 00:06:23 +0900 (Sat, 05 Aug 2017) | 1 line

* 2017-08-05
------------------------------------------------------------------------
r59503 | nagachika | 2017-08-05 00:06:22 +0900 (Sat, 05 Aug 2017) | 9 lines

merge revision(s) 59063: [Backport #13605]


	* proc.c (get_local_variable_ptr): return found env ptr. Returned env
	  will be used by write barrier at `bind_local_variable_set()'.
	  [Bug #13605]

	* test/ruby/test_proc.rb: add a test for this issue.

------------------------------------------------------------------------
r59501 | nagachika | 2017-08-04 23:39:29 +0900 (Fri, 04 Aug 2017) | 6 lines

merge revision(s) 58287: [Backport #13411]

	configure.in: rpath with OPTDIR

	* configure.in: add rpath flags which is needed for OPTDIR as well
	  as -L options, when it is given.  [ruby-dev:50065] [Bug #13411]
------------------------------------------------------------------------
r59500 | nagachika | 2017-08-04 23:31:52 +0900 (Fri, 04 Aug 2017) | 16 lines

merge revision(s) 59357,59358: [Backport #13391] [Backport #13404]

	proc.c: rb_block_min_max_arity

	* proc.c (rb_block_min_max_arity): new function to get arity range
	  from the current block.
	vm_eval.c: rb_lambda_call

	* enum.c (enum_collect): make the block arity same as the given
	  block.  [Bug #13391]

	* internal.h (vm_ifunc): store arity instead of unused id.

	* proc.c (rb_vm_block_min_max_arity): return ifunc arity.

	* vm_eval.c (rb_lambda_call): call method with lambda block.
------------------------------------------------------------------------
r59493 | nagachika | 2017-08-04 01:00:34 +0900 (Fri, 04 Aug 2017) | 15 lines

merge revision(s) 59183,59184: [Backport #13682]

	fix return in toplevel rescue/ensure

	* compile.c (iseq_compile_each0): throw TAG_RETURN at return in
	  toplevel rescue/ensure to adjust VM stack properly.
	  [ruby-core:81777] [Bug #13682]

	* vm_insnhelper.c (vm_throw_start): allow return in toplevel
	  rescue/ensure.
	fix return in toplevel ensure

	* compile.c (iseq_compile_each0): adjust stack after return in
	  toplevel ensure, when the value is used.
	  [ruby-core:81777] [Bug #13682]
------------------------------------------------------------------------
r59492 | nagachika | 2017-08-04 00:41:24 +0900 (Fri, 04 Aug 2017) | 8 lines

merge revision(s) 59202: [Backport #13690]

	compile.c: disallow next in once

	* compile.c (iseq_compile_each0): turned dregx context in "once"
	  into "guarded" type from "block" type, to disallow `next`,
	  `break`, `redo` as well as outside "once".
	  [ruby-core:81805] [Bug #13690]
------------------------------------------------------------------------
r59491 | nagachika | 2017-08-04 00:40:10 +0900 (Fri, 04 Aug 2017) | 8 lines

merge revision(s) 59181: [Backport #13680]

	vm_insnhelper.c: break in once

	* vm_insnhelper.c (vm_throw_start): size of catch table has been
	  included in iseq_catch_table struct, which could be NULL, since
	  2.2.  e.g., proc-closure in `once'.
	  [ruby-core:81775] [Bug #13680]
------------------------------------------------------------------------
r59490 | nagachika | 2017-08-03 23:00:41 +0900 (Thu, 03 Aug 2017) | 7 lines

merge revision(s) 59169: [Backport #13678]

	compile.c: toplevel return in argument

	* compile.c (iseq_compile_each0): adjust the stack before return
	  in an evstr/argument (reported by Balazs <balazs@kutilovi.cz>)
	  to fix stack consistency error.  [ruby-core:81761] [Bug #13678]
------------------------------------------------------------------------
r59489 | nagachika | 2017-08-03 22:43:01 +0900 (Thu, 03 Aug 2017) | 43 lines

merge revision(s) 58742,59081: [Backport #11033]

	Search SSL libraries by testing various filename patterns

	* ext/openssl/extconf.rb (find_openssl_library): should search by more flexible
	  method, especially for LibreSSL on Windows.

	openssl: import v2.0.4

	Import Ruby/OpenSSL 2.0.4. Only bug (and typo) fixes. The full commit
	history since v2.0.3 (imported at r57482) can be found at:

	  https://github.com/ruby/openssl/compare/v2.0.3...v2.0.4

	This contains the fix for [Bug #11033].

	----------------------------------------------------------------
	Jun Aruga (1):
	      Update .travis.yml and Dockerfile

	Kazuki Yamaguchi (9):
	      test/test_pkey_ec: do not use dummy 0 order
	      test/test_ssl: fix typo in test_sysread_and_syswrite
	      ssl: check return value of SSL_set_fd()
	      Fix typos
	      test/test_x509store: skip OpenSSL::TestX509Store#test_set_errors
	      tool/sync-with-trunk: 'LASY' -> 'LAST'
	      x509store: clear error queue after calling X509_LOOKUP_load_file()
	      extconf.rb: simplify searching libraries logic
	      Ruby/OpenSSL 2.0.4

	SHIBATA Hiroshi (1):
	      Fix typos

	Vladimir Rybas (1):
	      Fix documentation for OpenSSL::Cipher#final

	nobu (2):
	      openssl: fix broken openssl check
	      openssl: fix broken openssl check

	usa (1):
	      Search SSL libraries by testing various filename patterns
------------------------------------------------------------------------
r59488 | nagachika | 2017-08-03 22:29:12 +0900 (Thu, 03 Aug 2017) | 8 lines

merge revision(s) 58503: [Backport #13523]

	node.h: sign-extend

	* node.h (nd_line): should sign-extend.  shifting `VALUE` extends
	  with zero bits if `sizeof(VALUE)` equals to `sizeof(int)`.  the
	  zero bits are truncated if `sizeof(VALUE)` is bigger enough.
	  [ruby-core:80920] [Bug #13523]
------------------------------------------------------------------------
r59409 | nagachika | 2017-07-23 17:59:07 +0900 (Sun, 23 Jul 2017) | 9 lines

merge revision(s) 58641: [Backport #13547]

	parse.y: brace after literal arg

	* parse.y (symbol, dsym, parser_set_number_literal, parser_yylex):
	  set state to END too not only ENDARG and after a literal, so
	  that a left brace after it should be a primary block bound to
	  the literal, which causes syntax error.
	  [ruby-core:81037] [Bug #13547]
------------------------------------------------------------------------
r59408 | nagachika | 2017-07-23 17:49:34 +0900 (Sun, 23 Jul 2017) | 11 lines

merge revision(s) 58902: [Backport #13595]

	attempt to fix rb_alloc_tmp_buffer2 for ALLOCV_N

	This is a confusing function to my arithmetic-challenged mind,
	but nobu seems alright with this.  Anyways this lets me use
	large values of elsize without segfaulting, and "make exam"
	passes.

	* include/ruby/ruby.h (rb_alloc_tmp_buffer2): attempt to fix
	  [ruby-core:81388] [ruby-core:81391] [Bug #13595]
------------------------------------------------------------------------
r59407 | nagachika | 2017-07-23 17:39:46 +0900 (Sun, 23 Jul 2017) | 13 lines

merge revision(s) 58077,58229: [Backport #13358]

	ostruct.rb: fix OpenStruct.allocate

	* lib/ostruct.rb (OpenStruct.allocate): initialize an instance
	  variable directly, without calling `intialize` method which may
	  be overridden in a subclass.  [ruby-core:80292] [Bug #13358]
	ostruct.rb: improve fix for OpenStruct.allocate + #respond_to?

	* lib/ostruct.rb (OpenStruct#respond_to_missing?): this makes
	  OpenStruct#respond_to? works on any OpenStruct instance,
	  just like Kernel#respond_to? does, without workarounds.
	  [ruby-core:80292] [Bug #13358]
------------------------------------------------------------------------
r59406 | nagachika | 2017-07-23 17:15:57 +0900 (Sun, 23 Jul 2017) | 12 lines

merge revision(s) 58638,58640: [Backport #11873]

	test_syntax.rb: test_brace_after_local_variable

	* test/ruby/test_syntax.rb (test_brace_after_local_variable):
	  another test using braces.  [Bug #11873]
	parse.y: do after cmdarg in paren

	* parse.y (parser_yylex): set state to ENDARG after a string
	  literal, so that `do` after a literal should be `do_block` and
	  bound to the outer method, as well as a numeric/symbol literal.
	  [ruby-core:72482] [Bug #11873]
------------------------------------------------------------------------
r59405 | nagachika | 2017-07-23 17:05:15 +0900 (Sun, 23 Jul 2017) | 9 lines

merge revision(s) 59307: [Backport #13284]

	a64: fix crash on register stack mark/sweep pass

	* thread_pthread.c: move 'register_stack_start' earlier.
	  [ruby-core:79928] [Bug #13284] [Fix GH-1625]

	Author:    Sergei Trofimovich <slyfox@gentoo.org>

------------------------------------------------------------------------
r59404 | nagachika | 2017-07-23 16:50:10 +0900 (Sun, 23 Jul 2017) | 7 lines

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.
------------------------------------------------------------------------
r59403 | nagachika | 2017-07-23 16:48:31 +0900 (Sun, 23 Jul 2017) | 7 lines

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]
------------------------------------------------------------------------
r59402 | nagachika | 2017-07-23 16:46:05 +0900 (Sun, 23 Jul 2017) | 6 lines

merge revision(s) 57446: [Backport #13413]

	mkmf.rb: fix script installation

	* lib/mkmf.rb (MakeMakefile): fix condition to install script
	  files.
------------------------------------------------------------------------
r59401 | nagachika | 2017-07-23 16:44:56 +0900 (Sun, 23 Jul 2017) | 7 lines

merge revision(s) 59161: [Backport #13672]

	parse.y: check multibyte char

	* parse.y (parser_precise_mbclen): check invalid multibyte char at
	  skipping strings following `?x` literal string, not to stuck in
	  a infinite loop.  [ruby-core:81746] [Bug #13672]
------------------------------------------------------------------------
r59400 | nagachika | 2017-07-23 16:36:10 +0900 (Sun, 23 Jul 2017) | 8 lines

merge revision(s) 59102: [Backport #13515]

	pathname.rb: UNC root pathname needs a separator

	* ext/pathname/lib/pathname.rb (Pathname#plus): UNC root pathname
	  needs a separator.  File.basename returns "/" on UNC root, as
	  well as sole drive letter, even if it does not end with a
	  separator.  [ruby-core:80900] [Bug #13515]
------------------------------------------------------------------------
r59399 | nagachika | 2017-07-23 16:33:07 +0900 (Sun, 23 Jul 2017) | 9 lines

merge revision(s) 59033,59034: [Backport #13636]

	rexml: add close tag check on end of document to StreamParser

	[ruby-core:81593] [Bug #13636]

	Reported by Anton Sivakov. Thanks!!!

	* properties.
------------------------------------------------------------------------
r59398 | nagachika | 2017-07-23 16:30:43 +0900 (Sun, 23 Jul 2017) | 6 lines

merge revision(s) 58693: [Backport #13558]

	array.c: check position to insert

	* array.c (rb_ary_insert): check position to insert even if no
	  elements to be inserted.  [ruby-core:81125] [Bug #13558]
------------------------------------------------------------------------
r59397 | nagachika | 2017-07-23 16:21:04 +0900 (Sun, 23 Jul 2017) | 9 lines

merge revision(s) 58643: [Backport #13231]

	date_core.c: fix docs for %Z format

	* ext/date/date_core.c: [DOC] fix documentation for %Z format
	  of {Date,DateTime}.strftime.

	  Reported by Damon Timm.  Based on a patch by nano.
	  [ruby-core:79602] [Bug #13231] [Fix GH-1565]
------------------------------------------------------------------------
r59396 | nagachika | 2017-07-23 16:20:05 +0900 (Sun, 23 Jul 2017) | 10 lines

merge revision(s) 58552: [Backport #13531]

	rss: Accept empty text element as valid element

	Parser has been accepted it but XML serializer wasn't accepted.

	Reported by stefano frabetti. Thanks!!!

	[ruby-core:80965] [Bug #13531]

------------------------------------------------------------------------
r59395 | nagachika | 2017-07-23 16:02:29 +0900 (Sun, 23 Jul 2017) | 8 lines

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]
------------------------------------------------------------------------
r59363 | nagachika | 2017-07-18 21:42:38 +0900 (Tue, 18 Jul 2017) | 9 lines

merge revision(s) 59056: [Backport #13648] [Backport #13699]

	enumerator.c: fix nested maps

	* enumerator.c (lazy_map_proc, lazy_grep_iter_proc): marks values
	  returned by blocks are not packed in the case of nested maps, so
	  that the result will be same as non-lazy version.  based on the
	  patch by akihikodaki (Akihiko Odaki) at [ruby-core:81638],
	  without GCC extension.  [Bug#13648]
------------------------------------------------------------------------
r59316 | nagachika | 2017-07-12 23:06:21 +0900 (Wed, 12 Jul 2017) | 6 lines

merge revision(s) 59312: [Backport #13739]

	optparse.rb: get rid of eval

	* lib/optparse.rb: try Float() and Integer() instead of eval,
	  which does too much things.
------------------------------------------------------------------------
r59303 | nagachika | 2017-07-10 05:46:10 +0900 (Mon, 10 Jul 2017) | 28 lines

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>
------------------------------------------------------------------------
r59302 | nagachika | 2017-07-10 05:24:02 +0900 (Mon, 10 Jul 2017) | 13 lines

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]
------------------------------------------------------------------------
r59301 | nagachika | 2017-07-10 05:06:31 +0900 (Mon, 10 Jul 2017) | 10 lines

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.
------------------------------------------------------------------------
r59300 | nagachika | 2017-07-10 05:04:25 +0900 (Mon, 10 Jul 2017) | 7 lines

merge revision(s) 58823: [Backport #11464]

	erb.rb: Allow trimming carriage return

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

	[Bug #11464]
------------------------------------------------------------------------
r59299 | nagachika | 2017-07-10 05:02:04 +0900 (Mon, 10 Jul 2017) | 6 lines

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]
------------------------------------------------------------------------
r59298 | nagachika | 2017-07-10 04:51:43 +0900 (Mon, 10 Jul 2017) | 5 lines

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...
------------------------------------------------------------------------
r59297 | nagachika | 2017-07-10 04:49:03 +0900 (Mon, 10 Jul 2017) | 22 lines

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.

------------------------------------------------------------------------
r59296 | nagachika | 2017-07-10 04:47:28 +0900 (Mon, 10 Jul 2017) | 18 lines

merge revision(s) 58262,5826: [Backport #13369]

	fix TracePoint#return_value with non-local exits

	* vm.c: get return_value from imemo_throw_data object (THROW_DATA_VAL()).
	  imemo_throw_data (TAG_BREAK) contains returned value.
	  However, imemo_throw_data (TAG_BREAK) can skip several frames so that
	  we need to use it only once (at most internal frame). To record it,
	  we introduced THROW_DATA_CONSUMED and check it.

	* internal.h: define THROW_DATA_CONSUMED flag.

	* test/ruby/test_settracefunc.rb: add tests for [Bug #13369]

	* vm_insnhelper.h: add THROW_DATA_CONSUMED_P() and
	  THROW_DATA_CONSUMED_SET().
	  unless File::FNM_DOTMATCH is set. (like '*/') [ruby-dev:23014]

------------------------------------------------------------------------
r59295 | nagachika | 2017-07-10 04:36:49 +0900 (Mon, 10 Jul 2017) | 13 lines

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.
------------------------------------------------------------------------
r59294 | nagachika | 2017-07-10 04:27:57 +0900 (Mon, 10 Jul 2017) | 6 lines

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]
------------------------------------------------------------------------
r59293 | nagachika | 2017-07-10 04:02:35 +0900 (Mon, 10 Jul 2017) | 7 lines

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]
------------------------------------------------------------------------
r59286 | nagachika | 2017-07-08 11:21:36 +0900 (Sat, 08 Jul 2017) | 55 lines

merge revision(s) 58284,58812,59028: [Backport #13632]

	vm_core.h: ruby_error_stream_closed

	* vm_core.h (ruby_special_exceptions): renamed
	  ruby_error_closed_stream as ruby_error_stream_closed, like the
	  message.
	speed up IO#close with many threads

	Today, it increases IO#close performance with many threads:

	  Execution time (sec)
	  name            trunk   after
	  vm_thread_close 4.276   3.018

	  Speedup ratio: compare with the result of `trunk' (greater is better)
	  name            after
	  vm_thread_close 1.417

	This speedup comes because rb_notify_fd_close only scans threads
	inside rb_thread_io_blocking_region, not all threads in the VM.

	In the future, this type data structure may allow us to notify
	waiters of multiple FDs on a single thread (when using
	Fibers).

	* thread.c (struct waiting_fd): declare
	  (rb_thread_io_blocking_region): use on-stack list waiter
	  (rb_notify_fd_close): walk vm->waiting_fds instead
	  (call_without_gvl): remove old field setting
	  (th_init): ditto
	* vm_core.h (typedef struct rb_vm_struct): add waiting_fds list
	* (typedef struct rb_thread_struct): remove waiting_fd field
	  (rb_vm_living_threads_init): initialize waiting_fds list

	I am now kicking myself for not thinking about this 3 years ago
	when I introduced ccan/list in [Feature #9632] to optimize this
	same function :<
	IO#close: do not enqueue redundant interrupts (take #2)

	Enqueuing multiple errors for one event causes spurious errors
	down the line, as reported by Nikolay Vashchenko in
	https://bugs.ruby-lang.org/issues/13632

	This should fix bad interactions with test_race_gets_and_close
	in test/ruby/test_io.rb since we ensure rb_notify_fd_close
	continues returning the busy flag after enqueuing the interrupt.

	Backporting changes to 2.4 and earlier releases will be more
	challenging...

	* thread.c (rb_notify_fd_close): do not enqueue multiple interrupts
	  [ruby-core:81581] [Bug #13632]
	* test/ruby/test_io.rb (test_single_exception_on_close):
	  new test based on script from Nikolay
------------------------------------------------------------------------
r59247 | nagachika | 2017-07-01 20:51:13 +0900 (Sat, 01 Jul 2017) | 13 lines

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]
------------------------------------------------------------------------
r58637 | nagachika | 2017-05-10 00:42:52 +0900 (Wed, 10 May 2017) | 13 lines

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.
------------------------------------------------------------------------
r58636 | nagachika | 2017-05-10 00:30:19 +0900 (Wed, 10 May 2017) | 11 lines

merge revision(s) 58359: [Backport #13439]

	fix RSTRUCT_LEN macro in public C API

	rb_struct_size returns an Integer VALUE, so it must be converted
	to a `long` for compatibility with previous Ruby C API versions.

	* ext/-test-/struct/len.c: new
	* test/-ext-/struct/test_len.rb: new
	* include/ruby/ruby.h (RSTRUCT_LEN): use NUM2LONG
	  [ruby-core:80692] [Bug #13439]
------------------------------------------------------------------------
r58635 | nagachika | 2017-05-10 00:24:13 +0900 (Wed, 10 May 2017) | 7 lines

merge revision(s) 58211: [Backport #13387]

	string.c: Supress logical-op-parentheses warning

	* string.c(rb_str_upcase_bang): Supress logical-op-parentheses warning
	  Patch by Fukuo Kadota <fukuo-kadota@cookpad.com>,
	  Closes [GH-1570] [Bug #13387].
------------------------------------------------------------------------
r58634 | nagachika | 2017-05-10 00:13:55 +0900 (Wed, 10 May 2017) | 7 lines

merge revision(s) 58398: [Backport #13444]

	compile.c: wrong optimization

	* compile.c (compile_branch_condition): expression which has side
	  effects should not be eliminated.
	  [ruby-core:80740] [Bug #13444]
------------------------------------------------------------------------
r58633 | svn | 2017-05-10 00:06:00 +0900 (Wed, 10 May 2017) | 1 line

* 2017-05-10
------------------------------------------------------------------------
r58632 | nagachika | 2017-05-10 00:05:59 +0900 (Wed, 10 May 2017) | 11 lines

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]
------------------------------------------------------------------------
r58631 | nagachika | 2017-05-09 23:56:38 +0900 (Tue, 09 May 2017) | 8 lines

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]
------------------------------------------------------------------------
r58630 | nagachika | 2017-05-09 23:55:29 +0900 (Tue, 09 May 2017) | 13 lines

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.
------------------------------------------------------------------------
r58629 | nagachika | 2017-05-09 23:53:44 +0900 (Tue, 09 May 2017) | 6 lines

merge revision(s) 58037: [Backport #10944]

	docs for creating arrays

	* array.c: [DOC] add example for Array.new with block and index.
	  Reported by Don Cruickshank.  [ruby-core:68442] [Bug #10944]
------------------------------------------------------------------------
r58628 | nagachika | 2017-05-09 23:51:48 +0900 (Tue, 09 May 2017) | 12 lines

merge revision(s) 58008: [Backport #9294]

	io.c: improve docs

	* io.c: [DOC] improve and harmonize docs for IO#read and ARGF#read;
	  fix invalid example code for IO#read to make it syntax highlighted.

	* io.c: [DOC] various improvements for docs of IO, ARGF, and Kernel:
	  fix indent to ensure correct code block detection; sync "outbuf"
	  paragraph for {IO,ARGF}#read, {IO,ARGF}#readpartial, and IO#sysread;
	  fix formatting of call-seq's; improve Kernel#open example to use nil?;
	  fix RDoc markup and typos.
------------------------------------------------------------------------
r58627 | nagachika | 2017-05-09 23:50:45 +0900 (Tue, 09 May 2017) | 7 lines

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]
------------------------------------------------------------------------
r58626 | nagachika | 2017-05-09 23:48:49 +0900 (Tue, 09 May 2017) | 6 lines

merge revision(s) 57180: [Backport #13247]

	memory_status.c: support old Mac OS

	* ext/-test-/memory_status/memory_status.c (read_status): use
	  TASK_BASIC_INFO instead of MACH_TASK_BASIC_INFO on old Mac OS.
------------------------------------------------------------------------
r58625 | nagachika | 2017-05-09 23:46:24 +0900 (Tue, 09 May 2017) | 11 lines

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.
------------------------------------------------------------------------
r58624 | nagachika | 2017-05-09 23:28:21 +0900 (Tue, 09 May 2017) | 6 lines

merge revision(s) 57359: [Backport #13442]

	uri/generic.rb: fix exception on non-IP format

	* lib/uri/generic.rb (URI::Generic#find_proxy): match IP address
	  no_proxy against resolved self IP address.  [Fix GH-1513]
------------------------------------------------------------------------
r58623 | nagachika | 2017-05-09 23:24:20 +0900 (Tue, 09 May 2017) | 11 lines

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.
------------------------------------------------------------------------
r58622 | nagachika | 2017-05-09 23:21:37 +0900 (Tue, 09 May 2017) | 6 lines

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.
------------------------------------------------------------------------
r58620 | nagachika | 2017-05-09 23:11:14 +0900 (Tue, 09 May 2017) | 19 lines

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]
------------------------------------------------------------------------
r58619 | nagachika | 2017-05-09 23:09:44 +0900 (Tue, 09 May 2017) | 6 lines

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]
------------------------------------------------------------------------
r58445 | nagachika | 2017-04-22 16:29:01 +0900 (Sat, 22 Apr 2017) | 7 lines

merge revision(s) 58323,58324:

	Merge json-2.0.4.

	  * https://github.com/flori/json/releases/tag/v2.0.4
	  * https://github.com/flori/json/blob/09fabeb03e73ed88dc8ce8f19d76ac59e51dae20/CHANGES.md#2017-03-23-204
	Use `assert_raise` instead of `assert_raises`.
------------------------------------------------------------------------
r58444 | nagachika | 2017-04-22 16:20:22 +0900 (Sat, 22 Apr 2017) | 1 line

bump teeny version to 2.4.2
------------------------------------------------------------------------
r58079 | naruse | 2017-03-24 23:06:24 +0900 (Fri, 24 Mar 2017) | 3 lines

merge revision(s) 58078:

	export_changelog must specify the branch's url
------------------------------------------------------------------------
r58052 | naruse | 2017-03-22 14:54:22 +0900 (Wed, 22 Mar 2017) | 11 lines

merge revision(s) 58040,58041:

	stringio.c: check character code

	* ext/stringio/stringio.c (strio_ungetc): check if the character
	  code is valid in the encoding.  reported by Ahmad Sherif
	  (ahmadsherif) at https://hackerone.com/reports/209593.
	stringio.c: check range

	* ext/stringio/stringio.c (strio_ungetc): raise RangeError instead
	  of TypeError at too big value, as well as IO#ungetc.
------------------------------------------------------------------------
r58047 | naruse | 2017-03-22 01:22:21 +0900 (Wed, 22 Mar 2017) | 2 lines

Bump up version to 2.4.1

------------------------------------------------------------------------
r58046 | naruse | 2017-03-21 23:11:42 +0900 (Tue, 21 Mar 2017) | 8 lines

merge revision(s) 58042: [Backport #13339]

	string.c: use the usable size

	* string.c (rb_str_change_terminator_length): when called after
	  the content has been copied, old terminator length no longer
	  makes sense.  use the whole usable size instead of capacity
	  without terminator.  [ruby-core:80257] [Bug #13339]
------------------------------------------------------------------------
r58045 | naruse | 2017-03-21 23:04:23 +0900 (Tue, 21 Mar 2017) | 20 lines

merge revision(s) 57192,57464,58016,58018,58019: [Backport #12705]

	[Bug #12705]
	add a ticket number.

	test_lambda.rb: refine test

	* test/ruby/test_lambda.rb (test_lambda_as_iterator): refine a
	  test for the intention of the original report.
	  [ruby-core:61340] [Bug #9605]
	test_lambda.rb: remove duplcate tests
	vm_args.c: arity check of lambda

	* vm_eval.c (rb_yield_lambda): new function which yields an array
	  to a proc and splat to a lambda.  mainly for Enumerable only.

	* vm_args.c (setup_parameters_complex): remove special lambda
	  splatting for [Bug #9605].  [ruby-core:77065] [Bug #12705]

	* vm_insnhelper.c (vm_callee_setup_block_arg): ditto.
------------------------------------------------------------------------
r58022 | naruse | 2017-03-19 23:29:22 +0900 (Sun, 19 Mar 2017) | 6 lines

merge revision(s) 58015: [Backport #13325]

	vm_args.c: pass block

	* vm_args.c (refine_sym_proc_call): pass block to the method when
	  using refinements.  [ruby-core:80219] [Bug #13325]
------------------------------------------------------------------------
r58013 | naruse | 2017-03-18 21:02:27 +0900 (Sat, 18 Mar 2017) | 7 lines

merge revision(s) 57972: [Backport #13198]

	Fix bug of Tempfile#size if nothing is written [Bug #13198]

	* lib/tempfile.rb (Tempfile#size): Fix its behavior when nothing
	  is written. Tempfile#size should return 0 in this case.
	  The patch is from nobu <nobu@ruby-lang.org>.
------------------------------------------------------------------------
r58003 | naruse | 2017-03-17 16:06:50 +0900 (Fri, 17 Mar 2017) | 17 lines

merge revision(s) 57968,57969,57970: [Backport #13313]

	thread.c: thread_do_start

	* thread.c (thread_do_start): extract from a macro in
	  thread_start_func_2 for debugger.
	thread.c: Thread.start with Symbol

	* thread.c (thread_do_start): fix segfault at start with Symbol.
	  proc created by Symbol#to_proc does not have environment unless
	  using refinements.  [ruby-core:80147] [Bug #13313]
	Fiber also has same issue. [Bug #13313]

	* thread.c (rb_vm_proc_local_ep): added.

	* cont.c (rb_fiber_start): use rb_vm_proc_local_ep().

------------------------------------------------------------------------
r58002 | naruse | 2017-03-17 13:44:13 +0900 (Fri, 17 Mar 2017) | 6 lines

merge revision(s) 57956:

	Raise error if spec is nil

	With parallel test-all, the spec is sometimes nil.
	To debug it raise more detailed error.
------------------------------------------------------------------------
r58001 | naruse | 2017-03-17 13:36:49 +0900 (Fri, 17 Mar 2017) | 13 lines

merge revision(s) 57523,57998: [Backport #13322]

	test_gem.rb: exclude default gems

	* test/rubygems/test_gem.rb: check difference to exclude default
	  gems from the expected results.  [Feature #13186]
	Merge rubygems-2.6.11

	  This version fixed regression of rubygems-2.6.10.
	  https://github.com/rubygems/rubygems/pull/1856

	  See details of changelogs for 2.6.11 release:
	  https://github.com/rubygems/rubygems/blob/adfcf40502716080bd9cdfdd2e43bd4296872784/History.txt#L3
------------------------------------------------------------------------
r57959 | naruse | 2017-03-13 18:28:35 +0900 (Mon, 13 Mar 2017) | 10 lines

merge revision(s) 57948,57950: [Backport #13304]

	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 [ci skip]

	* thread.c (rb_thread_fd_close): remove deprecated. a couple of
	  external libraries used it.  [ruby-core:80078] [Bug #13304]
------------------------------------------------------------------------
r57957 | naruse | 2017-03-13 18:05:46 +0900 (Mon, 13 Mar 2017) | 6 lines

merge revision(s) 57603: [Backport #12997]

	Merge Onigmo 6.1.1

	* Support absent operator https://github.com/k-takata/Onigmo/issues/82
	* https://github.com/k-takata/Onigmo/blob/Onigmo-6.1.1/HISTORY
------------------------------------------------------------------------
r57954 | naruse | 2017-03-13 16:30:30 +0900 (Mon, 13 Mar 2017) | 33 lines

merge revision(s) 57410,57619,57621,57631,57634: [Backport #13150]

	Prevent GC by volatile [Bug #13150]

	test/ruby/test_marshal.rb test_context_switch (load) and test_gc (dump)
	are failed on FreeBSD 10.3 and gcc7 (FreeBSD Ports Collection) 7.0.0
	20170115 (experimental); RB_GC_GUARD looks not worked well.
	ruby.h: RB_GC_GUARD stronger than gcc7

	* include/ruby/ruby.h (RB_GC_GUARD): prevent guarded pointer from
	  optimization by using as an input to inline asm.
	ruby.h: remove comment

	* include/ruby/ruby.h (RB_GC_GUARD): remove comment unsupported by
	  Solaris AS.
	marshal.c: use hidden objects to allow recycling

	Hidden objects (klass == 0) are not visible to Ruby code invoked
	from other threads or signal handlers, so they can never be
	accessed from other contexts.  This makes it safe to call
	rb_gc_force_recycle on the object slot after releasing malloc
	memory.

	* marshal.c (rb_marshal_dump_limited): hide dump_arg and recycle when done
	  (rb_marshal_load_with_proc): hide load_arg and recycle when done
	  [ruby-core:79518]
	marshal.c: revert r57631 partially

	* marshal.c (rb_marshal_dump_limited): do not free dump_arg, which
	  may be dereferenced in check_dump_arg due to continuation, and
	  get rid of dangling pointers.

	* marshal.c (rb_marshal_load_with_proc): ditto for load_arg.
------------------------------------------------------------------------
r57953 | naruse | 2017-03-13 16:03:32 +0900 (Mon, 13 Mar 2017) | 10 lines

merge revision(s) 57269,57277:

	bignum.c: fix rb_cstr_parse_inum endp

	* bignum.c (rb_cstr_parse_inum): stores the address of the first
	  invalid character when str is too big or contains an underscore.
	bignum.c: unnecessary check

	* bignum.c (rb_cstr_parse_inum): remove unnecessary check.
	  successive sign is rejected by conv_digit.
------------------------------------------------------------------------
r57952 | naruse | 2017-03-13 15:58:19 +0900 (Mon, 13 Mar 2017) | 6 lines

merge revision(s) 57412: [Backport #13308]

	Update Rubygems 2.6.10

	 * https://github.com/rubygems/rubygems/commit/2ee5bf9fd3bd7649d3e244bc40107ff32070ef47
	 * https://github.com/rubygems/rubygems/commit/be510dd4097e65c6a256a6e173d6b724a3a96472
------------------------------------------------------------------------
r57945 | naruse | 2017-03-13 03:41:38 +0900 (Mon, 13 Mar 2017) | 8 lines

merge revision(s) 57767,57943: [Backport #10403]

	io.c: documentation for puts

	* io.c: [DOC] clarify that the 'record separator' between
	  arguments passed to 'puts' is always a newline.
	  Based on a patch by Mark Amery. [ruby-core:65801] [Misc #10403]
	* 2017-03-13
------------------------------------------------------------------------
r57941 | naruse | 2017-03-13 03:15:33 +0900 (Mon, 13 Mar 2017) | 66 lines

merge revision(s) 57469,57471,57472,57503,57508: [Backport #13299]

	io.c: recycle garbage on write

	* string.c (STR_IS_SHARED_M): new flag to mark shared mulitple times
	  (STR_SET_SHARED): set STR_IS_SHARED_M
	  (rb_str_tmp_frozen_acquire, rb_str_tmp_frozen_release): new functions
	  (str_new_frozen): set/unset STR_IS_SHARED_M as appropriate
	* internal.h: declare new functions
	* io.c (fwrite_arg, fwrite_do, fwrite_end): new
	  (io_fwrite): use new functions

	Introduce rb_str_tmp_frozen_acquire and rb_str_tmp_frozen_release
	to manage a hidden, frozen string.  Reuse one bit of the embed
	length for shared strings as STR_IS_SHARED_M to indicate a string
	has been shared multiple times.  In the common case, the string
	is only shared once so the object slot can be reclaimed immediately.

	minimum results in each 3 measurements. (time and size)

	Execution time (sec)
	name                            trunk   built
	io_copy_stream_write            0.682   0.254
	io_copy_stream_write_socket     1.225   0.751

	Speedup ratio: compare with the result of `trunk' (greater is better)
	name    built
	io_copy_stream_write            2.680
	io_copy_stream_write_socket     1.630

	Memory usage (last size) (B)
	name                            trunk           built
	io_copy_stream_write            95436800.000    6512640.000
	io_copy_stream_write_socket     117628928.000   7127040.000

	Memory consuming ratio (size) with the result of `trunk' (greater is better)
	name    built
	io_copy_stream_write            14.654
	io_copy_stream_write_socket     16.505
	string.c (rb_str_tmp_frozen_release): release embedded strings

	Handle the embedded case first, since we may have an embedded
	duplicate and non-embedded original string.

	* string.c (rb_str_tmp_frozen_release): handled embedded strings
	* test/ruby/test_io.rb (test_write_no_garbage): new test
	  [ruby-core:78898] [Bug #13085]
	io.c (rb_io_syswrite): avoid leaving garbage after write

	As with IO#write, IO#syswrite also generates garbage which can
	be harmful in hand-coded read-write loops.

	* io.c (swrite_arg, swrite_do, swrite_end): new
	  (rb_io_syswrite): use new functions to cleanup garbage
	  [ruby-core:78898] [Bug #13085]
	Add class name to assert messages
	io.c: remove rb_ensure usage for rb_str_tmp_frozen_* calls

	Using rb_ensure pessimizes the common case and makes the code
	more difficult to read and follow.  If we hit an exceptions
	during write, just let the GC handle cleanup as the exception
	is already bad for garbage.

	* io.c (io_fwrite): call rb_str_tmp_frozen{acquire,release} directly
	  (rb_io_syswrite): ditto
	  (fwrite_do, fwrite_end, swrite_do, swrite_end): remove
------------------------------------------------------------------------
r57940 | naruse | 2017-03-13 03:01:40 +0900 (Mon, 13 Mar 2017) | 11 lines

merge revision(s) 57811: [Backport #9829]

	docs for FileUtils.ln methods

	* lib/fileutils.rb: [DOC] add clarifying call-seq's for FileUtil.ln,
	  ln_s, and ln_sf, with better argument names for the created link and
	  link target.  Reported by Mike Vastola. [ruby-core:62532] [Bug #9829]

	* lib/fileutils.rb: [DOC] further improve descriptions of FileUtils.ln
	  and related methods; improve examples: relative links probably won't
	  work in other dir, avoid `include', use more generic homedir name.
------------------------------------------------------------------------
r57939 | naruse | 2017-03-13 03:01:22 +0900 (Mon, 13 Mar 2017) | 11 lines

merge revision(s) 57415,57463,57474:

	eval.c: copy special exception

	* eval.c (setup_exception): make unfrozen copy of special
	  exception before setting up a cause.
	reduce iterations for slower machines
	test_io.rb: separate a test

	* test/ruby/test_io.rb (test_closed_stream_in_rescue): run in a
	  separated process.
------------------------------------------------------------------------
r57938 | naruse | 2017-03-13 02:51:21 +0900 (Mon, 13 Mar 2017) | 7 lines

merge revision(s) 57427: [Backport #13030]

	skip T_IMEMO for VMDEBUG

	* vm_dump.c (vm_stack_dump_each): skip T_IMEMO object to display
	  for VMDEBUG=3. [Bug #13030]

------------------------------------------------------------------------
r57937 | naruse | 2017-03-13 02:26:03 +0900 (Mon, 13 Mar 2017) | 5 lines

merge revision(s) 57809: [Backport #13291]

	fix paren

	* string.c (str_byte_substr): fix misplaced parenthesis at r56155.
------------------------------------------------------------------------
r57936 | naruse | 2017-03-13 02:23:03 +0900 (Mon, 13 Mar 2017) | 7 lines

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]
------------------------------------------------------------------------
r57935 | naruse | 2017-03-13 02:22:20 +0900 (Mon, 13 Mar 2017) | 15 lines

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]
------------------------------------------------------------------------
r57934 | naruse | 2017-03-13 02:14:38 +0900 (Mon, 13 Mar 2017) | 7 lines

merge revision(s) 57801: [Backport #13287]

	parse.y: remove trace

	* parse.y (reg_named_capture_assign_iter): do not insert trace
	  instructions before local variable assinments.  putobject is
	  expected at first.  [ruby-core:79940] [Bug #13287]
------------------------------------------------------------------------
r57933 | naruse | 2017-03-13 02:10:14 +0900 (Mon, 13 Mar 2017) | 6 lines

merge revision(s) 57802:

	string.c: [DOC] Fix a typo in String#dump

	[Fix GH-1531][ci skip]
	Author:    Alex Semyonov <alex@semyonov.us>
------------------------------------------------------------------------
r57932 | naruse | 2017-03-13 02:10:01 +0900 (Mon, 13 Mar 2017) | 2 lines

RbConfig::Limits is Ruby 2.5 feature

------------------------------------------------------------------------
r57931 | naruse | 2017-03-13 01:51:47 +0900 (Mon, 13 Mar 2017) | 17 lines

merge revision(s) 57797,57799,57800: [Backport #13289]

	string.c: fix integer overflow

	* string.c (rb_str_subpos): fix integer overflow which can happen
	  only when SHARABLE_MIDDLE_SUBSTRING is enabled.  incorpolate
	  https://github.com/mruby/mruby/commit/7db0786abdd243ba031e24683f
	string.c: fix integer overflow

	* string.c (str_byte_substr): fix another integer overflow which
	  can happen only when SHARABLE_MIDDLE_SUBSTRING is enabled.
	  [ruby-core:79951] [Bug #13289]

	string.c: negation of LONG_MIN

	* string.c (rb_str_update): do not use negation of LONG_MIN, which
	  is negative too.
------------------------------------------------------------------------
r57930 | naruse | 2017-03-13 01:31:18 +0900 (Mon, 13 Mar 2017) | 11 lines

merge revision(s) 57781:

	docs for IO.{write,read}

	* io.c: [DOC] improve docs for IO
	  * IO.{write,read}: fix errors (:open_args is not an array of
	    strings, it might include a perm or options hash argument;
	    IO.write has no length argument, drop corresponding statement),
	    improve formatting, call-seq, grammar.
	  * IO#sync=: remove unnecessary "produces no output".
	  * other improvements.
------------------------------------------------------------------------
r57929 | naruse | 2017-03-13 01:30:08 +0900 (Mon, 13 Mar 2017) | 7 lines

merge revision(s) 57780: [Backport #12975]

	docs for IO#print

	* io.c: [DOC] split documentation for IO#print into smaller paragraphs,
	  delete duplicate sentence, fix call-seq.
	  Based on a patch by Dario Daic. [ruby-core:78291] [Bug #12975]
------------------------------------------------------------------------
r57928 | naruse | 2017-03-13 01:29:47 +0900 (Mon, 13 Mar 2017) | 7 lines

merge revision(s) 57778,57779:

	string.c: [DOC] fix doc formatting for String#==, #===
	math.c: more accuracy

	* math.c (math_log10): calculate log10(2) for more accuracy.
	  [ruby-core:79907] [Bug #13279]
------------------------------------------------------------------------
r57927 | naruse | 2017-03-13 01:29:12 +0900 (Mon, 13 Mar 2017) | 6 lines

merge revision(s) 57777:

	rdoc for String class

	* lib/unicode_normalize.rb: [DOC] prevent a comment from
	  showing up in the class documentation for String.
------------------------------------------------------------------------
r57926 | naruse | 2017-03-13 01:28:42 +0900 (Mon, 13 Mar 2017) | 7 lines

merge revision(s) 57775: [Backport #13281]

	nodoc OptParse

	* lib/optparse.rb: [DOC] nodoc OptParse, introduced with r46126,
	  to avoid leaking of its documentation (OptionParser's docs) into
	  the class documentation of Object.  [ruby-core:79909] [Bug #13281]
------------------------------------------------------------------------
r57925 | naruse | 2017-03-13 01:27:45 +0900 (Mon, 13 Mar 2017) | 7 lines

merge revision(s) 57771:

	documentation for sort methods

	* array.c: [DOC] fix grammar in Array#sort, #sort!, #sort_by!,
	  move references below the code example, add a missing reference.
	* enum.c: [DOC] fix grammar in Enumerable#sort, #sort_by.
------------------------------------------------------------------------
r57924 | naruse | 2017-03-13 01:27:30 +0900 (Mon, 13 Mar 2017) | 7 lines

merge revision(s) 57770:

	enum.c: documentation for Enumerable#sort_by

	* enum.c: [DOC] improve structure of docs for Enumerable#sort_by,
	  adopt explanation of the comparison block from Array#sort_by,
	  drop mention of 1.8, fix typos.
------------------------------------------------------------------------
r57923 | naruse | 2017-03-13 01:23:09 +0900 (Mon, 13 Mar 2017) | 13 lines

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?
------------------------------------------------------------------------
r57922 | naruse | 2017-03-13 01:22:05 +0900 (Mon, 13 Mar 2017) | 6 lines

merge revision(s) 57763:

	fix for mingw64

	* util.c: define MINGW_HAS_SECURE_API for qsort_s on recent
	  mingw64.
------------------------------------------------------------------------
r57921 | naruse | 2017-03-13 01:21:43 +0900 (Mon, 13 Mar 2017) | 8 lines

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]
------------------------------------------------------------------------
r57920 | naruse | 2017-03-13 01:20:56 +0900 (Mon, 13 Mar 2017) | 4 lines

merge revision(s) 57761:

	[DOC] update doc.

------------------------------------------------------------------------
r57919 | naruse | 2017-03-13 01:20:09 +0900 (Mon, 13 Mar 2017) | 7 lines

merge revision(s) 57758: [Backport #13268]

	string.c: restore documentation for String#<<

	* string.c: [DOC] restore documentation for String#<<
	  which became undocumented with r56021; fix a typo.
	  [ruby-core:79865] [Bug #13268]
------------------------------------------------------------------------
r57918 | naruse | 2017-03-13 01:20:03 +0900 (Mon, 13 Mar 2017) | 13 lines

merge revision(s) 57751,57753,57755:

	fileutils.rb: improve rdoc for FileUtils

	* lib/fileutils.rb: [DOC] fix invalid example code to make it
	  syntax highlighted, fix rdoc for lists, nodoc internal methods,
	  avoid a dangerous example.
	hash.c: [DOC] fix book title in example
	struct.c: improve rdoc for Struct

	* struct.c: [DOC] improve examples for ::new, improve #dig example,
	  simplify #select example, use consistent style for return values,
	  fix typos and example code style, remove duplicate cross reference.
------------------------------------------------------------------------
r57917 | naruse | 2017-03-13 01:18:06 +0900 (Mon, 13 Mar 2017) | 11 lines

merge revision(s) 57737: [Backport #13225]

	date_core.c: expand docs for Date shifting

	* ext/date/date_core.c: [DOC] expand docs for Date shifting

	  * add examples for Date#>> and Date#<< that clarify some edge cases
	  * add examples for Date#next_year and Date#prev_year
	  * add cross references to Date#>> and Date#<<

	  [ruby-core:79584] [Bug #13225]
------------------------------------------------------------------------
r57916 | naruse | 2017-03-13 00:51:23 +0900 (Mon, 13 Mar 2017) | 9 lines

merge revision(s) 57735: [Backport #13148]

	Fix doc for Hash#dig and Struct#dig

	* hash.c (rb_hash_dig): [DOC] correct argument name
	  in method description; fix formatting in examples.
	* struct.c (rb_struct_dig): ditto.

	[ruby-core:79221] [Bug #13148]
------------------------------------------------------------------------
r57915 | svn | 2017-03-13 00:02:31 +0900 (Mon, 13 Mar 2017) | 1 line

* 2017-03-13
------------------------------------------------------------------------
r57914 | naruse | 2017-03-13 00:02:30 +0900 (Mon, 13 Mar 2017) | 7 lines

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.
------------------------------------------------------------------------
r57913 | naruse | 2017-03-12 23:57:21 +0900 (Sun, 12 Mar 2017) | 16 lines

merge revision(s) 57255,57256,57257: [Backport #13111]

	forwardable.rb: use defined?

	* lib/forwardable.rb (_delegator_method): use defined? operator
	  instead of binding and calling unbound Kernel#respond_to?.  a
	  remedy for an performance bottleneck.
	forwardable.rb: use defined?

	* lib/forwardable.rb (_delegator_method): use defined? operator
	  instead of binding and calling unbound Kernel#respond_to?.  a
	  remedy for an performance bottleneck.
	forwardable.rb: fix branches

	* lib/forwardable.rb (instance_delegate, single_delegate): fix
	  inverted branches.
------------------------------------------------------------------------
r57912 | naruse | 2017-03-12 23:39:18 +0900 (Sun, 12 Mar 2017) | 7 lines

merge revision(s) 57717: [Backport #13253]

	parse.y: indent at invalid identifier

	* parse.y (parser_heredoc_identifier): set indent only when valid
	  identifier, not to dedent non-existent contents later.
	  [ruby-core:79772] [Bug #13253]
------------------------------------------------------------------------
r57911 | naruse | 2017-03-12 23:18:02 +0900 (Sun, 12 Mar 2017) | 10 lines

merge revision(s) 57688,57689: [Backport #13242]

	rational.c: infinity in power

	* rational.c (nurat_expt): return Infinity due to overflow.
	  [ruby-core:79686] [Bug #13242]:
	rational.c: infinity in power

	* rational.c (nurat_expt): return 0 due to overflow.
	  [ruby-core:79686] [Bug #13242]:
------------------------------------------------------------------------
r57910 | naruse | 2017-03-12 23:06:33 +0900 (Sun, 12 Mar 2017) | 14 lines

merge revision(s) 57665: [Backport #13229]

	extension.rdoc: add document title

	* doc/extension.rdoc, doc/extension.ja.rdoc: [DOC]
	  add title and adapt subheading levels.

	* doc/extension.rdoc: [DOC] fix subheading level of section
	  about "Ruby Constants That Can Be Accessed From C".

	* doc/extension.ja.rdoc: [DOC] add missing subheading.

	[ruby-core:79590] [Bug #13229]
	Author:    Marcus Stollsteimer <sto.mar@web.de>
------------------------------------------------------------------------
r57909 | naruse | 2017-03-12 23:03:16 +0900 (Sun, 12 Mar 2017) | 7 lines

merge revision(s) 57660: [Backport #13234]

	regparse.c: initialize return values

	* regparse.c (parse_char_class): initialize return values before
	  depth limit check.  returned values will be freed in callers
	  regardless the error.  [ruby-core:79624] [Bug #13234]
------------------------------------------------------------------------
r57907 | naruse | 2017-03-12 22:46:55 +0900 (Sun, 12 Mar 2017) | 7 lines

merge revision(s) 57655: [Backport #13227]

	vm_insnhelper.c: super to module in refinement

	* vm_insnhelper.c (vm_call_zsuper): method defined in module in
	  refinement is not callable as-is.  dispatch again.
	  [ruby-core:79588] [Bug #13227]
------------------------------------------------------------------------
r57906 | naruse | 2017-03-12 21:55:00 +0900 (Sun, 12 Mar 2017) | 4 lines

merge revision(s) 57595: [Backport #8996]

	check thread deadness correctly.

------------------------------------------------------------------------
r57905 | naruse | 2017-03-12 17:09:45 +0900 (Sun, 12 Mar 2017) | 9 lines

merge revision(s) 57584: [Backport #13202]

	[DOC] Update an obsolete example for slice_before.

	The argument for Enumerable#slice_before is is removed at Ruby 2.3.

	Reported by Shyouhei Urabe.  [Bug #13202]


------------------------------------------------------------------------
r57904 | naruse | 2017-03-12 17:04:28 +0900 (Sun, 12 Mar 2017) | 15 lines

merge revision(s) 57549: [Backport #13193]

	date_core.c: [DOC] revise docs [ci skip]

	* fix malformed rdoc for Date#today, Date._strptime,
	  and DateTime._strptime
	* add code examples for Date#<< and Date#>> to demonstrate
	  that different dates can result in the same return value
	* use Date::ITALY in call-seq instead of only ITALY
	* fix some copy/paste mistakes where Date should be DateTime
	* fix various errors and grammar
	* fix cross references and formatting

	[ruby-core:79433] [Bug #13193]
	Author:    Marcus Stollsteimer <sto.mar@web.de>
------------------------------------------------------------------------
r57903 | naruse | 2017-03-12 17:02:52 +0900 (Sun, 12 Mar 2017) | 8 lines

merge revision(s) 57543: [Backport #13194]

	rbinstall.rb: default umask

	* tool/rbinstall.rb: revert r49841 and default umask to just
	  prohibit all from writing.  symlink(2) has no argument to set
	  permissions but is affected by umask.
	  [ruby-dev:49975] [Bug #13194]
------------------------------------------------------------------------
r57902 | naruse | 2017-03-12 17:01:46 +0900 (Sun, 12 Mar 2017) | 7 lines

merge revision(s) 57539: [Backport #11752]

	rational.c: fix rdoc [ci skip]

	* rational.c (rb_rational_plus): [DOC] fix an example.
	  A patch by Trygve Flathen <at.ruby-lang AT flathen.net> in
	  [ruby-core:71755].  [Bug #11752]
------------------------------------------------------------------------
r57901 | naruse | 2017-03-12 16:54:43 +0900 (Sun, 12 Mar 2017) | 16 lines

merge revision(s) 57522: [Backport #13189]

	doc: restore class documentation for Struct

	* struct.c: restore class documentation for Struct
	  that disappeared with r46663.

	Due to r46663, the class documentation for Struct disappeared.
	(The revision inserted the definition of `InitVM_Struct` between
	the rdoc and the definition of `Init_Struct`.)

	The docs are rendered for 2.1: <https://docs.ruby-lang.org/en/2.1.0/Struct.html>,
	but not for later versions, see: <https://docs.ruby-lang.org/en/2.2.0/Struct.html>
	(Same for `ri` pages).

	[ruby-core:79416] [Bug #13189]
------------------------------------------------------------------------
r57900 | naruse | 2017-03-12 16:53:34 +0900 (Sun, 12 Mar 2017) | 44 lines

merge revision(s) 57690-57694:

	rational.c: infinity in power

	* rational.c (nurat_expt): return 0 due to overflow.
	  [ruby-core:79686] [Bug #13242]:
	------------------------------------------------------------------------
	r57690 | nobu | 2017-02-23 10:15:27 +0900 (Thu, 23 Feb 2017) | 7 lines

	[DOC] {read,write}_nonblock with exception: false

	Update docs to reflect EOF behavior change of read_nonblock and
	write_nonblock when using `exception: false`.

	[Fix GH-1527]
	Author:    Russell Davis <russell-stripe@users.noreply.github.com>
	------------------------------------------------------------------------
	r57691 | nobu | 2017-02-23 10:54:13 +0900 (Thu, 23 Feb 2017) | 11 lines

	socket.rb: [DOC] fix nonblock methods

	* ext/socket/lib/socket.rb (BasicSocket#recv_nonblock): fix
	  exception class and symbol.

	* ext/socket/lib/socket.rb (BasicSocket#recvmsg_nonblock): ditto.

	* ext/socket/lib/socket.rb (Socket#recvfrom_nonblock): fix the
	  method name.

	* ext/socket/lib/socket.rb (UDPSocket#recvfrom_nonblock): both.
	------------------------------------------------------------------------
	r57692 | nobu | 2017-02-23 11:00:28 +0900 (Thu, 23 Feb 2017) | 1 line

	[DOC] keyword argument _exception_
	------------------------------------------------------------------------
	r57693 | nobu | 2017-02-23 11:11:16 +0900 (Thu, 23 Feb 2017) | 1 line

	[DOC] mark up literals
	------------------------------------------------------------------------
	r57694 | nobu | 2017-02-23 11:40:17 +0900 (Thu, 23 Feb 2017) | 3 lines

	Revert r57690 except for read_nonblock

	https://github.com/ruby/ruby/pull/1527#issuecomment-281867551
------------------------------------------------------------------------
r57899 | naruse | 2017-03-12 16:52:32 +0900 (Sun, 12 Mar 2017) | 9 lines

merge revision(s) 57750:

	openssl: avoid segfault during running tests on Ubuntu trusty

	Import the commit 6693a549d673 ("test/test_pkey_ec: do not use dummy 0
	order", 2017-02-03) from upstream. Hopefully this will fix the segfault
	on RubyCI icc16-x64:

	  http://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-trunk/log/20170301T050002Z.fail.html.gz
------------------------------------------------------------------------
r57898 | naruse | 2017-03-12 16:51:35 +0900 (Sun, 12 Mar 2017) | 14 lines

merge revision(s) 57590,57591,57592: [Backport #13200]

	extmk.rb: split notes

	* ext/extmk.rb: split notes and echo per lines, for multiple lines
	  messages.  [ruby-core:79475] [Bug #13200]
	openssl: fix broken openssl check

	* ext/openssl/extconf.rb: check for broken OpenSSL only on mac OS.
	  [ruby-core:79475] [Bug #13200]
	openssl: fix broken openssl check

	* ext/openssl/deprecation.rb: check for broken OpenSSL only on mac
	  OS.  [ruby-core:79475] [Bug #13200]
------------------------------------------------------------------------
r57897 | naruse | 2017-03-12 16:46:26 +0900 (Sun, 12 Mar 2017) | 6 lines

merge revision(s) 57289: [Backport #13114]

	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.
------------------------------------------------------------------------
r57896 | naruse | 2017-03-12 16:46:13 +0900 (Sun, 12 Mar 2017) | 7 lines

merge revision(s) 57520: [Backport #13184]

	ruby.h: unused parameter

	* include/ruby/ruby.h (rb_scan_args_set): remove unused parameter
	  for more pedantic extension libraries.
	  [ruby-core:79399] [Feature #13184]
------------------------------------------------------------------------
r57895 | naruse | 2017-03-12 16:36:02 +0900 (Sun, 12 Mar 2017) | 10 lines

merge revision(s) 57517: [Backport #13190]

	doc: Fix error for escape sequences in string literals

	Backslash goes first in escape sequences, so it must be
	"any other character following a backslash is interpreted as ...",
	while the doc says "...followed by...".

	Author: Marcus Stollsteimer <sto.mar@web.de>
	[ruby-core:79418] [Bug #13190]
------------------------------------------------------------------------
r57894 | naruse | 2017-03-12 16:34:58 +0900 (Sun, 12 Mar 2017) | 7 lines

merge revision(s) 57492:

	test_queue.rb: fix portability

	* test/thread/test_queue.rb (test_queue_with_trap): fix
	  portability.  use SIGINT instead of SIGUSR2 which is supported
	  on not all platforms.
------------------------------------------------------------------------
r57893 | naruse | 2017-03-12 16:34:42 +0900 (Sun, 12 Mar 2017) | 5 lines

merge revision(s) 57515: [Backport #13169]

	lib/ostruct.rb: Fix returned value of each_pair.

	From a patch by Marcus Stollsteimer. [Fixes #13169]
------------------------------------------------------------------------
r57885 | naruse | 2017-03-12 04:18:45 +0900 (Sun, 12 Mar 2017) | 10 lines

merge revision(s) 57510,57511: [Backport #13176]

	eval.c: hide internal objects

	* eval.c (rb_ensure): veil internal exception objects not to leak
	  in ensure functions.  [ruby-core:79371] [Bug #13176]
	ensured.c: fix conflict

	* ext/-test-/exception/ensured.c (exc_raise): get rid of conflict
	  with raise(2) in the standard.  [ruby-core:79371] [Bug #13176]
------------------------------------------------------------------------
r57884 | naruse | 2017-03-12 04:06:22 +0900 (Sun, 12 Mar 2017) | 6 lines

merge revision(s) 57483:

	Describe about RUBY_CODESIGN

	With RUBY_CODESIGN people can avoid pushing many OK button of firewall
	dialogs on macOS through test-all.
------------------------------------------------------------------------
r57882 | naruse | 2017-03-12 03:59:50 +0900 (Sun, 12 Mar 2017) | 3 lines

merge revision(s) 57165:

	Add ruby_2_4 branch to test on travis [skip ci]
------------------------------------------------------------------------
r57881 | naruse | 2017-03-12 03:59:22 +0900 (Sun, 12 Mar 2017) | 26 lines

merge revision(s) 57482: [Backport #13080] [Backport #13170]

	openssl: import v2.0.3

	Import Ruby/OpenSSL 2.0.3. Only bugfixes. The full commit log since
	2.0.2 (imported at r57146) can be found at:

	  https://github.com/ruby/openssl/compare/v2.0.2...v2.0.3

	----------------------------------------------------------------
	Corey Bonnell (1):
	      Fix for ASN1::Constructive 'each' implementation

	Kazuki Yamaguchi (10):
	      Fix build with static OpenSSL libraries on Windows
	       ([ruby-core:78878] [Bug #13080])
	      Merge pull request #96 from CBonnell/master
	      Merge branch 'topic/windows-static-linking-without-pkg-config' into maint
	      appveyor.yml: update OpenSSL version to 1.0.2j
	      buffering: fix typo in doc
	      test/envutil: fix assert_raise_with_message
	      x509: fix OpenSSL::X509::Name#eql?
	       ([ruby-core:79310] [Bug #13170])
	      ruby-openssl-docker: update versions of Ruby and OpenSSL
	      .travis.yml: test with Ruby 2.4
	      Ruby/OpenSSL 2.0.3
------------------------------------------------------------------------
r57880 | naruse | 2017-03-12 03:46:17 +0900 (Sun, 12 Mar 2017) | 5 lines

merge revision(s) 57480:

	mkmf.rb: message format string

	* lib/mkmf.rb (checking_for): message needs format string.
------------------------------------------------------------------------
r57879 | naruse | 2017-03-12 03:45:34 +0900 (Sun, 12 Mar 2017) | 17 lines

merge revision(s) 57477,57478,57479: [Backport #12405]

	use TRUE/FALSE.

	define rb_thread_sleep_deadly_allow_spurious_wakeup().

	* thread.c, thread_sync.c: define new function
	  rb_thread_sleep_deadly_allow_spurious_wakeup() and use it instead of
	  using sleep_forever() directly.

	allow Queue operation in trap.

	* thread_sync.c: allow spurious wakeup to check Queue status just after trap.
	  [Bug #12405]

	* test/thread/test_queue.rb: add a test for it.

------------------------------------------------------------------------
r57878 | naruse | 2017-03-12 03:16:14 +0900 (Sun, 12 Mar 2017) | 7 lines

merge revision(s) 57437:

	leakchecker.rb: get rid of uninitialized Tempfile

	* test/lib/leakchecker.rb (LeakChecker#find_tempfiles): get rid of
	  errors on uninitialized Tempfile, which can be left when
	  Dir.tmpdir failed or by Tempfile.allocate.
------------------------------------------------------------------------
r57877 | naruse | 2017-03-12 03:15:50 +0900 (Sun, 12 Mar 2017) | 5 lines

merge revision(s) 57436:

	enum.c: write barrier

	* enum.c (rb_nmin_run): set the class with write barrier.
------------------------------------------------------------------------
r57876 | naruse | 2017-03-12 03:11:06 +0900 (Sun, 12 Mar 2017) | 11 lines

merge revision(s) 57434: [Backport #13161]

	Enumerable#{min,min_by,max,max_by} [ci skip]

	* enum.c: [DOC] Enumerable#{min,min_by,max,max_by} return a sorted
	  array when +n+ argument is used.

	* enum.c: Small typo : minimum -> maximum

	[Bug #13161]
	Author:    Eric Duminil <eric.duminil@gmail.com>
------------------------------------------------------------------------
r57875 | naruse | 2017-03-12 03:10:55 +0900 (Sun, 12 Mar 2017) | 3 lines

merge revision(s) 57431:

	[DOC] Use Integer instead of Fixnum [ci skip]
------------------------------------------------------------------------
r57874 | naruse | 2017-03-12 03:09:45 +0900 (Sun, 12 Mar 2017) | 8 lines

merge revision(s) 57428:

	Add document for lib/rss/atom.rb

	[fix GH-1520]

	Patch by Tsehau Chao. Thanks!!!

------------------------------------------------------------------------
r57873 | naruse | 2017-03-12 03:07:38 +0900 (Sun, 12 Mar 2017) | 6 lines

merge revision(s) 57423:

	Fix function name for DBM on extension document.

	  Patch by Yuji Yaginuma, @y-yagi <yuuji.yaginuma@gmail.com>
	  [ci skip][fix GH-1519]
------------------------------------------------------------------------
r57872 | naruse | 2017-03-12 03:07:19 +0900 (Sun, 12 Mar 2017) | 6 lines

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]
------------------------------------------------------------------------
r57871 | naruse | 2017-03-12 02:56:02 +0900 (Sun, 12 Mar 2017) | 5 lines

merge revision(s) 57421:

	[DOC] Add empty example to enum.all? and any?

	[ci skip]
------------------------------------------------------------------------
r57870 | naruse | 2017-03-12 02:55:02 +0900 (Sun, 12 Mar 2017) | 5 lines

merge revision(s) 57411: [Backport #13147]

	Fix typo of URI#escape [Bug #13147]

	patched by Steve Hill <sghill.dev@gmail.com>
------------------------------------------------------------------------
r57869 | naruse | 2017-03-12 02:51:05 +0900 (Sun, 12 Mar 2017) | 7 lines

merge revision(s) 57407: [Backport #13145]

	object.c: no TypeError at Symbol

	* object.c (special_object_p): uninterned Symbol also should not
	  raise a TypeError but return itself instead, as well as interned
	  Symbols.  [ruby-core:79216] [Bug #13145]
------------------------------------------------------------------------
r57868 | naruse | 2017-03-12 02:45:18 +0900 (Sun, 12 Mar 2017) | 6 lines

merge revision(s) 57406: [Backport #13149]

	csv.rb: fix field_size_limit check

	* lib/csv.rb (CSV#shift): the last column is an Array in extended
	  column since r55985.  [ruby-dev:49964] [Bug #13149]
------------------------------------------------------------------------
r57867 | naruse | 2017-03-12 02:40:39 +0900 (Sun, 12 Mar 2017) | 8 lines

merge revision(s) 57405:

	error.c: fixed doc [ci skip]

	* error.c (exc_message): fixed doc regarding the presence of
	  to_str.  [Fix GH-1517]

	Author:    Marc Gauthier <marcg.gauthier@gmail.com>
------------------------------------------------------------------------
r57866 | naruse | 2017-03-12 02:40:32 +0900 (Sun, 12 Mar 2017) | 6 lines

merge revision(s) 57390:

	Hash#fetch: fix grammar in documentation.

	[Fix GH-1515][ci skip]
	Author:    Alyssa Ross <hi+services.github@alyssa.is>
------------------------------------------------------------------------
r57865 | naruse | 2017-03-12 02:37:46 +0900 (Sun, 12 Mar 2017) | 3 lines

merge revision(s) 57375:

	More description about the protected attribute of a method
------------------------------------------------------------------------
r57864 | naruse | 2017-03-12 02:35:03 +0900 (Sun, 12 Mar 2017) | 5 lines

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]
------------------------------------------------------------------------
r57863 | naruse | 2017-03-12 02:28:49 +0900 (Sun, 12 Mar 2017) | 5 lines

merge revision(s) 57372:

	Fix documentation of options for all of methods in FileUtils.

	Patch by galia traub( @galiat ). [Fix GH-1510][ci skip]
------------------------------------------------------------------------
r57862 | naruse | 2017-03-12 02:22:39 +0900 (Sun, 12 Mar 2017) | 6 lines

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]
------------------------------------------------------------------------
r57861 | naruse | 2017-03-12 02:17:23 +0900 (Sun, 12 Mar 2017) | 6 lines

merge revision(s) 57360: [Backport #12884]

	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]
------------------------------------------------------------------------
r57860 | naruse | 2017-03-12 02:10:01 +0900 (Sun, 12 Mar 2017) | 11 lines

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]
------------------------------------------------------------------------
r57859 | naruse | 2017-03-12 02:09:43 +0900 (Sun, 12 Mar 2017) | 9 lines

merge revision(s) 57335:

	s/SaveStringValue/SafeStringValue/

	Fix a typo in extension.rdoc.

	Signed-off-by: Akira Matsuda <ronnie@dio.jp>

	closes #1512
------------------------------------------------------------------------
r57858 | naruse | 2017-03-12 02:07:53 +0900 (Sun, 12 Mar 2017) | 11 lines

merge revision(s) 57317,57318:

	error.c: moved

	* error.c (preface_dump, postscript_dump): moved from
	  rb_vm_bugreport to place the last important message at the very
	  last after [NOTE].
	error.c: moved

	* error.c (preface_dump, postscript_dump): CrashReporter directory
	  was used before Mac OS X 10.6.
------------------------------------------------------------------------
r57857 | naruse | 2017-03-12 02:06:18 +0900 (Sun, 12 Mar 2017) | 6 lines

merge revision(s) 57315:

	vm_dump.c: postscript_dump

	* vm_dump.c (postscript_dump): mention crash report log twice
	  because important.
------------------------------------------------------------------------
r57856 | naruse | 2017-03-12 01:44:40 +0900 (Sun, 12 Mar 2017) | 7 lines

merge revision(s) 57305: [Backport #13114] [Backport #13120]

	variable.c: fix the condition to cache

	* variable.c (rb_const_set): fix the condition to cache the class
	  path and cache permanent or temporary path corresponding to the
	  outer klass.  [ruby-core:79039] [Bug #13120]
------------------------------------------------------------------------
r57855 | naruse | 2017-03-12 01:38:53 +0900 (Sun, 12 Mar 2017) | 14 lines

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]
------------------------------------------------------------------------
r57854 | naruse | 2017-03-12 01:29:51 +0900 (Sun, 12 Mar 2017) | 10 lines

merge revision(s) 57300,57368: [Backport #12613]

	compile.c: check compile

	* compile.c (iseq_compile_each): check if sub nodes succeeded.
	  [ruby-core:76531] [Bug #12613]
	compile.c: check err_info

	* compile.c (iseq_setup): bail out if any errors found.
	  [ruby-core:76531] [Bug #12613]
------------------------------------------------------------------------
r57853 | naruse | 2017-03-12 01:24:17 +0900 (Sun, 12 Mar 2017) | 7 lines

merge revision(s) 57293: [Backport #13107]

	vm_insnhelper.c: block argument at tailcall

	* vm_insnhelper.c (vm_call_iseq_setup_tailcall): check interrupts
	  after set up the new frame, not the passed block to be clobbered
	  by invoked finalizers and so on.  [ruby-core:78981] [Bug #13107]
------------------------------------------------------------------------
r57850 | naruse | 2017-03-12 00:03:50 +0900 (Sun, 12 Mar 2017) | 8 lines

merge revision(s) 57283,57284: [Backport #13113]

	benchmarks for [Bug #13113] [ci skip]
	variable.c: resolve permanent name only

	* variable.c (rb_const_set): resolve and cache class name
	  immediately only if the outer class/module has the name,
	  otherwise just set the ID.  [ruby-core:79007] [Bug #13113]
------------------------------------------------------------------------
r57849 | naruse | 2017-03-11 23:59:43 +0900 (Sat, 11 Mar 2017) | 10 lines

merge revision(s) 57280,57282: [Backport #13112]

	console.c: OOB access

	* ext/io/console/console.c (console_set_winsize): fix
	  out-of-bounds access.  [ruby-core:79004] [Bug #13112]
	console.c: unpaired size

	* ext/io/console/console.c (console_set_winsize): reject unpaired
	  pixel size.
------------------------------------------------------------------------
r57848 | naruse | 2017-03-11 23:48:04 +0900 (Sat, 11 Mar 2017) | 11 lines

merge revision(s) 57278,57279: [Backport #12855]

	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]
------------------------------------------------------------------------
r57847 | naruse | 2017-03-11 23:25:54 +0900 (Sat, 11 Mar 2017) | 8 lines

merge revision(s) 57240: [Backport #13090]

	vm.c: fix return in lambda

	* vm.c (invoke_block_from_c_splattable): pass lambda-ness.

	* vm_eval.c (yield_under): invoke lambda proc properly.
	  [ruby-core:78917] [Bug #13090]
------------------------------------------------------------------------
r57846 | naruse | 2017-03-11 23:20:51 +0900 (Sat, 11 Mar 2017) | 7 lines

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]
------------------------------------------------------------------------
r57845 | naruse | 2017-03-11 22:36:26 +0900 (Sat, 11 Mar 2017) | 6 lines

merge revision(s) 57205:

	cont.c: change fiber stack size doc [ci skip]

	It's many years since we had tiny 4KB fiber stacks :<
	point to the manpage instead for current, larger sizes.
------------------------------------------------------------------------
r57844 | naruse | 2017-03-11 22:35:55 +0900 (Sat, 11 Mar 2017) | 3 lines

merge revision(s) 57246: [Backport #13091]

	fix typo [Bug #13091]
------------------------------------------------------------------------
r57843 | naruse | 2017-03-11 22:35:22 +0900 (Sat, 11 Mar 2017) | 6 lines

merge revision(s) 57232: [Backport #13084]

	rational.c: fix for mathn

	* rational.c (read_num, read_rat_nos): dispatch by the type of numerator, for
	  mathn.  [ruby-core:78893] [Bug #13084]
------------------------------------------------------------------------
r57841 | naruse | 2017-03-11 22:23:42 +0900 (Sat, 11 Mar 2017) | 5 lines

merge revision(s) 57204:

        r57203 needs r57204.
	io.c: use io_close to close ARGF

------------------------------------------------------------------------
r57840 | naruse | 2017-03-11 22:03:46 +0900 (Sat, 11 Mar 2017) | 6 lines

merge revision(s) 57227: [Backport #13078]

	numeric.c: reduce fdiv

	* numeric.c (rb_int_fdiv_double): reduce first for more precise
	  result.  [ruby-core:78886] [Bug #13078]
------------------------------------------------------------------------
r57839 | naruse | 2017-03-11 22:02:37 +0900 (Sat, 11 Mar 2017) | 6 lines

merge revision(s) 57203:

	io.c: ARGF fd leak

	* io.c (argf_next_argv): fix leak of fd after breaking in #each
	  method.
------------------------------------------------------------------------
r57838 | naruse | 2017-03-11 22:02:01 +0900 (Sat, 11 Mar 2017) | 22 lines

merge revision(s) 57199,57202,57206,57224: [Backport #13076]

	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]
------------------------------------------------------------------------
r57837 | naruse | 2017-03-11 21:53:45 +0900 (Sat, 11 Mar 2017) | 6 lines

merge revision(s) 57198: [Backport #13073]

	parse.y: preserve cmdarg stack

	* parse.y (do_body): preserve cmdarg stack around do/end block.
	  [ruby-core:78837] [Bug #13073]
------------------------------------------------------------------------
r57834 | naruse | 2017-03-11 20:06:39 +0900 (Sat, 11 Mar 2017) | 6 lines

merge revision(s) 57194: [Backport #13074]

	vm_eval.c: Symbol#to_proc and instance_exec

	* vm_eval.c (yield_under): should evaluate the proc on the first
	  argument.  [ruby-core:78839] [Bug #13074]
------------------------------------------------------------------------
r57833 | naruse | 2017-03-11 19:44:13 +0900 (Sat, 11 Mar 2017) | 18 lines

merge revision(s) 57187,57234: [Backport #13075]

	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
------------------------------------------------------------------------
r57832 | naruse | 2017-03-11 19:37:09 +0900 (Sat, 11 Mar 2017) | 5 lines

merge revision(s) 57179:

	bignum.c: precise fdiv

	* bignum.c (big_fdiv): more precise calculation.  [ruby-dev:49915]
------------------------------------------------------------------------
r57831 | naruse | 2017-03-11 19:28:14 +0900 (Sat, 11 Mar 2017) | 24 lines

merge revision(s) 57173-57175: [Backport #13068]

	------------------------------------------------------------------------
	r57173 | nobu | 2016-12-24 22:19:50 +0900 (Sat, 24 Dec 2016) | 4 lines

	compile.c: constify

	* compile.c (method_for_self): constify an argument of build
  function for VC6.
	------------------------------------------------------------------------
	r57174 | nobu | 2016-12-24 22:21:30 +0900 (Sat, 24 Dec 2016) | 4 lines

	hash.c: split long long literals

	* hash.c (prime1, prime2): split long long literals for platforms
  where LL suffix is not supported, e.g., VC6.
	------------------------------------------------------------------------
	r57175 | nobu | 2016-12-24 22:22:53 +0900 (Sat, 24 Dec 2016) | 4 lines

	regint.h: version for secure functions

	* regint.h (xvsnprintf): secure version functions are not
  supported on old VC.

------------------------------------------------------------------------
r57830 | naruse | 2017-03-11 19:17:35 +0900 (Sat, 11 Mar 2017) | 21 lines

merge revision(s) 57170-57172: [Backport #13066]

	test/unit.rb: restore parallel option

	* test/lib/test/unit.rb (_run_parallel): restore parallel option
  after retrying for --repeat-count option.
	------------------------------------------------------------------------
	r57170 | nobu | 2016-12-24 20:56:12 +0900 (Sat, 24 Dec 2016) | 1 line

	time.c: fix typo in value_insane_p
	------------------------------------------------------------------------
	r57171 | nobu | 2016-12-24 21:19:23 +0900 (Sat, 24 Dec 2016) | 1 line

	time.c: remove debug code
	------------------------------------------------------------------------
	r57172 | nobu | 2016-12-24 21:21:52 +0900 (Sat, 24 Dec 2016) | 4 lines

	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]
------------------------------------------------------------------------
r57163 | svn | 2016-12-24 01:03:40 +0900 (Sat, 24 Dec 2016) | 1 line

* 2016-12-24
------------------------------------------------------------------------
r57162 | naruse | 2016-12-24 01:03:39 +0900 (Sat, 24 Dec 2016) | 2 lines

v2.4.0p0

------------------------------------------------------------------------
r57161 | naruse | 2016-12-24 00:44:33 +0900 (Sat, 24 Dec 2016) | 1 line

Release branch of Ruby 2.4
------------------------------------------------------------------------
r57160 | naruse | 2016-12-23 23:54:04 +0900 (Fri, 23 Dec 2016) | 3 lines

Increase timeout

http://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20161223T113301Z.fail.html.gz
------------------------------------------------------------------------
r57159 | nobu | 2016-12-23 12:22:36 +0900 (Fri, 23 Dec 2016) | 5 lines

assertions.rb: prepare_syntax_check

* test/lib/test/unit/assertions.rb (prepare_syntax_check): extract
  common preparation of arguments from assert_valid_syntax and
  assert_syntax_error.
------------------------------------------------------------------------
r57158 | nobu | 2016-12-23 12:22:35 +0900 (Fri, 23 Dec 2016) | 8 lines

assertions.rb: syntax check by iseq

* test/lib/test/unit/assertions.rb (assert_valid_syntax): use
  RubyVM::InstructionSequence.compile to get rid of executing the
  code, instead of catch&throw.  sample/trick2015/kinaba/entry.rb
  no longer raises an Invalid return.

* test/lib/test/unit/assertions.rb (assert_syntax_error): ditto.
------------------------------------------------------------------------
r57157 | nobu | 2016-12-23 09:05:40 +0900 (Fri, 23 Dec 2016) | 4 lines

time.c: inquire suspicious values

* time.c (time_arg): dump sec and subsec arguments if subsecx is
  insane.
------------------------------------------------------------------------
r57156 | nobu | 2016-12-23 08:20:00 +0900 (Fri, 23 Dec 2016) | 5 lines

test_modify_expand.rb: skip if no overflow

* test/-ext-/string/test_modify_expand.rb (test_integer_overflow):
  no longer happens on platforms where size_t is larger than long,
  e.g. 64bit windows, since r57122.
------------------------------------------------------------------------
r57155 | nobu | 2016-12-23 07:34:18 +0900 (Fri, 23 Dec 2016) | 1 line

time.c: inquire suspicious values
------------------------------------------------------------------------
r57154 | nobu | 2016-12-23 07:16:19 +0900 (Fri, 23 Dec 2016) | 4 lines

string.c: suppress a warning

* string.c (rb_str_casecmp_p): [DOC] use Unicode escape form to
  get rid of warning C4819 by Microsoft Visual C++.
------------------------------------------------------------------------
r57153 | svn | 2016-12-23 05:58:55 +0900 (Fri, 23 Dec 2016) | 1 line

* 2016-12-23
------------------------------------------------------------------------
r57152 | nobu | 2016-12-23 05:58:55 +0900 (Fri, 23 Dec 2016) | 1 line

get rid of implicit signedness conversions
------------------------------------------------------------------------
r57151 | yui-knk | 2016-12-22 19:29:40 +0900 (Thu, 22 Dec 2016) | 4 lines

test_float.rb: add test cases for Float#round

* test_float.rb: add test cases for Float#round with
  half nil. Follow up r57130.
------------------------------------------------------------------------
r57150 | naruse | 2016-12-22 18:44:30 +0900 (Thu, 22 Dec 2016) | 3 lines

suppress warning: implicit conversion changes signedness

It causes [Bug #13060]
------------------------------------------------------------------------
r57149 | rhe | 2016-12-22 13:40:28 +0900 (Thu, 22 Dec 2016) | 4 lines

io.c: [DOC] update outdated documentation of ARGF.close

As of Ruby 2.3, IO#close no longer raises IOError if the file is already
closed.
------------------------------------------------------------------------
r57148 | hsbt | 2016-12-22 12:53:53 +0900 (Thu, 22 Dec 2016) | 1 line

Update xmlrpc-0.2.1 for Ruby 2.4.0 release.
------------------------------------------------------------------------
r57147 | nobu | 2016-12-22 11:00:02 +0900 (Thu, 22 Dec 2016) | 4 lines

test_rinda.rb: ipv6_mc

* test/rinda/test_rinda.rb (RingIPv6#ipv6_mc): extract IPv6
  multicast setup and cleanup, and ignore ENETDOWN.
------------------------------------------------------------------------
r57146 | rhe | 2016-12-22 10:43:41 +0900 (Thu, 22 Dec 2016) | 14 lines

openssl: import v2.0.2

Import Ruby/OpenSSL 2.0.2. This release contains only bugfixes. The full
commit log since 2.0.1 (imported at r57041) can be found at:

  https://github.com/ruby/openssl/compare/v2.0.1...v2.0.2

----------------------------------------------------------------
Kazuki Yamaguchi (5):
      ssl: check for SSL_CTX_clear_options()
      Rename functions in openssl_missing.c
      ssl: use SSL_SESSION_get_protocol_version()
      pkey: allow instantiating OpenSSL::PKey::PKey with unsupported key type
      Ruby/OpenSSL 2.0.2
------------------------------------------------------------------------
r57145 | mrkn | 2016-12-22 00:35:29 +0900 (Thu, 22 Dec 2016) | 5 lines

bigdecimal: version 1.3.0

Import bigdecimal version 1.3.0.  The full commit log is here:

  https://github.com/ruby/bigdecimal/compare/v1.3.0.pre.2...v1.3.0
------------------------------------------------------------------------
r57144 | svn | 2016-12-22 00:21:20 +0900 (Thu, 22 Dec 2016) | 1 line

* 2016-12-22
------------------------------------------------------------------------
r57143 | ngoto | 2016-12-22 00:21:19 +0900 (Thu, 22 Dec 2016) | 5 lines

regcomp.c: Fix compile error with old version of fcc on Solaris

* regcomp.c (get_min_match_length): Fix compile error with old version
  of fcc (Fujitsu C Compiler) on Solaris 10. [Bug #13059][ruby-dev:49909]

------------------------------------------------------------------------
r57142 | nobu | 2016-12-21 22:46:46 +0900 (Wed, 21 Dec 2016) | 1 line

time.c: debug print
------------------------------------------------------------------------
r57141 | yui-knk | 2016-12-21 22:26:16 +0900 (Wed, 21 Dec 2016) | 4 lines

numeric.c: remove not used lines

* numeric.c (rb_num_get_rounding_option): remove not used
  lines. After r57130 these lines are never reached.
------------------------------------------------------------------------
r57140 | nobu | 2016-12-21 21:06:40 +0900 (Wed, 21 Dec 2016) | 4 lines

time.c: refine num_exact error message

* time.c (num_exact): show the original argument when conversion
  failed, instead of intermediate nil.
------------------------------------------------------------------------
r57139 | nobu | 2016-12-21 21:05:41 +0900 (Wed, 21 Dec 2016) | 4 lines

time.c: use RB_TYPE_P

* time.c (time_timespec): use RB_TYPE_P instead of switching by
  TYPE.
------------------------------------------------------------------------
r57138 | nobu | 2016-12-21 20:20:02 +0900 (Wed, 21 Dec 2016) | 4 lines

st.c: suppress a warning

* st.c (st_hash): suppress unused label warning on 32bit
  platforms.  fix up r57134.
------------------------------------------------------------------------
r57137 | nobu | 2016-12-21 20:12:39 +0900 (Wed, 21 Dec 2016) | 4 lines

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]
------------------------------------------------------------------------
r57136 | usa | 2016-12-21 17:13:42 +0900 (Wed, 21 Dec 2016) | 2 lines

* win32/win32.c (winnt_stat): use `numberof` macro instead of constant.

------------------------------------------------------------------------
r57135 | usa | 2016-12-21 16:50:14 +0900 (Wed, 21 Dec 2016) | 8 lines

Fixed potentially buffer overrun.

* win32/win32.c (winnt_stat): the return value of `get_final_path` is the
  expected buffer length, not the actuall filled length.

* win32/win32.c (winnt_stat): `finalname` may be accessed in the outer block of
  its definition via `path`.

------------------------------------------------------------------------
r57134 | nobu | 2016-12-21 15:22:16 +0900 (Wed, 21 Dec 2016) | 29 lines

st.c: fix st_hash* functions [Bug #13019]

Previous implementation had an issues:
- macros murmur1 assumes murmur_step takes rotation value
  as a second argument
- but murmur_step second argument is "next block"
- this makes st_hash_uint and st_hash_end to not mix high bits of
  hash value into lower bits
- this leads to pure hash behavior on doubles and mixing hashes using
  st_hash_uint.
  It didn't matter when bins amount were prime numbers, but it hurts
  when bins are powers of two.

Mistake were created cause of attempt to co-exist Murmur1 and Murmur2
in a same code.

Change it to single hash-function implementation.
- block function is in a spirit of Murmur functions,
  but handles inter-block dependency a bit better (imho).
- final block is read in bit more optimal way on CPU with unaligned word access,
- final block is mixed in simple way,
- finalizer is taken from MurmurHash3 (it makes most of magic :) )
  (64bit finalizer is taken from
  http://zimbry.blogspot.ru/2011/09/better-bit-mixing-improving-on.html)

Also remove ST_USE_FNV1: it lacks implementation of many functions,
and looks to be abandoned

Author: Sokolov Yura aka funny_falcon <funny.falcon@gmail.com>
------------------------------------------------------------------------
r57133 | akr | 2016-12-21 14:26:35 +0900 (Wed, 21 Dec 2016) | 2 lines

[DOC] itemize values for half option of Float#round.

------------------------------------------------------------------------
r57132 | nobu | 2016-12-21 10:58:32 +0900 (Wed, 21 Dec 2016) | 4 lines

compile.c: toplevel return

* compile.c (iseq_compile_each): stop execution of the current source
  by toplevel return.  [ruby-core:36785] [Feature #4840]
------------------------------------------------------------------------
r57131 | nobu | 2016-12-21 10:29:58 +0900 (Wed, 21 Dec 2016) | 3 lines

numeric.c: rdoc of half option [ci skip]

* numeric.c (flo_round): [DOC] mention half option.  [Bug #12548]
------------------------------------------------------------------------
r57130 | nobu | 2016-12-21 10:29:57 +0900 (Wed, 21 Dec 2016) | 4 lines

numeric.c: allow nil as rounding mode option

* numeric.c (rb_num_get_rounding_option): allow nil same as the
  default behavior, per [ruby-core:77961].  [Bug #12548]
------------------------------------------------------------------------
r57129 | nobu | 2016-12-21 02:15:37 +0900 (Wed, 21 Dec 2016) | 4 lines

rdoc for r57126 [ci skip]

* ext/zlib/zlib.c: [DOC] update as keyword arguments.
  [Feature #13020]
------------------------------------------------------------------------
r57128 | svn | 2016-12-21 01:02:22 +0900 (Wed, 21 Dec 2016) | 1 line

* 2016-12-21
------------------------------------------------------------------------
r57127 | naruse | 2016-12-21 01:02:22 +0900 (Wed, 21 Dec 2016) | 1 line

suppress warning: attempt to close unfinished zstream; reset forced.
------------------------------------------------------------------------
r57126 | naruse | 2016-12-21 01:02:21 +0900 (Wed, 21 Dec 2016) | 1 line

Zlib.gzip uses kwargs instead of argc [Feature #13020]
------------------------------------------------------------------------
r57125 | nobu | 2016-12-20 17:25:03 +0900 (Tue, 20 Dec 2016) | 4 lines

io.c: update argf lineno

* io.c (argf_rewind): rewind line number in non-global ARGF
  instance.
------------------------------------------------------------------------
r57124 | nobu | 2016-12-20 17:25:02 +0900 (Tue, 20 Dec 2016) | 4 lines

io.c: update argf lineno

* io.c (argf_block_call_line): update line number in non-global
  ARGF instance.  [ruby-core:78728] [Bug #13051]
------------------------------------------------------------------------
r57123 | rhe | 2016-12-20 16:32:23 +0900 (Tue, 20 Dec 2016) | 5 lines

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]
------------------------------------------------------------------------
r57122 | rhe | 2016-12-20 15:53:45 +0900 (Tue, 20 Dec 2016) | 5 lines

string.c: add missing size_t cast

Add size_t cast to avoid signed integer overflow. r56157 ("string.c:
avoid signed integer overflow", 2016-09-13) missed this. Suppresses
UBSan.
------------------------------------------------------------------------
r57121 | rhe | 2016-12-20 15:53:44 +0900 (Tue, 20 Dec 2016) | 6 lines

array.c: do not resize to less than 0

Shrinking the Array from the block invoked by Array#select! or
Array#reject! causes the Array to be a negative number size. Ensure that
the resulting Array won't be smaller than 0.
[ruby-core:78739] [Bug #13053]
------------------------------------------------------------------------
r57120 | yuki | 2016-12-20 15:53:17 +0900 (Tue, 20 Dec 2016) | 2 lines

* gems/bundled_gems: Upgrade the did_you_mean gem to 1.1.0

------------------------------------------------------------------------
r57119 | rhe | 2016-12-20 14:26:08 +0900 (Tue, 20 Dec 2016) | 8 lines

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]
------------------------------------------------------------------------
r57118 | rhe | 2016-12-20 14:26:07 +0900 (Tue, 20 Dec 2016) | 10 lines

proc.c: assume rb_iseq_location_t::first_lineno is always a Fixnum

Do not check for the value of rb_iseq_constant_body::line_info_table as
it is no longer related. The checks seem to be the remains from the day
before the dedicated 'first_lineno' field was introduced. Remove them.

Note, rb_iseq_constant_body::line_info_table can be NULL only when the
iseq does not contain any instructions that originate from Ruby code,
for example, an iseq created with 'proc {}' under a non-default compile
options where trace instructions are disabled.
------------------------------------------------------------------------
r57117 | svn | 2016-12-20 14:09:18 +0900 (Tue, 20 Dec 2016) | 1 line

* 2016-12-20
------------------------------------------------------------------------
r57116 | nobu | 2016-12-20 14:09:18 +0900 (Tue, 20 Dec 2016) | 4 lines

test/unit.rb: separator [ci skip]

* test/lib/test/unit.rb (ExcludesOption#setup_options): add
  separator for --excludes-dir in help message.
------------------------------------------------------------------------
r57115 | nobu | 2016-12-19 17:36:21 +0900 (Mon, 19 Dec 2016) | 4 lines

time.c: refine error message

* time.c (validate_vtm): separate validation failure messages for
  each members.
------------------------------------------------------------------------
r57114 | nobu | 2016-12-19 13:07:40 +0900 (Mon, 19 Dec 2016) | 4 lines

re.c: RB_TYPE_P

* re.c (match_backref_number, namev_to_backref_number): use
  RB_TYPE_P instead of switching by TYPE.
------------------------------------------------------------------------
r57113 | svn | 2016-12-19 12:11:58 +0900 (Mon, 19 Dec 2016) | 1 line

* 2016-12-19
------------------------------------------------------------------------
r57112 | nobu | 2016-12-19 12:11:57 +0900 (Mon, 19 Dec 2016) | 4 lines

re.c: NAME_TO_NUMBER

* re.c (namev_to_backref_number, rb_reg_regsub): extract name to
  backref number check as NAME_TO_NUMBER.
------------------------------------------------------------------------
r57111 | ktsj | 2016-12-18 21:29:34 +0900 (Sun, 18 Dec 2016) | 1 line

doc/standard_library.rdoc: Tk is removed from stdlib
------------------------------------------------------------------------
r57110 | nobu | 2016-12-18 20:43:51 +0900 (Sun, 18 Dec 2016) | 4 lines

re.c: use name_to_backref_number

* re.c (match_backref_number): use name_to_backref_number for
  casts.
------------------------------------------------------------------------
r57109 | naruse | 2016-12-18 20:28:01 +0900 (Sun, 18 Dec 2016) | 3 lines

Increase timeout

http://rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20161215T021909Z.fail.html.gz
------------------------------------------------------------------------
r57108 | nobu | 2016-12-18 03:04:30 +0900 (Sun, 18 Dec 2016) | 4 lines

sprintf.c: fix width underflow

* sprintf.c (rb_str_format): fix memory corruption by width
  underflow.  https://github.com/mruby/mruby/issues/3347
------------------------------------------------------------------------
r57107 | svn | 2016-12-18 01:10:57 +0900 (Sun, 18 Dec 2016) | 1 line

* 2016-12-18
------------------------------------------------------------------------
r57106 | naruse | 2016-12-18 01:10:56 +0900 (Sun, 18 Dec 2016) | 3 lines

Increase timeout

http://rubyci.org/logs/13.78.52.201/vc12-x64/ruby-trunk/log/20161217T103523Z.log.html.gz
------------------------------------------------------------------------
r57105 | rhe | 2016-12-17 17:25:34 +0900 (Sat, 17 Dec 2016) | 3 lines

compile.c: do not emit numeric literal range in void context

A fix-up for r56316. Fix stack consistency error on '1..3; nil'.
------------------------------------------------------------------------
r57104 | nobu | 2016-12-17 16:48:58 +0900 (Sat, 17 Dec 2016) | 1 line

Reapply r57093,r57094,r57097 "dtrace build fixes on FreeBSD"
------------------------------------------------------------------------
r57103 | nobu | 2016-12-17 16:48:57 +0900 (Sat, 17 Dec 2016) | 3 lines

Reapply r57092 "configure.in: repeated checks"

Needs DTRACE_OBJ when "$rb_cv_prog_dtrace_g" = rebuild, too.
------------------------------------------------------------------------
r57102 | nobu | 2016-12-17 14:27:05 +0900 (Sat, 17 Dec 2016) | 1 line

Revert r57092 "configure.in: repeated checks"
------------------------------------------------------------------------
r57101 | naruse | 2016-12-17 14:14:14 +0900 (Sat, 17 Dec 2016) | 1 line

Revert r57093,r57094,r57097 "dtrace build fixes on FreeBSD"
------------------------------------------------------------------------
r57100 | nobu | 2016-12-17 09:58:47 +0900 (Sat, 17 Dec 2016) | 4 lines

test_mailto.rb: overwritten methods

* test/uri/test_mailto.rb (URI::TestMailTo#test_to_mailtext):
  merge overwritten methods.  [Bug #10774]
------------------------------------------------------------------------
r57099 | nobu | 2016-12-17 09:58:46 +0900 (Sat, 17 Dec 2016) | 1 line

test_mailto.rb: adjust scope
------------------------------------------------------------------------
r57098 | nobu | 2016-12-17 09:52:47 +0900 (Sat, 17 Dec 2016) | 4 lines

re.c: non-regexp name reference

* re.c (rb_reg_regsub): other than regexp has no name references.
  [ruby-core:78686] [Bug #13042]
------------------------------------------------------------------------
r57097 | nobu | 2016-12-17 09:01:42 +0900 (Sat, 17 Dec 2016) | 4 lines

configure.in: fix r57093

* configure.in (RUBY_DTRACE_AVAILABLE): try -xnolibs first.
  [ruby-core:78676] [Bug #13041]
------------------------------------------------------------------------
r57096 | svn | 2016-12-17 07:57:02 +0900 (Sat, 17 Dec 2016) | 1 line

* 2016-12-17
------------------------------------------------------------------------
r57095 | nobu | 2016-12-17 07:57:01 +0900 (Sat, 17 Dec 2016) | 4 lines

fix r57089

* parse.y (parser_heredoc_identifier): fix multiline here document
  identifier condition.
------------------------------------------------------------------------
r57094 | nobu | 2016-12-16 21:28:19 +0900 (Fri, 16 Dec 2016) | 3 lines

garbage space [ci skip]

* configure.in (RUBY_DTRACE_AVAILABLE): remove a garbage space.
------------------------------------------------------------------------
r57093 | nobu | 2016-12-16 21:16:33 +0900 (Fri, 16 Dec 2016) | 5 lines

dtrace build fixes on FreeBSD

* configure.in (RUBY_DTRACE_AVAILABLE, RUBY_DTRACE_POSTPROCESS):
  incorporate dtrace build fix on FreeBSD, dtrace needs -xnolibs
  in a jail.  [ruby-core:78676] [Bug #13041]
------------------------------------------------------------------------
r57092 | nobu | 2016-12-16 20:59:57 +0900 (Fri, 16 Dec 2016) | 4 lines

configure.in: repeated checks

* configure.in (enable_dtrace): reduce repeated
  RUBY_DTRACE_AVAILABLE checks.
------------------------------------------------------------------------
r57091 | nobu | 2016-12-16 14:05:42 +0900 (Fri, 16 Dec 2016) | 4 lines

no crypt.h on FreeBSD 12

* string.c (crypt.h): crypt_r() was added in FreeBSD 12.0 but is
  declared in unistd.h.  [ruby-core:78664] [Bug #13038]
------------------------------------------------------------------------
r57090 | nobu | 2016-12-16 12:30:26 +0900 (Fri, 16 Dec 2016) | 4 lines

configure.in: no crypt.h on FreeBSD 12

* configure.in (crypt.h): crypt_r() was added in FreeBSD 12.0 but
  is declared in unistd.h.  [ruby-core:78664] [Bug #13038]
------------------------------------------------------------------------
r57089 | nobu | 2016-12-16 10:27:47 +0900 (Fri, 16 Dec 2016) | 4 lines

multiline heredoc identifier

* parse.y (parser_heredoc_identifier): reject multiline here
  document identifier, which never matches single line.
------------------------------------------------------------------------
r57088 | nobu | 2016-12-16 10:12:09 +0900 (Fri, 16 Dec 2016) | 6 lines

fix chomping newline only line

* string.c (chomp_newline): fix chomping newline only line.
  rb_enc_prev_char return NULL if no previous character and must
  not call rb_enc_ascget on it.  a patch by Ary Borenszweig
  <asterite AT gmail.com> at [ruby-core:78666].  [Bug #13037]
------------------------------------------------------------------------
r57087 | svn | 2016-12-16 01:08:34 +0900 (Fri, 16 Dec 2016) | 1 line

* 2016-12-16
------------------------------------------------------------------------
r57086 | mrkn | 2016-12-16 01:08:33 +0900 (Fri, 16 Dec 2016) | 1 line

NEWS: Fix the default rounding mode
------------------------------------------------------------------------
r57085 | nobu | 2016-12-15 21:58:59 +0900 (Thu, 15 Dec 2016) | 4 lines

parse.y: newline in heredoc identifier

* parse.y (parser_heredoc_identifier): warn newline in here
  document identifier.
------------------------------------------------------------------------
r57084 | hsbt | 2016-12-15 20:00:41 +0900 (Thu, 15 Dec 2016) | 1 line

Added entry of psych 2.2.2
------------------------------------------------------------------------
r57083 | hsbt | 2016-12-15 20:00:40 +0900 (Thu, 15 Dec 2016) | 3 lines

Update psych-2.2.2

 * It fixed only JRuby dependency issue.
------------------------------------------------------------------------
r57082 | nobu | 2016-12-15 15:22:09 +0900 (Thu, 15 Dec 2016) | 1 line

parse.y: one warning, one line [ci skip]
------------------------------------------------------------------------
r57081 | usa | 2016-12-15 02:53:20 +0900 (Thu, 15 Dec 2016) | 5 lines

Removed the obstacle to running test-all with VC14.

* test/fiddle/test_import.rb (LIBC.fprintf): VC14's `fprintf` is very distinct
  name, then, just ignore this test.

------------------------------------------------------------------------
r57080 | svn | 2016-12-15 02:49:27 +0900 (Thu, 15 Dec 2016) | 1 line

* 2016-12-15
------------------------------------------------------------------------
r57079 | usa | 2016-12-15 02:49:26 +0900 (Thu, 15 Dec 2016) | 6 lines

Fixed link error with VC14.

* win32/mkexports.rb (Exports::Mswin#each_exports): should ignore `vsprintf_s_l`
  and the like just like `vsprintf_l`.
  [ruby-dev:49899] [Bug #13033]

------------------------------------------------------------------------
r57078 | rhe | 2016-12-14 21:32:42 +0900 (Wed, 14 Dec 2016) | 9 lines

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]
------------------------------------------------------------------------
r57077 | nobu | 2016-12-14 17:25:56 +0900 (Wed, 14 Dec 2016) | 5 lines

vcs.rb: no ext/date in vcs.rb

* tool/vcs.rb (VCS::GIT#export_changelog): do not require date
  extension library so that miniruby can run.
  [ruby-core:78641] [Bug #13032]
------------------------------------------------------------------------
r57076 | nobu | 2016-12-14 17:06:55 +0900 (Wed, 14 Dec 2016) | 4 lines

constify

* vm_dump.c (rb_vmdebug_debug_print_pre): constify pc argument for
  VMDEBUG.
------------------------------------------------------------------------
r57075 | nobu | 2016-12-14 16:30:41 +0900 (Wed, 14 Dec 2016) | 4 lines

parse.y: curtail scanning

* parse.y (parser_yyerror): curtail scanning range, not to exceed
  the max margin.
------------------------------------------------------------------------
r57074 | svn | 2016-12-14 13:35:29 +0900 (Wed, 14 Dec 2016) | 1 line

* 2016-12-14
------------------------------------------------------------------------
r57073 | nobu | 2016-12-14 13:35:28 +0900 (Wed, 14 Dec 2016) | 4 lines

parse.y: fix yyerror message

* parse.y (parser_yyerror): show the error line even if the error
  is at the end.
------------------------------------------------------------------------
r57072 | usa | 2016-12-13 14:17:48 +0900 (Tue, 13 Dec 2016) | 7 lines

declare `rb_w32_sysinit` in header.

* include/ruby/win32.h (rb_w32_sysinit): declare.
  [ruby-core:78444] [Bug #12994]

* ruby.c (ruby_sysinit): follow above change.

------------------------------------------------------------------------
r57071 | nobu | 2016-12-13 12:55:14 +0900 (Tue, 13 Dec 2016) | 1 line

require "irb/output-method" for StdioOutputMethod
------------------------------------------------------------------------
r57070 | nobu | 2016-12-13 12:55:13 +0900 (Tue, 13 Dec 2016) | 1 line

make-snapshot: fix circular dependency
------------------------------------------------------------------------
r57069 | hsbt | 2016-12-13 11:01:34 +0900 (Tue, 13 Dec 2016) | 1 line

Update description of XMLRPC section.
------------------------------------------------------------------------
r57068 | usa | 2016-12-13 01:18:45 +0900 (Tue, 13 Dec 2016) | 5 lines

get rid of a test failure with VC10.

* numeric.c (round_half_up, round_half_down): use `round` always because it's
  defined in this file even if doesn't exist.

------------------------------------------------------------------------
r57067 | svn | 2016-12-13 00:24:29 +0900 (Tue, 13 Dec 2016) | 1 line

* 2016-12-13
------------------------------------------------------------------------
r57066 | naruse | 2016-12-13 00:24:28 +0900 (Tue, 13 Dec 2016) | 4 lines

Use URI.decode_www_form_component [Bug #10774]

`parser` refered RFC2396_Parser, but it is separated.
test is contributed by Dominik Menke
------------------------------------------------------------------------
r57065 | naruse | 2016-12-12 23:55:15 +0900 (Mon, 12 Dec 2016) | 4 lines

st: Add 'static const'

patched by Ken Takata [ruby-core:78558]
https://github.com/k-takata/Onigmo/commit/44e3c0a16da1116be641ea807c1202434b743ace
------------------------------------------------------------------------
r57062 | naruse | 2016-12-12 22:37:27 +0900 (Mon, 12 Dec 2016) | 1 line

fix command
------------------------------------------------------------------------
r57060 | naruse | 2016-12-12 22:20:00 +0900 (Mon, 12 Dec 2016) | 3 lines

Use 7z if exist

7z can compress with higher ratio than gzip/zip.
------------------------------------------------------------------------
r57059 | kazu | 2016-12-12 22:12:08 +0900 (Mon, 12 Dec 2016) | 1 line

NEWS: Add String#match? and Symbol#match? [ci skip]
------------------------------------------------------------------------
r57058 | kazu | 2016-12-12 22:12:06 +0900 (Mon, 12 Dec 2016) | 1 line

NEWS: Use spaces instead of tab [ci skip]
------------------------------------------------------------------------
r57057 | kazu | 2016-12-12 22:12:05 +0900 (Mon, 12 Dec 2016) | 1 line

NEWS: Sort entries [ci skip]
------------------------------------------------------------------------
r57056 | nobu | 2016-12-12 16:12:07 +0900 (Mon, 12 Dec 2016) | 4 lines

string.c: fix method name in rdoc [ci skip]

* string.c (rb_str_equal): [DOC] fix fallback method name. the
  peer's == method will be used, not ===.
------------------------------------------------------------------------
r57055 | nobu | 2016-12-12 12:19:52 +0900 (Mon, 12 Dec 2016) | 1 line

test for Symbol#match?  [Feature #12898]
------------------------------------------------------------------------
r57054 | nobu | 2016-12-12 12:07:47 +0900 (Mon, 12 Dec 2016) | 4 lines

test_m17n.rb: escape

* test/ruby/test_m17n.rb (test_regexp_ascii_none): escape regexp
  meta characters.
------------------------------------------------------------------------
r57053 | nobu | 2016-12-12 11:56:12 +0900 (Mon, 12 Dec 2016) | 5 lines

String#match? and Symbol#match?

* string.c (rb_str_match_m_p): inverse of Regexp#match?.  based on
  the patch by Herwin Weststrate <herwin@snt.utwente.nl>.
  [Fix GH-1483] [Feature #12898]
------------------------------------------------------------------------
r57052 | svn | 2016-12-12 11:38:54 +0900 (Mon, 12 Dec 2016) | 1 line

* 2016-12-12
------------------------------------------------------------------------
r57051 | nobu | 2016-12-12 11:38:53 +0900 (Mon, 12 Dec 2016) | 4 lines

re.c: char boundary

* re.c (rb_reg_match_m_p): consider char boundary.  rb_str_subpos
  does not adjust to the boundary if len == 0.
------------------------------------------------------------------------
r57050 | nobu | 2016-12-11 18:20:27 +0900 (Sun, 11 Dec 2016) | 4 lines

parse.y: zero codepoints

* parse.y (parser_tokadd_utf8): relax restriction to allow zero or
  more codepoints.
------------------------------------------------------------------------
r57049 | naruse | 2016-12-11 15:13:02 +0900 (Sun, 11 Dec 2016) | 1 line

fix Zlib.gzip/gunzip document
------------------------------------------------------------------------
r57048 | naruse | 2016-12-11 03:34:07 +0900 (Sun, 11 Dec 2016) | 7 lines

Updated documentation examples for Hash#value?

The same code is used for has_value? and value?, but according to
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/43765
has_value is deprecated. Use the non-deprecated syntax in the examples.
by Herwin Weststrate <herwin@snt.utwente.nl>
fix https://github.com/ruby/ruby/pull/1491
------------------------------------------------------------------------
r57047 | naruse | 2016-12-11 03:23:33 +0900 (Sun, 11 Dec 2016) | 7 lines

Add missing :nodoc: comment

We were missing a `:nodoc:` magic comment that was making automated tools show
that this method was missing documentation, when it really didn't need to be
documented.
by Devon Estes <devon.c.estes@gmail.com>
https://github.com/ruby/ruby/pull/1482 fix GH-1482
------------------------------------------------------------------------
r57046 | svn | 2016-12-11 02:47:06 +0900 (Sun, 11 Dec 2016) | 1 line

* 2016-12-11
------------------------------------------------------------------------
r57045 | naruse | 2016-12-11 02:47:04 +0900 (Sun, 11 Dec 2016) | 8 lines

Merge Onigmo 6.0.0

* https://github.com/k-takata/Onigmo/blob/Onigmo-6.0.0/HISTORY
* fix for ruby 2.4: https://github.com/k-takata/Onigmo/pull/78
* suppress warning: https://github.com/k-takata/Onigmo/pull/79
* include/ruby/oniguruma.h: include onigmo.h.
* template/encdb.h.tmpl: ignore duplicated definition of EUC-CN in
  enc/euc_kr.c. It is defined in enc/gb2313.c with CRuby macro.
------------------------------------------------------------------------
r57044 | mrkn | 2016-12-10 17:56:05 +0900 (Sat, 10 Dec 2016) | 5 lines

bigdecimal: version 1.3.0.pre.2

Import bigdecimal version 1.3.0.pre.2.  The full commit log is here:

  https://github.com/ruby/bigdecimal/compare/v1.3.0.pre...v1.3.0.pre.2
------------------------------------------------------------------------
r57043 | nobu | 2016-12-10 17:54:40 +0900 (Sat, 10 Dec 2016) | 4 lines

stringio.c: chomp CR

* ext/stringio/stringio.c (strio_getline): chomp CR not only LF,
  as well as String#chomp.
------------------------------------------------------------------------
r57042 | nobu | 2016-12-10 17:26:40 +0900 (Sat, 10 Dec 2016) | 5 lines

zlib.c: replace with substring

* ext/zlib/zlib.c (zstream_discard_input): replace with unread
  portion substring, not modifying the input buffer directly.
  [ruby-core:78567] [Bug #13021]
------------------------------------------------------------------------
r57041 | rhe | 2016-12-10 17:12:02 +0900 (Sat, 10 Dec 2016) | 9 lines

openssl: import v2.0.1

Import Ruby/OpenSSL 2.0.1. The full commit history since 2.0.0 (imported
at r56946) can be found at:

  https://github.com/ruby/openssl/compare/v2.0.0...v2.0.1

This release contains only bug fixes. Note, the first two commits since
v2.0.0 are already imported at r56953 to make Travis and RubyCI green.
------------------------------------------------------------------------
r57040 | mrkn | 2016-12-10 16:49:15 +0900 (Sat, 10 Dec 2016) | 6 lines

bigdecimal: import version 1.3.0.pre

Import bigdecimal version 1.3.0.pre.  The full commit log of this
changes can be found at:

    https://github.com/ruby/bigdecimal/compare/5c43a9e...v1.3.0.pre
------------------------------------------------------------------------
r57039 | nobu | 2016-12-10 15:25:26 +0900 (Sat, 10 Dec 2016) | 1 line

Fix grammer [ci skip]
------------------------------------------------------------------------
r57038 | mrkn | 2016-12-10 11:36:16 +0900 (Sat, 10 Dec 2016) | 10 lines

internal.h: change the default rounding mode to half-up

* internal.h (ROUND_DEFAULT): changed to RUBY_NUM_ROUND_HALF_UP.
  [Bug #12958] [ruby-core:78204]

* test/ruby/test_integer.rb: fix assertions for the above change.

* test/ruby/test_rational.rb: ditto.

* test/test_mathn.rb: ditto.
------------------------------------------------------------------------
r57037 | kazu | 2016-12-10 11:16:55 +0900 (Sat, 10 Dec 2016) | 5 lines

Fix document of gunzip and gzip [ci skip]

- fix a typo (`GzipReadr` -> `GzipReader`)
- `Zlib::GzipReader.new` does not take block
- fix encoding
------------------------------------------------------------------------
r57036 | svn | 2016-12-10 07:45:39 +0900 (Sat, 10 Dec 2016) | 1 line

* 2016-12-10
------------------------------------------------------------------------
r57035 | naruse | 2016-12-10 07:45:39 +0900 (Sat, 10 Dec 2016) | 3 lines

Zlib.gzip and Zlib.gunzip [Feature #13020]

Encode and Decode gzip data without creating files.
------------------------------------------------------------------------
r57034 | naruse | 2016-12-10 07:45:38 +0900 (Sat, 10 Dec 2016) | 4 lines

Suppress warning: this use of "defined" may not be portable

Use of defined() in macro expansion is considered non portable.
https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01577.html
------------------------------------------------------------------------
r57033 | nobu | 2016-12-09 12:25:20 +0900 (Fri, 09 Dec 2016) | 4 lines

ruby.h: add prefix

* include/ruby/ruby.h (RB_TEST, RB_NIL_P): prefix RB to get rid of
  name conflicts with other headers.
------------------------------------------------------------------------
r57032 | nobu | 2016-12-09 11:59:55 +0900 (Fri, 09 Dec 2016) | 1 line

Adjust indent [ci skip]
------------------------------------------------------------------------
r57031 | svn | 2016-12-09 11:57:58 +0900 (Fri, 09 Dec 2016) | 1 line

* 2016-12-09
------------------------------------------------------------------------
r57030 | nobu | 2016-12-09 11:57:57 +0900 (Fri, 09 Dec 2016) | 6 lines

remove core#hash_merge_ary

* compile.c (compile_array_): remove m_core_hash_merge_ary which
  seems unreachable, and wrong number of arguments.

* vm.c (m_core_hash_merge_ary): removed because it is never used.
------------------------------------------------------------------------
r57029 | nobu | 2016-12-08 22:51:34 +0900 (Thu, 08 Dec 2016) | 4 lines

compile.c: static_literal_value

* compile.c (static_literal_value): separate getter from predicate
  function.
------------------------------------------------------------------------
r57028 | kazu | 2016-12-08 21:58:26 +0900 (Thu, 08 Dec 2016) | 10 lines

extension.rdoc: add ANYARGS to method definitions

* doc/extension.rdoc (rb_define_method, rb_define_singleton_method,
  rb_define_private_method, rb_define_protected_method,
  rb_define_module_function, rb_define_global_function): set ANYARGS
  as arguments to their underlying functions.

[ci skip]
Patch by: Dmitry Gritsay <unseductable@gmail.com>
[Fix GH-1473]
------------------------------------------------------------------------
r57027 | nobu | 2016-12-08 17:31:01 +0900 (Thu, 08 Dec 2016) | 5 lines

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]
------------------------------------------------------------------------
r57026 | nobu | 2016-12-08 17:25:21 +0900 (Thu, 08 Dec 2016) | 4 lines

test/unit.rb: fix -n option

* test/lib/test/unit.rb (non_options): turn name patterns into
  Regexps.
------------------------------------------------------------------------
r57025 | nobu | 2016-12-08 16:54:58 +0900 (Thu, 08 Dec 2016) | 5 lines

compile.c: optimize literal nodes

* compile.c (static_literal_node_p): optimize literal nodes for
  true, false, and nil, which are static literals in specific
  nodes but not in NODE_LIT.
------------------------------------------------------------------------
r57024 | nobu | 2016-12-08 15:19:06 +0900 (Thu, 08 Dec 2016) | 4 lines

vm.c: check type of hash to merge

* vm.c (core_hash_merge): check the type of the target hash to
  merge.  [ruby-core:78536] [Bug #13015]
------------------------------------------------------------------------
r57023 | nobu | 2016-12-08 14:16:33 +0900 (Thu, 08 Dec 2016) | 4 lines

vm_insnhelper.c: zsuper in refinements

* vm_insnhelper.c (vm_call_zsuper): prevent infinite recursion
  zsuper in refinements.  [ruby-core:77161] [Bug #12729]
------------------------------------------------------------------------
r57022 | nobu | 2016-12-08 09:45:13 +0900 (Thu, 08 Dec 2016) | 4 lines

parse.y: ripper generic input

* parse.y (ripper_initialize): allow generic input as source, if
  it has #gets method.
------------------------------------------------------------------------
r57021 | shugo | 2016-12-08 08:47:59 +0900 (Thu, 08 Dec 2016) | 12 lines

Add volatile to a suppress warning.

Without the fix, the following warning is shown:

    compiling cont.c
    cont.c: In function ?\226?\128?\152rb_callcc?\226?\128?\153:
    cont.c:949:39: warning: passing argument 1 of ?\226?\128?\152cont_capture?\226?\128?\153 discards ?\226?\128?\152volatile?\226?\128?\153 qualifier from pointer target type [-Wdiscarded-qualifiers]
	 volatile VALUE val = cont_capture(&called);
					   ^
    cont.c:473:1: note: expected ?\226?\128?\152int * volatile?\226?\128?\153 but argument is of type ?\226?\128?\152volatile int *?\226?\128?\153
     cont_capture(int *volatile stat)
     ^
------------------------------------------------------------------------
r57020 | shugo | 2016-12-08 08:27:51 +0900 (Thu, 08 Dec 2016) | 5 lines

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]
------------------------------------------------------------------------
r57019 | svn | 2016-12-08 00:30:02 +0900 (Thu, 08 Dec 2016) | 1 line

* 2016-12-08
------------------------------------------------------------------------
r57018 | kazu | 2016-12-08 00:30:01 +0900 (Thu, 08 Dec 2016) | 9 lines

fix typo in `IO#write_nonblock` example [ci skip]

This example explains when writing a value greater than 65536,
so the value specify must be greater than 65536.

This seems to be wrong in cee7f69

Patch by: Yuji Yaginuma <yuuji.yaginuma@gmail.com>
[Fix GH-1496]
------------------------------------------------------------------------
r57017 | nobu | 2016-12-07 23:39:24 +0900 (Wed, 07 Dec 2016) | 4 lines

ruby.c: dump option

* ruby.c (process_options): dump specified informations all, not
  only first one.
------------------------------------------------------------------------
r57016 | nobu | 2016-12-07 23:26:44 +0900 (Wed, 07 Dec 2016) | 4 lines

assertions.rb: defered message in FailDesc

* test/lib/test/unit/assertions.rb (FailDesc): allow to defer
  message generation, as well as other assertion methods.
------------------------------------------------------------------------
r57015 | svn | 2016-12-07 21:59:49 +0900 (Wed, 07 Dec 2016) | 1 line

* properties.
------------------------------------------------------------------------
r57014 | shugo | 2016-12-07 21:59:48 +0900 (Wed, 07 Dec 2016) | 5 lines

Delay Utils.getservername until needed.

There is no need to call Utils.getservername when the :ServerName option is
specified, so delay Utils.getservername until needed to avoid unnecessary
DNS lookups.  [ruby-core:78492] [Bug #13007]
------------------------------------------------------------------------
r57013 | nobu | 2016-12-07 17:44:34 +0900 (Wed, 07 Dec 2016) | 6 lines

compile.c: remove dead code

* compile.c (DECL_ANCHOR, INIT_ANCHOR): make anchor name an array
  and unassignable.

* compile.c (iseq_compile_each): ret is never 0.
------------------------------------------------------------------------
r57012 | nobu | 2016-12-07 13:25:50 +0900 (Wed, 07 Dec 2016) | 4 lines

hash.c: hash should be long

* hash.c (any_hash): should return `long', because ruby assumes
  the hash value of the object id of an object is `long'.
------------------------------------------------------------------------
r57011 | nobu | 2016-12-07 12:19:33 +0900 (Wed, 07 Dec 2016) | 4 lines

win32.c: suppress warning

* win32/win32.c (rb_w32_home_dir): suppress sequence-point
  warning, REALLOC_N re-assigns the variable.
------------------------------------------------------------------------
r57010 | shugo | 2016-12-07 11:41:00 +0900 (Wed, 07 Dec 2016) | 3 lines

Extend timeout for Solaris unstable10s.

http://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20161206T181910Z.fail.html.gz
------------------------------------------------------------------------
r57009 | nobu | 2016-12-07 11:19:29 +0900 (Wed, 07 Dec 2016) | 4 lines

file.c: cygwin behavior

* file.c: recent cygwin hides NTFS specific features.
  [ruby-core:78497] [Bug #13008]
------------------------------------------------------------------------
r57008 | svn | 2016-12-07 11:03:41 +0900 (Wed, 07 Dec 2016) | 1 line

* 2016-12-07
------------------------------------------------------------------------
r57007 | usa | 2016-12-07 11:03:40 +0900 (Wed, 07 Dec 2016) | 4 lines

const pointer is not able to be free.

* win32/file.c (rb_default_home_dir): should not be marked as const.

------------------------------------------------------------------------
r57006 | kazu | 2016-12-07 00:33:49 +0900 (Wed, 07 Dec 2016) | 4 lines

untabify [ci skip]

based on the patch by W <wolf@wolfsden.cz>
[Fix GH-1497]
------------------------------------------------------------------------
r57005 | kazu | 2016-12-07 00:33:47 +0900 (Wed, 07 Dec 2016) | 1 line

Fix indent [ci skip]
------------------------------------------------------------------------
r57004 | svn | 2016-12-06 22:57:57 +0900 (Tue, 06 Dec 2016) | 1 line

* properties.
------------------------------------------------------------------------
r57003 | kou | 2016-12-06 22:57:56 +0900 (Tue, 06 Dec 2016) | 2 lines

rexml: REXML::Element#[] accepts String or Symbol as attribute name

------------------------------------------------------------------------
r57002 | nobu | 2016-12-06 22:57:23 +0900 (Tue, 06 Dec 2016) | 6 lines

Make `trace_running` an integer flag again

* vm_core.h (rb_vm_struct): trace_running should be a counter but
  not a bit flag.  [ruby-core:78514] [Bug #13011]

Author: David Rodr?\195?\173guez <deivid.rodriguez@gmail.com>
------------------------------------------------------------------------
r57001 | mrkn | 2016-12-06 22:40:31 +0900 (Tue, 06 Dec 2016) | 9 lines

array.c, enum.c: change sum algorithm

* array.c (rb_ary_sum): change the algorithm to Kahan-Babuska balancing
  summation to be more precise.
  [Feature #12871] [ruby-core:77771]

* enum.c (sum_iter, enum_sum): ditto.

* test_array.rb, test_enum.rb: add an assertion for the above change.
------------------------------------------------------------------------
r57000 | mrkn | 2016-12-06 21:54:19 +0900 (Tue, 06 Dec 2016) | 6 lines

numeric.c: fix exception message for nil rounding

* numeric.c (rb_num_get_rounding_option): fix exception message
  for the case of nil rounding mode.

* test_float.rb: add an assertion for the above change.
------------------------------------------------------------------------
r56999 | kazu | 2016-12-06 21:49:46 +0900 (Tue, 06 Dec 2016) | 4 lines

Fix typos

Patch by: Koichi ITO <koic.ito@gmail.com>
[Fix GH-1498]
------------------------------------------------------------------------
r56998 | hsbt | 2016-12-06 20:57:19 +0900 (Tue, 06 Dec 2016) | 4 lines

Update latest bundled gems.

  * Rake 12.0.0
  * minitest 5.10.1
------------------------------------------------------------------------
r56997 | nobu | 2016-12-06 16:46:14 +0900 (Tue, 06 Dec 2016) | 4 lines

EPERM by symlink

* test/ruby/test_file.rb (test_realpath_encoding): EPERM can raise
  on cygwin.
------------------------------------------------------------------------
r56996 | nobu | 2016-12-06 16:21:55 +0900 (Tue, 06 Dec 2016) | 4 lines

file.c: isADS

* file.c (isADS): add macro to tell if Alternate Data Stream
  separator, to distinguish from drive letter.
------------------------------------------------------------------------
r56995 | nobu | 2016-12-06 15:16:57 +0900 (Tue, 06 Dec 2016) | 4 lines

EPERM by symlink

* test/ruby/test_file_exhaustive.rb (symlinkfile): EPERM can raise
  on cygwin.
------------------------------------------------------------------------
r56994 | rhe | 2016-12-06 15:14:17 +0900 (Tue, 06 Dec 2016) | 5 lines

re.c: check that MatchData is initialized

Follow r16757 ("* re.c: fix SEGV by Regexp.allocate.names,
Match.allocate.names, etc.", 2008-06-02). Don't do null dereference if
MatchData#hash or #== is called against an uninitialized instance.
------------------------------------------------------------------------
r56993 | rhe | 2016-12-06 15:14:16 +0900 (Tue, 06 Dec 2016) | 4 lines

test/ruby/test_hash.rb: suppress syntax warning

Avoid "ambiguous first argument; put parentheses or a space even after
`-' operator" warning in assert_in_out_err. Fixes r56992.
------------------------------------------------------------------------
r56992 | nobu | 2016-12-06 13:43:48 +0900 (Tue, 06 Dec 2016) | 23 lines

switching hash removal

* st.h (struct st_hash_type): Remove strong_hash.
  (struct st_table): Remove inside_rebuild_p and curr_hash.
* st.c (do_hash): Use type->hash instead of curr_hash.
  (make_tab_empty): Remove setting up curr_hash.
  (st_init_table_with_size): Remove setting up inside_rebuild_p.
  (rebuild_table): Remove clearing inside_rebuild_p.
  (reset_entry_hashes, HIT_THRESHOULD_FOR_STRONG_HASH): Remove code
  recognizing a denial attack and switching to strong hash.
* hash.c (rb_dbl_long_hash, rb_objid_hash, rb_ident_hash): Use
  rb_hash_start to randomize the hash.
  (str_seed): Remove.
  (any_hash): Remove strong_p and use always rb_str_hash for
  strings.
  (any_hash_weak, rb_any_hash_weak): Remove.
  (st_hash_type objhash): Remove rb_any_hash_weak.

based on the patch by Vladimir N Makarov <vmakarov@redhat.com> at
[ruby-core:78490].  [Bug #13002]

* test/ruby/test_hash.rb (test_wrapper): objects other than special
  constants should be able to be wrapped.
------------------------------------------------------------------------
r56991 | nobu | 2016-12-06 12:36:52 +0900 (Tue, 06 Dec 2016) | 5 lines

remove unnecessary variable

* st.c (do_hash): remove unnecessary variable and cast.

* hash.c, numeric.c, st.c: adjust style and indent.
------------------------------------------------------------------------
r56990 | nobu | 2016-12-06 12:25:21 +0900 (Tue, 06 Dec 2016) | 4 lines

random.c: pack hash seeds

* random.c (seed_keys_t, init_seed): pack seed for rb_hash_start and
  rb_memhash, and fill them at once.
------------------------------------------------------------------------
r56989 | svn | 2016-12-06 08:37:25 +0900 (Tue, 06 Dec 2016) | 1 line

* 2016-12-06
------------------------------------------------------------------------
r56988 | shugo | 2016-12-06 08:37:25 +0900 (Tue, 06 Dec 2016) | 1 line

Add a comment.
------------------------------------------------------------------------
r56987 | kazu | 2016-12-05 21:35:03 +0900 (Mon, 05 Dec 2016) | 1 line

Remove closed checks and use `&.`
------------------------------------------------------------------------
r56986 | kazu | 2016-12-05 21:35:02 +0900 (Mon, 05 Dec 2016) | 1 line

NEWS: mention chomp option of String and StringIO
------------------------------------------------------------------------
r56985 | shugo | 2016-12-05 20:10:05 +0900 (Mon, 05 Dec 2016) | 5 lines

Don't insert an entry to loading_tbl if another thread succeed to load.

If rb_thread_shield_wait() returns Qfalse, the file has been successfully
loaded by another thread, so there is no need to insert a new entry into
loading_tbl.  [ruby-core:78464] [Bug #12999]
------------------------------------------------------------------------
r56984 | nobu | 2016-12-05 09:03:45 +0900 (Mon, 05 Dec 2016) | 4 lines

random.c: private rand

* random.c (rb_random_ulong_limited): do not call private method
  rand.  [ruby-dev:49892] [Misc #13003]
------------------------------------------------------------------------
r56983 | svn | 2016-12-05 08:14:47 +0900 (Mon, 05 Dec 2016) | 1 line

* 2016-12-05
------------------------------------------------------------------------
r56982 | naruse | 2016-12-05 08:14:46 +0900 (Mon, 05 Dec 2016) | 4 lines

Increase timeout of TestRequire#test_require_with_loaded_features_pop

unstable10s fails it because of timeout
http://rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20161201T161908Z.fail.html.gz
------------------------------------------------------------------------
r56981 | nobu | 2016-12-04 17:50:29 +0900 (Sun, 04 Dec 2016) | 5 lines

class.c: missing unknown_keyword_error

* class.c (rb_get_kwargs): when values are stored, corresponding
  keys have been remove from the keyword hash, and the hash should
  be empty in that case.  [ruby-dev:49893] [Bug #13004]
------------------------------------------------------------------------
r56980 | nobu | 2016-12-04 17:50:28 +0900 (Sun, 04 Dec 2016) | 5 lines

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]
------------------------------------------------------------------------
r56979 | ktsj | 2016-12-04 14:40:18 +0900 (Sun, 04 Dec 2016) | 4 lines

Revert changes on rb_frame_method_id_and_class()

r56593 introduced backwards incompatible changes in the API.
[ruby-core:78471] [Feature #12747]
------------------------------------------------------------------------
r56978 | shugo | 2016-12-04 14:05:54 +0900 (Sun, 04 Dec 2016) | 1 line

Specify the socktype explicitly.
------------------------------------------------------------------------
r56977 | shugo | 2016-12-04 13:53:33 +0900 (Sun, 04 Dec 2016) | 1 line

Use 127.0.0.1 if getaddrinfo fails.
------------------------------------------------------------------------
r56976 | duerst | 2016-12-04 10:58:54 +0900 (Sun, 04 Dec 2016) | 10 lines

remove special processing for U+03B9/U+03BC/U+A64B

* enc/unicode.c: Remove special processing for U+03B9/U+03BC/U+A64B
  (GREEK SMALL LETTERs IOTA/MU, CYRILLIC SMALL LETTER MONOGRAPH UK)
  from onigenc_unicode_case_map and simplify code.

* enc/unicode/case-folding.rb: Remove check for U+03B9/U+03BC/U+A64B.

This and the previous few related commits make sure that we won't hit
the equivalent of bug #12990 anymore for future updates of Unicode versions.
------------------------------------------------------------------------
r56975 | duerst | 2016-12-04 10:17:34 +0900 (Sun, 04 Dec 2016) | 6 lines

Reorder codepoints in some entries of CaseUnfold_11_Table

* enc/unicode/case-folding.rb: Reorder codepoints so that the upper-case
  mapping comes first.
* enc/unicode/9.0.0/casefold.h: Codepoints reordered, upper-case mapping
  flag added.
------------------------------------------------------------------------
r56974 | svn | 2016-12-04 00:41:15 +0900 (Sun, 04 Dec 2016) | 1 line

* 2016-12-04
------------------------------------------------------------------------
r56973 | shugo | 2016-12-04 00:41:14 +0900 (Sun, 04 Dec 2016) | 3 lines

Use IPv6 if it's preferred.

I hope this fix makes tests faster on Windows.
------------------------------------------------------------------------
r56972 | nobu | 2016-12-03 23:18:03 +0900 (Sat, 03 Dec 2016) | 3 lines

string.c: chomp option

* string.c (rb_str_enumerate_lines): implement chomp option.
------------------------------------------------------------------------
r56971 | kazu | 2016-12-03 20:18:44 +0900 (Sat, 03 Dec 2016) | 8 lines

Cleanup ruby method definitions in hash.c

Always add a space between a comma and the next element. These spaces
were there sometimes, but not always. This keeps to code consistent.

Patch by: Herwin Weststrate <herwin@snt.utwente.nl>

[ruby-core:78297] [Misc #12977] [GH-1492]
------------------------------------------------------------------------
r56970 | nobu | 2016-12-03 20:01:25 +0900 (Sat, 03 Dec 2016) | 3 lines

stringio: chomp option

* ext/stringio/stringio.c (strio_getline): implement chomp option.
------------------------------------------------------------------------
r56969 | nobu | 2016-12-03 20:01:24 +0900 (Sat, 03 Dec 2016) | 4 lines

test_stringio.rb: paragraph mode

* test/stringio/test_stringio.rb (test_gets, test_each):
  assertions for paragraph mode.
------------------------------------------------------------------------
r56968 | duerst | 2016-12-03 16:18:41 +0900 (Sat, 03 Dec 2016) | 5 lines

add tests againts regressions for upcoming codepoint reordering in unfolding table

* test/ruby/enc/test_case_mapping.rb: Add method test_reorder_unfold to test against
  problems when reordering codepoints in some entries in
  CaseUnfold_11_Type CaseUnfold_11_Table.
------------------------------------------------------------------------
r56967 | svn | 2016-12-03 14:09:10 +0900 (Sat, 03 Dec 2016) | 1 line

* 2016-12-03
------------------------------------------------------------------------
r56966 | duerst | 2016-12-03 14:09:09 +0900 (Sat, 03 Dec 2016) | 5 lines

change test class name because it is not only about folding

* test/ruby/enc/test_case_comprehensive.rb: Change test class name from
  TestComprehensiveCaseFold to TestComprehensiveCaseMapping because the
  tests are about mapping in general, not only folding
------------------------------------------------------------------------
r56965 | nobu | 2016-12-02 15:12:56 +0900 (Fri, 02 Dec 2016) | 1 line

test/ruby/test_string.rb: ensure restoring $/
------------------------------------------------------------------------
r56964 | nobu | 2016-12-02 12:33:54 +0900 (Fri, 02 Dec 2016) | 4 lines

parse.y: simplify parsing utf-8 string

* parse.y (parser_tokadd_codepoint): move error checks and add
  char.
------------------------------------------------------------------------
r56963 | nobu | 2016-12-02 11:47:11 +0900 (Fri, 02 Dec 2016) | 4 lines

parse.y: relax spaces

* parse.y (parser_tokadd_utf8): relax restriction spaces inside
  "\u{...}".
------------------------------------------------------------------------
r56962 | rhe | 2016-12-02 11:24:45 +0900 (Fri, 02 Dec 2016) | 5 lines

re.c: count associated Regexp object in MatchData#hash

Don't discard the hash value computed for the regexp object. It seems it
was simply missed out in r24754, when MatchData#hash was initially
implemented.
------------------------------------------------------------------------
r56961 | svn | 2016-12-02 02:43:42 +0900 (Fri, 02 Dec 2016) | 1 line

* 2016-12-02
------------------------------------------------------------------------
r56960 | naruse | 2016-12-02 02:43:41 +0900 (Fri, 02 Dec 2016) | 1 line

Remove unused variable
------------------------------------------------------------------------
r56959 | naruse | 2016-12-01 23:18:32 +0900 (Thu, 01 Dec 2016) | 3 lines

String#unpack1 [Feature #12752]

Returns the first value of String#unpack.
------------------------------------------------------------------------
r56958 | usa | 2016-12-01 22:20:47 +0900 (Thu, 01 Dec 2016) | 4 lines

Remove `offset:` from `Array#pack`

* pack.c (pack_pack): can use `@` instead of `offset:`.

------------------------------------------------------------------------
r56957 | usa | 2016-12-01 22:08:20 +0900 (Thu, 01 Dec 2016) | 5 lines

Supports `buffer` and `offset` in `Array#pack`

* pack.c (pack_pack): Supports `buffer` and `offset` in `Array#pack`.
  [Feature #12754] [ruby-dev:49798]

------------------------------------------------------------------------
r56956 | nobu | 2016-12-01 17:26:39 +0900 (Thu, 01 Dec 2016) | 4 lines

parse.y: reject invalid codepoint

* parse.y (parser_tokadd_codepoint): reject invalid codepoint,
  surrogate blocks and surrogate pair, as well as mruby.
------------------------------------------------------------------------
r56955 | hsbt | 2016-12-01 14:24:00 +0900 (Thu, 01 Dec 2016) | 4 lines

Update bundled_gems

  * minitest-5.10.0
  * test-unit-3.2.3
------------------------------------------------------------------------
r56954 | shugo | 2016-12-01 13:51:42 +0900 (Thu, 01 Dec 2016) | 10 lines

Wait until excpetion handling is ready.

Because RubyCI on Solaris 10 failed as follows:

    1) Failure:
  TestProcess#test_execopts_redirect_open_fifo_interrupt_raise [/export/home/rubyci/unstable10s/tmp/build/20161130T201909Z/ruby/test/ruby/test_process.rb:646]:
  <"ok\n"> expected but was
  <"">.

The argument of sleep (0.5) can be smaller, but I'm not sure.
------------------------------------------------------------------------
r56953 | rhe | 2016-12-01 13:42:10 +0900 (Thu, 01 Dec 2016) | 27 lines

openssl: import fixes from upstream

Import the following two commits from upstream:

  commit 72126d6c8b88abd69c3565fc3bbbd5ed1e401611
  Author: Kazuki Yamaguchi <k@rhe.jp>
  Date:   Thu Dec 1 22:27:03 2016 +0900

      pkey: check existence of EVP_PKEY_get0()

      EVP_PKEY_get0() did not exist in early OpenSSL 0.9.8 series. So define
      ourselves if needed.

  commit 94a1c4e0c5705ad1e9a4ca08cacaa6cba8b1e6f5
  Author: Kazuki Yamaguchi <k@rhe.jp>
  Date:   Thu Dec 1 22:13:22 2016 +0900

      test/test_cipher: fix test with OpenSSL 1.0.1 before 1.0.1d

      Set the authentication tag before the AAD when decrypting.

      Before OpenSSL commit 96f7fafa2431 ("Don't require tag before ciphertext
      in AESGCM mode", 2012-10-16, at OpenSSL_1_0_1-stable branch, included in
      OpenSSL 1.0.1d), the authentication tag must be set before any calls of
      EVP_CipherUpdate().

They should fix build on CentOS 5 and Ubuntu 12.04 respectively.
------------------------------------------------------------------------
r56952 | nobu | 2016-12-01 09:34:42 +0900 (Thu, 01 Dec 2016) | 1 line

Use offsetof macro and shrink table size
------------------------------------------------------------------------
r56951 | nobu | 2016-12-01 09:34:41 +0900 (Thu, 01 Dec 2016) | 1 line

constify CaseMappingSpecials
------------------------------------------------------------------------
r56950 | svn | 2016-12-01 02:29:20 +0900 (Thu, 01 Dec 2016) | 1 line

* 2016-12-01
------------------------------------------------------------------------
r56949 | naruse | 2016-12-01 02:29:19 +0900 (Thu, 01 Dec 2016) | 22 lines

Regexp supports Unicoe 9.0.0's \X

* meta character \X matches Unicode 9.0.0 characters with some workarounds
  for UTR #51 Unicode Emoji, Version 4.0 emoji zwj sequences.
  [Feature #12831] [ruby-core:77586]

The term "character" can have many meanings bytes, codepoints, combined
characters, and so on. "grapheme cluster" is highest one of such words,
which means user-perceived characters.
Unicode Standard Annex #29 UNICODE TEXT SEGMENTATION specifies how to
handle grapheme clusters (extended grapheme cluster).
But some specs aren't updated to current situation because Unicode Emoji
is rapidly extended without well definition.
It breaks the precondition of UTR#29 "Grapheme cluster boundaries can be
easily tested by looking at immediately adjacent characters". (the
sentence will be removed in the next version)
Though some of its detail are described in Unicode Technical Report #51
UNICODE EMOJI but it is not merged into UTR#29 yet.

http://unicode.org/reports/tr29/
http://unicode.org/reports/tr51/
http://unicode.org/Public/emoji/4.0/
------------------------------------------------------------------------
r56948 | nobu | 2016-11-30 23:54:09 +0900 (Wed, 30 Nov 2016) | 4 lines

ossl.c: cast

* ext/openssl/ossl.c (ossl_pem_passwd_cb): cast to int.  it's safe
  because len does not exceed int max_len.
------------------------------------------------------------------------
r56947 | nobu | 2016-11-30 23:43:43 +0900 (Wed, 30 Nov 2016) | 4 lines

parse.y: refine error message

* parse.y (parser_tokadd_utf8): refine error message at bad char
  in unicode escape, "invalid" instead of "unterminated".
------------------------------------------------------------------------
r56946 | rhe | 2016-11-30 23:41:46 +0900 (Wed, 30 Nov 2016) | 6 lines

openssl: import v2.0.0

Import Ruby/OpenSSL 2.0.0. The full commit history since 2.0.0 beta.2
(imported at r56098) can be found at:

  https://github.com/ruby/openssl/compare/v2.0.0.beta.2...v2.0.0
------------------------------------------------------------------------
r56945 | hsbt | 2016-11-30 23:24:12 +0900 (Wed, 30 Nov 2016) | 3 lines

Fixed error with `make install`

  rbinstall.rb couldn't load "psych/versions".
------------------------------------------------------------------------
r56944 | hsbt | 2016-11-30 22:55:02 +0900 (Wed, 30 Nov 2016) | 6 lines

Update psych-2.2.1

  It fixed segmentation fault related with GC.
  https://github.com/ruby/psych/pull/296

  and removed deprecated code of Ruby 1.8.
------------------------------------------------------------------------
r56943 | nobu | 2016-11-30 22:09:51 +0900 (Wed, 30 Nov 2016) | 4 lines

parse.y: parser_tokadd_codepoint

* parse.y (parser_tokadd_codepoint): extract from
  parser_tokadd_utf8.
------------------------------------------------------------------------
r56942 | nobu | 2016-11-30 22:09:50 +0900 (Wed, 30 Nov 2016) | 3 lines

parse.y: brace constants

* parse.y (parser_tokadd_utf8): make open/close braces constant.
------------------------------------------------------------------------
r56941 | duerst | 2016-11-30 17:25:46 +0900 (Wed, 30 Nov 2016) | 14 lines

fix uppercasing for U+A64B, CYRILLIC SMALL LETTER MONOGRAPH UK

* enc/unicode.c: Add U+A64B to the special cases 03B9 and 03BC
  at the end of onigenc_unicode_case_map (Bug #12990).

* enc/unicode/case-folding.rb: Add U+A64B to the special cases
  03B9 and 03BC. Add a comment pointing to enc/unicode.c.
  Change warnings to exceptions for unpredicted cases,
  because this would have been more easily noticed
  (the warning was not noticed when upgrading to Unicode 9.0.0).

* test/ruby/enc/test_case_comprehensive.rb: Remove temporary
  exclusion of U+A64B from testing.

------------------------------------------------------------------------
r56940 | nobu | 2016-11-30 10:40:11 +0900 (Wed, 30 Nov 2016) | 4 lines

parse.y: no warning for lambda

* parse.y (parser_yylex): do not warn parentheses of lambda
  argument list, because there is no name.
------------------------------------------------------------------------
r56939 | shugo | 2016-11-30 10:22:05 +0900 (Wed, 30 Nov 2016) | 1 line

Supress warnings.
------------------------------------------------------------------------
r56938 | tenderlove | 2016-11-30 02:06:35 +0900 (Wed, 30 Nov 2016) | 28 lines

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]
------------------------------------------------------------------------
r56937 | nobu | 2016-11-30 01:06:54 +0900 (Wed, 30 Nov 2016) | 1 line

get rid of ambiguous parentheses warnings
------------------------------------------------------------------------
r56936 | rhe | 2016-11-30 00:48:47 +0900 (Wed, 30 Nov 2016) | 4 lines

webrick: don't use OpenSSL::TestUtils from webrick tests

Follow net/http and open-uri. Don't rely on the constants/methods from
OpenSSL::TestUtils.
------------------------------------------------------------------------
r56935 | rhe | 2016-11-30 00:48:46 +0900 (Wed, 30 Nov 2016) | 3 lines

open-uri: don't use OpenSSL::TestUtils from open-uri tests

Follow net/http. Define own test DH parameters and use.
------------------------------------------------------------------------
r56934 | rhe | 2016-11-30 00:48:45 +0900 (Wed, 30 Nov 2016) | 5 lines

net/http: don't use OpenSSL::TestUtils from test code

Make test code independent of test/openssl/utils.rb. The development of
openssl library has moved to a separate repository and
OpenSSL::TestUtils may be modified at any time.
------------------------------------------------------------------------
r56933 | nobu | 2016-11-30 00:34:31 +0900 (Wed, 30 Nov 2016) | 4 lines

object.c: no TypeError at special const

* object.c (special_object_p): no longer raise a TypeError for
  Integer and Float, and return itself instead.  [Feature#12979]
------------------------------------------------------------------------
r56932 | kazu | 2016-11-30 00:31:16 +0900 (Wed, 30 Nov 2016) | 3 lines

NEWS: Add String/Symbol#casecmp? [Feature #12786]

[ci skip]
------------------------------------------------------------------------
r56931 | usa | 2016-11-30 00:23:12 +0900 (Wed, 30 Nov 2016) | 4 lines

get rid of test failures on CI introduced at r56927

* lib/matrix.rb: now ruby warns ambiguous parentheses after a space in method definitions.

------------------------------------------------------------------------
r56930 | svn | 2016-11-30 00:14:06 +0900 (Wed, 30 Nov 2016) | 1 line

* 2016-11-30
------------------------------------------------------------------------
r56929 | nobu | 2016-11-30 00:14:05 +0900 (Wed, 30 Nov 2016) | 5 lines

object.c: no TypeError at special const clone

* object.c (rb_obj_clone2): no longer raise a TypeError for
  special constants, and return itself instead.  however, if
  freeze option is false, raise an ArgumentError.  [Feature#12979]
------------------------------------------------------------------------
r56928 | nobu | 2016-11-29 21:54:43 +0900 (Tue, 29 Nov 2016) | 8 lines

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.
------------------------------------------------------------------------
r56927 | nobu | 2016-11-29 19:47:43 +0900 (Tue, 29 Nov 2016) | 4 lines

parse.y: ambiguous parentheses

* parse.y (parser_yylex): warn ambiguous parentheses after a space
  in method definitions.
------------------------------------------------------------------------
r56926 | duerst | 2016-11-29 19:45:54 +0900 (Tue, 29 Nov 2016) | 6 lines

Fix/improve documentation of String/Symbol#casecmp[?]

Fix documentation of String#casecmp? (examples didn't have the '?').
Add an example with non-ASCII characters. Clarify that casecmp,
unlike casecmp?, only does case-insensitivity on A-Z/a-z.
[ci skip]
------------------------------------------------------------------------
r56925 | shugo | 2016-11-29 17:44:21 +0900 (Tue, 29 Nov 2016) | 1 line

Suppress warnings.
------------------------------------------------------------------------
r56924 | duerst | 2016-11-29 17:39:57 +0900 (Tue, 29 Nov 2016) | 5 lines

Fix erroneous test of target against target

* test/ruby/enc/test_case_comprehensive.rb: fix test condition,
  add a temporary check for U+A64B, the only character where the tests
  currently fail. (Bug #12990)
------------------------------------------------------------------------
r56923 | shugo | 2016-11-29 17:31:39 +0900 (Tue, 29 Nov 2016) | 4 lines

Ignore SystemCallError in case it is raised by SSLSocket#accept.

Errno::ECONNRESET was raised by test_tls_post_connection_check and
test_tls_unknown_ca on mswin64 CI.
------------------------------------------------------------------------
r56922 | nobu | 2016-11-29 12:06:03 +0900 (Tue, 29 Nov 2016) | 4 lines

test_keyword.rb: more assertions

* test/ruby/test_keyword.rb (test_block_required_keyword): more
  assertions for positional and require keyword parameters.
------------------------------------------------------------------------
r56921 | nobu | 2016-11-29 12:06:02 +0900 (Tue, 29 Nov 2016) | 4 lines

test_keyword.rb: assert_raise_with_message value

* test/ruby/test_keyword.rb (test_block_required_keyword):
  assert_raise_with_message returns the raised exception object.
------------------------------------------------------------------------
r56920 | nobu | 2016-11-29 12:06:01 +0900 (Tue, 29 Nov 2016) | 4 lines

string.c: use xmalloc

* string.c (rb_str_casemap): use xmalloc simply instead of
  ALLOC_N.
------------------------------------------------------------------------
r56919 | shugo | 2016-11-29 11:47:11 +0900 (Tue, 29 Nov 2016) | 7 lines

net/ftp: add a new option ssl_handshake_timeout to Net::FTP.new.

The TLS handshake timeout can be specified independently, because the TLS
handshake doesn't start just after the underlying connection is established,
but after the AUTH command is completed.  It's also useful for testing
purposes.  However, if ssl_handshake_timeout is not specified, open_timeout
is used instead for convenience.
------------------------------------------------------------------------
r56918 | shugo | 2016-11-29 11:33:34 +0900 (Tue, 29 Nov 2016) | 3 lines

net/ftp: close the socket directly when an error occurs during TLS handshake.

Otherwise, @sock.read in Net::FTP#close hungs until read_timeout exceeded.
------------------------------------------------------------------------
r56917 | svn | 2016-11-29 11:21:51 +0900 (Tue, 29 Nov 2016) | 1 line

* 2016-11-29
------------------------------------------------------------------------
r56916 | shugo | 2016-11-29 11:21:50 +0900 (Tue, 29 Nov 2016) | 3 lines

net/ftp: close the connection if the TLS handshake timeout is exceeded.

Otherwise, file descriptor leaks may occur in Net::FTP.new.
------------------------------------------------------------------------
r56915 | nobu | 2016-11-28 22:16:00 +0900 (Mon, 28 Nov 2016) | 4 lines

string.c: fix zero-length array

* string.c (mapping_buffer): get rid of zero-length array member,
  which is not a part of C90.
------------------------------------------------------------------------
r56914 | usa | 2016-11-28 19:17:03 +0900 (Mon, 28 Nov 2016) | 4 lines

hide exceptions in server thread

* test/net/ftp/test_ftp.rb (test_tls_connect_timeout): sleeping to give a chance of complete of accept is a timing issue at all.  therefore, simply ignore the exception.

------------------------------------------------------------------------
r56913 | nobu | 2016-11-28 18:37:19 +0900 (Mon, 28 Nov 2016) | 4 lines

string.c: enable rdoc

* string.c (rb_str_casecmp_p): [DOC] move forward declaration of
  rb_str_downcase to enable rdoc.
------------------------------------------------------------------------
r56912 | duerst | 2016-11-28 17:37:32 +0900 (Mon, 28 Nov 2016) | 8 lines

implement String/Symbol#casecmp? including Unicode case folding

* string.c: Implement String#casecmp? and Symbol#casecmp? by using
  String#downcase :fold for Unicode case folding. This does not include
  options such as :turkic, because these currently cannot be combined
  with the :fold option. This implements feature #12786.

* test/ruby/test_string.rb/test_symbol.rb: Tests for above.
------------------------------------------------------------------------
r56911 | nobu | 2016-11-28 12:48:34 +0900 (Mon, 28 Nov 2016) | 4 lines

insns.def: adjust index type

* insns.def (checkmatch): adjust type of the index variable, to
  get rid of (potential) overflow.
------------------------------------------------------------------------
r56910 | usa | 2016-11-28 12:14:07 +0900 (Mon, 28 Nov 2016) | 4 lines

Give a chance to complete server.accept

* test/net/ftp/test_ftp.rb (test_tls_connect_timeout): get rid of a test error on Windows.

------------------------------------------------------------------------
r56909 | svn | 2016-11-28 11:02:41 +0900 (Mon, 28 Nov 2016) | 1 line

* 2016-11-28
------------------------------------------------------------------------
r56908 | nobu | 2016-11-28 11:02:40 +0900 (Mon, 28 Nov 2016) | 4 lines

compile.c: splatarray peephole opt

* compile.c (iseq_peephole_optimize): remove splatarray following
  always-array insn.
------------------------------------------------------------------------
r56907 | nobu | 2016-11-27 20:22:42 +0900 (Sun, 27 Nov 2016) | 5 lines

signal.c: improve stack overflow check

* signal.c (check_stack_overflow): [EXPERIMENTAL] consider the
  segfault a stack overflow when the fault address is between SP
  and BP.
------------------------------------------------------------------------
r56906 | nobu | 2016-11-27 20:07:27 +0900 (Sun, 27 Nov 2016) | 4 lines

object.c: no TypeError at special const dup

* object.c (rb_obj_dup): no longer raise a TypeError for special
  constants, and return itself instead.  [Feature#12979]
------------------------------------------------------------------------
r56905 | knu | 2016-11-27 19:08:00 +0900 (Sun, 27 Nov 2016) | 5 lines

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.
------------------------------------------------------------------------
r56904 | svn | 2016-11-27 18:40:52 +0900 (Sun, 27 Nov 2016) | 1 line

* 2016-11-27
------------------------------------------------------------------------
r56903 | ktsj | 2016-11-27 18:40:51 +0900 (Sun, 27 Nov 2016) | 1 line

gems/bundled_gems: Update to power_assert 0.4.1
------------------------------------------------------------------------
r56902 | nobu | 2016-11-26 20:37:01 +0900 (Sat, 26 Nov 2016) | 4 lines

file.c: home directory from system

* file.c (rb_default_home_dir): resolve home directory from the
  system database when HOME is not set.  [Feature #12695]
------------------------------------------------------------------------
r56901 | nobu | 2016-11-26 20:37:01 +0900 (Sat, 26 Nov 2016) | 4 lines

win32.c: special folders as home dir

* win32/win32.c (rb_w32_home_dir): move from win32/file.c to try
  special folders.
------------------------------------------------------------------------
r56900 | nobu | 2016-11-26 19:57:02 +0900 (Sat, 26 Nov 2016) | 1 line

NEWS: mention [Feature #12953] [ci skip]
------------------------------------------------------------------------
r56899 | svn | 2016-11-26 18:29:12 +0900 (Sat, 26 Nov 2016) | 1 line

* 2016-11-26
------------------------------------------------------------------------
r56898 | shugo | 2016-11-26 18:29:11 +0900 (Sat, 26 Nov 2016) | 3 lines

net/ftp: support timeout for TLS handshake.

Net::FTP inherits ssl_socket_connect from Net::Protocol to implement timeout.
------------------------------------------------------------------------
r56897 | nobu | 2016-11-25 15:28:00 +0900 (Fri, 25 Nov 2016) | 4 lines

round-down

* numeric.c (round_half_down, int_round_half_down): support
  round-down mode.
------------------------------------------------------------------------
r56896 | svn | 2016-11-25 05:51:46 +0900 (Fri, 25 Nov 2016) | 1 line

* 2016-11-25
------------------------------------------------------------------------
r56895 | usa | 2016-11-25 05:51:45 +0900 (Fri, 25 Nov 2016) | 4 lines

use `rb_struct_ptr` for `RSTRUCT_PTR` macro

* include/ruby/ruby.h (RSTRUCT_PTR): at r55788, `rb_struct_const_ptr` had been hidden and `rb_struct_ptr` had been implemented for backward compatiblity.  but the definition of `RSTRUCT_PTR` was not modified to use it, probably by mistake.

------------------------------------------------------------------------
r56894 | nobu | 2016-11-24 20:07:12 +0900 (Thu, 24 Nov 2016) | 5 lines

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]
------------------------------------------------------------------------
r56893 | nobu | 2016-11-24 19:59:35 +0900 (Thu, 24 Nov 2016) | 4 lines

marshal.c: negative limit

* marshal.c (w_object): should not decrement negative limit which
  means unlimited.
------------------------------------------------------------------------
r56892 | nobu | 2016-11-24 12:01:59 +0900 (Thu, 24 Nov 2016) | 6 lines

test_fileutils.rb: fix deadlock

* test/fileutils/test_fileutils.rb (assert_output_lines): ensure
  that write pipe is closed, not the reader thread to deadlock
  when an exception raised in the given block.
  [ruby-core:78053] [Bug #12910]
------------------------------------------------------------------------
r56891 | shugo | 2016-11-24 10:03:07 +0900 (Thu, 24 Nov 2016) | 1 line

Add credit and PR/issue numbers.
------------------------------------------------------------------------
r56890 | normal | 2016-11-24 08:57:30 +0900 (Thu, 24 Nov 2016) | 7 lines

resolv: use safe navigation operator to avoid extra hash lookups

@addr2name is a private Hash and never changes its default_proc,
so only pay the hash lookup cost once; we know missing entries
in the hash will be nil.

* lib/resolv.rb (each_name): use safe navigation operator
------------------------------------------------------------------------
r56889 | normal | 2016-11-24 08:14:15 +0900 (Thu, 24 Nov 2016) | 6 lines

webrick/server: use symbol proc

Symbol proc is less code and avoids confusion from variable
naming.

* lib/webrick/server.rb (shutdown): use symbol proc
------------------------------------------------------------------------
r56886 | svn | 2016-11-24 00:10:20 +0900 (Thu, 24 Nov 2016) | 1 line

* 2016-11-24
------------------------------------------------------------------------
r56885 | shugo | 2016-11-24 00:10:19 +0900 (Thu, 24 Nov 2016) | 1 line

Add CR/LF check to Net::FTP#status.
------------------------------------------------------------------------
r56884 | nobu | 2016-11-23 20:30:02 +0900 (Wed, 23 Nov 2016) | 9 lines

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 V?\195?\173t 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.
------------------------------------------------------------------------
r56883 | normal | 2016-11-23 17:10:44 +0900 (Wed, 23 Nov 2016) | 3 lines

lib/net/ftp: fix typo

* lib/net/ftp.rb (shutdown): fix typo
------------------------------------------------------------------------
r56882 | shugo | 2016-11-23 14:26:18 +0900 (Wed, 23 Nov 2016) | 4 lines

rescue Errno::EPROTOTYPE in FTPTest#test_list_read_timeout_exceeded.

Errno::EPROTOTYPE is sometimes raised on Mac OS X 10.10.
[ruby-core:78066] [Bug #12914]
------------------------------------------------------------------------
r56881 | shugo | 2016-11-23 13:40:40 +0900 (Wed, 23 Nov 2016) | 4 lines

Don't encode to UTF-8 if it's unnecessary.

If the file system encoding is ISO-8851-1 or if the encoding of the target
string is invalid, don't encode to UTF-8.  [ruby-core:78271] [Bug#12972]
------------------------------------------------------------------------
r56880 | shugo | 2016-11-23 09:34:13 +0900 (Wed, 23 Nov 2016) | 6 lines

Disconnect immediately even if Net::FTP#close is called without quit.

In that case, BufferedSSLSocket#read in FTP#close exceeded timeout because
BufferedSSLSocket#shutdown did nothing.  So BufferedIO#rbuf_fill is
overridden in BufferedSSLSocket to raise an EOFError if the connection is
shut down.
------------------------------------------------------------------------
r56879 | shugo | 2016-11-23 09:03:27 +0900 (Wed, 23 Nov 2016) | 4 lines

Add a new optinal argument pathname to FTP#stat.

Based on the patch by soleboxy.
[Fix GH-1478] [ruby-core:78240] [Feature #12965]
------------------------------------------------------------------------
r56878 | kazu | 2016-11-23 08:44:51 +0900 (Wed, 23 Nov 2016) | 1 line

Use `&.` instead of `if` and `? :`
------------------------------------------------------------------------
r56877 | nobu | 2016-11-23 08:32:44 +0900 (Wed, 23 Nov 2016) | 4 lines

parse.y: warn ? followed by a word

* parse.y (parse_qmark): warn `?` with unbalanced space, which is
  interpreted as a conditional operator.
------------------------------------------------------------------------
r56876 | svn | 2016-11-23 08:11:41 +0900 (Wed, 23 Nov 2016) | 1 line

* 2016-11-23
------------------------------------------------------------------------
r56875 | nobu | 2016-11-23 08:11:41 +0900 (Wed, 23 Nov 2016) | 1 line

Use `&.` and `||=` instead of if guards
------------------------------------------------------------------------
r56874 | kazu | 2016-11-22 22:59:16 +0900 (Tue, 22 Nov 2016) | 4 lines

IOError does not happen

* IOError does not happen even if another thread closes io
* Use symbol proc
------------------------------------------------------------------------
r56873 | kazu | 2016-11-22 22:11:43 +0900 (Tue, 22 Nov 2016) | 1 line

Use `&.` instead of modifier if
------------------------------------------------------------------------
r56872 | mrkn | 2016-11-22 14:21:12 +0900 (Tue, 22 Nov 2016) | 11 lines

complex.c: optimize f_gt_p some cases

* complex.c (f_gt_p): optimize f_gt_p for specific types of arguments.

* internal.h (rb_int_gt, rb_float_gt, rb_rational_cmp): exported.

* numeric.c (rb_float_gt): rename from flo_gt and be exported.

* numeric.c (rb_int_gt): rename from int_gt and be exported.

* rational.c (rb_rational_cmp): rename from nurat_cmp and be exported.
------------------------------------------------------------------------
r56871 | shugo | 2016-11-22 14:17:45 +0900 (Tue, 22 Nov 2016) | 4 lines

Add BufferedSSLSocket#send.

SSLSocket#send is not defined, so use #write instead.  flags and dest are
ignored.
------------------------------------------------------------------------
r56870 | mrkn | 2016-11-22 13:54:57 +0900 (Tue, 22 Nov 2016) | 5 lines

complex.c: optimize Kernel#Complex

* complex.c (nucomp_f_complex): use nucomp_s_convert directly.

* complex.c (id_convert): removed.
------------------------------------------------------------------------
r56869 | normal | 2016-11-22 09:16:23 +0900 (Tue, 22 Nov 2016) | 6 lines

webrick/server: simplify Daemon.start

Process.daemon exists since Ruby 1.9.1 and does most of what we need.

* lib/webrick/server.rb (Daemon.start): simplify
  [Misc #12937]
------------------------------------------------------------------------
r56868 | normal | 2016-11-22 08:50:31 +0900 (Tue, 22 Nov 2016) | 5 lines

resolv: use symbol proc when possible

This reduces both human code and bytecode.

lib/resolv.rb (sender_for, Config.parse_resolv_conf): use symbol proc
------------------------------------------------------------------------
r56867 | normal | 2016-11-22 08:50:25 +0900 (Tue, 22 Nov 2016) | 8 lines

socket: use symbol proc for IO#close loops

Made possible by r56795, this reduces human and byte code size.

* ext/socket/lib/socket.rb (self.ip_sockets_port0,
  self.tcp_server_sockets_port0,
  self.tcp_server_sockets,
  self.udp_server_sockets): use symbol proc
------------------------------------------------------------------------
r56866 | normal | 2016-11-22 08:13:16 +0900 (Tue, 22 Nov 2016) | 6 lines

lib/open3: favor symbol proc when possible

It reduces both human and machine code; as well as reducing
the confusion from variable naming.

* lib/open3.rb (popen_run, pipeline, pipeline_run): avoid capture
------------------------------------------------------------------------
r56865 | normal | 2016-11-22 08:05:41 +0900 (Tue, 22 Nov 2016) | 17 lines

lib/*: remove closed checks

Follow r56795.  Since Ruby 2.2, calling #close on a closed
socket no longer raises exceptions.

* lib/cgi/session.rb (update): remove closed? check
* lib/net/http.rb (finish, transport_request): ditto
* lib/net/imap.rb (disconnect): ditto
* lib/net/pop.rb (do_start, do_finish): ditto
* lib/net/smtp.rb (do_start, do_finish): ditto
* lib/open3.rb (popen_run, pipeline_run): ditto
* lib/pstore.rb (transaction): ditto
* lib/shell/process-controller.rb (sfork):
* lib/tempfile (_close, call, Tempfile.create): ditto
* lib/webrick/httpauth/htdigest.rb (flush): ditto
* lib/webrick/httpauth/htpasswd.rb (flush): ditto
* lib/webrick/server.rb (start_thread, cleanup_shutdown_pipe): ditto
------------------------------------------------------------------------
r56864 | svn | 2016-11-22 07:45:27 +0900 (Tue, 22 Nov 2016) | 1 line

* 2016-11-22
------------------------------------------------------------------------
r56863 | nobu | 2016-11-22 07:45:26 +0900 (Tue, 22 Nov 2016) | 3 lines

Revert r56856

* parse.y: tCHAR can be concatenated.
------------------------------------------------------------------------
r56862 | nobu | 2016-11-21 21:34:54 +0900 (Mon, 21 Nov 2016) | 4 lines

ftp.rb: fix typo [ci skip]

* lib/net/ftp.rb (Net::FTP#initialize): [DOC] fix type in option
  name, :username is used but :use is not.
------------------------------------------------------------------------
r56861 | shugo | 2016-11-21 19:38:31 +0900 (Mon, 21 Nov 2016) | 1 line

Add new options open_timeout and read_timeout to Net::FTP.new.
------------------------------------------------------------------------
r56860 | shugo | 2016-11-21 17:55:25 +0900 (Mon, 21 Nov 2016) | 1 line

Use dynamic dispatch instead of is_a?.
------------------------------------------------------------------------
r56857 | rhe | 2016-11-21 14:02:58 +0900 (Mon, 21 Nov 2016) | 13 lines

net/http: avoid writing/reading from unstarted SSL socket

When net/http connects to an HTTPS server through a CONNECT proxy, it
writes the CONNECT request to an unconnected OpenSSL::SSL::SSLSocket.

OpenSSL::SSL::SSLSocket traditionally fallbacks to a method call on the
underlying IO object if a read/write method is called before the TLS
connection is established. So it automagically works correctly, emitting
the "SSL session is not started yet" warning.

This is not obvious at first glance. The warning is also noisy. Let's
just write to the plain socket instead of relying on the SSLSocket's
behavior.
------------------------------------------------------------------------
r56856 | nobu | 2016-11-21 12:13:59 +0900 (Mon, 21 Nov 2016) | 4 lines

parse.y: tCHAR cannot be concatenated

* parse.y (strings): tCHAR is not a subject of string literal
  concatenation and string interpolation.
------------------------------------------------------------------------
r56855 | svn | 2016-11-21 11:17:29 +0900 (Mon, 21 Nov 2016) | 1 line

* 2016-11-21
------------------------------------------------------------------------
r56854 | nobu | 2016-11-21 11:17:29 +0900 (Mon, 21 Nov 2016) | 4 lines

numeric.c: refine error message

* numeric.c (rb_num_get_rounding_option): refine error message at
  invalid rounding mode.
------------------------------------------------------------------------
r56853 | nobu | 2016-11-20 19:52:28 +0900 (Sun, 20 Nov 2016) | 3 lines

proc.c: enable Proc#to_s rdoc

* proc.c (proc_to_s): move just after the rdoc comment.
------------------------------------------------------------------------
r56852 | nobu | 2016-11-20 19:41:09 +0900 (Sun, 20 Nov 2016) | 4 lines

proc.c: suppress warning

* proc.c (NO_CLOBBERED): suppress clobbered warning which appears
  only on mingw.
------------------------------------------------------------------------
r56851 | shugo | 2016-11-20 18:11:44 +0900 (Sun, 20 Nov 2016) | 1 line

Remove an unused variable to suppress a warning.
------------------------------------------------------------------------
r56850 | nobu | 2016-11-20 15:53:39 +0900 (Sun, 20 Nov 2016) | 4 lines

win32ole.c: suppress warnings

* ext/win32ole/win32ole.c (g_ole_initialized): compare with 0
  instead of cast to get rid of pointer-to-int-cast warnings.
------------------------------------------------------------------------
r56849 | usa | 2016-11-20 15:19:05 +0900 (Sun, 20 Nov 2016) | 5 lines

get rid of test failures introduced at r56848

* ext/rubyvm/lib/forwardable/impl.rb: remove an unused variable definition to
  get rid of a warning.

------------------------------------------------------------------------
r56848 | nobu | 2016-11-20 11:12:48 +0900 (Sun, 20 Nov 2016) | 5 lines

forwardable/impl.rb

* lib/forwardable/impl.rb (_valid_method?, _compile_method):
  extract to separate implementation specific part.
  [ruby-core:78138] [Bug #12938]
------------------------------------------------------------------------
r56847 | shugo | 2016-11-20 10:49:25 +0900 (Sun, 20 Nov 2016) | 3 lines

remote_address should be called on @bare_sock.

Because @sock.remote_address fails if @sock is an SSLSocket.
------------------------------------------------------------------------
r56846 | shugo | 2016-11-20 10:44:07 +0900 (Sun, 20 Nov 2016) | 4 lines

shutdown(2) should not be called for SSLSocket.

SSLSocket#stop is a private method and cannot be called, but explicit calls
are not necessary because SSL_shutdown() is called from SSLSocket#close.
------------------------------------------------------------------------
r56845 | svn | 2016-11-20 08:51:50 +0900 (Sun, 20 Nov 2016) | 1 line

* 2016-11-20
------------------------------------------------------------------------
r56844 | suke | 2016-11-20 08:51:49 +0900 (Sun, 20 Nov 2016) | 3 lines

* ext/win32ole/win32ole.c: independent of libgcc_s_seh-1.dll [Bug #12959] 
  Thanks to Tsuyoshi Morita for bug report.

------------------------------------------------------------------------
r56843 | shugo | 2016-11-19 20:01:55 +0900 (Sat, 19 Nov 2016) | 1 line

Use Socket instead of TCPSocket/TCPServer.
------------------------------------------------------------------------
r56842 | shugo | 2016-11-19 16:02:32 +0900 (Sat, 19 Nov 2016) | 1 line

Expand abbreviated option names.
------------------------------------------------------------------------
r56840 | nobu | 2016-11-19 13:32:52 +0900 (Sat, 19 Nov 2016) | 4 lines

ruby.h: rb_big_sign

* include/ruby/ruby.h (RBIGNUM_SIGN): use a wrapper function to
  return the sign bit, instead of comparing with 0.
------------------------------------------------------------------------
r56839 | shugo | 2016-11-19 13:19:35 +0900 (Sat, 19 Nov 2016) | 1 line

Shut down TLS connections gracefully.
------------------------------------------------------------------------
r56837 | shugo | 2016-11-19 11:40:33 +0900 (Sat, 19 Nov 2016) | 1 line

Remove garbage.
------------------------------------------------------------------------
r56836 | shugo | 2016-11-19 11:37:39 +0900 (Sat, 19 Nov 2016) | 1 line

Move certificates to test/net/fixtures/.
------------------------------------------------------------------------
r56835 | svn | 2016-11-19 11:29:24 +0900 (Sat, 19 Nov 2016) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r56834 | shugo | 2016-11-19 11:29:23 +0900 (Sat, 19 Nov 2016) | 5 lines

Support TLS and hash styles options for Net::FTP.new.

If the :ssl options is specified, the control connection is protected with
TLS in the manner described in RFC 4217.  Data connections are also
protected with TLS unless the :private_data_connection is set to false.
------------------------------------------------------------------------
r56833 | nobu | 2016-11-19 10:55:34 +0900 (Sat, 19 Nov 2016) | 4 lines

math.c: unused_obj

* math.c (exp1, exp2): use immediate 0 instead of rb_mMath, which
  is never used.
------------------------------------------------------------------------
r56832 | nobu | 2016-11-19 10:16:50 +0900 (Sat, 19 Nov 2016) | 5 lines

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]
------------------------------------------------------------------------
r56831 | tadd | 2016-11-19 00:31:05 +0900 (Sat, 19 Nov 2016) | 2 lines

* NEWS: Added entry for optimized Rational. [Feature #12484] [ci skip]

------------------------------------------------------------------------
r56830 | mrkn | 2016-11-19 00:17:19 +0900 (Sat, 19 Nov 2016) | 13 lines

complex.c: optimize f_negate

* complex.c (f_negate): optimize for special numeric types.

* complex.c (nucomp_expt): use rb_int_uminus instead of f_negate for
  fixnum value.

* internal.h (rb_float_uminus, rb_rational_uminus): exported.

* numeric.c (rb_float_uminus): rename from flo_uminus.

* rational.c (rb_rational_uminus): rename from nurat_negate, and add
  assertion for the parameter.
------------------------------------------------------------------------
r56829 | svn | 2016-11-19 00:04:37 +0900 (Sat, 19 Nov 2016) | 1 line

* 2016-11-19
------------------------------------------------------------------------
r56828 | mrkn | 2016-11-19 00:04:36 +0900 (Sat, 19 Nov 2016) | 8 lines

rational.c: optimization and refactoring

* rational.c (nurat_s_new_bang, nurat_canonicalize): small optimization
  by using rb_int_uminus instead of f_negate.

* rational.c (nurat_canonicalize): add assertions for parameters.

* rational.c (f_negate, id_negate): removed.
------------------------------------------------------------------------
r56827 | mrkn | 2016-11-18 23:24:15 +0900 (Fri, 18 Nov 2016) | 7 lines

complex.c: refactoring

* complex.c (nucomp_abs): use rb_math_hypot directly.

* complex.c (nucomp_arg): use rb_math_atan2 directly.

* complex.c (imp2, m_{atan2,hypot}_bang, m_hypot): removed.
------------------------------------------------------------------------
r56826 | yui-knk | 2016-11-18 20:05:20 +0900 (Fri, 18 Nov 2016) | 3 lines

objspace.c:: indent [ci skip]

* ext/objspace/objspace.c (memsize_of_m): adjust indent of comments.
------------------------------------------------------------------------
r56825 | yui-knk | 2016-11-18 19:58:30 +0900 (Fri, 18 Nov 2016) | 1 line

* NEWS: Fix class name
------------------------------------------------------------------------
r56824 | nobu | 2016-11-18 15:29:51 +0900 (Fri, 18 Nov 2016) | 4 lines

internal.h: round macros

* internal.h (ROUND_FUNC, ROUND_CALL): macros wrapping round
  functions.
------------------------------------------------------------------------
r56823 | svn | 2016-11-18 13:34:27 +0900 (Fri, 18 Nov 2016) | 1 line

* 2016-11-18
------------------------------------------------------------------------
r56822 | nobu | 2016-11-18 13:34:26 +0900 (Fri, 18 Nov 2016) | 6 lines

extmk.rb: removed compiled? method [ci skip]

* ext/extmk.rb (compiled?): removed.

* ext/win32/extconf.rb: try to install libraries regardless
  fiddle.
------------------------------------------------------------------------
r56821 | hsbt | 2016-11-17 22:05:46 +0900 (Thu, 17 Nov 2016) | 12 lines

Remove webhook notification to Travis CI [skip ci]

  As travis-rubies now uses 3 Mac jobs to create archives for various OS
  releases.

  This is a bit wasteful if multiple builds pass in a short period.

  Instead, Travis CI is now running a nightly build of ruby-head
  (around 22:30 UTC). This will happen regardless of the state of the
  master branch.

  Author: Hiro Asari <asari.ruby@gmail.com>
------------------------------------------------------------------------
r56820 | nobu | 2016-11-17 20:52:11 +0900 (Thu, 17 Nov 2016) | 4 lines

readline.c: str_subpos

* ext/readline/readline.c (str_subpos): make string instance only
  if necessary.
------------------------------------------------------------------------
r56819 | usa | 2016-11-17 17:50:36 +0900 (Thu, 17 Nov 2016) | 4 lines

numeric.c: get rid of a compile error on mingw64

* numeric.c (rb_fix2str): typo.

------------------------------------------------------------------------
r56818 | svn | 2016-11-17 16:19:50 +0900 (Thu, 17 Nov 2016) | 1 line

* 2016-11-17
------------------------------------------------------------------------
r56817 | shugo | 2016-11-17 16:19:49 +0900 (Thu, 17 Nov 2016) | 4 lines

mkconfig.rb: add a magic comment to rbconfig.rb

* tool/mkconfig.rb: add a magic comment to rbconfig.rb in case the command
  line option -K is specified.  [ruby-core:78181] [Bug #12949]
------------------------------------------------------------------------
r56815 | nobu | 2016-11-16 15:59:42 +0900 (Wed, 16 Nov 2016) | 7 lines

logger.rb: fix next rotate time

* lib/logger.rb (Logger::LogDevice#initialize): calculate next
  rotate time based on the mtime of the last existing file.
  [ruby-dev:49881] [Bug #12948]

Author: Tsukasa Oishi <tsukasa.oishi@gmail.com>
------------------------------------------------------------------------
r56814 | nobu | 2016-11-16 15:59:41 +0900 (Wed, 16 Nov 2016) | 1 line

test/logger/test_logdevice.rb: heredoc styles
------------------------------------------------------------------------
r56813 | nobu | 2016-11-16 15:59:40 +0900 (Wed, 16 Nov 2016) | 5 lines

ruby-additional.el: unquoted code block

* misc/ruby-additional.el (ruby-insert-heredoc-code-block): make
  code between "begin;" and "end;" unquoted.  still quotable
  before "begin;".
------------------------------------------------------------------------
r56812 | nobu | 2016-11-16 15:07:55 +0900 (Wed, 16 Nov 2016) | 4 lines

configure.in: compressed debug section option

* configure.in: make compressed debug section optional.
  [ruby-core:78121] [Bug #12934]
------------------------------------------------------------------------
r56811 | nobu | 2016-11-16 14:25:53 +0900 (Wed, 16 Nov 2016) | 4 lines

test_flip.rb: r56316

* test/ruby/test_flip.rb (test_input_line_number_range): test for
  r56316.  [ruby-core:78162] [Bug #12947]
------------------------------------------------------------------------
r56810 | mrkn | 2016-11-16 13:25:37 +0900 (Wed, 16 Nov 2016) | 4 lines

math.c: remove needless ifdef clause

* math.c (ifdef M_PI): M_PI is eventually defined in missing.h even if math.h
  doesn't supply it.
------------------------------------------------------------------------
r56809 | mrkn | 2016-11-16 13:25:35 +0900 (Wed, 16 Nov 2016) | 16 lines

complex.c: optimize Numeric#polar and Numeric#arg

* complex.c (numeric_polar): optimize for Integer, Float, and Rational.

* complex.c (numeric_arg): directly create the value of pi.

* complex.c (f_negative_p): optimize for Integer, Float, and Rational.

* rational.c (INT_NEGATIVE_P): move the definition into internal.h.

* internal.h (INT_NEGATIVE_P): ditto.

* numeric.c (rb_float_abs): rename from flo_abs and export to be used
  from other source files..

* internal.h (rb_float_abs): ditto.
------------------------------------------------------------------------
r56808 | mrkn | 2016-11-16 13:25:33 +0900 (Wed, 16 Nov 2016) | 4 lines

rational.c: optimize Rational#abs

* rational.c (rb_rational_abs): optimize Rational#abs with the
  specialized implementation.
------------------------------------------------------------------------
r56807 | hsbt | 2016-11-16 12:02:42 +0900 (Wed, 16 Nov 2016) | 3 lines

Fix a typo.

https://github.com/ruby/psych/commit/18d13b1df09504548feb4cb9b259fed552d6a4d5
------------------------------------------------------------------------
r56806 | hsbt | 2016-11-16 11:51:26 +0900 (Wed, 16 Nov 2016) | 4 lines

Fixed regression of typo fix.

Picked from upstream: https://github.com/ruby/psych/commit/66fb7fb77533d0606748940288858794752d95cb
[ci skip][ruby-dev:49879][Bug #12942]
------------------------------------------------------------------------
r56805 | svn | 2016-11-16 00:04:57 +0900 (Wed, 16 Nov 2016) | 1 line

* 2016-11-16
------------------------------------------------------------------------
r56804 | kazu | 2016-11-16 00:04:56 +0900 (Wed, 16 Nov 2016) | 1 line

Fix regexp and typo
------------------------------------------------------------------------
r56801 | naruse | 2016-11-15 21:42:04 +0900 (Tue, 15 Nov 2016) | 3 lines

Use rb_mod_name instead of classname

classname() is static function.
------------------------------------------------------------------------
r56799 | shugo | 2016-11-15 17:16:45 +0900 (Tue, 15 Nov 2016) | 1 line

ftp.rb: use Addrinfo interfaces
------------------------------------------------------------------------
r56797 | nobu | 2016-11-15 15:28:05 +0900 (Tue, 15 Nov 2016) | 6 lines

complex.c: purge id_eqeq_p and limit return value

* complex.c (f_eqeq_p): use rb_equal.

* complex.c (nucomp_eqeq_p): limit return value to true or false,
  instead of the result of the other as-is.
------------------------------------------------------------------------
r56795 | nobu | 2016-11-15 10:39:11 +0900 (Tue, 15 Nov 2016) | 4 lines

socket.rb: remove closed checks

* ext/socket/lib/socket.rb: remove unnecessary closed checks,
  close on closed socket no longer raises an exception.
------------------------------------------------------------------------
r56794 | nobu | 2016-11-15 10:39:10 +0900 (Tue, 15 Nov 2016) | 4 lines

ftp.rb: use Addrinfo

* lib/net/ftp.rb (sendport, makeport, makepasv, BufferedSocket):
  use Addrinfo interfaces.
------------------------------------------------------------------------
r56793 | normal | 2016-11-15 09:27:20 +0900 (Tue, 15 Nov 2016) | 11 lines

st.c: fix crashes on huge hash tables

From: Vladimir Makarov <vmakarov@redhat.com>

By Vladimir's estimation, this requires at least 64 GB of memory
to reproduce this bug due to the hash sizes required.  So there
is no new test case (and I am unable to test it, myself).

* st.c (get_bins_num): avoid out-of-bounds on shift by using correct type
  [ruby-core:78139] [Bug #12939]
* st.c (get_allocated_entries): ditto
------------------------------------------------------------------------
r56792 | headius | 2016-11-15 04:39:21 +0900 (Tue, 15 Nov 2016) | 2 lines

* test/thread/test_queue.rb: Give up to ten seconds for threads to
  reach expected state before proceeding.
------------------------------------------------------------------------
r56791 | svn | 2016-11-15 04:27:25 +0900 (Tue, 15 Nov 2016) | 1 line

* 2016-11-15
------------------------------------------------------------------------
r56790 | headius | 2016-11-15 04:27:24 +0900 (Tue, 15 Nov 2016) | 5 lines

* test/ruby/test_module.rb: Method tables are not guaranteed to be
  ordered.
* test/ruby/test_struct.rb: Ditto.
* test/ruby/test_thread.rb: Thread locals are not guaranteed to be
ordered.
------------------------------------------------------------------------
r56780 | nobu | 2016-11-14 16:59:50 +0900 (Mon, 14 Nov 2016) | 3 lines

net/ftp.rb: kwargs

* lib/net/ftp.rb (Net::FTP#open_socket): use keyword argument.
------------------------------------------------------------------------
r56779 | nobu | 2016-11-14 16:53:32 +0900 (Mon, 14 Nov 2016) | 4 lines

net/protocol.rb: kwargs

* lib/net/protocol.rb (Net::BufferedIO#initialize): add keyword
  arguments for initial attributes.
------------------------------------------------------------------------
r56778 | nobu | 2016-11-14 16:53:31 +0900 (Mon, 14 Nov 2016) | 6 lines

socket.rb: kwargs

* ext/socket/lib/socket.rb (connect_{from,to}, connect): let use
  keyword arguments.

* ext/socket/lib/socket.rb (Socket.tcp): ditto.
------------------------------------------------------------------------
r56777 | nobu | 2016-11-14 14:17:55 +0900 (Mon, 14 Nov 2016) | 4 lines

vm_eval.c: fstring instance_eval

* vm_eval.c (singleton_class_for_eval): enable fstring singleton
  class for instance_eval.  [ruby-core:78116] [Bug #12930]
------------------------------------------------------------------------
r56776 | nobu | 2016-11-14 13:06:15 +0900 (Mon, 14 Nov 2016) | 8 lines

complex.c: optimize

* complex.c (f_negative_p): use rb_num_negative_p instead of funcall.

* complex.c (f_kind_of_p, f_numeric_p): cast down to int because
  rb_obj_is_kind_of is safe.

* complex.c (f_signbit, f_tpositive_p): remove f_boolcast.
------------------------------------------------------------------------
r56775 | nobu | 2016-11-14 13:02:45 +0900 (Mon, 14 Nov 2016) | 4 lines

rational.c: cast to int

* rational.c (f_kind_of_p): rb_obj_is_kind_of returns Qtrue or
  Qfalse always, and is safe to cast down to int.
------------------------------------------------------------------------
r56774 | svn | 2016-11-14 09:40:06 +0900 (Mon, 14 Nov 2016) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r56773 | hsbt | 2016-11-14 09:40:04 +0900 (Mon, 14 Nov 2016) | 4 lines

Update bundled psych to 2.2.0.

 * Merge libyaml-0.1.7 for bundled-libyaml option.
 * Update canonical url to https://github.com/ruby/psych.
------------------------------------------------------------------------
r56772 | mrkn | 2016-11-14 01:43:43 +0900 (Mon, 14 Nov 2016) | 5 lines

complex.c: refactoring

* complex.c (f_zero_p): return int rather than VALUE.

* complex.c (rb_complex_mul): remove needless negate operations.
------------------------------------------------------------------------
r56771 | mrkn | 2016-11-14 01:22:26 +0900 (Mon, 14 Nov 2016) | 3 lines

complex.c: refactoring

* complex.c (f_one_p): removed.
------------------------------------------------------------------------
r56770 | mrkn | 2016-11-14 01:22:08 +0900 (Mon, 14 Nov 2016) | 6 lines

complex.c: refactoring and small optimization

* complex.c (nucomp_expt): optimize the access to the numerator and
  denominator of a rational number.

* complex.c (k_rational_p): removed.
------------------------------------------------------------------------
r56769 | svn | 2016-11-14 01:21:55 +0900 (Mon, 14 Nov 2016) | 1 line

* 2016-11-14
------------------------------------------------------------------------
r56768 | mrkn | 2016-11-14 01:21:54 +0900 (Mon, 14 Nov 2016) | 3 lines

complex.c: refactoring

* complex.c (f_addsub, k_complex_p, k_float_p): removed.
------------------------------------------------------------------------
r56767 | nobu | 2016-11-13 14:25:54 +0900 (Sun, 13 Nov 2016) | 7 lines

error.c: redefined backtrace

* error.c (rb_get_backtrace): honor redefined Exception#backtrace
  method.  [ruby-core:78097] [Bug #12925]

* eval.c (setup_exception): rescue exceptions during backtrace
  setup.
------------------------------------------------------------------------
r56766 | nobu | 2016-11-13 14:25:53 +0900 (Sun, 13 Nov 2016) | 4 lines

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]
------------------------------------------------------------------------
r56765 | nobu | 2016-11-13 11:11:07 +0900 (Sun, 13 Nov 2016) | 7 lines

readline: remove dependency on internal.h

* ext/readline/depend: remove dependency on internal.h.

* ext/readline/readline.c (readline_s_delete_text): use
  rb_enc_str_new_static instead of rb_setup_fake_str not to depend
  on internal.h.
------------------------------------------------------------------------
r56764 | nobu | 2016-11-13 11:04:51 +0900 (Sun, 13 Nov 2016) | 4 lines

numeric.c: limit return value

* numeric.c (num_equal): limit return value to true or false,
  instead of the result of the other as-is.
------------------------------------------------------------------------
r56763 | nobu | 2016-11-13 10:51:29 +0900 (Sun, 13 Nov 2016) | 5 lines

purge id_eqeq_p

* rational.c (f_{eqeq,zero,one,minus_one}_p, nurat_eqeq_p): use
  rb_equal.  this function returns Qtrue or Qfalse always, so it
  is safe to cast down to int.
------------------------------------------------------------------------
r56762 | mrkn | 2016-11-13 03:42:30 +0900 (Sun, 13 Nov 2016) | 6 lines

complex.c: refactoring

* complex.c: refactor to use some specific macros and
  to reduce needless conversion by FIX2LONG.

* complex.c (k_fixnum_p, k_bignum_p): removed.
------------------------------------------------------------------------
r56761 | mrkn | 2016-11-13 01:29:11 +0900 (Sun, 13 Nov 2016) | 3 lines

rational.c: refactoring

* rational.c: use RB_INTEGER_TYPE_P, RB_FLOAT_TYPE_P, and FIXNUM_ZERO_P.
------------------------------------------------------------------------
r56760 | mrkn | 2016-11-13 00:43:34 +0900 (Sun, 13 Nov 2016) | 3 lines

rational.c: remove f_negative_p

* rational.c (f_negative_p): removed.
------------------------------------------------------------------------
r56759 | mrkn | 2016-11-13 00:43:26 +0900 (Sun, 13 Nov 2016) | 8 lines

rational.c: optimize Integer#lcm

* rational.c (f_div, f_mul, f_abs): optimize Integer#lcm
  Author: Tadashi Saito <tad.a.digger@gmail.com>

* numeric.c (rb_int_abs): rename from int_abs to be exported.

* internal.h (rb_int_div, rb_int_abs): exported.
------------------------------------------------------------------------
r56758 | mrkn | 2016-11-13 00:43:18 +0900 (Sun, 13 Nov 2016) | 4 lines

rational.c: optimize (-rational).rationalize(some)

* rational.c (nurat_rationalize): optimize (-rational).rationalize(some).
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56757 | svn | 2016-11-13 00:07:53 +0900 (Sun, 13 Nov 2016) | 1 line

* 2016-11-13
------------------------------------------------------------------------
r56756 | mrkn | 2016-11-13 00:07:53 +0900 (Sun, 13 Nov 2016) | 5 lines

rational.c: define Rational#{negative?,positive?}

* rational.c (nurat_{negative,positive}_p): define Rational#negative?
  and Rational#positive?, respectively.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56755 | mrkn | 2016-11-12 23:54:19 +0900 (Sat, 12 Nov 2016) | 4 lines

rational.c: refactoring

* rational.c (id_expt, id_fdiv, f_expt, f_fdiv, f_positive_p): removed.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56754 | nobu | 2016-11-12 22:24:23 +0900 (Sat, 12 Nov 2016) | 4 lines

test_fstring.rb: fix exception

* test/-ext-/string/test_fstring.rb (test_singleton_class): fix
  expected exception class.  [ruby-dev:49867] [Bug #12923]
------------------------------------------------------------------------
r56753 | mrkn | 2016-11-12 21:16:12 +0900 (Sat, 12 Nov 2016) | 3 lines

raitonal.c: remove needless macro

* rational.c (id_lshift, f_lshift): removed.
------------------------------------------------------------------------
r56752 | mrkn | 2016-11-12 21:14:10 +0900 (Sat, 12 Nov 2016) | 5 lines

rational.c: optimize Float#rationalize

* rational.c (rb_flt_rationalize{,_with_prec},float_rationalize):
  optimize Float#rationalize.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56751 | mrkn | 2016-11-12 20:52:09 +0900 (Sat, 12 Nov 2016) | 4 lines

rational.c: use rb_num_zerodiv instead of rb_raise_zerodiv

* rational.c (rb_raize_zerodiv): replace by rb_num_zerodiv.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56750 | mrkn | 2016-11-12 20:52:00 +0900 (Sat, 12 Nov 2016) | 7 lines

rational.c: optimize Float#to_r

* rational.c (float_to_r): optimize Float#to_r.

* numeric.c (rb_int_lshift): exported.

* internal.h (rb_int_lshift): ditto.
------------------------------------------------------------------------
r56749 | mrkn | 2016-11-12 20:51:51 +0900 (Sat, 12 Nov 2016) | 5 lines

rational.c: optimize Float#{numerator,denominator}

* rational.c (float_{numerator,denominator}): optimize
  Float#{numerator,denominator}.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56748 | mrkn | 2016-11-12 20:51:41 +0900 (Sat, 12 Nov 2016) | 4 lines

rational.c: optimize Numeric#quo

* rational.c (numeric_quo): optimize Numeric#quo.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56747 | nobu | 2016-11-12 18:43:05 +0900 (Sat, 12 Nov 2016) | 5 lines

class.c: no fstring singleton class

* class.c (singleton_class_of): prohibit fstrings from creating
  singleton classes.
  temporary measure for [ruby-dev:49867] [Bug #12923]
------------------------------------------------------------------------
r56746 | nobu | 2016-11-12 17:16:58 +0900 (Sat, 12 Nov 2016) | 4 lines

symbol/noninterned_name.rb

* test/-ext-/symbol/noninterned_name.rb: split from
  test_inadvertent_creation.rb.
------------------------------------------------------------------------
r56745 | mrkn | 2016-11-12 16:32:28 +0900 (Sat, 12 Nov 2016) | 3 lines

rational.c: refactor by removing needless ID vars

* rational.c (id_cmp, id_trunate): removed.
------------------------------------------------------------------------
r56744 | mrkn | 2016-11-12 16:28:47 +0900 (Sat, 12 Nov 2016) | 8 lines

rational.c: optimize Rational#fdiv

* rational.c (nurat_fdiv): optimize Rational#fdiv.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

* rational.c (f_to_f, id_to_f): removed.

* rational.c (f_expt): only used when FLT_RADIX is not 2.
------------------------------------------------------------------------
r56743 | mrkn | 2016-11-12 15:58:35 +0900 (Sat, 12 Nov 2016) | 4 lines

rational.c: optimize Rational#to_i

* rational.c (nurat_truncate): optimize Rational#to_i.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56742 | mrkn | 2016-11-12 15:45:11 +0900 (Sat, 12 Nov 2016) | 11 lines

rational.c: optimize Rational#{floor,ceil,round,truncate}

* rational.c (f_{expt10,round_common},nurat_{floor,ceil,round_half_{up,even}}):
  optimize Rational#{floor,ceil,round,truncate}.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

* numeric.c (rb_int_divmod): rename from int_divmod to be exported.

* numeric.c (rb_int_and): rename from int_and to be exported.

* intern.h (rb_int_{divmod,and}): exported.
------------------------------------------------------------------------
r56741 | mrkn | 2016-11-12 15:17:12 +0900 (Sat, 12 Nov 2016) | 5 lines

rational.c: optimize rational.coerce(float) and float [+-*/] rational

* rational.c (nurat_coerce): optimize rational.coerce(float).
  note that this makes `float [+-*/] rational` faster
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56740 | nobu | 2016-11-12 15:12:13 +0900 (Sat, 12 Nov 2016) | 7 lines

pack.c: simplify

* pack.c (str_associate): remove unnecessary branch.
  the argument must be a plain vanilla string object.

* pack.c (str_associated): use rb_ivar_lookup to give the
  undefined value.
------------------------------------------------------------------------
r56739 | nobu | 2016-11-12 15:12:12 +0900 (Sat, 12 Nov 2016) | 4 lines

class.c: trivial optimization

* class.c (singleton_class_of): just copy FROZEN flag without
  conditions.
------------------------------------------------------------------------
r56738 | nobu | 2016-11-12 15:12:09 +0900 (Sat, 12 Nov 2016) | 4 lines

.gdbinit: improve rp [ci skip]

* .gdbinit (rp): improve T_OBJECT dump.  show the contents of the
  instance variables table.
------------------------------------------------------------------------
r56737 | mrkn | 2016-11-12 15:07:46 +0900 (Sat, 12 Nov 2016) | 9 lines

rational.c: optimize construction of Rational

* rational.c (nurat_{s_new_bang,canonicalize,f_rational,s_convert}):
  optimize construction of Rational from numbers.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

* rational.c (read_{num,rat_nos}): optimize construction of Rational
  from string.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56736 | mrkn | 2016-11-12 15:07:24 +0900 (Sat, 12 Nov 2016) | 10 lines

rational.c: purge f_cmp

* rational.c (f_cmp, nurat_expt): purge f_cmp.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

* rational.c (INT_POSITIVE_P): added.

* numeric.c (FIXNUM_POSITIVE_P): move the definition into internal.h.

* internal.h (FIXNUM_POSITIVE_P): ditto.
------------------------------------------------------------------------
r56735 | mrkn | 2016-11-12 15:07:01 +0900 (Sat, 12 Nov 2016) | 4 lines

rational.c: optimize Rational#-@

* rational.c (nurat_negate): introduced to optimize Rational#-@.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56734 | mrkn | 2016-11-12 11:24:32 +0900 (Sat, 12 Nov 2016) | 9 lines

rational.c: optimize Rational#==

* rational.c (nurat_eqeq_p): optimize Rational#==.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

* numeric.c (rb_int_equal): rename from int_equal and remove static
  to be exported.

* internal.h (rb_int_equal): exported.
------------------------------------------------------------------------
r56733 | mrkn | 2016-11-12 10:29:01 +0900 (Sat, 12 Nov 2016) | 9 lines

rational.c: optimize Rational#<=>

* rational.c (nurat_cmp): optimize Rational#<=>.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

* numeric.c (rb_int_cmp): rename from int_cmp and remove static
  to be exported.

* internal.h (rb_int_cmp): exported.
------------------------------------------------------------------------
r56725 | mrkn | 2016-11-12 01:38:28 +0900 (Sat, 12 Nov 2016) | 9 lines

rational.c: optimize Rational#**

* rational.c (nurat_expt): optimize Rational#**.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

* numeric.c (rb_float_pow): rename flo_pow() to rb_float_pow()
  and remove static to be exporetd.

* internal.h (rb_int_pow, rb_float_pow): exported.
------------------------------------------------------------------------
r56724 | mrkn | 2016-11-12 01:18:13 +0900 (Sat, 12 Nov 2016) | 3 lines

rational.c: add argument type check assertions in f_muldiv

* rational.c (f_muldiv): add assertions to check argument types
------------------------------------------------------------------------
r56723 | mrkn | 2016-11-12 01:17:56 +0900 (Sat, 12 Nov 2016) | 4 lines

rational.c: optimize Rational#/

* rational.c (f_muldiv, nurat_div): optimize Rational#/.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56719 | mrkn | 2016-11-12 00:55:30 +0900 (Sat, 12 Nov 2016) | 25 lines

rational.c: avoid needless object allocation with nurat_to_double

* rational.c (nurat_to_double): introduce to convert rational to double
  without object allocation.

* rational.c (rb_rational_plus, nurat_{sub,mul,to_f}): rewrite by using
  nurat_to_double.

* bignum.c (rb_big_fdiv_double): introduce to calculate fdiv and return
  the result as a double value.

* bignum.c (big_fdiv{,_int,_float}): change the return types for
  implementing rb_big_fdiv_double.

* bignum.c (rb_big_fdiv): rewrite by using rb_big_fdiv_double.

* numeric.c (rb_int_fdiv_double): introduce to calculate fdiv and return
  the result as a double value.

* numeric.c (fix_fdiv_double): rewrite from fix_fdiv to return the
  result as a double value.

* numeric.c (rb_int_fdiv): rewrite by using rb_int_fdiv_double.

* internal.h (rb_{big,int}_fdiv_double): exported.
------------------------------------------------------------------------
r56716 | nagachika | 2016-11-12 00:43:43 +0900 (Sat, 12 Nov 2016) | 2 lines

fix a constant name typo in redmine-backporter.rb
[ci skip]
------------------------------------------------------------------------
r56713 | svn | 2016-11-12 00:11:05 +0900 (Sat, 12 Nov 2016) | 1 line

* 2016-11-12
------------------------------------------------------------------------
r56712 | mrkn | 2016-11-12 00:11:04 +0900 (Sat, 12 Nov 2016) | 5 lines

rational.c: optimize rational * {float, huge rational, bignum}

* rational.c (f_muldiv, nurat_mul):
  optimize rational * {float, huge rational, bignum}.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56711 | mrkn | 2016-11-11 23:57:11 +0900 (Fri, 11 Nov 2016) | 4 lines

rational.c: optimize rational - {float,rational}

* rational.c (f_addsub, nurat_sub): optimize rational - {float,rational}.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56710 | mrkn | 2016-11-11 23:45:11 +0900 (Fri, 11 Nov 2016) | 4 lines

rational.c: optimize rational - integer

* rational.c (nurat_sub): optimize rational - integer.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56709 | mrkn | 2016-11-11 23:42:53 +0900 (Fri, 11 Nov 2016) | 4 lines

rational.c: optimize rational + rational

* rational.c (f_addsub): optimize rational + rational.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56708 | mrkn | 2016-11-11 23:39:34 +0900 (Fri, 11 Nov 2016) | 4 lines

rational.c: prevent unused warning

* rational.c (f_mod): define only when NDEBUG is not defined to prevent
  unused warning
------------------------------------------------------------------------
r56707 | mrkn | 2016-11-11 23:39:25 +0900 (Fri, 11 Nov 2016) | 8 lines

numeric.c, rational.c: refactor by using FIXNUM_NEGATIVE_P and FIXNUM_ZERO_P

* numeric.c (num_zero_p, fix_divide, fix_mod, fix_divmod): refactor by using
  FIXNUM_NEGATIVE_P and FIXNUM_ZERO_P.

* rational.c (INT_NEGATIVE_P, INT_ZERO_P): ditto.

* internal.h: move FIXNUM_NEGATIVE_P and FIXNUM_ZERO_P from numeric.c
------------------------------------------------------------------------
r56706 | mrkn | 2016-11-11 23:39:16 +0900 (Fri, 11 Nov 2016) | 4 lines

rational.c: optimize Integer#gcd.

* rational.c (f_gcd_normal): optimize Integer#gcd.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56705 | mrkn | 2016-11-11 23:39:07 +0900 (Fri, 11 Nov 2016) | 4 lines

rational.c: optimize rational + integer.

* rational.c (rb_rational_plus): optimize rational + integer.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56704 | mrkn | 2016-11-11 23:38:59 +0900 (Fri, 11 Nov 2016) | 4 lines

rational.c: optimize rational + float.

* rational.c (rb_rational_plus): optimize rational + float.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56703 | nobu | 2016-11-11 20:52:03 +0900 (Fri, 11 Nov 2016) | 4 lines

range.c: check loading

* range.c (range_loader): check loading values if the data came
  from an initialized range object. [ruby-core:78067] [Bug #12915]
------------------------------------------------------------------------
r56702 | nobu | 2016-11-11 16:26:14 +0900 (Fri, 11 Nov 2016) | 4 lines

rational.c: check load

* rational.c (nurat_loader, nurat_marshal_load): check if loading
  values are Integer.  [ruby-core:78071] [Bug #12918]
------------------------------------------------------------------------
r56701 | nobu | 2016-11-11 16:08:53 +0900 (Fri, 11 Nov 2016) | 7 lines

rational.c: optimize

* rational.c (f_{lt,eqeq,zero,one,minus_one,kind_of}_p): add RTEST
  to results of funcalls.

* rational.c (f_negative_p, k_{integer,float,rational}_p):
  optimize.
------------------------------------------------------------------------
r56700 | nobu | 2016-11-11 16:08:52 +0900 (Fri, 11 Nov 2016) | 1 line

rational.c: use RB_INTEGER_TYPE_P
------------------------------------------------------------------------
r56699 | akr | 2016-11-11 12:04:38 +0900 (Fri, 11 Nov 2016) | 2 lines

Enable the document for Kernel[#.]pp.

------------------------------------------------------------------------
r56698 | nobu | 2016-11-11 09:08:41 +0900 (Fri, 11 Nov 2016) | 4 lines

vm_eval.c: reorder

* vm_eval.c (vm_call0_body): reorder the conditions.
  [ruby-core:78073] [Bug #12920]
------------------------------------------------------------------------
r56697 | mrkn | 2016-11-11 00:23:43 +0900 (Fri, 11 Nov 2016) | 3 lines

rational.c: optimize Rational#to_f by using rb_int_fdiv

* rational.c (nurat_to_f): optimize Rational#to_f by using rb_int_fdiv.
------------------------------------------------------------------------
r56696 | svn | 2016-11-11 00:23:34 +0900 (Fri, 11 Nov 2016) | 1 line

* 2016-11-11
------------------------------------------------------------------------
r56695 | mrkn | 2016-11-11 00:23:33 +0900 (Fri, 11 Nov 2016) | 5 lines

numeric.c, internal.h: export int_fdiv() as rb_int_fdiv()

* numeric.c (rb_int_fdiv): export int_fdiv() as rb_int_fdiv().

* internal.h (rb_int_fdiv): add declaration of rb_int_fdiv().
------------------------------------------------------------------------
r56694 | nobu | 2016-11-10 23:18:52 +0900 (Thu, 10 Nov 2016) | 4 lines

vm_eval.c: fix refined method when prepended

* vm_eval.c (vm_call0_body): refined module should not be skipped
  as prepended.  [ruby-core:78073] [Bug #12920]
------------------------------------------------------------------------
r56693 | nobu | 2016-11-10 19:39:51 +0900 (Thu, 10 Nov 2016) | 3 lines

range.c: check if range modifiable

* range.c (range_modify): frozen object cannot be modified.
------------------------------------------------------------------------
r56692 | nobu | 2016-11-10 16:47:44 +0900 (Thu, 10 Nov 2016) | 5 lines

parse.y: new_attr_op_assign in ripper needs symbol

* parse.y (command_asgn, arg): new_attr_op_assign in ripper
  expects a Symbol VALUE as the operator, not an ID, so convert
  literal IDs to Symbols.  [ruby-core:78069] [Bug #12916]
------------------------------------------------------------------------
r56691 | nobu | 2016-11-10 16:47:43 +0900 (Thu, 10 Nov 2016) | 4 lines

test_files.rb: sample size

* test/ripper/test_files.rb (assert_parse_files): extract at least
  one sample.
------------------------------------------------------------------------
r56690 | nobu | 2016-11-10 15:45:57 +0900 (Thu, 10 Nov 2016) | 4 lines

test_files.rb: separate tests

* test/ripper/test_files.rb (assert_parse_files): separate tests
  for each directories.
------------------------------------------------------------------------
r56689 | hsbt | 2016-11-10 15:38:14 +0900 (Thu, 10 Nov 2016) | 4 lines

Use environment variable for system ruby detection on appveyor.

 * Use ruby_version instead of 22-x64 and 21-x64
 * Use 23-x64 to build Ruby
------------------------------------------------------------------------
r56688 | nobu | 2016-11-10 12:50:47 +0900 (Thu, 10 Nov 2016) | 4 lines

make-snapshot: repository options

* tool/make-snapshot: add -svn and -git options to direct the
  repository to export.
------------------------------------------------------------------------
r56687 | nobu | 2016-11-10 12:50:46 +0900 (Thu, 10 Nov 2016) | 4 lines

make-snapshot: program name

* tool/make-snapshot (package): abort with the basename of this
  script.
------------------------------------------------------------------------
r56686 | shugo | 2016-11-10 11:23:58 +0900 (Thu, 10 Nov 2016) | 11 lines

Extend timeout for RubyCI chkbuild on Debian 8.2 x86_64.

On that machine, TestQueue#test_thr_kill often fails as follows:

      1) Failure:
    TestQueue#test_thr_kill [/home/hsbt/chkbuild/tmp/build/20161109T213002Z/ruby/test/thread/test_queue.rb:155]:
    only 171/250 done in 30 seconds.

Even if it passes, it takes about 30 seconds:

    [11160/16832] TestQueue#test_thr_kill = 29.80 s
------------------------------------------------------------------------
r56685 | svn | 2016-11-10 09:49:17 +0900 (Thu, 10 Nov 2016) | 1 line

* 2016-11-10
------------------------------------------------------------------------
r56684 | nobu | 2016-11-10 09:49:17 +0900 (Thu, 10 Nov 2016) | 5 lines

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]
------------------------------------------------------------------------
r56683 | nobu | 2016-11-10 09:49:16 +0900 (Thu, 10 Nov 2016) | 3 lines

range.c: indent [ci skip]

* range.c (range_alloc): adjust indent of comments.
------------------------------------------------------------------------
r56682 | nobu | 2016-11-09 11:42:30 +0900 (Wed, 09 Nov 2016) | 4 lines

default.mspec: end of options

* spec/default.mspec (MSpecScript): add the end of options to
  runruby.rb, to fix failure at ruby/spec@a0e55db.
------------------------------------------------------------------------
r56681 | a_matsuda | 2016-11-09 05:25:44 +0900 (Wed, 09 Nov 2016) | 6 lines

Fix undefined method 'dump' for nil:NilClass (NoMethodError)

Patch by: Dmitry Vorotilin <d.vorotilin@gmail.com> (@route)
Signed-off-by: Akira Matsuda <ronnie@dio.jp>

closes #1475
------------------------------------------------------------------------
r56680 | a_matsuda | 2016-11-09 04:55:59 +0900 (Wed, 09 Nov 2016) | 8 lines

Fix grammar errors

Patch by: Chris Tweedie <cltweedie@gmail.com> (@cltweedie)
Signed-off-by: Akira Matsuda <ronnie@dio.jp>

closes #1074

[ci skip]
------------------------------------------------------------------------
r56679 | a_matsuda | 2016-11-09 04:43:58 +0900 (Wed, 09 Nov 2016) | 9 lines

Update documentation of fetch

The sentence `Negative values of +index+ count from the end of the array.` can be interpreted that it only holds if a block is given. Clarify it.

Patch by: Lukas Elmer <lukas.elmer@gmail.com> (@lukaselmer)
Signed-off-by: Akira Matsuda <ronnie@dio.jp>

closes #1472
[ci skip]
------------------------------------------------------------------------
r56678 | a_matsuda | 2016-11-09 04:37:59 +0900 (Wed, 09 Nov 2016) | 15 lines

Fix typo in code doc of proc.c

Insure has a different meaning than ensure and we mean the latter in
this case.

*Ensure* is to do or have what is necessary for success.
Example: These blankets ensure that you?\226?\128?\153ll be warm enough.

*Insure* is to cover with an insurance policy.
Example: I will insure my home with additional fire and flood policies.

Patch by: Dimitris Zorbas <zorbash@skroutz.gr> (@Zorbash)
Signed-off-by: Akira Matsuda <ronnie@dio.jp>

closes #1352
------------------------------------------------------------------------
r56677 | kazu | 2016-11-09 00:04:29 +0900 (Wed, 09 Nov 2016) | 1 line

Add a space [ci skip]
------------------------------------------------------------------------
r56676 | svn | 2016-11-09 00:01:56 +0900 (Wed, 09 Nov 2016) | 1 line

* 2016-11-09
------------------------------------------------------------------------
r56675 | kazu | 2016-11-09 00:01:55 +0900 (Wed, 09 Nov 2016) | 1 line

Add ticket number [ci skip]
------------------------------------------------------------------------
r56674 | a_matsuda | 2016-11-08 20:57:00 +0900 (Tue, 08 Nov 2016) | 6 lines

Update comment about default constant

Patch by: Dave Takahashi <dtcello@gmail.com> (@dtakahas)
Signed-off-by: Akira Matsuda <ronnie@dio.jp>

closes #1151
------------------------------------------------------------------------
r56673 | nobu | 2016-11-08 19:44:21 +0900 (Tue, 08 Nov 2016) | 4 lines

vcs.rb: fix GIT.get_revisions

* tool/vcs.rb (VCS::GIT.get_revisions): fix for out-of-place
  build.
------------------------------------------------------------------------
r56672 | svn | 2016-11-08 18:31:53 +0900 (Tue, 08 Nov 2016) | 1 line

* properties.
------------------------------------------------------------------------
r56671 | naruse | 2016-11-08 18:31:52 +0900 (Tue, 08 Nov 2016) | 3 lines

Moved deleted ChangeLog into doc/ChangeLog-2.4.0

And Add doc/ChangeLog-2016 as an anchor.
------------------------------------------------------------------------
r56670 | nobu | 2016-11-08 16:47:23 +0900 (Tue, 08 Nov 2016) | 5 lines

vcs.rb: format from git-log

* tool/vcs.rb (VCS::GIT#export_changelog): re-format from git-log
  to svn style log, instead of git-svn, because cloned working
  directory would not have .git/svn.
------------------------------------------------------------------------
r56669 | nobu | 2016-11-08 16:45:19 +0900 (Tue, 08 Nov 2016) | 4 lines

vcs.rb: expand srcdir

* tool/vcs.rb (VCS::GIT#initialize): expand srcdir if it is a
  local path.
------------------------------------------------------------------------
r56668 | nobu | 2016-11-08 15:39:46 +0900 (Tue, 08 Nov 2016) | 6 lines

vcs.rb: fix srcdir in VCS::GIT

* tool/vcs.rb (VCS::GIT.cmd_args): add chdir option to arguments
  for IO.popen if srcdir is a local path.  unless -srcdir command
  line option is given, srcdir is the default URL.
  [ruby-core:78036] [Bug #12908]
------------------------------------------------------------------------
r56667 | svn | 2016-11-08 00:26:11 +0900 (Tue, 08 Nov 2016) | 1 line

* 2016-11-08
------------------------------------------------------------------------
r56666 | kazu | 2016-11-08 00:26:10 +0900 (Tue, 08 Nov 2016) | 3 lines

Add entry for Enumerator::Lazy#chunk_while

[ci skip][GH-1186]
------------------------------------------------------------------------
r56665 | kazu | 2016-11-07 21:10:36 +0900 (Mon, 07 Nov 2016) | 1 line

fix a typo [ci skip]
------------------------------------------------------------------------
r56664 | hsbt | 2016-11-07 18:46:42 +0900 (Mon, 07 Nov 2016) | 1 line

Added Entry for Rubygems 2.6.8 update.
------------------------------------------------------------------------
r56663 | nobu | 2016-11-07 16:45:18 +0900 (Mon, 07 Nov 2016) | 4 lines

test_optimization.rb: for r56208

* test/ruby/test_optimization.rb (test_tailcall_condition_block):
  test for r56208.  [ruby-core:78015] [Bug #12905]
------------------------------------------------------------------------
r56662 | shugo | 2016-11-07 15:57:14 +0900 (Mon, 07 Nov 2016) | 1 line

Extend Net::HTTP#open_timeout for chkbuild on Solaris 10s.
------------------------------------------------------------------------
r56660 | naruse | 2016-11-07 14:53:42 +0900 (Mon, 07 Nov 2016) | 1 line

Add NEWS about removing ChangeLog
------------------------------------------------------------------------
r56658 | nobu | 2016-11-07 12:47:46 +0900 (Mon, 07 Nov 2016) | 3 lines

vcs.rb: suppress warning

* tool/vcs.rb (DebugPOpen): suppress refinements warning in 2.0.
------------------------------------------------------------------------
r56657 | nobu | 2016-11-07 12:28:57 +0900 (Mon, 07 Nov 2016) | 3 lines

add cast

* hash.c (rb_objid_hash): need to cast down.
------------------------------------------------------------------------
r56656 | nobu | 2016-11-07 12:25:28 +0900 (Mon, 07 Nov 2016) | 7 lines

vcs.rb: exclude beginning revision

* tool/make-snapshot: pass the last revision in the last ChangeLog
  file without increment.

* tool/vcs.rb (export_changelog): exclude the beginning revision
  of the range uniformly. svn log includes it, but git log not.
------------------------------------------------------------------------
r56655 | nobu | 2016-11-07 11:54:28 +0900 (Mon, 07 Nov 2016) | 6 lines

vcs.rb: unnecessary arguments

* tool/make-snapshot: $srcdir is optional.

* tool/vcs.rb (export_changelog): remove unnecessary arguments.
  VCS should know srcdir and url.
------------------------------------------------------------------------
r56654 | nobu | 2016-11-07 11:54:27 +0900 (Mon, 07 Nov 2016) | 4 lines

vcs.rb: use chdir option

* tool/vcs.rb (export_changelog): for old git, use chdir option
  instead of git -C option, and set language environmets to C.
------------------------------------------------------------------------
r56653 | shugo | 2016-11-07 11:10:00 +0900 (Mon, 07 Nov 2016) | 1 line

Just check that interruption doesn't cause SEGV.
------------------------------------------------------------------------
r56652 | nobu | 2016-11-07 10:23:04 +0900 (Mon, 07 Nov 2016) | 4 lines

make-snapshot: sort globbed results

* tool/make-snapshot (package): globbed results order is
  undefined.
------------------------------------------------------------------------
r56651 | ko1 | 2016-11-07 10:03:04 +0900 (Mon, 07 Nov 2016) | 1 line

fix NEWS message
------------------------------------------------------------------------
r56650 | ko1 | 2016-11-07 09:45:00 +0900 (Mon, 07 Nov 2016) | 19 lines

	Introduce table improvement by Vladimir Makarov <vmakarov@redhat.com>.
	[Feature #12142]
	See header of st.c for improvment details.

	You can see all of code history here:
	<https://github.com/vnmakarov/ruby/tree/hash_tables_with_open_addressing>

	This improvement is discussed at
	<https://bugs.ruby-lang.org/issues/12142>
	with many people, especially with Yura Sokolov.

	* st.c: improve st_table.

	* include/ruby/st.h: ditto.

	* internal.h, numeric.c, hash.c (rb_dbl_long_hash): extract a function.

	* ext/-test-/st/foreach/foreach.c: catch up this change.

------------------------------------------------------------------------
r56649 | nobu | 2016-11-07 09:04:20 +0900 (Mon, 07 Nov 2016) | 3 lines

vcs.rb: popen with env

* tool/vcs.rb (IO.popen): support passing environment variables.
------------------------------------------------------------------------
r56648 | naruse | 2016-11-07 02:34:56 +0900 (Mon, 07 Nov 2016) | 3 lines

revision.h shouldn't depend ChangeLog

Maybe it needs vcs dependent ways.
------------------------------------------------------------------------

Zerion Mini Shell 1.0