403Webshell
Server IP : 66.29.132.122  /  Your IP : 3.137.190.200
Web Server : LiteSpeed
System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : admazpex ( 531)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/proc/self/root/proc/thread-self/root/proc/self/root/proc/self/root/proc/self/root/opt/alt/ruby26/share/doc/alt-ruby26/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/proc/self/root/proc/thread-self/root/proc/self/root/proc/self/root/proc/self/root/opt/alt/ruby26/share/doc/alt-ruby26/ChangeLog
------------------------------------------------------------------------
r67958 | usa | 2022-04-12 20:50:11 +0900 (Tue, 12 Apr 2022) | 1 line

add tag v2_6_10
------------------------------------------------------------------------
r67957 | usa | 2022-04-12 20:49:45 +0900 (Tue, 12 Apr 2022) | 2 lines

Fix dtoa buffer overrun

------------------------------------------------------------------------
r67956 | usa | 2022-04-12 20:03:11 +0900 (Tue, 12 Apr 2022) | 2 lines

Backport date-2.0.3 for Reiwa Support [Backport #18514]

------------------------------------------------------------------------
r67955 | usa | 2022-04-12 19:52:41 +0900 (Tue, 12 Apr 2022) | 2 lines

fix for #16798 to Ruby 2.6 introduced C99 syntax [Backport #18387]

------------------------------------------------------------------------
r67953 | usa | 2021-11-24 20:41:55 +0900 (Wed, 24 Nov 2021) | 1 line

When parsing cookies, only decode the values
------------------------------------------------------------------------
r67952 | usa | 2021-11-24 18:07:47 +0900 (Wed, 24 Nov 2021) | 1 line

Merge date-2.0.2
------------------------------------------------------------------------
r67950 | usa | 2021-07-07 19:38:10 +0900 (Wed, 07 Jul 2021) | 6 lines

Fix StartTLS stripping vulnerability

Reported by Alexandr Savca in https://hackerone.com/reports/1178562

Co-authored-by: Shugo Maeda <shugo@ruby-lang.org>

------------------------------------------------------------------------
r67949 | usa | 2021-07-07 19:34:08 +0900 (Wed, 07 Jul 2021) | 7 lines

Ignore IP addresses in PASV responses by default, and add new option use_pasv_ip

This fixes CVE-2021-31810.
Reported by Alexandr Savca.

Co-authored-by: Shugo Maeda <shugo@ruby-lang.org>

------------------------------------------------------------------------
r67948 | usa | 2021-07-04 02:10:56 +0900 (Sun, 04 Jul 2021) | 2 lines

patchlevel for previous commit

------------------------------------------------------------------------
r67947 | usa | 2021-07-04 02:10:28 +0900 (Sun, 04 Jul 2021) | 8 lines

merge revision(s) b1c73f23,c9ab8fe2: [Backport #17877]

	[ruby/rdoc] Use File.open to fix the OS Command Injection vulnerability in CVE-2021-31799
	
	https://github.com/ruby/rdoc/commit/a7f5d6ab88

	The test for command injection on Unix platforms should be omitted on Windows

------------------------------------------------------------------------
r67946 | usa | 2021-07-04 01:56:34 +0900 (Sun, 04 Jul 2021) | 23 lines

merge revision(s) 9edc1625: [Backport #17781]

	[ruby/resolv] Fix confusion of received response message

	This is a follow up for commit 33fb966197f1 ("Remove sender/message_id
	pair after response received in resolv", 2020-09-11).

	As the @senders instance variable is also used for tracking transaction
	ID allocation, simply removing an entry without releasing the ID would
	eventually deplete the ID space and cause
	Resolv::DNS.allocate_request_id to hang.

	It seems the intention of the code was to check that the received DNS
	message is actually the response for the question made within the method
	earlier. Let's have it actually do so.

	[Bug #12838] https://bugs.ruby-lang.org/issues/12838
	[Bug #17748] https://bugs.ruby-lang.org/issues/17748

	https://github.com/ruby/resolv/commit/53ca9c9209
	---
	 lib/resolv.rb | 6 +++---
	 1 file changed, 3 insertions(+), 3 deletions(-)
------------------------------------------------------------------------
r67945 | usa | 2021-07-04 01:53:29 +0900 (Sun, 04 Jul 2021) | 11 lines

merge revision(s) d8a13e50: [Backport #17780]

	[Bug #17780] Fix Method#super_method for module alias

	Method#super_method crashes for aliased module methods because they are
	not defined on a class. This bug was introduced in
	c60aaed1856b2b6f90de0992c34771830019e021 as part of bug #17130.
	---
	 proc.c                   |  2 +-
	 test/ruby/test_method.rb | 13 +++++++++++++
	 2 files changed, 14 insertions(+), 1 deletion(-)
------------------------------------------------------------------------
r67944 | usa | 2021-06-24 00:47:43 +0900 (Thu, 24 Jun 2021) | 30 lines

merge revision(s) 17aeff3e77e6fe0d37a9943dd93bcb16c4bb9f66,1616dcb16ef34ebf4ffc2167292f9a779f3e121e,1616dcb16ef34ebf4ffc2167292f9a779f3e121e:

	make-snapshot: get rid of circular dependency

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	---
	 tool/make-snapshot | 5 ++---
	 1 file changed, 2 insertions(+), 3 deletions(-)

	make-snapshot: try downloading Unicode files

	[Bug #15593]

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	---
	 tool/make-snapshot | 7 +------
	 1 file changed, 1 insertion(+), 6 deletions(-)

	make-snapshot: try downloading Unicode files

	[Bug #15593]

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	---
	 tool/make-snapshot | 7 +------
	 1 file changed, 1 insertion(+), 6 deletions(-)

	these patches are not for security issue, but are needed to resolv a
	packaging problem.

------------------------------------------------------------------------
r67943 | usa | 2021-05-10 12:24:37 +0900 (Mon, 10 May 2021) | 1 line

fix previous commit
------------------------------------------------------------------------
r67942 | usa | 2021-05-10 01:11:52 +0900 (Mon, 10 May 2021) | 5 lines

fix macos build

note that this is not a security fix, but recognized as critical build problem.
[Backport #17777]

------------------------------------------------------------------------
r67940 | usa | 2021-04-05 20:48:23 +0900 (Mon, 05 Apr 2021) | 2 lines

REXML 3.1.9.1

------------------------------------------------------------------------
r67936 | usa | 2021-04-05 10:22:11 +0900 (Mon, 05 Apr 2021) | 11 lines

merge revision(s) 254bed302752a401b5fcc3b6c65a9c93711d91d6,fad3023e94c45e7f03478732f7641b6f39ba9d12,3156fb0f2c3ebf8229f392c8502c08fe165ab181: [Backport #17218]

	Renamed `nurat_sub` compliant with `rb_rational_plus`


	Fix ArithmeticSequence#last and ArithmeticSequence#each for
	non-integer sequences (#3870)

	[Bug #17218]
	[ruby-core:100312]

------------------------------------------------------------------------
r67935 | usa | 2021-04-05 09:19:04 +0900 (Mon, 05 Apr 2021) | 33 lines

merge revision(s) ebb96fa8808317ad53a4977bff26cf755d68077e: [Backport #17321]

	Fix singleton class cloning

	Before this commit, `clone` gave different results depending on whether the original object
	had an attached singleton class or not.

	Consider the following setup:
	```
	class Foo; end
	Foo.singleton_class.define_method(:foo) {}

	obj = Foo.new

	obj.singleton_class if $call_singleton

	clone = obj.clone
	```

	When `$call_singleton = false`, neither `obj.singleton_class.singleton_class` nor
	`clone.singleton_class.singleton_class` own any methods.

	However, when `$call_singleton = true`, `clone.singleton_class.singleton_class` would own a copy of
	`foo` from `Foo.singleton_class`, even though `obj.singleton_class.singleton_class` does not.

	The latter case is unexpected and results in a visibly different clone, depending on if the original object
	had an attached class or not.

	Co-authored-by: Ufuk Kayserilioglu <ufuk.kayserilioglu@shopify.com>
	---
	 class.c                 | 31 ++++++++++++++++++++++---------
	 test/ruby/test_class.rb | 47 +++++++++++++++++++++++++++++++++++++++++++++++
	 2 files changed, 69 insertions(+), 9 deletions(-)
------------------------------------------------------------------------
r67934 | usa | 2021-04-05 09:17:28 +0900 (Mon, 05 Apr 2021) | 16 lines

merge revision(s) 276f6a225d18561cbe5282b798cb4e416c66079f,95bef7b69a6fb42687a6200b338060be307259f5: [Backport #17352]

	Don't double fractional seconds when passing timezone object to Time.new

	I found that fractional seconds were doubled when using the timezone
	feature of Time in Sequel's named_timezones extension (which uses
	TZInfo for the timezone object), and traced the problem to this code.

	There is no subsecx being modified in the utc_to_local call below
	this, and I'm not sure why you would want to add in the fractional
	seconds unless you assumed the timezone conversion would drop the
	existing fractional seconds (TZInfo doesn't drop fractional seconds).


	Subsecond of Time::tm should be 0

------------------------------------------------------------------------
r67933 | usa | 2021-04-05 09:12:27 +0900 (Mon, 05 Apr 2021) | 27 lines

merge revision(s) c60aaed1856b2b6f90de0992c34771830019e021: [Backport #17130]

	Fix Method#super_method for aliased methods

	Previously, Method#super_method looked at the called_id to
	determine the method id to use, but that isn't correct for
	aliased methods, because the super target depends on the
	original method id, not the called_id.

	Additionally, aliases can reference methods defined in other
	classes and modules, and super lookup needs to start in the
	super of the defined class in such cases.

	This adds tests for Method#super_method for both types of
	aliases, one that uses VM_METHOD_TYPE_ALIAS and another that
	does not. Both check that the results for calling super
	methods return the expected values.

	To find the defined class for alias methods, add an rb_ prefix
	to find_defined_class_by_owner in vm_insnhelper.c and make it
	non-static, so that it can be called from method_super_method
	in proc.c.

	This bug was original discovered while researching [Bug #11189].

	Fixes [Bug #17130]

------------------------------------------------------------------------
r67932 | usa | 2021-04-05 09:05:42 +0900 (Mon, 05 Apr 2021) | 13 lines

merge revision(s) abe2e7de4d1f2d5861d7c9ab9c7e778f2ee1dcd2: [Backport #16774]

	Don't require sub-word atomics

	On some architectures (like RISC-V) sub-word atomics are only available
	when linking against -latomic, but the configure script doesn't do that,
	causing the atomic checks to fail and the resulting ruby binary is
	non-functional.  Ruby does not use sub-word atomic operations, rb_atomic_t
	is defined to unsigned int, so use unsigned int when checking for atomic
	operations.
	---
	 configure.ac | 4 ++--
	 1 file changed, 2 insertions(+), 2 deletions(-)
------------------------------------------------------------------------
r67931 | usa | 2021-04-05 09:04:41 +0900 (Mon, 05 Apr 2021) | 39 lines

merge revision(s) c15cddd1d515c5bd8dfe8fb2725e3f723aec63b8: [Backport #16787]

	Allow Dir.home to work for non-login procs when $HOME not set

	Allow the 'Dir.home' method to reliably locate the user's home directory when
	all three of the following are true at the same time:

	1. Ruby is running on a Unix-like OS
	2. The $HOME environment variable is not set
	3. The process is not a descendant of login(1) (or a work-alike)

	The prior behavior was that the lookup could only work for login-descended
	processes.

	This is accomplished by looking up the user's record in the password database
	by uid (getpwuid_r(3)) as a fallback to the lookup by name (getpwname_r(3))
	which is still attempted first (based on the name, if any, returned by
	getlogin_r(3)).

	If getlogin_r(3), getpwnam_r(3), and/or getpwuid_r(3) is not available at
	compile time, will fallback on using their respective non-*_r() variants:
	getlogin(3), getpwnam(3), and/or getpwuid(3).

	The rationale for attempting to do the lookup by name prior to doing it by uid
	is to accommodate the possibility of multiple login names (each with its own
	record in the password database, so each with a potentially different home
	directory) being mapped to the same uid (as is explicitly allowed for by
	POSIX; see getlogin(3posix)).

	Preserves the existing behavior for login-descended processes, and adds the
	new capability of having Dir.home being able to find the user's home directory
	for non-login-descended processes.

	Fixes [Bug #16787]

	Related discussion:
	https://bugs.ruby-lang.org/issues/16787
	https://github.com/ruby/ruby/pull/3034

------------------------------------------------------------------------
r67930 | usa | 2021-04-05 08:50:56 +0900 (Mon, 05 Apr 2021) | 4 lines

merge revision(s) 2a83650b0fd25719fb6c03bfec7bd895734d3ceb: [Backport #15852]

	Destroy VM-wise locks before freeing [Bug #15852]

------------------------------------------------------------------------
r67929 | usa | 2021-04-05 08:47:58 +0900 (Mon, 05 Apr 2021) | 14 lines

merge revision(s) 9682db065158da5fa4ec8a3bc267da45b429b92c: [Backport #17658]

	Remove sender/message_id pair after response received in resolv

	Once a response for a given DNS request has been received (which
	requires a matching message id), the [sender, message_id] pair
	should be removed from the list of valid senders.  This makes it
	so duplicate responses from the same sender are ignored.

	Fixes [Bug #12838]
	---
	 lib/resolv.rb           |   2 +-
	 test/resolv/test_dns.rb | 113 ++++++++++++++++++++++++++++++++++++++++++++++++
	 2 files changed, 114 insertions(+), 1 deletion(-)
------------------------------------------------------------------------
r67928 | usa | 2021-04-05 08:45:25 +0900 (Mon, 05 Apr 2021) | 14 lines

merge revision(s) f4be7a510eebbe6507ba41d138d7d252f4a68e90,9441f3f97087a4325ee80911859d37da41fa5050: [Backport #17504]

	Added tests for Time#getlocal with UTC offset

	---
	 test/ruby/test_time.rb | 8 ++++++++
	 1 file changed, 8 insertions(+)

	Allow UTC offset without colons per ISO-8601 [Bug #17504]

	---
	 test/ruby/test_time.rb |  6 ++++++
	 time.c                 | 44 +++++++++++++++++++++++++++++---------------
	 2 files changed, 35 insertions(+), 15 deletions(-)
------------------------------------------------------------------------
r67927 | usa | 2021-04-05 08:43:53 +0900 (Mon, 05 Apr 2021) | 4 lines

merge revision(s) 0036648a420f945624898568bb82bc5f83195d12: [Backport #17533]

	Capture to reserved name variables if already defined [Bug #17533]

------------------------------------------------------------------------
r67926 | usa | 2021-04-05 08:40:30 +0900 (Mon, 05 Apr 2021) | 8 lines

merge revision(s) a55eb9a2af7950d180d9d31ffde2bce66710f44f: [Backport #17572]

	Make reciprocal properly of non-integral rational [Bug #17572]

	---
	 rational.c                 | 2 +-
	 test/ruby/test_rational.rb | 7 +++++++
	 2 files changed, 8 insertions(+), 1 deletion(-)
------------------------------------------------------------------------
r67925 | usa | 2021-04-05 08:36:51 +0900 (Mon, 05 Apr 2021) | 7 lines

merge revision(s) ce7a053475cbebfb2f3e5ed6614e0ba631541917,1cbb1f1720127b0b34b38c77e27b51b182008699: [Backport #16695]

    Adjust sp for `x = false; y = (return until x unless x)` [Bug #16695]

    test/ruby/test_syntax.rb: avoid "warning: assigned but unused
     variable"

------------------------------------------------------------------------
r67924 | usa | 2021-04-05 08:31:49 +0900 (Mon, 05 Apr 2021) | 43 lines

merge revision(s) 8b0dc77a621ded75f72486c33f55404ce73f00d7: [Backport #17275]

	configure.ac: Bump the size of sigaltstack

	The RubyVM uses C macro defines to feature detect whether
	`backtrace(2)` support is available, and if so it includes C level backtraces
	when the RubyVM itself crashes.

	But on my machine, C level backtraces from `vm_dump.c` didn't work when
	using a version of Ruby buillt on the machine, but worked fine when using a
	version of Ruby built on another machine and copied to my machine.

	The default autoconf test for backtraces uses a sigaltstack size that is
	too small, so the SIGSEGV signal handler itself causes a SIGSEGV).
	I noticed that signal.c uses a larger sigaltstack size:

	https://github.com/ruby/ruby/blob/v2_6_5/signal.c#L568

	The specific variables it looks at:

	- `HAVE_BACKTRACE`

	  this is a macro defined by autoconf because there is a line in the
	  configure script like `AC_CHECK_FUNCS(backtrace)` (see the autoconf
	  docs for more).

	- `BROKEN_BACKTRACE`

	  this comes from a custom program that Ruby's configure script runs to
	  attempt to figure out whether actually using backtrace(2) in a real
	  program works. You can see the autoconf program here.

	  <https://github.com/ruby/ruby/blob/v2_6_5/configure.ac#L2817-L2863>

	It uses sigaltstack and SA_ONSTACK to create a seperate stack for
	handling signals.

	The problem was: SIGSTKSZ (which comes from a system header!) was not
	suggesting a large enough stack size. When checking on an Ubuntu 16.04
	box, we found that SIGSTKSZ was 8192 and MINSIGSTKSZ was 2048.
	---
	 configure.ac | 4 ++--
	 1 file changed, 2 insertions(+), 2 deletions(-)
------------------------------------------------------------------------
r67923 | usa | 2021-04-05 08:30:49 +0900 (Mon, 05 Apr 2021) | 14 lines

merge revision(s) be9dbe1c3eb4bb4cab0bdc42a91ef425bb1eaddd: [Backport #15178]

	Fix pthread_setname_np arguments on NetBSD

	The previous attempt to fix this in
	b87df1bf243074edb2e6cc8a24bc00df81cebf3c reversed the argument
	order instead of just fixing the quote escaping.

	From Takahiro Kambe.

	Fixes [Bug #15178]
	---
	 configure.ac | 4 ++--
	 1 file changed, 2 insertions(+), 2 deletions(-)
------------------------------------------------------------------------
r67922 | usa | 2021-04-05 08:28:16 +0900 (Mon, 05 Apr 2021) | 4 lines

backported a part of a569bc09e25a2ba813d0bec1228d9ff65330a3db

picked up by Jeremy Evans [Backport #17305]

------------------------------------------------------------------------
r67921 | usa | 2021-04-05 08:07:45 +0900 (Mon, 05 Apr 2021) | 4 lines

merge revision(s) 8e189df32cacef4b21e357a590d349330532baf5: [Backport #17013]

	Add operator info to OP_ASGN2 of RubyVM::AbstractSyntaxTree.

------------------------------------------------------------------------
r67920 | usa | 2021-04-05 08:03:14 +0900 (Mon, 05 Apr 2021) | 35 lines

merge revision(s) de9d6a7a8cb0929e0b4cf0a3120971c7b8ee8927,da5bd0047d6c961105da210c69d4c88421324b70,ce91c5615ca96f357519043181fb5b76b57ee223,c53aebb1d2eb5afbb18f9b3db9f9c956a463a4e1,d05f04d27dd86c67e4a8dfff4392f806cf577bdf: [Backport #16931]

	Split test_defined

	---
	 test/ruby/test_defined.rb | 18 ++++++++++++++++--
	 1 file changed, 16 insertions(+), 2 deletions(-)

	Test for [Bug #16669]

	---
	 test/ruby/test_defined.rb | 8 ++++++++
	 1 file changed, 8 insertions(+)

	Fix typo in test name

	---
	 test/ruby/test_defined.rb | 2 +-
	 1 file changed, 1 insertion(+), 1 deletion(-)

	Split test_defined_method

	---
	 test/ruby/test_defined.rb | 23 ++++++++++++++++++++++-
	 1 file changed, 22 insertions(+), 1 deletion(-)

	Fixed `defined?` against protected method call

	Protected methods are restricted to be called according to the
	class/module in where it is defined, not the actual receiver's
	class.  [Bug #16931]
	---
	 test/ruby/test_defined.rb | 1 +
	 vm_insnhelper.c           | 2 +-
	 2 files changed, 2 insertions(+), 1 deletion(-)
------------------------------------------------------------------------
r67919 | usa | 2021-04-05 07:58:46 +0900 (Mon, 05 Apr 2021) | 44 lines

merge revision(s) a0bc3f2a1c2c98f225612101cb4e1ea1a6813546,75a0447c15a7ab017bd4240c2a9cc69b134b80b9,f1699314147bad2cf5550cc582693424fdbc2510: [Backport #16846]

	Suppress C4267 "possible loss of data" warnings

	---
	 ext/win32ole/win32ole.c | 2 +-
	 1 file changed, 1 insertion(+), 1 deletion(-)

	Suppress C4267 "possible loss of data" warnings

	Just cast down explicitly.
	---
	 ext/win32ole/win32ole.c | 2 +-
	 1 file changed, 1 insertion(+), 1 deletion(-)

	win32ole: separate global variable declarations and definitions

	https://gcc.gnu.org/gcc-10/changes.html#c

	> * GCC now defaults to `-fno-common`.  As a result, global
	>   variable accesses are more efficient on various targets.  In
	>   C, global variables with multiple tentative definitions now
	>   result in linker errors.  With `-fcommon` such definitions are
	>   silently merged during linking.
	---
	 ext/win32ole/win32ole.c           | 1 +
	 ext/win32ole/win32ole.h           | 4 ++--
	 ext/win32ole/win32ole_error.c     | 3 +++
	 ext/win32ole/win32ole_error.h     | 4 ++--
	 ext/win32ole/win32ole_method.c    | 2 ++
	 ext/win32ole/win32ole_method.h    | 2 +-
	 ext/win32ole/win32ole_record.c    | 2 ++
	 ext/win32ole/win32ole_record.h    | 2 +-
	 ext/win32ole/win32ole_type.c      | 2 ++
	 ext/win32ole/win32ole_type.h      | 2 +-
	 ext/win32ole/win32ole_typelib.c   | 2 ++
	 ext/win32ole/win32ole_typelib.h   | 2 +-
	 ext/win32ole/win32ole_variable.c  | 2 ++
	 ext/win32ole/win32ole_variable.h  | 2 +-
	 ext/win32ole/win32ole_variant.c   | 2 ++
	 ext/win32ole/win32ole_variant.h   | 2 +-
	 ext/win32ole/win32ole_variant_m.c | 2 ++
	 ext/win32ole/win32ole_variant_m.h | 2 +-
	 18 files changed, 29 insertions(+), 11 deletions(-)
------------------------------------------------------------------------
r67918 | usa | 2021-04-05 07:50:22 +0900 (Mon, 05 Apr 2021) | 15 lines

merge revision(s) 12391cdbe11f3fbeb3b04c30b944139e5bbd9ea6: [Backport #16834]

	merge revision(s) cbe4f75ef802f13d05f94e42274b65a062bd3666: [Backport
	 #16834]

		Fix rb_profile_frame_classpath to handle module singletons

		Right now `SomeClass.method` is properly named, but `SomeModule.method`
		is displayed as `#<Module:0x000055eb5d95adc8>.method` which makes
		profiling annoying.
	---
	 test/-ext-/debug/test_profile_frames.rb | 40 ++++++++++++++++++++++++++++-----
	 version.h                               |  2 +-
	 vm_backtrace.c                          |  2 +-
	 3 files changed, 36 insertions(+), 8 deletions(-)
------------------------------------------------------------------------
r67917 | usa | 2021-04-05 07:48:27 +0900 (Mon, 05 Apr 2021) | 4 lines

merge revision(s) 08529a61153e5c40f57a65272211357511d6e6db: [Backport #16798]

	Compare environment variable names in those manor [Bug #16798]

------------------------------------------------------------------------
r67916 | usa | 2021-04-05 07:44:23 +0900 (Mon, 05 Apr 2021) | 8 lines

merge revision(s) 2f1895fa: [Backport #16767]

	Fixed formatted substring expansion [Bug #16767]

	---
	 strftime.c             | 2 ++
	 test/ruby/test_time.rb | 7 +++++++
	 2 files changed, 9 insertions(+)
------------------------------------------------------------------------
r67915 | usa | 2021-04-05 07:41:01 +0900 (Mon, 05 Apr 2021) | 4 lines

merge revision(s) 2f1895fa15386fb3cdc91c5604171290828b9da8: [Backport #16767]

	Fix source location of autoloaded constant [Bug #16764]

------------------------------------------------------------------------
r67914 | usa | 2021-04-05 07:27:35 +0900 (Mon, 05 Apr 2021) | 11 lines

merge revision(s) e04418bb16cd99b4a4402e7457d3bdc967284f98: [Backport #16830]

	[ruby/uri] Check if DN exists

	https://bugs.ruby-lang.org/issues/16830

	https://github.com/ruby/uri/commit/b4bf8c1217
	---
	 lib/uri/ldap.rb       | 1 +
	 test/uri/test_ldap.rb | 4 ++++
	 2 files changed, 5 insertions(+)
------------------------------------------------------------------------
r67913 | usa | 2021-04-05 07:24:29 +0900 (Mon, 05 Apr 2021) | 4 lines

merge revision(s) 579645d9: [Backport #17033]

Fixed infinite loop at error in printing cause [Bug #17033]

------------------------------------------------------------------------
r67912 | usa | 2021-03-02 21:00:29 +0900 (Tue, 02 Mar 2021) | 13 lines

merge revision(s) e39f7e64: [Backport #16760]

	parse.y: fix segv with Ripper#yydebug

	* parse.y (parser_token_value_print): in ripper, ID values are
	  wrapped in NODE_RIPPER at set_yylval_name(), so print the Symbol
	  wrapped together.

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	---
	 parse.y                    | 2 +-
	 test/ripper/test_ripper.rb | 9 +++++++++
	 2 files changed, 10 insertions(+), 1 deletion(-)
------------------------------------------------------------------------
r67911 | usa | 2021-03-02 20:44:02 +0900 (Tue, 02 Mar 2021) | 4 lines

merge revision(s) 99a9c3fe: [Backport #17024]

	Fixed yday and wday with timezone [Bug #17024]

------------------------------------------------------------------------
r67910 | usa | 2021-03-02 20:37:36 +0900 (Tue, 02 Mar 2021) | 9 lines

merge revision(s) 2ecfb88e: [Backport #16918]

	Correctly remove temporary directory if path yielded is mutated
	
	Another approach would be to freeze the string, but that could
	cause backwards compatibility issues.
	
	Fixes [Bug #16918]

------------------------------------------------------------------------
r67909 | usa | 2021-03-02 20:26:58 +0900 (Tue, 02 Mar 2021) | 15 lines

merge revision(s) 5a79d8e0,160511d8: [Backport #16925]

	Fix error raised by Net::HTTPResponse#inflater if the block raises

	* See https://bugs.ruby-lang.org/issues/13882#note-6
	---
	 lib/net/http/response.rb                    |  5 ++-
	 spec/ruby/library/net/http/http/get_spec.rb | 67 +++++++++++++++++++++++++++++
	 2 files changed, 70 insertions(+), 2 deletions(-)

	Quarantine specs which fail frequently with CHECK_LEAKS=true

	---
	 spec/ruby/library/net/http/http/get_spec.rb | 2 ++
	 1 file changed, 2 insertions(+)
------------------------------------------------------------------------
r67908 | usa | 2021-03-02 20:25:18 +0900 (Tue, 02 Mar 2021) | 11 lines

merge revision(s) 0ba27259: [Backport #16940]

	Fix crashes in the peephole optimizer on OpenBSD/sparc64

	These crashes are due to alignment issues, casting ADJUST to INSN
	and then accessing after the end of the ADJUST.  These patches
	come from Stefan Sperling <stsp@apache.org>, who reported the
	issue.
	---
	 compile.c | 5 +++--
	 1 file changed, 3 insertions(+), 2 deletions(-)
------------------------------------------------------------------------
r67907 | usa | 2021-03-02 20:23:42 +0900 (Tue, 02 Mar 2021) | 13 lines

merge revision(s) a19228f8: [Backport #16979]

	brace the fact that lchmod(2) can EOPNOTSUPP

	Musl libc has this function as a tiny wrapper of fchmodat(3posix).  On
	the other hand Linux kernel does not support changing modes of a symlink.
	The operation always fails with EOPNOTSUPP.  This fchmodat behaviour is
	defined in POSIX.  We have to take care of such exceptions.
	---
	 lib/fileutils.rb               |  3 ++-
	 test/pathname/test_pathname.rb |  2 +-
	 test/ruby/test_notimp.rb       | 19 ++++++++++++-------
	 3 files changed, 15 insertions(+), 9 deletions(-)
------------------------------------------------------------------------
r67906 | usa | 2021-03-02 20:21:10 +0900 (Tue, 02 Mar 2021) | 7 lines

merge revision(s) 263b9413: [Backport #16981]

	[ripper] fix mismatched indentations warning [Bug #16981]
	
	The scanner location has to be set from lex.ptok before it is
	flushed by dispatching the scanner event.

------------------------------------------------------------------------
r67905 | usa | 2021-03-01 22:23:20 +0900 (Mon, 01 Mar 2021) | 24 lines

merge revision(s) e9bb30d4,a064e467,4d753461: [Backport #16998]

	Expect no conflict in the parser

	---
	 parse.y | 1 +
	 1 file changed, 1 insertion(+)

	Support Bison 3

	---
	 common.mk           |  1 +
	 parse.y             |  2 +-
	 tool/pure_parser.rb | 15 +++++++++++++++
	 3 files changed, 17 insertions(+), 1 deletion(-)
	 create mode 100755 tool/pure_parser.rb

	Refine error message

	Highlight failed command and suggest installing the command.
	[Bug #16042]
	---
	 tool/pure_parser.rb | 7 ++++++-
	 1 file changed, 6 insertions(+), 1 deletion(-)
------------------------------------------------------------------------
r67904 | usa | 2021-03-01 00:06:26 +0900 (Mon, 01 Mar 2021) | 13 lines

merge revision(s) ac2106ac,cf90df22: [Backport #16813]

	[DOC] Fixed explanation for Method#>> [Bug #16813] [ci skip]

	---
	 proc.c | 4 ++--
	 1 file changed, 2 insertions(+), 2 deletions(-)

	[DOC] Separated Method#[] from Method#call [Bug #16813] [ci skip]

	---
	 proc.c | 14 +++++++++++++-
	 1 file changed, 13 insertions(+), 1 deletion(-)
------------------------------------------------------------------------
r67903 | usa | 2021-03-01 00:04:13 +0900 (Mon, 01 Mar 2021) | 6 lines

merge revision(s) 01b3a380: [Backport #11143][Backport #15932]

	Fix wrong "void value expression" error

	* parse.y (value_expr_check): if either of then or else statements is not a void value expression, the whole if is not also a void value expression. [Bug #15932]

------------------------------------------------------------------------
r67902 | usa | 2021-02-28 23:53:21 +0900 (Sun, 28 Feb 2021) | 14 lines

merge revision(s) e02bd0e7: [Backport #15608]

	Don't display singleton class in Method#inspect unless method defined there
	
	Previously, if an object has a singleton class, and you call
	Object#method on the object, the resulting string would include
	the object's singleton class, even though the method was not
	defined in the singleton class.
	
	Change this so the we only show the singleton class if the method
	is defined in the singleton class.
	
	Fixes [Bug #15608]

------------------------------------------------------------------------
r67901 | usa | 2021-02-28 23:44:22 +0900 (Sun, 28 Feb 2021) | 7 lines

merge revision(s) 8b6e2685: [Backport #16649]

	Fixed symbol misused as ID
	
	rb_funcallv_public and rb_respond_to require an ID, not a
	Symbol. [Bug #16649]

------------------------------------------------------------------------
r67900 | usa | 2021-02-28 23:37:37 +0900 (Sun, 28 Feb 2021) | 8 lines

merge revision(s) 3c93ed59: [Backport #16514]

	Update documentation for Array/Hash Argument section of methods.rdoc

	[Bug #16514]
	---
	 doc/syntax/methods.rdoc | 15 +++++++++++++--
	 1 file changed, 13 insertions(+), 2 deletions(-)
------------------------------------------------------------------------
r67899 | usa | 2021-02-28 23:31:52 +0900 (Sun, 28 Feb 2021) | 4 lines

	* vm_args.c (setup_parameters_complex): no longer need to warn splat
	  hash in a pattern.
	[Backport #16632][Bacport #16950]

------------------------------------------------------------------------
r67898 | usa | 2021-02-28 23:16:37 +0900 (Sun, 28 Feb 2021) | 24 lines

merge revision(s) f9e5c74c: [Backport #15980]

	compile.c: stop wrong peephole optimization when covearge is enabled

	jump-jump optimization ignores the event flags of the jump instruction
	being skipped, which leads to overlook of line events.

	This changeset stops the wrong optimization when coverage measurement is
	neabled and when the jump instruction has any event flag.

	Note that this issue is not only for coverage but also for TracePoint,
	and this change does not fix TracePoint.
	However, fixing it fundamentally is tough (which requires revamp of
	the compiler).  This issue is critical in terms of coverage measurement,
	but minor for TracePoint (ko1 said), so we here choose a stopgap
	measurement.

	[Bug #15980] [Bug #16397]

	Note for backporters: this changeset can be viewed by `git diff -w`.
	---
	 compile.c                      | 232 +++++++++++++++++++++++------------------
	 test/coverage/test_coverage.rb |  12 +++
	 2 files changed, 141 insertions(+), 103 deletions(-)
------------------------------------------------------------------------
r67897 | usa | 2021-02-28 23:14:25 +0900 (Sun, 28 Feb 2021) | 1 line

merge revision(s) a7b9f085ff952fcb18f82de39b3bf9ab7e5ba3e7,9165fcdfa309052a2adc3c6100ab24204de6c2d1,e42d9d8df87f58b9bfa65647249822df25851375: [Backport #16401]
------------------------------------------------------------------------
r67896 | usa | 2021-02-28 23:01:55 +0900 (Sun, 28 Feb 2021) | 8 lines

merge revision(s) f72dc407: [Backport #16297]

	Prohibit calling undefined allocator [Bug #16297]

	---
	 object.c                | 31 +++++++++++++++++++++++++++++--
	 test/ruby/test_class.rb |  8 ++++++++
	 2 files changed, 37 insertions(+), 2 deletions(-)
------------------------------------------------------------------------
r67895 | usa | 2021-02-28 22:56:46 +0900 (Sun, 28 Feb 2021) | 14 lines

merge revision(s) 74b19e330adbdae2d8e53b58f1a2a7b725e69c8d: [Backport #16268]

	fix imemo entry description.

	* ext/objspace/objspace.c (count_imemo_objects): `imemo_type_ids`
	  should be match with `enum imemo_type` in internal.h and this
	  patch fix mismatch.


	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	---
	 ext/objspace/objspace.c        | 5 +++--
	 test/objspace/test_objspace.rb | 2 ++
	 2 files changed, 5 insertions(+), 2 deletions(-)
------------------------------------------------------------------------
r67894 | usa | 2021-02-28 22:47:29 +0900 (Sun, 28 Feb 2021) | 10 lines

merge revision(s) f364564e66d1db1de8e80d669287386595c8bc46: [Backport #16269]

	bignum.c (estimate_initial_sqrt): prevent integer overflow

	`Integer.sqrt(0xffff_ffff_ffff_ffff ** 2)` caused assertion failure
	because of integer overflow.  [ruby-core:95453] [Bug #16269]
	---
	 bignum.c                  | 10 +++++++++-
	 test/ruby/test_integer.rb |  3 +++
	 2 files changed, 12 insertions(+), 1 deletion(-)
------------------------------------------------------------------------
r67892 | usa | 2021-01-31 18:56:27 +0900 (Sun, 31 Jan 2021) | 4 lines

Backport webrick patch for CVE-2020-25613

[Backport #17201]

------------------------------------------------------------------------
r67891 | usa | 2021-01-31 18:52:51 +0900 (Sun, 31 Jan 2021) | 7 lines

merge revision(s) 7cb8904a12c850ee30dcd67817fa2f9dc3fee813: [Backport #17567]

	Extract correct processor name for ARM64 Macs

	---
	 tool/m4/ruby_universal_arch.m4 | 3 +++
	 1 file changed, 3 insertions(+)
------------------------------------------------------------------------
r67890 | usa | 2021-01-31 18:45:23 +0900 (Sun, 31 Jan 2021) | 4 lines

change the order of of SERVER_CERT and CA_CERT for OpenSSL 1.1.1

[backport #17501]

------------------------------------------------------------------------
r67888 | usa | 2020-12-09 22:53:56 +0900 (Wed, 09 Dec 2020) | 2 lines

[Backport #17381] replace the old certs in RubyGems

------------------------------------------------------------------------
r67886 | usa | 2020-10-27 23:25:35 +0900 (Tue, 27 Oct 2020) | 31 lines

merge revision(s): 07786ed

	test/net/http/test_https.rb: Stop the error due to openssl 1.1.1h

	On some environments that uses OpenSSL 1.1.1h, the two tests now fail.

	http://rubyci.s3.amazonaws.com/android29-x86_64/ruby-master/log/20200924T062352Z.fail.html.gz
	https://github.com/ruby/ruby/runs/1159288773?check_suite_focus=true

	```
	  1) Failure:
	TestNetHTTPS#test_get [/data/data/com.termux/files/home/cb/tmp/build/20200924T062352Z/ruby/test/net/http/test_https.rb:47]:
	<"0\x82\x03\xED0\x82\x02\xD5\xA0\x03..."> expected but was
	<"0\x82\x03\xE30\x82\x02\xCB\xA0\x03...">.
	```

	Not sure why, but verify_callback now seems to receive only SERVER_CERT
	but not CA_CERT.
	It would be good to investigate the issue furthermore, but tentatively,
	I want to stop the failures.

	test/net/http/test_https.rb: the order of verify_callback seems to
	 vary

	... depending upon the environment.

	test/net/http/test_https.rb: The test logic was buggy

	The expected certs must be `[CA_CERT, SERVER_CERT]` before 1.1.1g and
	`[SERVER_CERT]` after 1.1.1h.

------------------------------------------------------------------------
r67884 | usa | 2020-06-14 00:52:54 +0900 (Sun, 14 Jun 2020) | 10 lines

merge revision(s) 7e289cdf3fed588b2d5a6973e29f9ff95cb8d76c: [Backport #16949]

	[ruby/psych] Fixing compatibility with libyaml 0.2.5

	The main issue is that commas aren't allowed in local tags.  libyaml
	was updated to follow the spec, and our tests were out of date.

	See: https://github.com/yaml/libyaml/issues/196

	https://github.com/ruby/psych/commit/3f5e520fd3
------------------------------------------------------------------------
r67883 | nagachika | 2020-03-31 22:46:22 +0900 (Tue, 31 Mar 2020) | 1 line

bump teeny version to 2.6.7.
------------------------------------------------------------------------
r67875 | nagachika | 2020-03-31 20:21:22 +0900 (Tue, 31 Mar 2020) | 10 lines

merge revision: 61b7f86248bd121be2e83768be71ef289e8e5b90

ext/socket/init.c: do not return uninitialized buffer

Resize string buffer only if some data is received in
BasicSocket#read_nonblock and some methods.

Co-Authored-By: Samuel Williams <samuel.williams@oriontransfer.co.nz>


------------------------------------------------------------------------
r67859 | nagachika | 2020-03-30 13:47:36 +0900 (Mon, 30 Mar 2020) | 6 lines

merge revision(s) 4adb2d655dcd54b28366b4d17e86b21e2b622cd1: [Backport #16738]

	Make RbConfig::CONFIG values mutable [Bug #16738]

	As `RbConfig.expand` modifies the argument and involved `CONFIG`
	values, its values should be mutable.
------------------------------------------------------------------------
r67858 | nagachika | 2020-03-30 11:22:51 +0900 (Mon, 30 Mar 2020) | 13 lines

merge revision(s) 4c019f5a626523e99e2827ed917802e3097c380d,c3584dfacce4d0f2058d8403de6fdce4fd4d686b: [Backport #16676]

	check ar_table after `#hash` call

	ar_table can be converted to st_table just after `ar_do_hash()`
	function which calls `#hash` method. We need to check
	the representation to detect this mutation.
	[Bug #16676]

	check ar_table first.

	RHASH_AR_TABLE_SIZE() has assertion that it is a ar_talbe.
	The last commit breaks this assumption so check ar_table first.
------------------------------------------------------------------------
r67857 | nagachika | 2020-03-20 23:31:10 +0900 (Fri, 20 Mar 2020) | 20 lines

merge revision(s) c6633f21a49c90ab7c37076d79c286bbf3438c1f:

	Update some syslog tests to absurb the format change of FreeBSD
	 syslog

	FreeBSD

	```
	$ ruby -rsyslog -e 'Syslog.open("rubyspec", Syslog::LOG_PERROR) {|s| s.log(Syslog::LOG_ALERT, "Hello") }'
	rubyspec 78462 - - Hello
	```

	Linux

	```
	$ ruby -rsyslog -e 'Syslog.open("rubyspec", Syslog::LOG_PERROR) {|s| s.log(Syslog::LOG_ALERT, "Hello") }'
	rubyspec: Hello
	```

	https://github.com/freebsd/freebsd/commit/591ef7c8076109cff3c41f9bb50da996a34121e9
------------------------------------------------------------------------
r67856 | nagachika | 2020-03-20 17:12:05 +0900 (Fri, 20 Mar 2020) | 2 lines

backport 80b5a0ff2a7709367178f29d4ebe1c54122b1c27 partially as a securify fix for CVE-2020-10663.
The patch was provided by Jeremy Evans.
------------------------------------------------------------------------
r67855 | nagachika | 2020-03-20 17:07:34 +0900 (Fri, 20 Mar 2020) | 1 line

Add svn:ignore properties.
------------------------------------------------------------------------
r67854 | nagachika | 2020-03-20 16:01:35 +0900 (Fri, 20 Mar 2020) | 7 lines

merge revision(s) 87ad5ea729735ff6b8f1ac0bb3aad2aedd6f716e,9745e90197f129708986803e8913fb151862478a:

	Skip jit_test on some new RubyCI envs for now


	Propagate JIT skip to all tests

------------------------------------------------------------------------
r67853 | nagachika | 2020-03-20 15:47:10 +0900 (Fri, 20 Mar 2020) | 18 lines

merge revision(s) b3ea0980db87404c2b7763a3fdbe898c3812843d,5fbb4555b427909aed4fe2376c4c583849c1d51c,6477d98e49dbe04deb03caee1a58a34c3b79d4e4,16415fefc14e1419d5587288fb6a69fe5ccf94ba:

	Check MJIT support in one place

	to fix test failure on trunk-no-mjit
	https://gist.github.com/ko1/32ab982ffd7555988818773c08f97123

	Prefer using MJIT_CC for JIT support check

	because Solaris might have CC=cc and we'd like to check full path
	MJIT_CC=/opt/developerstudio12.5/bin/cc instead.

	test/lib/jit_support.rb: Update the regexp for icc

	MJIT_CC is always an absolute path.

	test/lib/jit_support.rb: The path to icc was changed

------------------------------------------------------------------------
r67852 | nagachika | 2020-03-20 15:43:59 +0900 (Fri, 20 Mar 2020) | 14 lines

merge revision(s) 66590,66615,66781:

	jit_support.rb: skip testing MJIT on oracle developer studio

	jit_support.rb: deal with -std=c99 flag

	CC is changed from "icc" to "icc -std=c99" by r66605.

	https://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-trunk/log/20181228T130003Z.fail.html.gz

	test_jit.rb: change format of test error output

	to avoid breaking redmine quote like
	https://bugs.ruby-lang.org/issues/15522
------------------------------------------------------------------------
r67851 | nagachika | 2020-03-20 15:36:58 +0900 (Fri, 20 Mar 2020) | 1 line

Add svn:ignore properties.
------------------------------------------------------------------------
r67850 | nagachika | 2020-03-20 15:12:36 +0900 (Fri, 20 Mar 2020) | 9 lines

merge revision(s) adcf0316d1ecedae2a9157ad941550e0c0fb510b: [Backport #16664]

	Prevent unloading methods used in root_fiber while calling another
	 Fiber (#2939)

	Fixing SEGVs like:
	http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2744905
	http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2744420
	http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2741400
------------------------------------------------------------------------
r67849 | nagachika | 2020-03-20 12:09:27 +0900 (Fri, 20 Mar 2020) | 4 lines

merge revision(s) a8dcab723316997d9e01c89d6df969edce75bdca:

	Avoid infinite loop on --jit-wait

------------------------------------------------------------------------
r67848 | nagachika | 2020-03-20 11:54:46 +0900 (Fri, 20 Mar 2020) | 6 lines

merge revision(s) 67325:

	Show retry's stdout as well

	because stderr did not have sufficient information
	https://ci.appveyor.com/project/ruby/ruby/builds/23242505/job/dirugxujk70nnhp6
------------------------------------------------------------------------
r67847 | nagachika | 2020-03-20 11:45:26 +0900 (Fri, 20 Mar 2020) | 7 lines

merge revision(s) 67322,67323:

	Insert --jit-verbose=2 logs for mswin debugging

	Explain why cl.exe needs --jit-verbose=2 [ci skip]

	I forgot to explain it in the previous commit
------------------------------------------------------------------------
r67846 | nagachika | 2020-03-19 21:55:36 +0900 (Thu, 19 Mar 2020) | 43 lines

merge revision(s) c14b67b2a8cf60b37cfb221d8b97c6eb91833522: [Backport #16139]

	Check frozen flag on MJIT setinstancevariable

	It does not seem to have a significant performance impact, hopefully?

	```
	$ benchmark-driver -v benchmark.yml --rbenv 'before --jit;after --jit' --repeat-count=24 --output=all
	before --jit: ruby 2.7.0dev (2019-09-03T21:02:24Z master 77596fb7a9) +JIT [x86_64-linux]
	after --jit: ruby 2.7.0dev (2019-09-04T01:54:44Z master 7363e22d79) +JIT [x86_64-linux]
	Calculating -------------------------------------
	                                 before --jit           after --jit
	Optcarrot Lan_Master.nes    48.44054595799523     71.67010255902900 fps
	                            71.32797692837639     71.97846863769546
	                            72.51921961607691     78.87360980544105
	                            73.54082925611047     79.80408132389941
	                            74.03503843709451     79.85739528572826
	                            74.04863857926493     79.89850834901381
	                            75.30266276129467     80.34607233076015
	                            75.69063990896244     80.88474397425360
	                            75.70458132587405     81.09234267781642
	                            77.39842764662852     82.13766823612643
	                            77.76922944068329     82.20398304840373
	                            81.17984044023393     82.26722630628272
	                            82.85235776076533     82.71375902781254
	                            83.04906099135320     82.75893420702198
	                            83.10214168136230     82.79668965325972
	                            83.71456007558125     82.85131667916379
	                            84.06658306760725     82.95676565411722
	                            84.25690684305728     83.19972846225775
	                            84.27938663923503     83.28510503845854
	                            84.45467716218090     83.41003730434703
	                            84.51563186125925     83.67773614721280
	                            84.56139892968321     84.02082201151110
	                            84.69819452180658     84.10495346787033
	                            84.78125989622576     84.47867803506055
	```

	Note for backporter:
	test_jit's `success_count` would be 1 in Ruby 2.6, since 2.7 introduced
	"MJIT recompile" on JIT-ed code cancel.

	[Bug #16139]
------------------------------------------------------------------------
r67845 | nagachika | 2020-03-18 20:59:35 +0900 (Wed, 18 Mar 2020) | 4 lines

merge revision(s) ee1334189b95cb5e7785e3415b332a7a76879ac3:

	Fix uplevel

------------------------------------------------------------------------
r67844 | nagachika | 2020-03-18 20:24:21 +0900 (Wed, 18 Mar 2020) | 4 lines

merge revision(s) 8a6ba10f9dd456cf54de800203cf04bbe42271fb: [Backport #12392]

	Do not make disabled directories at installation  [Bug #12392]

------------------------------------------------------------------------
r67843 | nagachika | 2020-03-10 20:41:32 +0900 (Tue, 10 Mar 2020) | 1 line

r66845 introduced mixed declarations and code.
------------------------------------------------------------------------
r67842 | nagachika | 2020-03-08 10:48:27 +0900 (Sun, 08 Mar 2020) | 9 lines

merge revision(s) 86022167461dc90b70164e2bb23316959bbfd6ba,47a1872cd8b901b8aab6dedce7fa3807c97d290d: [Backport #16681]

	Switch to download libffi source package to github releases from
	 sourceware.org


	Use osuosl instead of GitHub releases

	  Because the package provided by GitHub releases is different from sourceware.
------------------------------------------------------------------------
r67841 | nagachika | 2020-03-07 19:03:51 +0900 (Sat, 07 Mar 2020) | 10 lines

merge revision(s) 77596fb7a91cc119b25ac9e19b3c8682709765b4: [Backport #16138]

	Do not turn on keyword_init for Struct subclass if keyword hash is
	 empty

	This was accidentally turned on because there was no checking for
	Qundef.

	Also, since only a single keyword is currently supported, simplify
	the rb_get_kwargs call.
------------------------------------------------------------------------
r67840 | nagachika | 2020-03-07 18:57:02 +0900 (Sat, 07 Mar 2020) | 5 lines

merge revision(s) c4794ed73ad348a61a7cfbe3da0a7eb49ba46eb9: [Backport #16641]

	Avoid jumping to a wrong destination

	when the next insn is already compiled by former branches.
------------------------------------------------------------------------
r67839 | nagachika | 2020-03-07 18:44:38 +0900 (Sat, 07 Mar 2020) | 6 lines

merge revision(s) 6e6844320de989cb88a154e2ac75066ccea1bba2: [Backport #16619]

	Fixed duplicated warning

	As `command_rhs` is always a "value expression", `command_asgn`
	does not need the same check.
------------------------------------------------------------------------
r67838 | nagachika | 2020-03-07 18:38:30 +0900 (Sat, 07 Mar 2020) | 8 lines

merge revision(s) 4f19666e8b144600e959e4673f79d63f98bd637d: [Backport #16508]

	`Regexp` in `MatchData` can be `nil`

	`String#sub` with a string pattern defers creating a `Regexp`
	until `MatchData#regexp` creates a `Regexp` from the matched
	string.  `Regexp#last_match(group_name)` accessed its content
	without creating the `Regexp` though.  [Bug #16508]
------------------------------------------------------------------------
r67837 | nagachika | 2020-02-15 18:12:47 +0900 (Sat, 15 Feb 2020) | 6 lines

merge revision(s) 95ab9cd8f453099d7649dc0e0eec55ea891340f5: [Backport #16624]

	Restart timer thread even after preparation failed

	If the timer thread is left stopped, memory crash or segfault can
	happen. [Bug #16624]
------------------------------------------------------------------------
r67836 | nagachika | 2019-12-18 22:41:48 +0900 (Wed, 18 Dec 2019) | 28 lines

merge revision(s) d6a2bce64a7fa1099e507e1d36b5f1533f42f60f,c687be4bc01c9ce52ea990945d9304d6fe59fe9b: [Backport #16159]

	time.c (find_time_t): fix round-to-zero bug

	`find_time_t` did not work correctly for year older than the Epoch
	because it used C's integer division (which rounds negative to zero).

	For example, `TIme.new(1933)` returned a wrong time whose year is 1922
	in Asia/Kuala_Lumpur because there is no 00:00:00 1st Jan. 1933 in the
	time zone.

	```
	$ TZ=Asia/Kuala_Lumpur ruby -e 'p Time.new(1933)'
	1932-12-31 00:00:00 +0700
	```

	This change fixes the issue by using `DIV` macro instead of `/`.
	Now `Time.new(1933)` returns a time in 1933.

	```
	$ TZ=Asia/Kuala_Lumpur ruby -e 'p Time.new(1933)'
	1933-01-01 00:20:00 +0720
	```

	[Bug #16159]

	Added a test for [Bug #16159]

------------------------------------------------------------------------
r67835 | nagachika | 2019-12-15 17:28:52 +0900 (Sun, 15 Dec 2019) | 5 lines

merge revision(s) ff41663403d3eb76d95f465cb94e14d2faaa04d1: [Backport #16354]

	Fix memory corruption in Enumerable#reverse_each [ruby-dev:50867]
	 [Bug #16354]

------------------------------------------------------------------------
r67834 | nagachika | 2019-12-15 17:12:17 +0900 (Sun, 15 Dec 2019) | 21 lines

merge revision(s) 203b7fa1ae8cc40d41c38d684f70b3fea7fae813,0131fab749fb76800de09e49a6abf910201c5b58,9c0cd5c569ba22bc68d1a77ad6580a275cd99639,c144d7215b3444fa36d28d540b60170a5b30743d: [Backport #16196]

	Guard static variable first

	* ext/openssl/ossl_asn1.c (Init_ossl_asn1): register the static
	  variable to grab an internal object, before creating the object.
	  otherwise the just-created object could get collected during the
	  global variable list allocation.  [Bug #16196]

	Slimed down test runtime by stressing openssl.so only [Bug #16196]


	Prefer rb_gc_register_mark_object

	* ext/openssl/ossl_asn1.c (Init_ossl_asn1): prefer
	  `rb_gc_register_mark_object`, which is better for constant
	  objects, over `rb_gc_register_address` for global/static
	  variables which can be re-assigned at runtime.  [Bug #16196]

	Skip very time consuming test [Bug #16196]

------------------------------------------------------------------------
r67833 | nagachika | 2019-12-15 16:20:58 +0900 (Sun, 15 Dec 2019) | 4 lines

merge revision(s) 463092b84da7933f307cc8747f948f68ef19f5fd: [Backport #16279]

	Update rake-12.3.3.

------------------------------------------------------------------------
r67832 | nagachika | 2019-12-15 16:14:45 +0900 (Sun, 15 Dec 2019) | 14 lines

merge revision(s) c9423b016cfeab852bc5a829e55e0a11f80b3ab7,0b1e26398e018116180bf41cb63887f77d5d1b82,78ee2c245331e353e218b8fac9ca722a2bcd8fea: [Backport #15968]

	marshal.c: check instance variable count

	* marshal.c (w_obj_each): ensure that no instance variable was
	  added while dumping other instance variables.  [Bug #15968]

	Hoisted out w_ivar_each


	marshal.c: check instance variable count

	* marshal.c (w_ivar_each): ensure that no instance variable was
	  removed while dumping other instance variables.  [Bug #15968]
------------------------------------------------------------------------
r67831 | nagachika | 2019-12-09 21:25:34 +0900 (Mon, 09 Dec 2019) | 5 lines

merge revision(s) 7d805e67f3275aef066d77aa9c32bef715c362ed: [Backport #15780]

	Avoid triggering autoload in Module#const_defined?(String)

	[Bug #15780]
------------------------------------------------------------------------
r67830 | nagachika | 2019-12-09 21:06:38 +0900 (Mon, 09 Dec 2019) | 16 lines

merge revision(s) e1b592b508c72a56ae012869d97fe1580ff87246,d10451f3fd51f577e704db770de48d05044eb45c: [Backport #15758]

	test_module.rb: fix a typo

	* test/ruby/test_module.rb (TestModule#test_nested_get): fix a
	  typo.  nested module's name is a qualified path.

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

	object.c: fix searching nested const paths

	* object.c (rb_mod_const_get, rb_mod_const_defined): nested const
	  paths should not search from toplevel constants.
	  [ruby-core:92202] [Bug #15758]

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
------------------------------------------------------------------------
r67828 | nagachika | 2019-11-09 07:51:51 +0900 (Sat, 09 Nov 2019) | 14 lines

merge revision(s) 6333020fc924d3ae63775c032bbe8f57364cd42e:

	atime may not updated unless strictatime is set on macOS Catalina

	Cited from mount(8):

	```
	strictatime
	        Always update the file access time when reading from a
	        file. Without this option the filesystem may default to a
	        less strict update mode, where some access time updates
	        are skipped for performance reasons. This option could be
	        ignored if it is not supported by the filesystem.
	```
------------------------------------------------------------------------
r67825 | nagachika | 2019-10-02 20:18:43 +0900 (Wed, 02 Oct 2019) | 10 lines

merge revision(s) 63ab7046a1a5c374a52dfa79406fe52d92d80344:

	Skip POINTOPOINT of IPv4 too instead of IPv6 only

	Fix following error on `utun*`:
	```
	  1) Error:
	TestSocket#test_udp_server:
	Errno::ECONNREFUSED: Connection refused - recvmsg(2)
	```
------------------------------------------------------------------------
r67822 | nagachika | 2019-10-02 07:38:59 +0900 (Wed, 02 Oct 2019) | 1 line

bump up teeny version to 2.6.6.
------------------------------------------------------------------------
r67810 | nagachika | 2019-10-01 19:59:35 +0900 (Tue, 01 Oct 2019) | 4 lines

lib/shell/command-processor.rb (Shell#[]): prevent unknown command

`FileTest.send(command, ...)` allows to call not only FileTest-related
methods but also any method that belongs to Kernel, Object, etc.
------------------------------------------------------------------------
r67808 | nagachika | 2019-10-01 19:57:43 +0900 (Tue, 01 Oct 2019) | 9 lines

merge revision(s) 3ce238b5f9795581eb84114dcfbdf4aa086bfecc:

	WEBrick: prevent response splitting and header injection

	This is a follow up to d9d4a28f1cdd05a0e8dabb36d747d40bbcc30f16.
	The commit prevented CRLR, but did not address an isolated CR or an
	isolated LF.

	Co-Authored-By: NARUSE, Yui <naruse@airemix.jp>
------------------------------------------------------------------------
r67807 | nagachika | 2019-10-01 19:56:49 +0900 (Tue, 01 Oct 2019) | 6 lines

merge revision(s) 36e057e26ef2104bc2349799d6c52d22bb1c7d03:

	Loop with String#scan without creating substrings

	Create the substrings necessary parts only, instead of cutting the
	rest of the buffer.  Also removed a useless, probable typo, regexp.
------------------------------------------------------------------------
r67806 | nagachika | 2019-10-01 19:56:11 +0900 (Tue, 01 Oct 2019) | 6 lines

merge revision(s) a0a2640b398cffd351f87d3f6243103add66575b:

	Fix for wrong fnmatch patttern

	* dir.c (file_s_fnmatch): ensure that pattern does not contain a
	  NUL character.  https://hackerone.com/reports/449617
------------------------------------------------------------------------
r67805 | nagachika | 2019-09-28 13:32:46 +0900 (Sat, 28 Sep 2019) | 8 lines

merge revision(s) 8b3774be3dd9f472bddd99e84e3c9fe2ff99d7ac: [Backport #15935]

	Fix memory leak

	* string.c (str_make_independent_expand): free independent buffer.
	  [Bug# 15935]

	Co-Authored-By: luke-gru (Luke Gruber) <luke.gru@gmail.com>
------------------------------------------------------------------------
r67804 | nagachika | 2019-09-27 20:23:18 +0900 (Fri, 27 Sep 2019) | 15 lines

merge revision(s) 93faa011d393bb4b5cf31a0cbb46922f0a5e7cdc: [Backport #16151]

	Tag string shared roots to fix use-after-free

	The buffer deduplication codepath in rb_fstring can be used to free the buffer
	of shared string roots, which leads to use-after-free.

	Introudce a new flag to tag strings that at one point have been a shared root.
	Check for it in rb_fstring to avoid freeing buffers that are shared by
	multiple strings. This change is based on nobu's idea in [ruby-core:94838].

	The included test case test for the sequence of calls to internal functions
	that lead to this bug. See attached ticket for Ruby level repros.

	[Bug #16151]
------------------------------------------------------------------------
r67803 | nagachika | 2019-09-14 11:24:58 +0900 (Sat, 14 Sep 2019) | 15 lines

merge revision(s) ade1283ca276f7d589ffd3539fbc7b9817f682d5: [Backport #16136]

	Fix a use-after-free bug by avoiding rb_str_new_frozen

	`str2 = rb_str_new_frozen(str1)` seems to make str1 a shared string that
	refers to str2, but str2 is not marked as STR_IS_SHARED_M nor
	STR_NOFREE.
	`rb_fstring(str2)` frees str2's ptr because it is not marked, and the
	free'ed pointer is the same as str1's ptr.
	After that, accessing str1 may cause use-after-free memory corruption.

	I guess this is a bug of rb_str_new_frozen, but I'm completely unsure
	what it should be; the string states and flags are not documented.
	So, this is a workaround for [Bug #16136].  I confirmed that rspec of
	activeadmin runs gracefully.
------------------------------------------------------------------------
r67802 | nagachika | 2019-09-13 20:21:17 +0900 (Fri, 13 Sep 2019) | 15 lines

merge revision(s) 547887138f19959f649b1c0dbcde5659ae3878ed:

	test/ruby/test_fiber.rb: reduce the count of object creation to cause
	 GC

	The test consistently fails on OpenBSD.

	https://rubyci.org/logs/rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20190903T010009Z.fail.html.gz
	```
	  1) Failure:
	TestFiber#test_fork_from_fiber [/home/chkbuild/chkbuild/tmp/build/20190903T010009Z/ruby/test/ruby/test_fiber.rb:327]:
	[ruby-core:41456].
	<0> expected but was
	<1>.
	```
------------------------------------------------------------------------
r67801 | nagachika | 2019-09-13 20:17:07 +0900 (Fri, 13 Sep 2019) | 8 lines

merge revision(s) b0b0ded5aa2cf7c4574b057d8326ed4e1c172c12:

	webrick/test_utils.rb: loosen timeout severity

	to stabilize CI failure like:
	https://rubyci.org/logs/rubyci.s3.amazonaws.com/osx1013/ruby-trunk/log/20181228T114501Z.fail.html.gz

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
------------------------------------------------------------------------
r67799 | nagachika | 2019-08-29 20:50:49 +0900 (Thu, 29 Aug 2019) | 1 line

bump up teeny version to 2.6.5.
------------------------------------------------------------------------
r67797 | nagachika | 2019-08-28 16:36:31 +0900 (Wed, 28 Aug 2019) | 7 lines

merge revision(s) f308ab2131ee675000926540cbb8c13c91dc3be5,989e8ad322afdfa3aa06e74b89fc42aef42895d0:

	Remove jquery.js


	Remove debug print [ci skip]

------------------------------------------------------------------------
r67792 | nagachika | 2019-08-28 14:41:10 +0900 (Wed, 28 Aug 2019) | 7 lines

merge revision(s) 4e038a7e64a9d52eed59b8f05647d4e58d265ec3: [Backport #5400]

	Revert "parse.y: Deprecate flip-flops"

	This reverts commit bae638ad5b782c44c80efe33834cb9039279af46.

	[Feature #5400]
------------------------------------------------------------------------
r67782 | nagachika | 2019-08-27 22:00:48 +0900 (Tue, 27 Aug 2019) | 1 line

bump up teeny version to 2.6.4.
------------------------------------------------------------------------
r67780 | nagachika | 2019-08-27 21:54:19 +0900 (Tue, 27 Aug 2019) | 1 line

Update rdoc version from 6.1.0 to 6.1.2.
------------------------------------------------------------------------
r67750 | nagachika | 2019-08-22 20:39:49 +0900 (Thu, 22 Aug 2019) | 6 lines

merge revision(s) fd0e3bd2497d4e796b719c7b7154dc3c945f87b1: [Backport #14834]

	fix VC 2013 compile error

	It seems the compiler does not support VLAs.
	See also: https://ci.appveyor.com/project/ruby/ruby/builds/26392589/job/px6nuiuw4e78weg1
------------------------------------------------------------------------
r67749 | nagachika | 2019-08-22 20:28:30 +0900 (Thu, 22 Aug 2019) | 4 lines

merge revision(s) 9557069299ac3b96691040a541afa65761a724ad: [Backport #15992]

	Avoid creating Hash objects per each mon_synchronize call (#2393)

------------------------------------------------------------------------
r67747 | nagachika | 2019-08-18 16:22:19 +0900 (Sun, 18 Aug 2019) | 7 lines

merge revision(s) d5c33364e3c0efb15e11df417c925afee2cdb9c9: [Backport #16105]

	Fixed heap-use-after-free

	* string.c (rb_str_sub_bang): retrieves a pointer to the
	  replacement string buffer just before using it, for the case of
	  replacement with the receiver string itself.  [Bug #16105]
------------------------------------------------------------------------
r67746 | nagachika | 2019-08-18 15:53:02 +0900 (Sun, 18 Aug 2019) | 6 lines

merge revision(s) 5b1bf8dd2d08ae7371ecf025967376bb794ed651: [Backport #16099]

	UTF LE is fixed at least the first 2 bytes

	* io.c (io_strip_bom): if the first 2 bytes are 0xFF0xFE, it
	should be a little-endian UTF, 16 or 32.  [Bug #16099]
------------------------------------------------------------------------
r67745 | nagachika | 2019-08-18 15:10:46 +0900 (Sun, 18 Aug 2019) | 18 lines

merge revision(s) 5d33f787169bcc3594d2264726695d58c4a06899,8b162ce9d1003e4e469d8f48cb9a2076fd45b47c: [Backport #14834]

	fix tracepoint + backtrace SEGV

	PC modification in gc_event_hook_body was careless.  There are (so
	to say) abnormal iseqs stored in the cfp.  We have to check sanity
	before we touch the PC.

	This has not been fixed because there was no way to (ab)use the
	setup from pure-Ruby.  However by using our official C APIs it is
	possible to touch such frame(s), resulting in SEGV.

	Fixes [Bug #14834].

	Fix assertion failure when VM_CHECK_MODE

	Some VM frames (dummy and top pushed by `rb_vm_call_cfunc`) has
	iseq but has no pc.
------------------------------------------------------------------------
r67744 | nagachika | 2019-08-18 14:21:34 +0900 (Sun, 18 Aug 2019) | 12 lines

merge revision(s) df317151a5b4e0c5a30fcc321a9dc6abad63f7ed: [Backport #16019]

	should not free local hook_list here.

	exec_hooks_postcheck() clean executed hook_list if it is needed.
	list_exec is freed if there are no events and this list is local
	event (connected to specific iseq). However, iseq keeps to point
	this local hook_list, freed list. To prevent this situation,
	do not free hook_list here even if it has no events.

	This issue is reported by @joker1007.
	https://twitter.com/joker1007/status/1153649170797830144
------------------------------------------------------------------------
r67743 | nagachika | 2019-08-18 14:07:50 +0900 (Sun, 18 Aug 2019) | 10 lines

merge revision(s) f1b76ea63ce40670071a857f408a4747c571f1e9,1d1f98d49c9908f4e3928e582d31fd2e9f252f92: [Backport #16024]

	Occupy match data

	* string.c (rb_str_split_m): occupy match data not to be modified
	  during yielding the block.  [Bug #16024]

	Reuse match data

	* string.c (rb_str_split_m): reuse occupied match data.  [Bug #16024]
------------------------------------------------------------------------
r67742 | nagachika | 2019-08-18 13:32:59 +0900 (Sun, 18 Aug 2019) | 8 lines

merge revision(s) f91879a7b548284c93743168acfd11e3d2aeefac: [Backport #15992]

	handle_interrupt to defend monitor state [Bug #15992]

	If an exception is raised from another thread for example Timeout
	and this thread is just after `mon_exit`'s `@mon_owner = nil`,
	the exception breaks the state of MonitorMixin. To prevent that situation,
	it need to block interruption in mon_enter and mon_exit.
------------------------------------------------------------------------
r67741 | nagachika | 2019-08-11 21:17:58 +0900 (Sun, 11 Aug 2019) | 12 lines

merge revision(s) 8aecc90974ab1ac87056f77e2cb3406c5c041504,2f6cc15cdb3d64135b29cfd5ee376a5a03ebbee7: [Backport #15965]

	Hoisted out WIDE_ENCODINGS


	Fixed String#grapheme_clusters with wide encodings

	* string.c (get_reg_grapheme_cluster): make regexp from properly
	  encoded sources fro wide-char encodings.  [Bug #15965]

	* regparse.c (node_extended_grapheme_cluster): suppress false
	  duplicated range warning for the time being.
------------------------------------------------------------------------
r67740 | nagachika | 2019-08-09 23:28:00 +0900 (Fri, 09 Aug 2019) | 13 lines

merge revision(s) ec8e5f5aa64e2a54cf1e303f2b012c98e8d521ba,5a187e26adc8aa32367f294c1496935c7356d386: [Backport #15952]

	array.c: always check frozenness in Array#unshift. Fixes [Bug #15952]

	Closes: https://github.com/ruby/ruby/pull/2251

	array.c add back shared array optimization to
	 ary_ensure_room_for_unshift

	Bug fix in commit ec8e5f5aa64e2a [Bug #15952] disabled an
	optimization in this function.

	Closes: https://github.com/ruby/ruby/pull/2252
------------------------------------------------------------------------
r67739 | nagachika | 2019-08-09 22:42:26 +0900 (Fri, 09 Aug 2019) | 6 lines

merge revision(s) 8f51da5d41f0642d5a971e4223d1ba14643c6398: [Backport #15946]

	Get rid of undefined behavior

	* string.c (rb_str_sub_bang): str and repl can be same.
	  [Bug #15946]
------------------------------------------------------------------------
r67738 | nagachika | 2019-08-09 22:41:04 +0900 (Fri, 09 Aug 2019) | 11 lines

merge revision(s) 28678997e40869f5591eae60edd9757334426ffb,8797f48373dcfa3ff8e748667732dea8aea4347e: [Backport #15937]

	Preserve the string content at self-copying

	* string.c (rb_str_init): preserve the embedded content when
	  self-copying with a capacity.  [Bug #15937]

	New buffer for shared string

	* string.c (rb_str_init): allocate new buffer if the string is
	  shared.  [Bug #15937]
------------------------------------------------------------------------
r67737 | nagachika | 2019-08-08 01:30:37 +0900 (Thu, 08 Aug 2019) | 21 lines

merge revision(s) ae2a904ce9bffedee7d110dc60fd51c0a2879a5b,165ddfda20f6db8a3149d14c4f431fc242ddab70,fa7a768fdfe5223a29db4fa71b3e6101fb02ad51: [Backport #16051]

	Update the certificate files to make the test pass on Debian 10

	The old certificate files (for example, test/rubygems/ca_cert.pem) were
	signed by SHA1.  This message digest is considered too weak and rejected
	by OpenSSL 1.1.1 or later.  Because of this, the test suite does not
	pass on Debian 10.

	https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20190527T123003Z.fail.html.gz#test%2Frubygems

	This change regenerates the files.
	A shell script for the regeneration (util/create_certs.sh) is also
	added.

	* remove trailing spaces.


	Removed inconsistency file from upstream repository of rubygems.

	  followed up ae2a904ce9bffedee7d110dc60fd51c0a2879a5b
------------------------------------------------------------------------
r67736 | nagachika | 2019-08-07 22:05:00 +0900 (Wed, 07 Aug 2019) | 15 lines

merge revision(s) 5931857281ce45c1c277aa86d1588119ab00a955,76e2370f132f83c16c9de39a0a9356579f364527: [Backport #16041]

	Fix dangling path name from fstring

	* parse.y (yycompile): make sure in advance that the `__FILE__`
	  object shares a fstring, to get rid of dangling path name.
	  Fixed up 53e9908d8afc7f03109b0aafd1698ab35f512b05.  [Bug #16041]

	* vm_eval.c (eval_make_iseq): ditto.

	Fix dangling path name from fstring

	* load.c (rb_require_internal): make sure in advance that the path
	  to be loaded shares a fstring, to get rid of dangling path name.
	  Fixed up 5931857281ce45c1c277aa86d1588119ab00a955.  [Bug #16041]
------------------------------------------------------------------------
r67735 | nagachika | 2019-08-07 21:38:15 +0900 (Wed, 07 Aug 2019) | 12 lines

merge revision(s) 1e54903684aa3c9ea3fe54520157846a1b1f07be: [Backport #16051]

	test/openssl: Support OpenSSL 1.1.1

	OpenSSL 1.1.1 rejects some shorter keys, which caused some failures of
	`make test-all TESTS=openssl`.

	https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20190606T003005Z.fail.html.gz

	This change merges 6bbc31ddd1 and 63fb3a36d1 in
	https://github.com/ruby/openssl.
	Reference: https://github.com/ruby/openssl/pull/217
------------------------------------------------------------------------
r67734 | nagachika | 2019-08-07 21:25:24 +0900 (Wed, 07 Aug 2019) | 6 lines

merge revision(s) 43730256e800dd8e0c5cc482e9861868590ae037:

	open-uri: Regenerate server certificates for tests

	OpenSSL 1.1.1 requires 2048 bits or more.  This change will fix:
	https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20190527T003004Z.fail.html.gz#test%2Fopen-uri
------------------------------------------------------------------------
r67733 | nagachika | 2019-08-07 21:23:48 +0900 (Wed, 07 Aug 2019) | 25 lines

merge revision(s) 9dec4e8fc3a6018261834b5ac9b9877f787b97ca: [Backport #15934]

	String#b: Don't depend on dependent string

	Registering a string that depend on a dependent string as fstring
	can lead to use-after-free. See c06ddfe and 3f95620 for details.

	The following script triggers use-after-free on trunk, 2.4.6, 2.5.5
	and 2.6.3. Credits to @wanabe for using eval as a cross-version way
	of registering a fstring.

	```ruby
	a = ('j' * 24).b.b
	eval('', binding, a)

	p a
	4.times { GC.start }
	p a
	```

	 - string.c (str_replace_shared_without_enc): when given a
	   dependent string, depend on the root of the dependent
	   string.

	[Bug #15934]
------------------------------------------------------------------------
r67732 | nagachika | 2019-08-07 21:03:52 +0900 (Wed, 07 Aug 2019) | 15 lines

merge revision(s) 53e9908d8afc7f03109b0aafd1698ab35f512b05: [Backport #15916]

	Fix memory leak

	* string.c (str_replace_shared_without_enc): free previous buffer
	  before replaced.

	* parse.y (gettable): make sure in advance that the `__FILE__`
	  object shares a fstring, to get rid of replacement with the
	  fstring later.
	  TODO: this hack may be needed in other places.

	[Bug #15916]

	Co-Authored-By: luke-gru (Luke Gruber) <luke.gru@gmail.com>
------------------------------------------------------------------------
r67731 | nagachika | 2019-08-07 20:45:24 +0900 (Wed, 07 Aug 2019) | 80 lines

merge revision(s) 3f9562015e651735bfc2fdd14e8f6963b673e22a,c06ddfee878524168e4af07443217ed2f8d0954b,3b3b4a44e57dfe03ce3913009d69a33d6f6100be: [Backport #15792]

	Get rid of indirect sharing

	* string.c (str_duplicate): share the root shared string if the
	  original string is already sharing, so that all shared strings
	  refer the root shared string directly.  indirect sharing can
	  cause a dangling pointer.

	[Bug #15792]

	str_duplicate: Don't share with a frozen shared string

	This is a follow up for 3f9562015e651735bfc2fdd14e8f6963b673e22a.
	Before this commit, it was possible to create a shared string which
	shares with another shared string by passing a frozen shared string
	to `str_duplicate`.

	Such string looks like:

	```
	 --------                    -----------------
	 | root | ------ owns -----> | root's buffer |
	 --------                    -----------------
	     ^                             ^   ^
	 -----------                       |   |
	 | shared1 | ------ references -----   |
	 -----------                           |
	     ^                                 |
	 -----------                           |
	 | shared2 | ------ references ---------
	 -----------
	```

	This is bad news because `rb_fstring(shared2)` can make `shared1`
	independent, which severs the reference from `shared1` to `root`:

	```c
	/* from fstr_update_callback() */
	str = str_new_frozen(rb_cString, shared2);  /* can return shared1 */
	if (STR_SHARED_P(str)) { /* shared1 is also a shared string */
	    str_make_independent(str);  /* no frozen check */
	}
	```

	If `shared1` was the only reference to `root`, then `root` can be
	reclaimed by the GC, leaving `shared2` in a corrupted state:

	```
	 -----------                         --------------------
	 | shared1 | -------- owns --------> | shared1's buffer |
	 -----------                         --------------------
	      ^
	      |
	 -----------                         -------------------------
	 | shared2 | ------ references ----> | root's buffer (freed) |
	 -----------                         -------------------------
	```

	Here is a reproduction script for the situation this commit fixes.

	```ruby
	a = ('a' * 24).strip.freeze.strip
	-a
	p a
	4.times { GC.start }
	p a
	```

	 - string.c (str_duplicate): always share with the root string when
	   the original is a shared string.
	 - test_rb_str_dup.rb: specifically test `rb_str_dup` to make
	   sure it does not try to share with a shared string.

	[Bug #15792]

	Closes: https://github.com/ruby/ruby/pull/2159

	Update dependencies

------------------------------------------------------------------------
r67730 | nagachika | 2019-08-07 19:52:38 +0900 (Wed, 07 Aug 2019) | 1 line

Update Xcode or Homebrew (apply https://github.com/nobu/ruby/commit/c86b74dc431d4cbdeb7d3c3fe5ac0693dc731bb1) [Bug #16032]
------------------------------------------------------------------------
r67729 | nagachika | 2019-08-05 23:05:59 +0900 (Mon, 05 Aug 2019) | 5 lines

merge revision(s) 5e018214e7435030727a97ac49db038d96438e74: [Backport #15720]

	Fix SystemStackError when calling a method in an unused refinement

	Fixes [Bug #15720]
------------------------------------------------------------------------
r67728 | nagachika | 2019-08-05 22:53:03 +0900 (Mon, 05 Aug 2019) | 5 lines

merge revision(s) c1d78a7f0ece2004822193a0c1f1fd3dc38c2fdf: [Backport #15360]

	do_mutex_lock: release mutex before checking for interrupts (fixes
	 issue 15360)

------------------------------------------------------------------------
r67727 | nagachika | 2019-08-05 22:39:48 +0900 (Mon, 05 Aug 2019) | 6 lines

merge revision(s) 2403f9ac3af170ce0107a709a9cb510fe0501648:

	Expand the timeout of
	 `test_pstore_files_are_accessed_as_binary_files`

	Sometimes causes timeout error on mswin CI
------------------------------------------------------------------------
r67726 | nagachika | 2019-08-04 23:29:17 +0900 (Sun, 04 Aug 2019) | 10 lines

merge revision(s) 66977: [Backport #15578]

	Revert r63383, r63248 "compile.c: copy a short insn with leave"

	When copying `leave` insn, TRACE also should be copied if it is
	present, but this optimization is trivial and not worth the
	complexity.  [ruby-core:91366] [Bug #15578]

	4cae5353c03009beb1e0a1619422072773580609
	5afd479de63b6609ddcd1510da94d2c1ac384f7f
------------------------------------------------------------------------
r67725 | nagachika | 2019-08-03 21:27:02 +0900 (Sat, 03 Aug 2019) | 22 lines

merge revision(s) 1ef39d8d099f145222b9352423af16a2bab6e05b: [Backport #15798]

	Fix process not waking up on signals on OpenBSD

	When using UBF_TIMER_PTHREAD (the UBF handler on OpenBSD), the
	timer_pthread_fn function will not signal the main thread with
	SIGVTALRM in cases where timer_pthread is armed before
	consume_communication_pipe is called.  This is because
	consume_communication_pipe will unarm the timer.

	Fix this by checking the return value of consume_communication_pipe.
	If it returns TRUE and the timer_pthread is disarmed, then signal
	the main thread with SIGVTALRM.

	On OpenBSD, this fixes TestThread#test_thread_timer_and_interrupt, and
	fixes hangs in TestProcess#test_execopts_redirect_open_fifo_interrupt_raise
	and TestProcess#test_execopts_redirect_open_fifo_interrupt_print.
	It also fixes the use of Ctrl+C/SIGINT in irb on OpenBSD. It does not
	cause any test failures on Linux when UBF_TIMER_PTHREAD is forced as
	the UBF handler.

	Fixes [Bug #15798]
------------------------------------------------------------------------
r67724 | nagachika | 2019-08-01 22:56:16 +0900 (Thu, 01 Aug 2019) | 14 lines

merge revision(s) 6375c68f8851e1e0fee8a95afba91c4555097127,c05eaa93258ddc01e685b6cc3a0da82998a2af48: [Backport #15839]

	parse.y: function parser_mixed_error & parser_mixed_escape

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

	Fix mixed encoding in heredoc

	Heredocs are parsed line-by-line, so we need to keep track of the
	temporary encoding of the string.  Previously, a heredoc would
	only detect mixed encoding errors if they were on the same line,
	this changes things so they will be caught on different lines.

	Fixes [Bug #15839]
------------------------------------------------------------------------
r67723 | nagachika | 2019-08-01 22:18:27 +0900 (Thu, 01 Aug 2019) | 7 lines

merge revision(s) 5bab1304af25a843728dbcd2f3594913740aecb0: [Backport #15847]

	fix visibility of SecureRandom.gen_random

	Aliasing a method preserves its visibility.  These aliases turn
	formerly-public methods into private.  Should make them public
	again.  [Bug #15847]
------------------------------------------------------------------------
r67721 | nagachika | 2019-07-31 23:47:34 +0900 (Wed, 31 Jul 2019) | 9 lines

merge revision(s) ea42423908ed055f9039b1dce6e9a232a3b2dd90: [Backport #15887]

	Keep vm->orig_progname alive

	`vm->orig_progname` can be different from `vm->progname` when user
	code assigns to `$0`. While `vm->progname` is kept alive by the
	global table, nothing marked `vm->orig_progname`.

	[Bug #15887]
------------------------------------------------------------------------
r67720 | nagachika | 2019-07-31 23:32:43 +0900 (Wed, 31 Jul 2019) | 10 lines

merge revision(s) b165bedcbd41d791a85fc1ce90b57a0d0525f319,ac00bdc8a8ac2c62a94dd36a7784d15bbcb7df19: [Backport #15821]

	skip a test to pass CIs.

	I'm debugging [Bug #15821] but my patch introduces another issue.
	So I simply skip this test and re-enable it later.

	Do not modify shared array

	[Bug #15821]
------------------------------------------------------------------------
r67719 | nagachika | 2019-07-31 23:14:59 +0900 (Wed, 31 Jul 2019) | 5 lines

merge revision(s) 374c8f4ebab1a740990330c732b9de965c5e8d10: [Backport #15823]

	Fixed about ARGF.lineno

	[Bug #15823]
------------------------------------------------------------------------
r67718 | nagachika | 2019-07-31 23:10:09 +0900 (Wed, 31 Jul 2019) | 12 lines

merge revision(s) d0ba4abf1a00339ebbb5d405db3240a8bdb7b68b,54eac83b2ad77ddea84fa6d66c09e0bb014cf61e: [Backport #15786]

	Add RB_ID_SERIAL_MAX


	Hide internal IDs

	* parse.y (internal_id): number the ID serial for internal use by
	  counting down from the neary maximum value, not to accidentally
	  match permanent IDs.

	[Bug #15768]
------------------------------------------------------------------------
r67716 | nagachika | 2019-07-28 23:16:53 +0900 (Sun, 28 Jul 2019) | 5 lines

merge revision(s) a6a26e42b15c46f117f4fce07a2050e9d727355d: [Backport #15906]

	compile.c: Partially revert r63870 which caused wrong optimization

	[Bug #15906]
------------------------------------------------------------------------
r67715 | nagachika | 2019-07-28 23:02:10 +0900 (Sun, 28 Jul 2019) | 4 lines

merge revision(s) dcb6a6ae3e2b8a3e298e7f0d4a3e7f8ff102a30e: [Backport #15845]

	Windows simply causes an error to open invalid path

------------------------------------------------------------------------
r67714 | nagachika | 2019-07-26 08:17:08 +0900 (Fri, 26 Jul 2019) | 5 lines

merge revision(s) b72623012d74abdb06210153ed48c9e2fa075bbd: [Backport #15775]

	Update broken URL in Float documentation.

	  [Misc #15775][ruby-core:92332]
------------------------------------------------------------------------
r67713 | nagachika | 2019-07-26 08:11:57 +0900 (Fri, 26 Jul 2019) | 18 lines

merge revision(s) a15f7dd1fb1148c3d586238ee6907875f2e40379: [Backport #15803]

	Always mark the string returned by File.realpath as tainted

	This string can include elements that were not in either string
	passed to File.realpath, even if one of the strings is an
	absolute path, due to symlinks:

	```ruby
	Dir.mkdir('b') unless File.directory?('b')
	File.write('b/a', '') unless File.file?('b/a')
	File.symlink('b', 'c') unless File.symlink?('c')
	path = File.realpath('c/a'.untaint, Dir.pwd.untaint)
	path # "/home/testr/ruby/b/a"
	path.tainted? # should be true, as 'b' comes from file system
	```

	[Bug #15803]
------------------------------------------------------------------------
r67712 | nagachika | 2019-06-22 10:56:07 +0900 (Sat, 22 Jun 2019) | 4 lines

merge revision(s) 5e23b1138f16af0defb184d7deeffadfd2ce3c04: [Backport #15820]

	Fix potential memory leak

------------------------------------------------------------------------
r67711 | nagachika | 2019-06-16 12:20:55 +0900 (Sun, 16 Jun 2019) | 7 lines

merge revision(s) af1e487e9bb763b939dc6704c9a343c9eafa1637,6f8ac2cb28f99a4b2588c59ec44eff6ed38c4d3b: [Backport #15801]

	Updated marked commits for ChangeLog


	Include the beginning commit in ChangeLog

------------------------------------------------------------------------
r67710 | nagachika | 2019-06-13 21:23:01 +0900 (Thu, 13 Jun 2019) | 119 lines

merge revision(s) 7b7043e5da8589e01b94575d4ed647e909e5c875: [Backport #15793]

	eliminate use of freed memory

	rb_io_fptr_finalize_internal frees the memory region.

	=================================================================
	==85264==ERROR: AddressSanitizer: heap-use-after-free on address 0x610000000d8c at pc 0x5608e38077f7 bp 0x7ffee12d5440 sp 0x7ffee12d5438
	READ of size 4 at 0x610000000d8c thread T0
	    #0 0x5608e38077f6 in rb_io_memsize io.c:4749:24
	    #1 0x5608e37a0481 in obj_memsize_of gc.c:3547:14
	    #2 0x5608e37a4f30 in check_rvalue_consistency gc.c:1107:2
	    #3 0x5608e37a2624 in RVALUE_OLD_P gc.c:1218:5
	    #4 0x5608e37a5bae in rb_gc_force_recycle gc.c:6652:18
	    #5 0x5608e38191f9 in rb_f_backquote io.c:9021:5
	    #6 0x5608e3d8aa14 in call_cfunc_1 vm_insnhelper.c:2058:12
	    #7 0x5608e3d6e23d in vm_call_cfunc_with_frame vm_insnhelper.c:2211:11
	    #8 0x5608e3d54a35 in vm_call_cfunc vm_insnhelper.c:2229:12
	    #9 0x5608e3d5253b in vm_call_method_each_type vm_insnhelper.c:2564:9
	    #10 0x5608e3d51f50 in vm_call_method vm_insnhelper.c:2701:13
	    #11 0x5608e3cf2de4 in vm_call_general vm_insnhelper.c:2734:12
	    #12 0x5608e3d79918 in vm_sendish vm_insnhelper.c:3627:11
	    #13 0x5608e3d06cf5 in vm_exec_core insns.def:789:11
	    #14 0x5608e3d43700 in rb_vm_exec vm.c:1892:22
	    #15 0x5608e3d47cbf in rb_iseq_eval_main vm.c:2151:11
	    #16 0x5608e37620ca in ruby_exec_internal eval.c:262:2
	    #17 0x5608e376198b in ruby_exec_node eval.c:326:12
	    #18 0x5608e37617d0 in ruby_run_node eval.c:318:25
	    #19 0x5608e35c9486 in main main.c:42:9
	    #20 0x7f62e9421b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
	    #21 0x5608e3522289 in _start (miniruby+0x15f289)

	0x610000000d8c is located 76 bytes inside of 192-byte region [0x610000000d40,0x610000000e00)
	freed by thread T0 here:
	    #0 0x5608e359a2ed in free (miniruby+0x1d72ed)
	    #1 0x5608e37af421 in objspace_xfree gc.c:9591:5
	    #2 0x5608e37af3da in ruby_sized_xfree gc.c:9687:2
	    #3 0x5608e3799ac8 in ruby_xfree gc.c:9694:5
	    #4 0x5608e380746d in rb_io_fptr_finalize_internal io.c:4728:5
	    #5 0x5608e38191ed in rb_f_backquote io.c:9020:5
	    #6 0x5608e3d8aa14 in call_cfunc_1 vm_insnhelper.c:2058:12
	    #7 0x5608e3d6e23d in vm_call_cfunc_with_frame vm_insnhelper.c:2211:11
	    #8 0x5608e3d54a35 in vm_call_cfunc vm_insnhelper.c:2229:12
	    #9 0x5608e3d5253b in vm_call_method_each_type vm_insnhelper.c:2564:9
	    #10 0x5608e3d51f50 in vm_call_method vm_insnhelper.c:2701:13
	    #11 0x5608e3cf2de4 in vm_call_general vm_insnhelper.c:2734:12
	    #12 0x5608e3d79918 in vm_sendish vm_insnhelper.c:3627:11
	    #13 0x5608e3d06cf5 in vm_exec_core insns.def:789:11
	    #14 0x5608e3d43700 in rb_vm_exec vm.c:1892:22
	    #15 0x5608e3d47cbf in rb_iseq_eval_main vm.c:2151:11
	    #16 0x5608e37620ca in ruby_exec_internal eval.c:262:2
	    #17 0x5608e376198b in ruby_exec_node eval.c:326:12
	    #18 0x5608e37617d0 in ruby_run_node eval.c:318:25
	    #19 0x5608e35c9486 in main main.c:42:9
	    #20 0x7f62e9421b96 in __libc_start_main
	/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

	previously allocated by thread T0 here:
	    #0 0x5608e359a56d in malloc (miniruby+0x1d756d)
	    #1 0x5608e37aed12 in objspace_xmalloc0 gc.c:9416:5
	    #2 0x5608e37aebe7 in ruby_xmalloc0 gc.c:9600:12
	    #3 0x5608e37aea8b in ruby_xmalloc_body gc.c:9609:12
	    #4 0x5608e37a6d64 in ruby_xmalloc gc.c:11469:12
	    #5 0x5608e380e4b4 in rb_io_fptr_new io.c:8040:19
	    #6 0x5608e380e446 in rb_io_make_open_file io.c:8077:10
	    #7 0x5608e3850ea0 in pipe_open io.c:6707:5
	    #8 0x5608e384edb4 in pipe_open_s io.c:6772:12
	    #9 0x5608e381910b in rb_f_backquote io.c:9014:12
	    #10 0x5608e3d8aa14 in call_cfunc_1 vm_insnhelper.c:2058:12
	    #11 0x5608e3d6e23d in vm_call_cfunc_with_frame vm_insnhelper.c:2211:11
	    #12 0x5608e3d54a35 in vm_call_cfunc vm_insnhelper.c:2229:12
	    #13 0x5608e3d5253b in vm_call_method_each_type vm_insnhelper.c:2564:9
	    #14 0x5608e3d51f50 in vm_call_method vm_insnhelper.c:2701:13
	    #15 0x5608e3cf2de4 in vm_call_general vm_insnhelper.c:2734:12
	    #16 0x5608e3d79918 in vm_sendish vm_insnhelper.c:3627:11
	    #17 0x5608e3d06cf5 in vm_exec_core insns.def:789:11
	    #18 0x5608e3d43700 in rb_vm_exec vm.c:1892:22
	    #19 0x5608e3d47cbf in rb_iseq_eval_main vm.c:2151:11
	    #20 0x5608e37620ca in ruby_exec_internal eval.c:262:2
	    #21 0x5608e376198b in ruby_exec_node eval.c:326:12
	    #22 0x5608e37617d0 in ruby_run_node eval.c:318:25
	    #23 0x5608e35c9486 in main main.c:42:9
	    #24 0x7f62e9421b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

	SUMMARY: AddressSanitizer: heap-use-after-free io.c:4749:24 in
	rb_io_memsize
	Shadow bytes around the buggy address:
	  0x0c207fff8160: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
	  0x0c207fff8170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	  0x0c207fff8180: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
	  0x0c207fff8190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	  0x0c207fff81a0: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
	=>0x0c207fff81b0: fd[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd
	  0x0c207fff81c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
	  0x0c207fff81d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
	  0x0c207fff81e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
	  0x0c207fff81f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
	  0x0c207fff8200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
	Shadow byte legend (one shadow byte represents 8 application bytes):
	  Addressable:           00
	  Partially addressable: 01 02 03 04 05 06 07
	  Heap left redzone:       fa
	  Freed heap region:       fd
	  Stack left redzone:      f1
	  Stack mid redzone:       f2
	  Stack right redzone:     f3
	  Stack after return:      f5
	  Stack use after scope:   f8
	  Global redzone:          f9
	  Global init order:       f6
	  Poisoned by user:        f7
	  Container overflow:      fc
	  Array cookie:            ac
	  Intra object redzone:    bb
	  ASan internal:           fe
	  Left alloca redzone:     ca
	  Right alloca redzone:    cb
	  Shadow gap:              cc
	==85264==ABORTING
------------------------------------------------------------------------
r67571 | svn | 2019-04-16 09:02:01 +0900 (Tue, 16 Apr 2019) | 1 line

* 2019-04-16
------------------------------------------------------------------------
r67570 | knu | 2019-04-16 09:02:00 +0900 (Tue, 16 Apr 2019) | 1 line

Mention SNI support in Net::IMAP
------------------------------------------------------------------------
r67567 | naruse | 2019-04-15 23:42:35 +0900 (Mon, 15 Apr 2019) | 6 lines

merge revision(s) 67561:

	Import CSV 3.0.9

	This fixes test failures on Windows.

------------------------------------------------------------------------
r67565 | naruse | 2019-04-15 22:36:58 +0900 (Mon, 15 Apr 2019) | 14 lines

merge revision(s) 67560,67561:

        Import CSV 3.0.8

        This includes performance improvements and backward incompatibility
        fixes.


        Import CSV 3.0.9

        This fixes test failures on Windows.

Note that r67562's commit message is wrong.

------------------------------------------------------------------------
r67564 | naruse | 2019-04-15 22:27:53 +0900 (Mon, 15 Apr 2019) | 9 lines

merge revision(s) 67563:

	Support SNI (Reapplying r67488)

	This fixes connecting using TLS 1.3 to imap.gmail.com

	[Fix GH-2077] [Feature #15594]

	From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
------------------------------------------------------------------------
r67562 | naruse | 2019-04-15 18:22:11 +0900 (Mon, 15 Apr 2019) | 8 lines

merge revision(s) 66720:

        separate downloading of Unicode property files and auxiliary files

        Separate downloading of Unicode property files in ucd and in ucd/auxiliary.
        This is needed because we need information from separate index.html files
        to discover the exact file names of property files during a beta period.

------------------------------------------------------------------------
r67529 | naruse | 2019-04-14 07:18:20 +0900 (Sun, 14 Apr 2019) | 7 lines

merge revision(s) 66720:

	separate downloading of Unicode property files and auxiliary files

	Separate downloading of Unicode property files in ucd and in ucd/auxiliary.
	This is needed because we need information from separate index.html files
	to discover the exact file names of property files during a beta period.
------------------------------------------------------------------------
r67528 | naruse | 2019-04-14 07:04:51 +0900 (Sun, 14 Apr 2019) | 45 lines

merge revision(s) 66737,66738,67413,67445,67446,67447,67448,67450,67451,67454:

	add logic to handle Unicode beta period file names

	In downloader.rb, add logic to handle file names of the form
	UnicodeData-12.0.0d6.txt. To find the right file, we download
	the index of the directory. Then we download the files by finding
	the file names from the index. Files are always checked for changes,
	because changes might be frequent during the beta period.
	We also check whether any index.html files are left when we are not
	in the beta period. This would indicate that we might have stale
	data from the beta period rather than the actual release data.

	simplify filename-related code

	(Thanks to Nobuyoshi Nakada for the hint!)

	downloader.rb: keep linked file newer than cached file

	* tool/downloader.rb (Downloader.save_cache): keep linked file
	  newer than cached file, so that GNU make triggers when the
	  content is updated.  it uses the timestamp of symlink itself
	  instead of the target.

	add puts statements to debug Unicode file download (temporary)

	Unicode file download doesn't work with Visual Studio, see e.g.
	https://ci.appveyor.com/project/ruby/ruby/builds/23614399/job/f8vya2l7fjdfcye4
	We temporarily produce more output for debugging.

	* remove trailing spaces.

	output more debug information in downloader.rb (temporary)

	Unicode file download doesn't work with Visual Studio, we need more debug output.

	downloader.rb: quote base name

	downloader.rb: fix typo, extra %

	revert r67445, (r67446,) r67447

	Debugging output is no longer needed because the problem has been fixed with r67449.

	appveyor.yml: Use pre-generated headers and tables
------------------------------------------------------------------------
r67527 | naruse | 2019-04-14 00:14:02 +0900 (Sun, 14 Apr 2019) | 31 lines

merge revision(s) 66745,67397,67398,67399,67400,67409,67410,67411,67412,67425,67426,67473,67474: [Backport #15742]

	Bump version to date-2.0.0.

	  I forgot to change it when Ruby 2.6.0 was released.

	date_parse.c: extract Japanese era initials

	* expand tabs.

	date_parse.c: removed 'r' which is not in JIS X 0301 yet

	Added tests for end of Heisei

	date: use del_hash to extract an element destructively

	* expand tabs.

	date_parse.c: renamed JAPANESE prefix as JISX0301

	date_parse.c: name JISX0301_DEFAULT_ERA

	date: make zone a substring to copy encoding and taintedness

	* expand tabs.

	date_core.c: [DOC] Heisei will be assumed if no-era [ci skip]

	date: support for Reiwa, new Japanese era

	[Feature #15742]
------------------------------------------------------------------------
r67526 | svn | 2019-04-14 00:01:42 +0900 (Sun, 14 Apr 2019) | 1 line

* 2019-04-14
------------------------------------------------------------------------
r67525 | naruse | 2019-04-14 00:01:39 +0900 (Sun, 14 Apr 2019) | 32 lines

merge revision(s) 67439,67441,67453,67476: [Backport #15740]

        change lib/unicode_normalize/tables.rb to single item per line to make diffs shorter

        * template/unicode_norm_gen.tmpl: Change formatting of output to produce only a
          single item (or range) for each line to make future diffs shorter and easier
          to understand and check.

        * lib/unicode_normalize/tables.rb: output of the above

        update to Unicode Version 12.1.0 (beta)

        Unicode Version 12.1.0 adds one single character, U+32FF SQUARE ERA NAME REIWA,
        for the new Japanese era starting on May 1st. 12.1.0 will be finalized only on
        May 7th, so we go with the beta version because further changes in the data we
        need are highly unlikely, and we want to make sure Ruby is ready for the new era.

        * common.mk: change UNICODE_VERSION to 12.1.0, UNICODE_BETA to YES

        * enc/unicode/12.1.0, enc/unicode/12.1.0/casefold.h, enc/unicode/12.1.0/name2ctype.h:
          add directory and generated data files for new version

        * lib/unicode_normalize/tables.rb: update for new character

        * test/ruby/test_regexp.rb: add test for character property age=12.1

        * test/test_unicode_normalize.rb: add test for NFKC decomposition of new character

        This (mostly) completes issue #15195.

        remove Unicode 12.0.0 related directory and generated files

------------------------------------------------------------------------
r67524 | naruse | 2019-04-13 16:33:10 +0900 (Sat, 13 Apr 2019) | 9 lines

merge revision(s) 67497,67498: [Backport #15760]

	ext/openssl/ossl_bn.c (ossl_bn_initialize): get rid of SEGV

	OpenSSL::BN.new(nil, 2) dumped core.

	[ruby-core:92231] [Bug #15760]

	* expand tabs.
------------------------------------------------------------------------
r67516 | naruse | 2019-04-11 21:09:34 +0900 (Thu, 11 Apr 2019) | 6 lines

merge revision(s) 67466: [Backport #15755]

	enumerator.c: force hash values fixable

	* enumerator.c (arith_seq_hash): force hash values fixable on
	  LLP64 environment.  [ruby-core:92190] [Bug #15755]
------------------------------------------------------------------------
r67515 | naruse | 2019-04-11 21:09:16 +0900 (Thu, 11 Apr 2019) | 6 lines

merge revision(s) 67467: [Backport #15756]

	range.c: force hash values fixable

	* range.c (method_hash): force hash values fixable on LLP64
	  environment.  [ruby-core:92191] [Bug #15756]
------------------------------------------------------------------------
r67514 | naruse | 2019-04-11 21:08:55 +0900 (Thu, 11 Apr 2019) | 6 lines

merge revision(s) 67468: [Backport #15757]

	range.c: force hash values fixable

	* range.c (range_hash): force hash values fixable on LLP64
	  environment.  [ruby-core:92194] [Bug #15757]
------------------------------------------------------------------------
r67353 | naruse | 2019-03-28 12:28:38 +0900 (Thu, 28 Mar 2019) | 7 lines

merge revision(s) 67332: [Backport #15649]

	dir.c: fix Dir.glob starts with brace

	* dir.c (ruby_glob0): expand braces if a glob pattern starts with
	  brace.
	  [ruby-core:91728] [Bug #15649]
------------------------------------------------------------------------
r67352 | naruse | 2019-03-28 12:26:50 +0900 (Thu, 28 Mar 2019) | 3 lines

merge revision(s) 67270: [Backport #15670]

	dsym should be treated as string [ruby-core:91852] [Bug #15670]
------------------------------------------------------------------------
r67351 | naruse | 2019-03-28 12:24:57 +0900 (Thu, 28 Mar 2019) | 3 lines

merge revision(s) 67247: [Backport #15666]

	Guard out the test when it is run under root permission
------------------------------------------------------------------------
r67246 | naruse | 2019-03-14 06:55:03 +0900 (Thu, 14 Mar 2019) | 2 lines

bump up teeny version to 2.6.3

------------------------------------------------------------------------
r67231 | naruse | 2019-03-13 05:22:33 +0900 (Wed, 13 Mar 2019) | 2 lines

bump up teeny version to 2.6.2

------------------------------------------------------------------------
r67223 | naruse | 2019-03-11 23:33:45 +0900 (Mon, 11 Mar 2019) | 5 lines

fix merge conflict

Reported by Krzysztof Rybka
https://github.com/ruby/ruby/commit/dca69588f4a46e1ecc94eeb9e01efc8cd7cb82e4#r32684541

------------------------------------------------------------------------
r67222 | naruse | 2019-03-11 22:49:09 +0900 (Mon, 11 Mar 2019) | 7 lines

merge revision(s) 67203: [Backport #15651]

	numeric.c: fix infinite loop

	* numeric.c (int_pow): fix infinite loop in the case of y equal 1
	  and power of x does not overflow.
	  [ruby-core:91734] [Bug #15651]
------------------------------------------------------------------------
r67220 | naruse | 2019-03-11 21:57:34 +0900 (Mon, 11 Mar 2019) | 5 lines

merge revision(s) 67217: [Backport #15658]

	The combination of non-Symbol keys and Symbol keys is now allowed again

	Revert r64358.  [Bug #15658]
------------------------------------------------------------------------
r67210 | naruse | 2019-03-11 16:18:45 +0900 (Mon, 11 Mar 2019) | 3 lines

merge revision(s) 66973: [Backport #15577]

	Run r66972 assertion only when a sticky-bit makes sense
------------------------------------------------------------------------
r67209 | naruse | 2019-03-11 16:01:19 +0900 (Mon, 11 Mar 2019) | 6 lines

merge revision(s) 67201: [Backport #15650]

	eval.c: clear internal errinfo

	* eval.c (ruby_cleanup): clear internal error info when invoking
	  end procs.  [ruby-core:91731] [Bug #15650]
------------------------------------------------------------------------
r67208 | naruse | 2019-03-11 15:52:01 +0900 (Mon, 11 Mar 2019) | 7 lines

merge revision(s) 67200: [Backport #15648]

	Add ignored_sp event

	* ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer): add ignored_sp
	  event which will be fired from Ripper::Lexer#on_heredoc_dedent
	  method.  [ruby-core:91727] [Bug #15648]
------------------------------------------------------------------------
r67207 | naruse | 2019-03-11 15:45:29 +0900 (Mon, 11 Mar 2019) | 6 lines

merge revision(s) 67188: [Backport #15642]

	io.c: chomp CR at the end of read buffer

	* io.c (rb_io_getline_fast): chomp CR followed by LF but separated
	  by the read buffer boundary.  [ruby-core:91707] [Bug #15642]
------------------------------------------------------------------------
r67184 | naruse | 2019-03-06 18:49:16 +0900 (Wed, 06 Mar 2019) | 5 lines

merge revision(s) 67183: [Backport #15607]

	Fix PTY.open on OpenBSD [Bug #15607]

	From: Jeremy Evans <code@jeremyevans.net>
------------------------------------------------------------------------
r67182 | naruse | 2019-03-06 18:01:48 +0900 (Wed, 06 Mar 2019) | 12 lines

Backport RubyGems 3.0.3: [Backport #15637]

	* Fixed following vulnerabilities:
	  * CVE-2019-8320: Delete directory using symlink when decompressing tar
	  * CVE-2019-8321: Escape sequence injection vulnerability in verbose
	  * CVE-2019-8322: Escape sequence injection vulnerability in gem owner
	  * CVE-2019-8323: Escape sequence injection vulnerability in API response handling
	  * CVE-2019-8324: Installing a malicious gem may lead to arbitrary code execution
	  * CVE-2019-8325: Escape sequence injection vulnerability in errors

	* see also https://blog.rubygems.org/2019/03/05/3.0.3-released.html

------------------------------------------------------------------------
r67181 | naruse | 2019-03-06 17:53:51 +0900 (Wed, 06 Mar 2019) | 7 lines

merge revision(s) 67167: [Backport #15635]

	string.c: respect the actual encoding

	* string.c (rb_enc_str_coderange): respect the actual encoding of
	  if a BOM presents, and scan for the actual code range.
	  [ruby-core:91662] [Bug #15635]
------------------------------------------------------------------------
r67180 | naruse | 2019-03-06 17:48:50 +0900 (Wed, 06 Mar 2019) | 10 lines

merge revision(s) 66984: [Backport #15582]

	Fixed gemspec location of bundler.

	  FileCollector of rbinstall.rb requires location of gemspec under
	  the sub-direcotry with the same name as default gems.

	  I forgot to fix it with r66867.

	  [Bug #15582][ruby-core:91374]
------------------------------------------------------------------------
r67179 | naruse | 2019-03-06 16:47:53 +0900 (Wed, 06 Mar 2019) | 5 lines

merge revision(s) 67006: [Backport #15469]

	Ignore to add bundler lib direcotry if it is same as rubylibdir.

	  [Bug #15469][ruby-core:90742]
------------------------------------------------------------------------
r67178 | naruse | 2019-03-06 16:31:29 +0900 (Wed, 06 Mar 2019) | 6 lines

merge revision(s) 67172:

	Remove deprecated `sudo: false` in .travis.yml

	- https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
	- https://docs.travis-ci.com/user/reference/overview/#deprecated-virtualization-environments
------------------------------------------------------------------------
r67177 | naruse | 2019-03-06 16:14:13 +0900 (Wed, 06 Mar 2019) | 8 lines

merge revision(s) 66972: [Backport #15577]

	Fix exception namespace

	* lib/fileutils.rb (remove_entry_secure): EISDIR is under the
	  Errno namespace.  [ruby-core:91362] [Bug #15577]

	From: Tietew (Toru Iwase) <tietew@tietew.net>
------------------------------------------------------------------------
r67176 | naruse | 2019-03-06 15:58:04 +0900 (Wed, 06 Mar 2019) | 2 lines

Drop pedantic matrix from .travis.yml

------------------------------------------------------------------------
r67175 | naruse | 2019-03-06 15:36:32 +0900 (Wed, 06 Mar 2019) | 18 lines

merge revision(s) 67169,67173,67174: [Backport #15641]

	update Unicode version (and Emoji version) to 12.0.0

	- common.mk: set UNICODE_VERSION and UNICODE_EMOJI_VERSION to 12.0.0

	- lib/unicode_normalize/tables.rb: update table data to Unicode version 12.0.0

	- enc/unicode/12.0.0/casefold.h, enc/unicode/12.0.0/name2ctype.h: add generated
	  files for Unicode version 12.0.0

	This is the main commit for #15321.

	add news about Unicode version update (issue #15321) to NEWS [ci skip]

	delete directory and files related to Unicode version 11.0.0

	this completes and closes feature #15321
------------------------------------------------------------------------
r66953 | naruse | 2019-01-30 23:41:42 +0900 (Wed, 30 Jan 2019) | 2 lines

Ruby 2.6 is still C90

------------------------------------------------------------------------
r66952 | naruse | 2019-01-30 22:09:26 +0900 (Wed, 30 Jan 2019) | 6 lines

merge revision(s) 66888: [Backport #15460]

* Fix rubyspec to follow IO#ungetbyte's fix
  Merge CRuby r66824
  With fixing actual spec and the version the change applied.

------------------------------------------------------------------------
r66949 | naruse | 2019-01-30 15:20:10 +0900 (Wed, 30 Jan 2019) | 13 lines

merge revision(s) 66947: [Backport #15518]

	enumerator.c: fix arith_seq_first for Infinity

	* enumerator.c (arith_seq_first): fix for Float::INFINITY.

	* test/ruby/test_arithmetic_sequence.rb: add tests.

	* numeric.c (ruby_float_step_size): export for internal use.

	* internal.h: add prototype declaration of ruby_float_step_size.

	[ruby-core:90937][Bug #15518]
------------------------------------------------------------------------
r66941 | naruse | 2019-01-29 18:19:52 +0900 (Tue, 29 Jan 2019) | 9 lines

merge revision(s) 66909: [Backport #15555]

	tmpdir.rb: permission of user given directory

	* lib/tmpdir.rb (Dir.mktmpdir): check if the permission of the
	  parent directory only when using the default temporary
	  directory, and no check against user given directory.  the
	  security is the user's responsibility in that case.
	  [ruby-core:91216] [Bug #15555]
------------------------------------------------------------------------
r66940 | naruse | 2019-01-29 14:31:00 +0900 (Tue, 29 Jan 2019) | 10 lines

merge revision(s) 66708: [Backport #15499]

	thread.c (call_without_gvl): spawn thread for UBF iff single-threaded

	We need another native thread to call some unblocking functions
	which aren't RUBY_UBF_IO or RUBY_UBF_PROCESS.  Instead of a
	permanent thread in <= 2.5, we can now rely on the thread cache
	feature to perform interrupts.

	[ruby-core:90865] [Bug #15499]
------------------------------------------------------------------------
r66939 | naruse | 2019-01-29 13:39:32 +0900 (Tue, 29 Jan 2019) | 7 lines

merge revision(s) 66938: [Backport #15488]

	Fix `Module#const_defined?` on inherited constants

	[Fix GH-2061]

	From: manga_osyo <manga.osyo@gmail.com>
------------------------------------------------------------------------
r66926 | naruse | 2019-01-26 17:02:47 +0900 (Sat, 26 Jan 2019) | 4 lines

merge revision(s) 66922: [Backport #15521]

	Upgrade CSV to 3.0.4

------------------------------------------------------------------------
r66925 | naruse | 2019-01-26 16:59:54 +0900 (Sat, 26 Jan 2019) | 7 lines

merge revision(s) 66658: [Backport #15489]

	vm_args.c: search symbol proc in super classes

	* vm_args.c (refine_sym_proc_call): traverse ancestors to search
	  inherited methods for symbol proc.
	  [ruby-dev:50741] [Bug #15489]
------------------------------------------------------------------------
r66924 | naruse | 2019-01-26 16:59:11 +0900 (Sat, 26 Jan 2019) | 16 lines

merge revision(s) 66823,66869: [Backport #15548]

	Revert "mjit_worker.c: try passing -nostdlib to AIX"

	This reverts commit b32fb23083912c37a2601c66531ed786a7c9f3e5.

	This didn't work on AIX.

	mjit_worker.c: do not use GCC_NOSTDLIB_FLAGS for OpenBSD

	OpenBSD's GCC compiler has local extensions that break when
	`-nostartfiles -nodefaultlibs -nostdlib` is used.

	From: Jeremy Evans <merch-redmine@jeremyevans.net>

	[Bug #15548]
------------------------------------------------------------------------
r66913 | naruse | 2019-01-24 10:00:07 +0900 (Thu, 24 Jan 2019) | 13 lines

merge revision(s) 66867: [Backport #15500]

	Revert r58345 and r58371.

	  These changes break the behavior of default gems. Bug #13428 says
	  r58345 is reasonable because gemspec file is installed by `to_ruby_for_cache`
	  method. But I revert `to_ruby_for_cache` in rbinstall.rb at r58403.
	  There is no reason that we apply r58345 now.

	  But I'm not sure about gemspec of default gems affects standalone gems.
	  I'm going to investigate it on rubygems/rubygems.

	  [Bug #15500][ruby-core:90867]
------------------------------------------------------------------------
r66862 | naruse | 2019-01-18 13:19:32 +0900 (Fri, 18 Jan 2019) | 9 lines

merge revision(s) 66796,66797: [Backport #15525]

	No TypeError at nil if exception: false

	[ruby-core:91021] [Bug #15525]

	No FloatDomainError at non-finitive number if exception: false

	[ruby-core:91021] [Bug #15525]
------------------------------------------------------------------------
r66855 | naruse | 2019-01-18 08:09:52 +0900 (Fri, 18 Jan 2019) | 2 lines

bump up teeny version to 2.6.1

------------------------------------------------------------------------
r66854 | naruse | 2019-01-18 08:08:10 +0900 (Fri, 18 Jan 2019) | 117 lines

merge revision(s) 66681,66682,66684,66688,66697,66751,66693,66694: [Backport #15491]

	complex.c: Optimize Complex#+ for some conditions

	Optimize f_add defined in complex.c for some specific conditions.
	It makes Complex#+ about 1.4x faster than r66678.

	Compared to r66678:

	```
	mrkn-mbp15-late2016:complex-optim-o3 mrkn$ make benchmark ITEM=complex_float_ COMPARE_RUBY=/Users/mrkn/.rbenv/versions/trunk-o3/bin/ruby
	/Users/mrkn/src/github.com/ruby/ruby/revision.h unchanged
	/Users/mrkn/.rbenv/shims/ruby --disable=gems -rrubygems -I/Users/mrkn/src/github.com/ruby/ruby/benchmark/lib /Users/mrkn/src/github.com/ruby/ruby/benchmark/benchmark-driver/exe/benchmark-driver \
	                    --executables="compare-ruby::/Users/mrkn/.rbenv/versions/trunk-o3/bin/ruby -I.ext/common --disable-gem" \
	                    --executables="built-ruby::./miniruby -I/Users/mrkn/src/github.com/ruby/ruby/lib -I. -I.ext/common  -r/Users/mrkn/src/github.com/ruby/ruby/prelude --disable-gem" \
	                    $(find /Users/mrkn/src/github.com/ruby/ruby/benchmark -maxdepth 1 -name '*complex_float_*.yml' -o -name '*complex_float_*.rb' | sort)
	Calculating -------------------------------------
	                     compare-ruby  built-ruby
	   complex_float_add       9.132M     12.864M i/s -      1.000M times in 0.109511s 0.077734s
	   complex_float_div     600.723k    627.878k i/s -      1.000M times in 1.664662s 1.592666s
	   complex_float_mul       2.320M      2.347M i/s -      1.000M times in 0.431039s 0.426113s
	   complex_float_new       1.473M      1.489M i/s -      1.000M times in 0.678791s 0.671750s
	 complex_float_power       1.690M      1.722M i/s -      1.000M times in 0.591863s 0.580775s
	   complex_float_sub       8.870M      9.516M i/s -      1.000M times in 0.112740s 0.105091s

	Comparison:
	                complex_float_add
	          built-ruby:  12864383.7 i/s
	        compare-ruby:   9131502.8 i/s - 1.41x  slower

	                complex_float_div
	          built-ruby:    627878.0 i/s
	        compare-ruby:    600722.5 i/s - 1.05x  slower

	                complex_float_mul
	          built-ruby:   2346795.3 i/s
	        compare-ruby:   2319975.7 i/s - 1.01x  slower

	                complex_float_new
	          built-ruby:   1488649.1 i/s
	        compare-ruby:   1473207.5 i/s - 1.01x  slower

	              complex_float_power
	          built-ruby:   1721837.2 i/s
	        compare-ruby:   1689580.2 i/s - 1.02x  slower

	                complex_float_sub
	          built-ruby:   9515562.7 i/s
	        compare-ruby:   8869966.3 i/s - 1.07x  slower
	```

	suppress warning: method redefined; discarding old + introduced at r66681

	complex.c: fix indentation

	complex.c: fix against redefining component methods

	This fixes the incompatibility (maybe unintentionally) introduced by
	removal of `#ifndef PRESERVE_SIGNEDZERO` guards in f_add, f_mul, and
	f_sub functions in r62701.  [Bug #15491] [ruby-core:90843]

	complex.c: Optimize Complex#* and Complex#**

	Optimize f_mul for the core numeric class components.
	This change improves the computation time of Complex#* and Complex#**.

	```
	$ make benchmark ITEM=complex_float_ COMPARE_RUBY=/Users/mrkn/.rbenv/versions/2.6.0/bin/ruby
	generating known_errors.inc
	known_errors.inc unchanged
	/Users/mrkn/src/github.com/ruby/ruby/revision.h unchanged
	/Users/mrkn/.rbenv/shims/ruby --disable=gems -rrubygems -I/Users/mrkn/src/github.com/ruby/ruby/benchmark/lib /Users/mrkn/src/github.com/ruby/ruby/benchmark/benchmark-driver/exe/benchmark-driver \
	                    --executables="compare-ruby::/Users/mrkn/.rbenv/versions/2.6.0/bin/ruby -I.ext/common --disable-gem" \
	                    --executables="built-ruby::./miniruby -I/Users/mrkn/src/github.com/ruby/ruby/lib -I. -I.ext/common  -r/Users/mrkn/src/github.com/ruby/ruby/prelude --disable-gem" \
	                    $(find /Users/mrkn/src/github.com/ruby/ruby/benchmark -maxdepth 1 -name '*complex_float_*.yml' -o -name '*complex_float_*.rb' | sort)
	Calculating -------------------------------------
	                     compare-ruby  built-ruby
	   complex_float_add       6.558M     13.012M i/s -      1.000M times in 0.152480s 0.076850s
	   complex_float_div     576.821k    567.969k i/s -      1.000M times in 1.733640s 1.760660s
	   complex_float_mul       1.690M      2.628M i/s -      1.000M times in 0.591786s 0.380579s
	   complex_float_new       1.350M      1.268M i/s -      1.000M times in 0.740669s 0.788762s
	 complex_float_power       1.571M      1.835M i/s -      1.000M times in 0.636507s 0.544909s
	   complex_float_sub       8.635M      8.779M i/s -      1.000M times in 0.115814s 0.113906s

	Comparison:
	                complex_float_add
	          built-ruby:  13012361.7 i/s
	        compare-ruby:   6558237.1 i/s - 1.98x  slower

	                complex_float_div
	        compare-ruby:    576821.0 i/s
	          built-ruby:    567968.8 i/s - 1.02x  slower

	                complex_float_mul
	          built-ruby:   2627575.4 i/s
	        compare-ruby:   1689800.0 i/s - 1.55x  slower

	                complex_float_new
	        compare-ruby:   1350130.8 i/s
	          built-ruby:   1267809.6 i/s - 1.06x  slower

	              complex_float_power
	          built-ruby:   1835168.8 i/s
	        compare-ruby:   1571074.6 i/s - 1.17x  slower

	                complex_float_sub
	          built-ruby:   8779168.8 i/s
	        compare-ruby:   8634534.7 i/s - 1.02x  slower
	```

	complex.c: replace misused UNLIKELY with LIKELY

	test_complex.rb: fix tests for RUBYOPT="-w"

	test_complex.rb: use the same approach to fix failures

	as r66682.
------------------------------------------------------------------------
r66853 | naruse | 2019-01-18 07:08:56 +0900 (Fri, 18 Jan 2019) | 13 lines

merge revision(s) 66832: [Backport #15536]

	st.c (rb_hash_bulk_insert_into_st_table): avoid out-of-bounds write

	"hash_bulk_insert" first expands the table, but the target size was
	wrong: it was calculated by "num_entries + (size to buld insert)", but
	it was wrong when "num_entries < entries_bound", i.e., it has a deleted
	entry.  "hash_bulk_insert" adds the given entries from entries_bound,
	which led to out-of-bounds write access.  [Bug #15536]

	As a simple fix, this commit changes the calculation to "entries_bound +
	size".  I'm afraid if this might be inefficient, but I think it is safe
	anyway.
------------------------------------------------------------------------
r66852 | naruse | 2019-01-18 07:07:55 +0900 (Fri, 18 Jan 2019) | 7 lines

merge revision(s) 66779: [Backport #15520]

	configure: refuse to build with jemalloc when header is missing

	[ruby-core:90964] [Bug #15520]

	Freom: Misty De Meo <mistydemeo@github.com>
------------------------------------------------------------------------
r66851 | naruse | 2019-01-18 07:03:14 +0900 (Fri, 18 Jan 2019) | 3 lines

merge revision(s) 66819: [Backport #15532]

	ast.c: fix missing head part in dynamic literal
------------------------------------------------------------------------
r66850 | naruse | 2019-01-18 06:55:11 +0900 (Fri, 18 Jan 2019) | 5 lines

merge revision(s) 66817: [Backport #15513]

	mjit_worker.c: pass -nostdlib when making pch as well

	[Bug #15513]
------------------------------------------------------------------------
r66849 | naruse | 2019-01-18 06:54:24 +0900 (Fri, 18 Jan 2019) | 36 lines

merge revision(s) 66811,66812,66816: [Backport #15522]

	mjit_worker.c: untangle CC_LIBS nesting

	This should have no impact.
	The CC_LIBS was too hard to read for human.

	I don't remember whether the order of -lmsvcrt and -lgcc matters or not,
	but I kept that for the best safety.

	mjit_worker.c: pass -lgcc to GCC platforms

	using `-nodefaultlibs -nostdlib`.

	I assume libgcc is needed when we use -nostdlib, and it's linked on some
	platforms but not linked on some platforms (like aarch64, and possibly
	AIX as well) as said in https://wiki.osdev.org/Libgcc :

	> You can link with libgcc by passing -lgcc when linking your kernel
	with your compiler. You don't need to do this unless you pass the
	-nodefaultlibs option (implied by -nostdlib)

	Also note that -nostdlib is not strictly needed (rather implied
	-nodefaultlibs is problematic for Gentoo like Bug#15513, which will be
	approached later) but helpful for performance. So I want to keep it for
	now.

	[Bug #15522]

	I'm not trying to add `-nodefaultlibs -nostdlib` for AIX in this commit
	because AIX RubyCI is dead right now, but I'll try to add them again
	once RubyCI is fixed.

	mjit_worker.c: try passing -nostdlib to AIX

	r66812 might have allowed this. Testing.
------------------------------------------------------------------------
r66848 | naruse | 2019-01-18 06:46:40 +0900 (Fri, 18 Jan 2019) | 10 lines

merge revision(s) 66838: [Backport #15540]

	dir.c: fix Dir.glob with braces and matching dir

	* dir.c (join_path_from_pattern): add the last slash for directory
	  matching.

	* test/ruby/test_dir.rb (test_glob_recursive_directory): add a test
	  for above.
	  [ruby-core:91110] [Bug #15540]
------------------------------------------------------------------------
r66847 | naruse | 2019-01-18 06:39:14 +0900 (Fri, 18 Jan 2019) | 10 lines

merge revision(s) 66756: [Backport #15479]

	Mark array as "going to be modified" in `Array#reject!`

	Before this patch, if `reject!` is called on a shared array it can
	mutate the shared array rather than a copy.  This patch marks the array
	as "going to be modified" so that the shared source array isn't
	mutated.

	[Bug #15479] [ruby-core:90781]
------------------------------------------------------------------------
r66846 | svn | 2019-01-18 06:36:20 +0900 (Fri, 18 Jan 2019) | 1 line

* 2019-01-18
------------------------------------------------------------------------
r66845 | naruse | 2019-01-18 06:36:17 +0900 (Fri, 18 Jan 2019) | 17 lines

merge revision(s) 66760,66761,66824: [Backport #15460]

	Follow behaviour of IO#ungetbyte

	see r65802 and [Bug #14359]

	* expand tabs.

	setbyte / ungetbyte allow out-of-range integers

	* string.c: String#setbyte to accept arbitrary integers [Bug #15460]

	* io.c: ditto for IO#ungetbyte

	* ext/strringio/stringio.c: ditto for StringIO#ungetbyte


------------------------------------------------------------------------
r66829 | naruse | 2019-01-15 18:06:51 +0900 (Tue, 15 Jan 2019) | 8 lines

merge revision(s) 66767: [Backport #15399]

	insns.def (duparray, duphash): add dtrace hooks

	They are considered Array and Hash creation events, so
	allow dtrace (and systemtap) to track those creations.

	Co-Authored-By: Eric Wong <e@80x24.org>
------------------------------------------------------------------------
r66828 | naruse | 2019-01-15 18:00:14 +0900 (Tue, 15 Jan 2019) | 5 lines

merge revision(s) 66788: [Backport #15498]

	Update refinements docs

	Co-Authored-By: Vladimir Dementyev <dementiev.vm@gmail.com>
------------------------------------------------------------------------
r66827 | naruse | 2019-01-15 17:55:56 +0900 (Tue, 15 Jan 2019) | 5 lines

merge revision(s) 66736: [Backport #15511]

	ast.c: argument must be a string

	[ruby-core:90904] [Bug #15511]
------------------------------------------------------------------------
r66826 | naruse | 2019-01-15 17:55:11 +0900 (Tue, 15 Jan 2019) | 5 lines

merge revision(s) 66745: [Backport #15512]

	Bump version to date-2.0.0.

	  I forgot to change it when Ruby 2.6.0 was released.
------------------------------------------------------------------------
r66825 | naruse | 2019-01-15 17:53:40 +0900 (Tue, 15 Jan 2019) | 5 lines

merge revision(s) 66735: [Backport #15506]

	Fix mday overflow

	[ruby-core:90897] [Bug #15506]
------------------------------------------------------------------------
r66815 | naruse | 2019-01-14 15:38:34 +0900 (Mon, 14 Jan 2019) | 13 lines

merge revision(s) 66595: [Backport #15471]

	fix missed script_compiled events. [Bug #15471]

	* ruby.c (process_options): script_compiled events are missed on
	  command line -e or specified file. this commit fix it.
	  [Bug #15471]

	  This patch should be backport to Ruby 2.6 branch.

	* vm_core.h (rb_exec_event_hook_script_compiled): introduce utility
	  function to invoke a script_compiled event.

------------------------------------------------------------------------
r66814 | svn | 2019-01-14 15:34:03 +0900 (Mon, 14 Jan 2019) | 1 line

* 2019-01-14
------------------------------------------------------------------------
r66813 | naruse | 2019-01-14 15:34:02 +0900 (Mon, 14 Jan 2019) | 13 lines

merge revision(s) 66670,66676: [Backport #15476]

	compile.c: support branch coverage for `a&.foo = 1`

	[Bug #15476]

	compile.c (iseq_set_sequence): fix branch coverage table

	Not only TRACE_ELEMENT but also INSN_ELEMENT may have events.
	The old pc2branchindex was created using only events of TRACE_ELEMENTs.
	This change uses events of INSN_ELEMENTs too for pc2branchindex table.

	[Bug #15476]
------------------------------------------------------------------------
r66800 | naruse | 2019-01-13 06:04:31 +0900 (Sun, 13 Jan 2019) | 3 lines

merge revision(s) 66768: [Backport #15519]

	Get rid of C99 feature for now [ruby-core:90949] [Bug #15519]
------------------------------------------------------------------------
r66799 | naruse | 2019-01-13 06:02:26 +0900 (Sun, 13 Jan 2019) | 37 lines

merge revision(s) 66582: [Backport #15468][Backport #15472]

	Fix Net::Protocol::BufferedIO#write when sending large multi-byte string

	This commit should fix Net::Protocol::BufferedIO#write when sending
	large multi-byte string like following example.

	```
	$ ruby -rnet/http -rjson -v -e "Net::HTTP.post(URI('http://httpbin.org/post'), { text: '?'*100_000 }.to_json, 'Content-Type' => 'application/json')"
	ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
	Traceback (most recent call last):
	        19: from -e:1:in `<main>'
	        18: from lib/ruby/2.6.0/net/http.rb:500:in `post'
	        17: from lib/ruby/2.6.0/net/http.rb:605:in `start'
	        16: from lib/ruby/2.6.0/net/http.rb:920:in `start'
	        15: from lib/ruby/2.6.0/net/http.rb:502:in `block in post'
	        14: from lib/ruby/2.6.0/net/http.rb:1281:in `post'
	        13: from lib/ruby/2.6.0/net/http.rb:1493:in `send_entity'
	        12: from lib/ruby/2.6.0/net/http.rb:1479:in `request'
	        11: from lib/ruby/2.6.0/net/http.rb:1506:in `transport_request'
	        10: from lib/ruby/2.6.0/net/http.rb:1506:in `catch'
	         9: from lib/ruby/2.6.0/net/http.rb:1507:in `block in transport_request'
	         8: from lib/ruby/2.6.0/net/http/generic_request.rb:123:in `exec'
	         7: from lib/ruby/2.6.0/net/http/generic_request.rb:189:in `send_request_with_body'
	         6: from lib/ruby/2.6.0/net/protocol.rb:247:in `write'
	         5: from lib/ruby/2.6.0/net/protocol.rb:265:in `writing'
	         4: from lib/ruby/2.6.0/net/protocol.rb:248:in `block in write'
	         3: from lib/ruby/2.6.0/net/protocol.rb:275:in `write0'
	         2: from lib/ruby/2.6.0/net/protocol.rb:275:in `each_with_index'
	         1: from lib/ruby/2.6.0/net/protocol.rb:275:in `each'
	lib/ruby/2.6.0/net/protocol.rb:280:in `block in write0': undefined method `bytesize' for nil:NilClass (NoMethodError)
	```

	[Fix GH-2058]

	From: Eito Katagiri <eitoball@gmail.com>

------------------------------------------------------------------------
r66729 | naruse | 2019-01-06 06:33:26 +0900 (Sun, 06 Jan 2019) | 7 lines

merge revision(s) 66699: [Backport #15494]

	Fix Random.urandom in a chroot on OpenBSD

	[ruby-core:90850] [Bug #15494]

	From: jeremyevans0 (Jeremy Evans) <merch-redmine@jeremyevans.net>
------------------------------------------------------------------------
r66728 | naruse | 2019-01-06 06:25:49 +0900 (Sun, 06 Jan 2019) | 5 lines

merge revision(s) 66685,66686: [Backport #15502]

	Try to update cert

	Try to update cert (2nd try)
------------------------------------------------------------------------
r66563 | naruse | 2018-12-26 02:05:20 +0900 (Wed, 26 Dec 2018) | 3 lines

merge revision(s) 66533:

	Add ruby_2_6 branch to .travis.yml
------------------------------------------------------------------------
r66562 | naruse | 2018-12-26 02:03:10 +0900 (Wed, 26 Dec 2018) | 3 lines

merge revision(s) 66553:

	Set typeflag [Bug #15461]
------------------------------------------------------------------------
r66549 | naruse | 2018-12-25 17:50:27 +0900 (Tue, 25 Dec 2018) | 7 lines

merge revision(s) 66548:

	fix a test by restoring value checking.

	* test/ruby/test_literal.rb (test_hash_literal_frozen): restore value
	  checking code which is removed accidentaly at r66466.

------------------------------------------------------------------------
r66546 | naruse | 2018-12-25 15:17:00 +0900 (Tue, 25 Dec 2018) | 2 lines

v2.6.0p0

------------------------------------------------------------------------
r66545 | naruse | 2018-12-25 15:00:37 +0900 (Tue, 25 Dec 2018) | 3 lines

merge revision(s) 66539:

	io-console: bump to 0.4.7
------------------------------------------------------------------------
r66544 | naruse | 2018-12-25 15:00:14 +0900 (Tue, 25 Dec 2018) | 7 lines

merge revision(s) 66538:

	vm_insnhelper.c: use COLDFUNC

	COLDFUNC is introduced in r66228.  Use it for pre-existing
	__attribute__((__cold__)) usages.

------------------------------------------------------------------------
r66543 | naruse | 2018-12-25 14:58:52 +0900 (Tue, 25 Dec 2018) | 3 lines

merge revision(s) 66537:

	[DOC] Fix typos [ci skip]
------------------------------------------------------------------------
r66542 | naruse | 2018-12-25 14:57:55 +0900 (Tue, 25 Dec 2018) | 7 lines

merge revision(s) 66536:

	Import REXML 3.1.9

	It restores removed REXML::Parsers::BaseParser::UNQME_STR.
	Because it's used by kramdown.

------------------------------------------------------------------------
r66541 | naruse | 2018-12-25 14:57:13 +0900 (Tue, 25 Dec 2018) | 5 lines

merge revision(s) 66535:

	Import bigdecimal 1.4.1

	* https://github.com/ruby/bigdecimal/compare/v1.4.0..v1.4.1
------------------------------------------------------------------------
r66540 | naruse | 2018-12-25 14:56:17 +0900 (Tue, 25 Dec 2018) | 5 lines

merge revision(s) 66534:

	Mention rb_gc_register_mark_object [ci skip]

	[Feature #9894]
------------------------------------------------------------------------
r66532 | naruse | 2018-12-25 07:13:36 +0900 (Tue, 25 Dec 2018) | 1 line

Release branch of Ruby 2.6
------------------------------------------------------------------------
r66531 | naruse | 2018-12-25 07:09:40 +0900 (Tue, 25 Dec 2018) | 1 line

exception bactrace in reverse order is Ruby 2.5 feature
------------------------------------------------------------------------
r66530 | stomar | 2018-12-25 06:14:38 +0900 (Tue, 25 Dec 2018) | 4 lines

Small improvement in refinements docs

Move general statement about refinements of modules
from example to the top of the document.
------------------------------------------------------------------------
r66529 | svn | 2018-12-25 05:41:19 +0900 (Tue, 25 Dec 2018) | 1 line

* 2018-12-25
------------------------------------------------------------------------
r66528 | stomar | 2018-12-25 05:41:15 +0900 (Tue, 25 Dec 2018) | 1 line

complex.c, object.c: [DOC] improve "exception: false" docs
------------------------------------------------------------------------
r66527 | hsbt | 2018-12-24 20:03:52 +0900 (Mon, 24 Dec 2018) | 1 line

Added entry for RubyGems 3.0.1 to NEWS.
------------------------------------------------------------------------
r66526 | stomar | 2018-12-24 19:52:44 +0900 (Mon, 24 Dec 2018) | 1 line

NEWS: various improvements
------------------------------------------------------------------------
r66525 | knu | 2018-12-24 17:11:49 +0900 (Mon, 24 Dec 2018) | 1 line

Document the "cause" keyword argument for raise
------------------------------------------------------------------------
r66524 | k0kubun | 2018-12-24 12:50:39 +0900 (Mon, 24 Dec 2018) | 5 lines

test_win32ole_event.rb: use better retry strategy

because
https://ci.appveyor.com/project/ruby/ruby/builds/21208728/job/lm5k0lxnn51pcljl
seems to fail with just sleeping
------------------------------------------------------------------------
r66523 | k0kubun | 2018-12-24 12:48:32 +0900 (Mon, 24 Dec 2018) | 1 line

test_win32ole_event.rb: avoid unlimited retries
------------------------------------------------------------------------
r66522 | ko1 | 2018-12-24 11:02:47 +0900 (Mon, 24 Dec 2018) | 9 lines

remove "deprecated" for rb_frame_method_id_and_class [Bug #15300]

* include/ruby/backward.h (rb_frame_method_id_and_class): we had labeled
  `rb_frame_method_id_and_class()` as deprecated because MRI internal
  doesn't use it, but we found there are user of this API in external
  C-extensions. Now we don't have proper alternative API and no time
  to make alternative API, so I remove "deprecated" label.
  [Bug #15300]

------------------------------------------------------------------------
r66521 | nobu | 2018-12-24 10:56:21 +0900 (Mon, 24 Dec 2018) | 1 line

Compact AST::Node#inspect
------------------------------------------------------------------------
r66520 | nobu | 2018-12-24 10:46:48 +0900 (Mon, 24 Dec 2018) | 6 lines

time.c: zone in fixoff mode

* time.c (time_set_utc_offset): reset zone when setting to fixoff
  mode.  while previously TZMODE_SET_FIXOFF has reset it always,
  the zone is kept for loaded zone since r65025.
  [ruby-core:90627] [Bug #15439]
------------------------------------------------------------------------
r66519 | nobu | 2018-12-24 09:48:15 +0900 (Mon, 24 Dec 2018) | 3 lines

enumerator.c: fix inspect with the last empty hash

[ruby-core:90685] [Bug #15455]
------------------------------------------------------------------------
r66518 | mrkn | 2018-12-24 03:54:51 +0900 (Mon, 24 Dec 2018) | 1 line

Add test case of ArithmeticSequence#sum
------------------------------------------------------------------------
r66517 | mrkn | 2018-12-24 03:32:03 +0900 (Mon, 24 Dec 2018) | 3 lines

NEWS: Update for bigdecimal future plan

[ci skip]
------------------------------------------------------------------------
r66516 | mrkn | 2018-12-24 03:32:01 +0900 (Mon, 24 Dec 2018) | 3 lines

Import bigdecimal-1.4.0

* https://github.com/ruby/bigdecimal/compare/v1.4.0.pre.20181220a..v1.4.0
------------------------------------------------------------------------
r66515 | svn | 2018-12-24 00:02:23 +0900 (Mon, 24 Dec 2018) | 1 line

* 2018-12-24
------------------------------------------------------------------------
r66514 | ko1 | 2018-12-24 00:02:17 +0900 (Mon, 24 Dec 2018) | 9 lines

move checking code.

* gc.c (gc_mark_ptr): this check was introduced by accidentaly
  (this is why message is "...", crazy simple) for debugging.
  However, this check is useful because if there is T_NONE
  object here, we can't know which object points to it.
  For debugging reason, I remain this checking code and
  set reasonable error message.

------------------------------------------------------------------------
r66513 | ko1 | 2018-12-23 23:58:41 +0900 (Sun, 23 Dec 2018) | 8 lines

fix marking T_NONE object bug.

* array.c (rb_ary_splice): do not use RARRAY_PTR() here because it can cause
  GC because of rb_ary_detransient(). Here ary can contain T_NONE object
  because of increasing capacity and not initialized yet.

  error log: http://ci.rvm.jp/results/trunk-test@ruby-sky1/1557174

------------------------------------------------------------------------
r66512 | aycabta | 2018-12-23 22:15:17 +0900 (Sun, 23 Dec 2018) | 1 line

Add RDoc section to NEWS
------------------------------------------------------------------------
r66511 | aycabta | 2018-12-23 22:14:28 +0900 (Sun, 23 Dec 2018) | 1 line

Merge RDoc 6.1.0 from upstream
------------------------------------------------------------------------
r66510 | nobu | 2018-12-23 20:11:36 +0900 (Sun, 23 Dec 2018) | 1 line

Prohibit circular causes [Bug #15447]
------------------------------------------------------------------------
r66509 | nobu | 2018-12-23 20:11:35 +0900 (Sun, 23 Dec 2018) | 1 line

remove trailing spaces [ci skip]
------------------------------------------------------------------------
r66508 | normal | 2018-12-23 17:42:44 +0900 (Sun, 23 Dec 2018) | 6 lines

test/ruby/test_thread.rb (test_fork_while_parent_locked): rewrite to avoid OOM

Instead of using a torture test, trigger the condition for the old
segfault in [Bug #15383] exactly.

[ruby-core:90676] [Bug #15430]
------------------------------------------------------------------------
r66507 | kou | 2018-12-23 16:00:35 +0900 (Sun, 23 Dec 2018) | 5 lines

Import CSV 3.0.2

This includes performance improvement especially writing. Writing is
about 2 times faster.

------------------------------------------------------------------------
r66506 | nobu | 2018-12-23 14:49:43 +0900 (Sun, 23 Dec 2018) | 1 line

Restrict cause to an exception object [Bug #15447]
------------------------------------------------------------------------
r66505 | marcandre | 2018-12-23 12:43:45 +0900 (Sun, 23 Dec 2018) | 3 lines

Struct#to_h: Add doc for block form.

Patch by Shuji Kobayashi [doc] [ci skip] [#15454]
------------------------------------------------------------------------
r66504 | k0kubun | 2018-12-23 10:58:33 +0900 (Sun, 23 Dec 2018) | 4 lines

.travis.yml: refine explanation of no -j3 on osx [ci skip]

With travis_wait, we may not need -j3 for test-all anymore, but still we
need to avoid hanging on building Ruby somehow.
------------------------------------------------------------------------
r66503 | k0kubun | 2018-12-23 10:40:33 +0900 (Sun, 23 Dec 2018) | 5 lines

test/fiddle/test_function.rb: loosen timeout

We're hitting `Expected |200 - 351| (151) to be <= 150.` in several places:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/osx1012/ruby-trunk/log/20181215T094505Z.fail.html.gz
https://travis-ci.org/ruby/ruby/jobs/471483171
------------------------------------------------------------------------
r66502 | k0kubun | 2018-12-23 10:35:14 +0900 (Sun, 23 Dec 2018) | 3 lines

.travis.yml: wrap setarch with travis_wait

because travis_wait is not found via setarch
------------------------------------------------------------------------
r66501 | k0kubun | 2018-12-23 10:10:06 +0900 (Sun, 23 Dec 2018) | 4 lines

.travis.yml: try travis_wait instead of -v

Using -v somehow makes test-all on osx stable. Let me check if travis_wait
solves the issue or not.
------------------------------------------------------------------------
r66500 | k0kubun | 2018-12-23 09:45:11 +0900 (Sun, 23 Dec 2018) | 3 lines

iseq.c: avoid Null pointer dereference

detected by coverity scan
------------------------------------------------------------------------
r66499 | hsbt | 2018-12-23 09:20:49 +0900 (Sun, 23 Dec 2018) | 4 lines

Merge RubyGems 3.0.1 from rubygems/rubygems.

  It fixed the issues of RubyGems 3.0.0.
  https://blog.rubygems.org/2018/12/23/3.0.1-released.html
------------------------------------------------------------------------
r66498 | normal | 2018-12-23 07:39:31 +0900 (Sun, 23 Dec 2018) | 5 lines

{complex,object,rational}.c: document exception: false

From: Victor Shepelev <zverok.offline@gmail.com>

[ruby-core:90673] [Bug #15452]
------------------------------------------------------------------------
r66497 | svn | 2018-12-23 02:05:05 +0900 (Sun, 23 Dec 2018) | 1 line

* 2018-12-23
------------------------------------------------------------------------
r66496 | marcandre | 2018-12-23 02:05:03 +0900 (Sun, 23 Dec 2018) | 3 lines

ostruct.rb: Accept block for to_h [#15451].

Patch by Shuji Kobayashi.
------------------------------------------------------------------------
r66495 | nobu | 2018-12-22 19:23:06 +0900 (Sat, 22 Dec 2018) | 1 line

Use idException
------------------------------------------------------------------------
r66494 | normal | 2018-12-22 17:08:03 +0900 (Sat, 22 Dec 2018) | 7 lines

test/ruby/test_thread.rb (test_fork_while_parent_locked): reduce threads

Reduce thread counts unconditionally for some CI systems with
low limits..  And Solaris apparently lacks RLIMIT_NPROC, so we
can't detect resource limits and scale the test appropriately.

[ruby-core:90670] [Bug #15430]
------------------------------------------------------------------------
r66493 | nobu | 2018-12-22 16:14:14 +0900 (Sat, 22 Dec 2018) | 4 lines

Fix for circular causes

* eval_error.c (show_cause): get rid of infinite recursion on
  circular causes.  [Bug #15447]
------------------------------------------------------------------------
r66492 | nobu | 2018-12-22 16:14:13 +0900 (Sat, 22 Dec 2018) | 1 line

Removed garbage output
------------------------------------------------------------------------
r66491 | nobu | 2018-12-22 16:14:12 +0900 (Sat, 22 Dec 2018) | 1 line

Moved regexps not to confuse ruby-mode.el
------------------------------------------------------------------------
r66490 | k0kubun | 2018-12-22 10:43:45 +0900 (Sat, 22 Dec 2018) | 3 lines

benchmark/app_erb.yml: remove unused variable

https://github.com/ruby/ruby/commit/3efcb74036af32cbcc889d06d8c6c546289e89f4#r31762996
------------------------------------------------------------------------
r66489 | normal | 2018-12-22 10:41:18 +0900 (Sat, 22 Dec 2018) | 15 lines

thread_sync.c (rb_mutex_t): eliminate fork_gen

The true bug fork_gen was hiding was rb_mutex_abandon_locking_mutex
failing to unconditionally clear the waitq of mutexes it was
waiting on.  So we fix rb_mutex_abandon_locking_mutex, instead,
and eliminate rb_mutex_cleanup_keeping_mutexes.

This commit was tested heavily on a single-core Pentium-M which
was my most reliable reproducer of the "crash.rb" script from
[Bug #15383]

[Bug #14578] [Bug #15383]

Note: [Bug #15430] turned out to be an entirely different
problem: RLIMIT_NPROC limit was hit on the CI VMs.
------------------------------------------------------------------------
r66488 | normal | 2018-12-22 08:32:36 +0900 (Sat, 22 Dec 2018) | 7 lines

test/ruby/test_thread.rb: reduce thread count to avoid SIGKILL

Perhaps this error report is down to resource limits on a VM:

http://rubyci.s3.amazonaws.com/centos7/ruby-trunk/log/20181221T230003Z.fail.html.gz

But rb_mutex_t.fork_gen is still redundant, I think.
------------------------------------------------------------------------
r66487 | normal | 2018-12-22 06:44:09 +0900 (Sat, 22 Dec 2018) | 6 lines

test/ruby/test_thread.rb: add diagnosis code for [Bug #15430]

I can't find stderr in the test-all output of the CI machine,
so maybe the assertion will show what's going on.

http://rubyci.s3.amazonaws.com/centos7/ruby-trunk/log/20181221T170003Z.log.html.gz#test-all
------------------------------------------------------------------------
r66486 | k0kubun | 2018-12-22 01:36:37 +0900 (Sat, 22 Dec 2018) | 1 line

.travis.yml: use -v for osx to find a blocking test
------------------------------------------------------------------------
r66485 | k0kubun | 2018-12-22 01:19:31 +0900 (Sat, 22 Dec 2018) | 1 line

../arith_seq/../extract.c: remove unused variable
------------------------------------------------------------------------
r66484 | k0kubun | 2018-12-22 01:07:41 +0900 (Sat, 22 Dec 2018) | 6 lines

.travis.yml: give up parallel build for osx

Even building ruby seems to hang for unknown reasons.
https://travis-ci.org/ruby/ruby/jobs/471021727

Travis's osx environment is too fragile. Avoid anything dangerous.
------------------------------------------------------------------------
r66483 | svn | 2018-12-22 00:07:19 +0900 (Sat, 22 Dec 2018) | 1 line

* 2018-12-22
------------------------------------------------------------------------
r66482 | k0kubun | 2018-12-22 00:07:18 +0900 (Sat, 22 Dec 2018) | 14 lines

.travis.yml: avoid using -j3 for osx

osx build has failed too often. we don't know why.

To know which test hangs forever, we might want to have hard timeout for
all test case (like 9min, slightly less than no-output timeout) in test-all.
But it's a little hard to implement and I would workaround an unknown
cause somehow.

It's known that -j is harmful for some tests in test-all. Let's try to
remove it first, and if it doesn't work, I'll resurrect -v option to
easily know which test is the culprit.

Slow correctness is much better than fast false-positive.
------------------------------------------------------------------------
r66481 | svn | 2018-12-21 23:33:26 +0900 (Fri, 21 Dec 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66480 | k0kubun | 2018-12-21 23:33:25 +0900 (Fri, 21 Dec 2018) | 4 lines

test/excludes/_wercker: give up testing TestGemRemoteFetcher

The tests are really fragile with --jit-wait and it doesn't have interface
to modify this timeout at all.
------------------------------------------------------------------------
r66479 | k0kubun | 2018-12-21 23:01:49 +0900 (Fri, 21 Dec 2018) | 4 lines

test_jit.rb: show debug info for success_count test

to investigate
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20181221T092505Z.fail.html.gz
------------------------------------------------------------------------
r66478 | mrkn | 2018-12-21 22:05:16 +0900 (Fri, 21 Dec 2018) | 4 lines

range.c: reject ArithmeticSequence in rb_range_values

Reject ArithmeticSequence in rb_range_values so that methods like
Array#[] raises TypeError for ArithmeticSequence as an index.
------------------------------------------------------------------------
r66477 | normal | 2018-12-21 21:32:52 +0900 (Fri, 21 Dec 2018) | 8 lines

thread_sync.c (rb_mutex_cleanup_keeping_mutexes): update fork_gen

... when clearing waitq. Otherwise, we risk redundantly clearing
valid waiters in future calls to `mutex_ptr`.

Note: I am not sure if this fixes [Bug #15430], and even if it
did, fork_gen is a belt-and-suspenders redundancy for [Bug #15383]
which wastes one word for every Mutex object.
------------------------------------------------------------------------
r66476 | normal | 2018-12-21 21:32:48 +0900 (Fri, 21 Dec 2018) | 5 lines

thread_sync.c (rb_mutex_abandon_keeping_mutexes): remove unnecessary check

rb_mutex_abandon_all functions fine when passed a NULL value,
so let the compiler deal with the complexity of the branch
instead of the person reading the code.
------------------------------------------------------------------------
r66475 | mame | 2018-12-21 20:44:21 +0900 (Fri, 21 Dec 2018) | 3 lines

eval_error.c (show_cause): check if cause is an Exception or not

Fixes [Bug #15447]
------------------------------------------------------------------------
r66474 | mrkn | 2018-12-21 09:03:39 +0900 (Fri, 21 Dec 2018) | 5 lines

enumerator.c: Fix airth_seq_each for Rational

Fix the wrong uses of rb_int_ge in arith_seq_each.

[ruby-core:90648] [Bug #15444]
------------------------------------------------------------------------
r66473 | mrkn | 2018-12-21 08:29:49 +0900 (Fri, 21 Dec 2018) | 3 lines

Import bigdecimal-1.4.0.pre.20181220a

* https://github.com/ruby/bigdecimal/compare/v1.4.0.pre.20181214a..v1.4.0.pre.20181220a
------------------------------------------------------------------------
r66472 | nobu | 2018-12-21 08:21:50 +0900 (Fri, 21 Dec 2018) | 1 line

iseq.c: resurrect literal hash operands
------------------------------------------------------------------------
r66471 | stomar | 2018-12-21 07:54:36 +0900 (Fri, 21 Dec 2018) | 1 line

NEWS: small improvements
------------------------------------------------------------------------
r66470 | svn | 2018-12-21 06:17:15 +0900 (Fri, 21 Dec 2018) | 1 line

* 2018-12-21
------------------------------------------------------------------------
r66469 | nobu | 2018-12-21 06:17:11 +0900 (Fri, 21 Dec 2018) | 5 lines

A couple of small English fixes [ci skip]

[Fix GH-2052]

From: Jon Burgess <jkburges@gmail.com>
------------------------------------------------------------------------
r66468 | mame | 2018-12-20 19:17:37 +0900 (Thu, 20 Dec 2018) | 5 lines

ext/coverage/lib/coverage.rb (Coverage.line_stub): use only line events

It wrongly used all linenos of ISeq#trace_points which includes not only
line events but also call, return, and other events.  So, the result
included some linenos that can not be covered at all by line coverage.
------------------------------------------------------------------------
r66467 | kazu | 2018-12-20 18:55:05 +0900 (Thu, 20 Dec 2018) | 3 lines

[DOC] Update CI build status badges [ci skip]

copy from README.md
------------------------------------------------------------------------
r66466 | ko1 | 2018-12-20 16:17:55 +0900 (Thu, 20 Dec 2018) | 7 lines

hide iseq operand object for duphash. [Bug #15440]

* compile.c (compile_array): hide source Hash object.

* hash.c (rb_hash_resurrect): introduced to dup Hash object
  using rb_cHash.

------------------------------------------------------------------------
r66465 | nobu | 2018-12-20 15:59:27 +0900 (Thu, 20 Dec 2018) | 1 line

Test separately to get rid of risk to modify unrelated hash
------------------------------------------------------------------------
r66464 | nobu | 2018-12-20 15:44:50 +0900 (Thu, 20 Dec 2018) | 23 lines

Freeze hash literals embedded in duphash instructions

Previously, these hash literals were not frozen, and thus could be
modified by ObjectSpace, resulting in undesired behavior.  Example:

```ruby
require 'objspace'

def a(b={0=>1,1=>4,2=>17})
  b
end

p a
ObjectSpace.each_object(Hash) do |a|
  a[3] = 8 if a.class == Hash && a[0] == 1 && a[1] == 4 && a[2] == 17
end
p a
```

It may be desirable to hide such hashes from ObjectSpace, since
they are internal, but I'm not sure how to do that.

From: Jeremy Evans <code@jeremyevans.net>
------------------------------------------------------------------------
r66463 | nobu | 2018-12-20 14:43:15 +0900 (Thu, 20 Dec 2018) | 5 lines

parse.y: ignore constant name captures

* parse.y (reg_named_capture_assign_iter): ignore non-local name
  captures, including non-ASCII constant names.
  [ruby-dev:50719] [Bug #15437]
------------------------------------------------------------------------
r66462 | kou | 2018-12-20 13:03:10 +0900 (Thu, 20 Dec 2018) | 2 lines

Really ensure loading REXML in tests

------------------------------------------------------------------------
r66461 | nobu | 2018-12-20 13:03:07 +0900 (Thu, 20 Dec 2018) | 3 lines

rbinstall.rb: purge %x[git ls-files] too

[Bug #13423]
------------------------------------------------------------------------
r66460 | nobu | 2018-12-20 12:51:15 +0900 (Thu, 20 Dec 2018) | 4 lines

rbinstall.rb: syntax error in gemspec

* tool/rbinstall.rb (load_gemspec): do not hide syntax errors in
  a gemspec file.  check if the result instead.
------------------------------------------------------------------------
r66459 | kou | 2018-12-20 12:08:57 +0900 (Thu, 20 Dec 2018) | 3 lines

Ensure loading REXML


------------------------------------------------------------------------
r66458 | kou | 2018-12-20 11:49:10 +0900 (Thu, 20 Dec 2018) | 6 lines

rexml: upgrade to 3.1.8

See https://github.com/ruby/rexml/blob/master/NEWS.md for change summary.

Changes for spec/ has been reported: https://github.com/ruby/spec/pull/639

------------------------------------------------------------------------
r66457 | normal | 2018-12-20 09:07:19 +0900 (Thu, 20 Dec 2018) | 18 lines

thread_pthread.c (ubf_timer_disarm): ignore EINVAL iff timer is dead

The following race may happen if ubf_timer_destroy calls
timer_delete before ubf_timer_disarm gets called from
a different thread.  Consider the following timelines:

  ubf_timer_destroy                    | ubf_timer_disarm
  -------------------------------------+-----------------------------
                                       | CAS(ARM => DISARM)
  CAS(DISARM => DEAD)                  |
  timer_delete                         |
                                       | timer_settime(disarm)

Another option may be to add an intermediate "RTIMER_DISARMING"
state to the transition, but I figure the EINVAL check is
simpler and less intrusive code-wise.

cf. http://ci.rvm.jp/results/trunk-iseq_binary@silicon-docker/1545794
------------------------------------------------------------------------
r66456 | svn | 2018-12-20 04:01:04 +0900 (Thu, 20 Dec 2018) | 1 line

* 2018-12-20
------------------------------------------------------------------------
r66455 | yuki | 2018-12-20 04:01:02 +0900 (Thu, 20 Dec 2018) | 1 line

* gems/bundled_gems: Upgrade the did_you_mean gem to 1.3.0
------------------------------------------------------------------------
r66454 | hsbt | 2018-12-19 21:57:19 +0900 (Wed, 19 Dec 2018) | 1 line

Update entry of Psych on NEWS file.
------------------------------------------------------------------------
r66453 | hsbt | 2018-12-19 21:46:29 +0900 (Wed, 19 Dec 2018) | 1 line

Update entry of RubyGems on NEWS file.
------------------------------------------------------------------------
r66452 | normal | 2018-12-19 20:08:05 +0900 (Wed, 19 Dec 2018) | 22 lines

webrick: add the ability to override res, req creation

So that a customized HTTPServer subclass can use it's own
Request/Response classes.

To apply the override, make a subclass of WEBrick::HTTPServer
and override the
`create_request_and_response(with_webrick_config)` method. The
method should return an Array of [request, response].

To check whether the Server supports this method (i.e. when
using older versions of WEBrick when needing this
functionality), you can ask the server if it responds to the
method

    server.respond_to?(:create_request_and_response)

This is backportable.

[ruby-core:69604] [Feature #11266]

From: Julik Tarkhanov <me@julik.nl>
------------------------------------------------------------------------
r66451 | hsbt | 2018-12-19 16:20:17 +0900 (Wed, 19 Dec 2018) | 3 lines

Merge RubyGems 3.0.0 from upstream.

  https://blog.rubygems.org/2018/12/19/3.0.0-released.html
------------------------------------------------------------------------
r66450 | hsbt | 2018-12-19 16:02:57 +0900 (Wed, 19 Dec 2018) | 1 line

Update metadata of Bundler 1.17.2
------------------------------------------------------------------------
r66449 | duerst | 2018-12-19 13:08:46 +0900 (Wed, 19 Dec 2018) | 6 lines

avoid passing unnecessary options to download method

The option --unicode-beta for tool/downloader.rb introduced in
r66448 must not be passed as an option to actual download machinery.
Thanks to MSP-Greg (Greg L.) for bug report and patch.
This closes issue #15434.
------------------------------------------------------------------------
r66448 | duerst | 2018-12-19 09:26:31 +0900 (Wed, 19 Dec 2018) | 16 lines

add option to deal with Unicode beta data files

Unicode uses file names with explicit versions for beta publication.
This commit introduces a variable on the makefile level to distinguish
between beta and regular versions of file names.
 
common.mk: Define new variable UNICODE_BETA, usually set to NO,
but would be YES during tests with beta data files. Pass the value
of this variable to tool/downloader.rb with option --unicode-beta.

tool/downloader.rb: Receive and store value of --unicode-beta.
Raise an exception if value is YES, because we don't yet actually
deal with this case. Continue as usual if value is not YES.

This completes the changes needed in the makefile. Upcomming changes
will only affect tool/downloader.rb.
------------------------------------------------------------------------
r66447 | kazu | 2018-12-19 08:36:47 +0900 (Wed, 19 Dec 2018) | 1 line

sample/fib.py: Fix syntax error in Python 3 [ci skip]
------------------------------------------------------------------------
r66446 | normal | 2018-12-19 03:25:54 +0900 (Wed, 19 Dec 2018) | 6 lines

thread_pthread.c (ubf_timer_destroy): more careful state transition

We must not call timer_destroy while another thread is
calling timer_settime to arm the timer.

cf. http://ci.rvm.jp/results/trunk-iseq_binary@silicon-docker/1541578
------------------------------------------------------------------------
r66445 | nobu | 2018-12-19 01:11:07 +0900 (Wed, 19 Dec 2018) | 1 line

Constified to fix warning at r66442
------------------------------------------------------------------------
r66444 | nobu | 2018-12-19 01:01:58 +0900 (Wed, 19 Dec 2018) | 1 line

CHDIR to follow symlink [ci skip]
------------------------------------------------------------------------
r66443 | svn | 2018-12-19 00:11:18 +0900 (Wed, 19 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66442 | nobu | 2018-12-19 00:11:17 +0900 (Wed, 19 Dec 2018) | 1 line

Expand cross-recursion to a loop
------------------------------------------------------------------------
r66441 | svn | 2018-12-19 00:06:21 +0900 (Wed, 19 Dec 2018) | 1 line

* 2018-12-19
------------------------------------------------------------------------
r66440 | nobu | 2018-12-19 00:06:20 +0900 (Wed, 19 Dec 2018) | 1 line

Freeze and hide callback arguments holder
------------------------------------------------------------------------
r66439 | nobu | 2018-12-18 22:59:46 +0900 (Tue, 18 Dec 2018) | 11 lines

Enable refinements on symbol-proc in ruby-level methods

* vm_args.c (refine_sym_proc_call): resolve refinements when the
  proc is invoked, instead of resolving at making the proc, to
  enable refinements on symbol-proc in ruby-level methods

* vm.c (vm_cref_dup): clear cached symbol-procs when duplicating.

[Bug #15114] [Fix GH-2039]

From: manga_osyo <manga.osyo@gmail.com>
------------------------------------------------------------------------
r66438 | normal | 2018-12-18 18:21:05 +0900 (Tue, 18 Dec 2018) | 12 lines

thread_sync.c (mutex_ptr): only reinitalize waitqueue at fork

Mutexes need to remain locked after forking.

This fixes "[BUG] invalid keeping_mutexes: Attempt to unlock a
mutex which is locked by another thread" and should
fix test_fork_while_parent_locked failures in CI

[ruby-core:90581] [Bug #15424]
[ruby-core:90595] [Bug #15430]

Fixes: r66230 ("handle mutexes held by parent threads in children")
------------------------------------------------------------------------
r66437 | svn | 2018-12-18 17:33:23 +0900 (Tue, 18 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66436 | ko1 | 2018-12-18 17:33:20 +0900 (Tue, 18 Dec 2018) | 6 lines

should use defined_class.

* vm_insnhelper.c (vm_call_method_each_type): we should use me->defined_class
  instead of me->owner because me->owner doesn't has correct ancestors list.
  [Bug #15427]

------------------------------------------------------------------------
r66435 | svn | 2018-12-18 17:11:57 +0900 (Tue, 18 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66434 | ko1 | 2018-12-18 17:11:52 +0900 (Tue, 18 Dec 2018) | 2 lines

rb_raw_obj_info() support T_MODULE and T_ICLASS.

------------------------------------------------------------------------
r66433 | hsbt | 2018-12-18 15:49:12 +0900 (Tue, 18 Dec 2018) | 1 line

Bump version to 1.0.0.
------------------------------------------------------------------------
r66432 | knu | 2018-12-18 14:09:08 +0900 (Tue, 18 Dec 2018) | 4 lines

Import ipaddr 1.2.2

- Enable frozen_string_literal and do a bit of code cleanup

------------------------------------------------------------------------
r66431 | akr | 2018-12-18 12:09:54 +0900 (Tue, 18 Dec 2018) | 4 lines

Pathname#relative_path_from uses is_a?

I reconsidered because simpler code would have better maintainablity.

------------------------------------------------------------------------
r66430 | hsbt | 2018-12-18 11:01:39 +0900 (Tue, 18 Dec 2018) | 1 line

Bump version to psych 3.1.0.
------------------------------------------------------------------------
r66429 | svn | 2018-12-18 07:49:01 +0900 (Tue, 18 Dec 2018) | 1 line

* 2018-12-18
------------------------------------------------------------------------
r66428 | normal | 2018-12-18 07:48:57 +0900 (Tue, 18 Dec 2018) | 7 lines

Fix test failure if ENV["USER"] doesn't match Process.euid

When dropping privileges to run tests, ENV["USER"] could be set
to a user that doesn't match Process.euid, which causes this
test to fail with Errno::EPERM.  Try to get the name for the
current euid, and only fallback to ENV["USER"] if that doesn't
work.
------------------------------------------------------------------------
r66427 | nobu | 2018-12-17 14:57:15 +0900 (Mon, 17 Dec 2018) | 1 line

Split test_fnmatch
------------------------------------------------------------------------
r66426 | nobu | 2018-12-17 13:58:50 +0900 (Mon, 17 Dec 2018) | 1 line

Already nlink is properly set on Windows
------------------------------------------------------------------------
r66425 | nobu | 2018-12-17 13:58:49 +0900 (Mon, 17 Dec 2018) | 1 line

Split test_expand_path, test_basename, test_dirname
------------------------------------------------------------------------
r66424 | mrkn | 2018-12-17 12:08:46 +0900 (Mon, 17 Dec 2018) | 5 lines

NEWS: Note for the bigdecimal versions

The differences between bigdecimal 1.3.5, 1.4.0, and 1.5.0 are explained.

[ci skip]
------------------------------------------------------------------------
r66423 | nobu | 2018-12-17 10:36:34 +0900 (Mon, 17 Dec 2018) | 6 lines

Workaround for OpenBSD make

* common.mk: read from node.h in the source directly, without
  VPATH.  [ruby-core:89151] [Bug #15154]

From: kernigh (George Koehler) <xkernigh@netscape.net>
------------------------------------------------------------------------
r66422 | svn | 2018-12-17 09:43:45 +0900 (Mon, 17 Dec 2018) | 1 line

* 2018-12-17
------------------------------------------------------------------------
r66421 | nobu | 2018-12-17 09:43:40 +0900 (Mon, 17 Dec 2018) | 4 lines

Range check is only for interaval

* time.c (time_timespec): range check is only for time interval
  value if time_t is signed.
------------------------------------------------------------------------
r66420 | kazu | 2018-12-16 23:54:05 +0900 (Sun, 16 Dec 2018) | 3 lines

[DOC] Update Object#=~ [ci skip]

see r65989
------------------------------------------------------------------------
r66419 | k0kubun | 2018-12-16 23:24:20 +0900 (Sun, 16 Dec 2018) | 5 lines

bin/erb: improve documentation of -P flag

man/erb.1: ditto

[Bug #15421]
------------------------------------------------------------------------
r66418 | nobu | 2018-12-16 21:55:59 +0900 (Sun, 16 Dec 2018) | 6 lines

Refine error message for time interval

* time.c (time_timespec): Time interval value can be zero, not
  only positive.  [ruby-dev:50709] [Bug #15420]

From: shuujii (Shuji KOBAYASHI) <shuujii@gmail.com>
------------------------------------------------------------------------
r66417 | normal | 2018-12-16 21:33:44 +0900 (Sun, 16 Dec 2018) | 3 lines

thread_pthread (ubf_timer_destroy): use VM_ASSERT

Don't need the overhead at runtime
------------------------------------------------------------------------
r66416 | akr | 2018-12-16 21:26:52 +0900 (Sun, 16 Dec 2018) | 4 lines

Pathname#relative_path_from compatible with mock.

[Fix GH-2049]

------------------------------------------------------------------------
r66415 | nobu | 2018-12-16 21:09:08 +0900 (Sun, 16 Dec 2018) | 5 lines

Enhance Tempfile docs [ci skip]

[ruby-core:90525] [Bug #15411]

From: zverok (Victor Shepelev) <zverok.offline@gmail.com>
------------------------------------------------------------------------
r66414 | svn | 2018-12-16 16:51:11 +0900 (Sun, 16 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66413 | normal | 2018-12-16 16:51:09 +0900 (Sun, 16 Dec 2018) | 15 lines

thread_pthread.c: fix memory leak from fork loop leapfrog (v3)

Constantly forking a single-threaded process in a loop leads to
a memory leak when using POSIX timers.  This fixes the leak for
GNU/Linux systems running glibc.

v2: disarm before timer_delete
v3: ubf_timer_arm prevents double-arming

This unreverts r66291 / commit ab73ef6b7037039a05edcbf2a0c1b1108197e036
Example Linux-only reproduction may be found in:

  r66290 / commit 043047a8fd5315d98eac38ddbd04ebe8db361817

Note: FreeBSD 11.2 still leaks, I'm not sure why, yet.
------------------------------------------------------------------------
r66412 | k0kubun | 2018-12-16 09:55:56 +0900 (Sun, 16 Dec 2018) | 3 lines

spec/../initialize_spec.rb: skip fd-specific spec

https://gist.github.com/ko1/72c03695e81a54d40649f29d0c421f26
------------------------------------------------------------------------
r66411 | svn | 2018-12-16 06:28:37 +0900 (Sun, 16 Dec 2018) | 1 line

* 2018-12-16
------------------------------------------------------------------------
r66410 | stomar | 2018-12-16 06:28:34 +0900 (Sun, 16 Dec 2018) | 1 line

time.c: [DOC] improve docs for tz argument of Time.new
------------------------------------------------------------------------
r66409 | k0kubun | 2018-12-15 23:45:36 +0900 (Sat, 15 Dec 2018) | 6 lines

Revert "* expand tabs."

This reverts commit 298180f0450df6e975057cc7e90b3ae3248586fc.

It looks like we should not expand ext/nkf:
https://git.ruby-lang.org/ruby-commit-hook.git/commit/?id=91fd9708b7cf04a4dcddd9614c24e27ddef5d43b
------------------------------------------------------------------------
r66407 | svn | 2018-12-15 18:55:26 +0900 (Sat, 15 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66406 | naruse | 2018-12-15 18:55:24 +0900 (Sat, 15 Dec 2018) | 1 line

Merge nkf v2.1.5
------------------------------------------------------------------------
r66405 | suke | 2018-12-15 14:04:40 +0900 (Sat, 15 Dec 2018) | 4 lines

use System Monitor Control for spec of Win32OLE.

* spec/ruby/library/win32ole/win32ole_method/event_interface_spec.rb:
  use System Monitor Control instead of Microsoft Internet Control
------------------------------------------------------------------------
r66404 | normal | 2018-12-15 13:40:14 +0900 (Sat, 15 Dec 2018) | 12 lines

test/lib/test/unit.rb: do not propagate MAKEFLAGS to children

Propagating MAKEFLAGS to children running test/unit caused stuck
tests with GNU make when "-jN" is passed in both the make(1)
command-line and the "TESTS=" variable; because the forked child
process would see MAKEFLAGS and try to use jobserver on its own.

This is regression caused by r64399
(commit b53fadfd5f200dbd6fe9f4b2a91ebb68618e59bb,
"process.c: defaults to close_others false");
but that change also fixed a regression when close-on-exec
became the default in 2.0 :<
------------------------------------------------------------------------
r66403 | svn | 2018-12-15 00:18:16 +0900 (Sat, 15 Dec 2018) | 1 line

* 2018-12-15
------------------------------------------------------------------------
r66402 | stomar | 2018-12-15 00:18:14 +0900 (Sat, 15 Dec 2018) | 1 line

proc.c: [DOC] fix typos
------------------------------------------------------------------------
r66401 | naruse | 2018-12-14 18:44:20 +0900 (Fri, 14 Dec 2018) | 4 lines

Move autoload to toplevel

So that classes which uses Net::HTTP with https can use OpenSSL
namespace for example exception classes like OpenSSL::SSL::SSLError.
------------------------------------------------------------------------
r66400 | naruse | 2018-12-14 17:01:40 +0900 (Fri, 14 Dec 2018) | 3 lines

fix r66163

OpenSSL maybe aren't loaded in rubygems.
------------------------------------------------------------------------
r66399 | svn | 2018-12-14 14:44:43 +0900 (Fri, 14 Dec 2018) | 1 line

* remove trailing spaces. [ci skip]
------------------------------------------------------------------------
r66398 | duerst | 2018-12-14 14:44:41 +0900 (Fri, 14 Dec 2018) | 1 line

tweak syntax of Proc documentation [ci skip]
------------------------------------------------------------------------
r66397 | nobu | 2018-12-14 13:10:42 +0900 (Fri, 14 Dec 2018) | 1 line

Suppress deprecation warnings
------------------------------------------------------------------------
r66396 | mrkn | 2018-12-14 12:45:32 +0900 (Fri, 14 Dec 2018) | 3 lines

NEWS: Fix description of BigDecimal.new [ci skip]

BigDecimal.new is restored, and will be removed on bigdecimal 1.5
------------------------------------------------------------------------
r66395 | nobu | 2018-12-14 12:36:13 +0900 (Fri, 14 Dec 2018) | 1 line

No document of Tempfile::Remover [ci skip]
------------------------------------------------------------------------
r66394 | svn | 2018-12-14 12:33:54 +0900 (Fri, 14 Dec 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66393 | mrkn | 2018-12-14 12:33:53 +0900 (Fri, 14 Dec 2018) | 3 lines

Import bigdecimal-1.4.0.pre.20181214a

* https://github.com/ruby/bigdecimal/compare/v1.4.0.pre.20181205a..v1.4.0.pre.20181214a
------------------------------------------------------------------------
r66392 | ko1 | 2018-12-14 11:27:23 +0900 (Fri, 14 Dec 2018) | 9 lines

separte NULL and EMPTY check.

* hash.c: separate NULL and EMPTY check functions.
  `RHASH_TABLE_EMPTY` function checks NULL table or not,
  but it should be named "NULL_P".
  Introduce `RHASH_TABLE_EMPTY_P` function to check size == 0.
  There are cases that hash has table data even if data is not NULL
  (in case removed after inserted elements).

------------------------------------------------------------------------
r66391 | nobu | 2018-12-14 10:29:23 +0900 (Fri, 14 Dec 2018) | 1 line

Suppress uninitialized instance variable warnings
------------------------------------------------------------------------
r66390 | ko1 | 2018-12-14 10:10:15 +0900 (Fri, 14 Dec 2018) | 16 lines

rename li_table->ar_table (and related names).

* internal.h: rename the following names:
  * li_table -> ar_table. "li" means linear (from linear search),
    but we use the word "array" (from data layout).
  * RHASH_ARRAY -> RHASH_AR_TABLE. AR_TABLE is more clear.
  * rb_hash_array_* -> rb_hash_ar_table_*.
  * RHASH_TABLE_P() -> RHASH_ST_TABLE_P(). more clear.
  * RHASH_CLEAR() -> RHASH_ST_CLEAR().

* hash.c: rename "linear_" prefix functions to "ar_" prefix.

* hash.c (linear_init_table): rename to ar_alloc_table.

* debug_counter.h: rename obj_hash_array to obj_hash_ar.

------------------------------------------------------------------------
r66389 | stomar | 2018-12-14 07:41:44 +0900 (Fri, 14 Dec 2018) | 4 lines

time.c: improve docs for Time

* time.c: [DOC] fix typos, drop unnecessary `p' from code examples,
  add missing `#' for return values, other small improvements.
------------------------------------------------------------------------
r66388 | stomar | 2018-12-14 05:35:02 +0900 (Fri, 14 Dec 2018) | 4 lines

NEWS: various fixes

Fix some typos; fix syntax in a code example; fix unintentional
description list for ticket numbers; other fixes.
------------------------------------------------------------------------
r66387 | stomar | 2018-12-14 05:25:36 +0900 (Fri, 14 Dec 2018) | 1 line

re.c: [DOC] fix typos
------------------------------------------------------------------------
r66386 | svn | 2018-12-14 05:24:25 +0900 (Fri, 14 Dec 2018) | 1 line

* 2018-12-14
------------------------------------------------------------------------
r66385 | stomar | 2018-12-14 05:24:23 +0900 (Fri, 14 Dec 2018) | 1 line

proc.c: [DOC] fix typos
------------------------------------------------------------------------
r66384 | usa | 2018-12-13 19:51:59 +0900 (Thu, 13 Dec 2018) | 2 lines

Install script of default gems as is to its libexec dir

------------------------------------------------------------------------
r66383 | kazu | 2018-12-13 18:51:05 +0900 (Thu, 13 Dec 2018) | 1 line

[DOC] Fix typos [ci skip]
------------------------------------------------------------------------
r66382 | normal | 2018-12-13 18:41:17 +0900 (Thu, 13 Dec 2018) | 5 lines

thread_pthread.c (native_ppoll_sleep): drop ubf_select references

We don't use ubf_select after r65495 / 5de7b3b4f27df747899c243adbb10c9799ad1399
("thread_pthread.c (native_ppoll_sleep): new eventfd (or pipe) for ubf"),
so we don't need to unregister the thread from the ubf list.
------------------------------------------------------------------------
r66381 | normal | 2018-12-13 18:25:46 +0900 (Thu, 13 Dec 2018) | 12 lines

thread_pthread.c (native_sleep): sched_yield if GVL uncontended

Uncontended GVL waitqueue could mean a single CPU setup where
threads are starved and can't even insert themselves into our
waitqueue.  So we force other threads to run upon releasing
the GVL in an uncontended state, in the hope that we can
avoid entering the slow path of ppoll and similar syscalls.

This should prevent test/ruby/test_thread.rb::test_signal_at_join
timeout problems on our single CPU FreeBSD CI machine.

[ruby-core:90417] [Bug #15398]
------------------------------------------------------------------------
r66380 | akr | 2018-12-13 17:53:15 +0900 (Thu, 13 Dec 2018) | 2 lines

use :chdir option to avoid fd 3 to work with Windows.

------------------------------------------------------------------------
r66379 | normal | 2018-12-13 17:44:15 +0900 (Thu, 13 Dec 2018) | 3 lines

thread_pthread.c (gvl_release_common): constify return value

No need for it to be mutable
------------------------------------------------------------------------
r66378 | k0kubun | 2018-12-13 14:59:14 +0900 (Thu, 13 Dec 2018) | 1 line

test_win32ole_event.rb: retry random failure
------------------------------------------------------------------------
r66377 | nobu | 2018-12-13 14:09:58 +0900 (Thu, 13 Dec 2018) | 4 lines

Separate RSTRING_PTR from a function call

Do not apply RSTRING_PTR, a macro which evaluats its argument
multiple times, on a function call.
------------------------------------------------------------------------
r66376 | tenderlove | 2018-12-13 12:01:18 +0900 (Thu, 13 Dec 2018) | 6 lines

Don't increment `code_index`

`code_index` doesn't need to be incremented since the mark array has
been removed.  Thanks for the patch ko1!

[ruby-core:90456] [Bug #15406]
------------------------------------------------------------------------
r66375 | stomar | 2018-12-13 07:04:48 +0900 (Thu, 13 Dec 2018) | 1 line

string.c: [DOC] fix typos
------------------------------------------------------------------------
r66374 | stomar | 2018-12-13 07:03:11 +0900 (Thu, 13 Dec 2018) | 1 line

range.c: [DOC] fix typo
------------------------------------------------------------------------
r66373 | marcandre | 2018-12-13 06:45:17 +0900 (Thu, 13 Dec 2018) | 1 line

range.c: Typo fix [DOC] [ci skip] [#15405]
------------------------------------------------------------------------
r66372 | svn | 2018-12-13 06:17:05 +0900 (Thu, 13 Dec 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66371 | mrkn | 2018-12-13 06:17:04 +0900 (Thu, 13 Dec 2018) | 1 line

Add test cases of rb_arithmetic_sequence_extract
------------------------------------------------------------------------
r66370 | marcandre | 2018-12-13 04:51:50 +0900 (Thu, 13 Dec 2018) | 1 line

NEWS: Mention (1...) in addition to (1..) [DOC]
------------------------------------------------------------------------
r66369 | marcandre | 2018-12-13 04:49:22 +0900 (Thu, 13 Dec 2018) | 3 lines

range.c: Documentation on endless ranges.

Based on patch by Victor Shepelev [DOC] [#7552]
------------------------------------------------------------------------
r66368 | ko1 | 2018-12-13 02:16:02 +0900 (Thu, 13 Dec 2018) | 6 lines

skip a test.

* test/ruby/test_literal.rb (test_debug_frozen_string_in_array_literal):
  skip last test if `RUBY_ISEQ_DUMP_DEBUG` is specified because round-trip
  (iseq <-> binary/array) doesn't support this feature.

------------------------------------------------------------------------
r66367 | ko1 | 2018-12-13 02:12:08 +0900 (Thu, 13 Dec 2018) | 7 lines

param.flags.has_kw flag should be FALSE before setting param.keyword.

* compile.c (ibf_load_iseq_each): iseq_mark assumes that if
  param.flags.has_kw is TRUE, then param.keyword is not NULL.
  To confirm this assumption, make it FALSE before param.keyword
  is initialized.

------------------------------------------------------------------------
r66366 | ko1 | 2018-12-13 00:59:49 +0900 (Thu, 13 Dec 2018) | 5 lines

restore `catch_except_p` flag.

* compile.c: we need to restore `catch_except_p` flag at
  `load_from_binary`. [Bug #15395]

------------------------------------------------------------------------
r66365 | svn | 2018-12-13 00:45:09 +0900 (Thu, 13 Dec 2018) | 1 line

* 2018-12-13
------------------------------------------------------------------------
r66364 | ko1 | 2018-12-13 00:45:06 +0900 (Thu, 13 Dec 2018) | 7 lines

remove `compiled_` prefix. [Feature #15287]

* vm_trace.c: remove `compiled_` prefix from the following methods:
  * `compiled_eval_script`
  * `compiled_instruction_sequence`
  [Feature #15287]

------------------------------------------------------------------------
r66363 | hsbt | 2018-12-12 22:25:29 +0900 (Wed, 12 Dec 2018) | 1 line

Added entry of Psych.
------------------------------------------------------------------------
r66362 | nobu | 2018-12-12 20:43:14 +0900 (Wed, 12 Dec 2018) | 3 lines

Revise Date#hour, #min, #sec

For ActiveSupport.  [ruby-core:90443] [Bug #15403]
------------------------------------------------------------------------
r66361 | mame | 2018-12-12 20:24:15 +0900 (Wed, 12 Dec 2018) | 1 line

test/test_open3.rb: skip a fd redirection test on windows
------------------------------------------------------------------------
r66360 | nobu | 2018-12-12 20:06:48 +0900 (Wed, 12 Dec 2018) | 3 lines

complex.c: new APIs for Complex

[Feature #15066]
------------------------------------------------------------------------
r66359 | nobu | 2018-12-12 20:06:47 +0900 (Wed, 12 Dec 2018) | 6 lines

complex.c: rb_complex_new_polar

* complex.c (rb_complex_new_polar): renamed with _new to clarify
  that it creates a new instance, but is not an instance method.

* complex.c (rb_complex_polar): deprecated.
------------------------------------------------------------------------
r66358 | hsbt | 2018-12-12 18:40:06 +0900 (Wed, 12 Dec 2018) | 1 line

Bump version to 1.3.0 same as the latest version of rubygems.org.
------------------------------------------------------------------------
r66357 | hsbt | 2018-12-12 16:57:42 +0900 (Wed, 12 Dec 2018) | 1 line

Bump library version same as released version of rubygems.org
------------------------------------------------------------------------
r66356 | hsbt | 2018-12-12 16:41:10 +0900 (Wed, 12 Dec 2018) | 3 lines

Backport https://github.com/ruby/irb/pull/2

  Fix and improve version string by @stomar
------------------------------------------------------------------------
r66355 | duerst | 2018-12-12 16:37:16 +0900 (Wed, 12 Dec 2018) | 4 lines

Enhance Proc docs [Misc #14610]

From: Victor Shepelev <zverok.offline@gmail.com>

------------------------------------------------------------------------
r66354 | hsbt | 2018-12-12 16:34:16 +0900 (Wed, 12 Dec 2018) | 1 line

Backport https://github.com/ruby/shell/pull/1
------------------------------------------------------------------------
r66353 | mrkn | 2018-12-12 16:16:07 +0900 (Wed, 12 Dec 2018) | 4 lines

enumerator.c: Add rb_arithmetic_sequence_components_t

Add rb_arithmetic_sequence_components_t struct for encapsulating
the components of ArithmeticSequence.
------------------------------------------------------------------------
r66352 | akr | 2018-12-12 15:48:46 +0900 (Wed, 12 Dec 2018) | 14 lines

open3.rb don't use keyword splat (**).

revert r43582, r49173 and r49177.

open3 arguments uses spawn-like keyword arguments.
Both symbol and integer keys are used.
```
Open3.capture2(*command, :in => IO::NULL, 3 => IO::NULL)
``

This style cannot be supported with keyword splat (**) since Ruby 2.6.
Because Ruby 2.6 prohibits symbol/non-symbol key hash separation.


------------------------------------------------------------------------
r66351 | mrkn | 2018-12-12 15:39:58 +0900 (Wed, 12 Dec 2018) | 4 lines

enumerator.c: rb_arithmetic_sequence_extract

New public C-API for extracting components of Enumerator::ArithmeticSequence
or Range.
------------------------------------------------------------------------
r66350 | naruse | 2018-12-12 15:10:29 +0900 (Wed, 12 Dec 2018) | 3 lines

Enchance MatchData docs [Bug #14450]

From: Victor Shepelev <zverok.offline@gmail.com>
------------------------------------------------------------------------
r66349 | nobu | 2018-12-12 14:46:13 +0900 (Wed, 12 Dec 2018) | 1 line

Disable tailcall optimization [Bug #15303]
------------------------------------------------------------------------
r66348 | akr | 2018-12-12 14:38:59 +0900 (Wed, 12 Dec 2018) | 2 lines

mention Pathname change.

------------------------------------------------------------------------
r66347 | hsbt | 2018-12-12 14:07:50 +0900 (Wed, 12 Dec 2018) | 4 lines

Merge rubygems@21f12a8 from upstream.

  * [BudlerVersionFinder] set .filter! and .compatible? to match only on major versions https://github.com/rubygems/rubygems/pull/2515
  * Fix broken symlink that points to ../* https://github.com/rubygems/rubygems/pull/2516
------------------------------------------------------------------------
r66346 | akr | 2018-12-12 14:07:49 +0900 (Wed, 12 Dec 2018) | 18 lines

Use File class methods to avoid pipe execution


Following methods use corresponding File class methods
instead of IO class methods.

- Pathname#each_line
- Pathname#read
- Pathname#binread
- Pathname#write
- Pathname#binwrite
- Pathname#readlines

Reported by ooooooo_q.




------------------------------------------------------------------------
r66345 | samuel | 2018-12-12 11:31:26 +0900 (Wed, 12 Dec 2018) | 1 line

Fix location of NEWS for native coroutine.
------------------------------------------------------------------------
r66344 | k0kubun | 2018-12-12 09:38:49 +0900 (Wed, 12 Dec 2018) | 7 lines

bootstraptest/runner.rb: increase timeout for --jit-wait

because test_io.rb:33 randomly fails
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1519055

checking MJIT.enabled? on driver might not make sense for target, but as
long as the CI is -DMJIT_FORCE_ENABLE, I believe it works for now.
------------------------------------------------------------------------
r66343 | hsbt | 2018-12-12 09:17:59 +0900 (Wed, 12 Dec 2018) | 1 line

Update version number on Bundler section.
------------------------------------------------------------------------
r66342 | samuel | 2018-12-12 08:56:26 +0900 (Wed, 12 Dec 2018) | 1 line

Explain which architectures are supported in NEWS.
------------------------------------------------------------------------
r66341 | samuel | 2018-12-12 08:49:33 +0900 (Wed, 12 Dec 2018) | 1 line

Ensure x86 stack is fortified, fixed #15335.
------------------------------------------------------------------------
r66340 | svn | 2018-12-12 08:49:32 +0900 (Wed, 12 Dec 2018) | 1 line

* 2018-12-12
------------------------------------------------------------------------
r66339 | samuel | 2018-12-12 08:49:29 +0900 (Wed, 12 Dec 2018) | 1 line

Add NEWS about coroutine implementation.
------------------------------------------------------------------------
r66338 | hsbt | 2018-12-11 20:02:41 +0900 (Tue, 11 Dec 2018) | 1 line

Merge Bundler 1.17.2 from upstream.
------------------------------------------------------------------------
r66337 | naruse | 2018-12-11 19:55:07 +0900 (Tue, 11 Dec 2018) | 1 line

Same as r66334 add Errno::EISDIR
------------------------------------------------------------------------
r66336 | normal | 2018-12-11 18:49:31 +0900 (Tue, 11 Dec 2018) | 6 lines

test/dtrace: use TracePoint.__enable

"TracePoint.enable" is implemented in prelude.rb since
r66003 / commit 96990203b71184003cf8a9bad5cc177645820fd4
and not available in miniruby.  I tried using regular "ruby"
for testing, but it proved noisy and caused test failures.
------------------------------------------------------------------------
r66335 | normal | 2018-12-11 18:49:26 +0900 (Tue, 11 Dec 2018) | 4 lines

test/dtrace: improve diagnostics

These will help us track down test failures more easily
(on FreeBSD 11.2)
------------------------------------------------------------------------
r66334 | naruse | 2018-12-11 17:44:00 +0900 (Tue, 11 Dec 2018) | 3 lines

CentOS-7 (1810)'s header has O_TMPFILE but kernel doesn't support it

http://rubyci.s3.amazonaws.com/centos7/ruby-trunk/log/20181206T080003Z.diff.html.gz
------------------------------------------------------------------------
r66333 | ko1 | 2018-12-11 16:31:23 +0900 (Tue, 11 Dec 2018) | 1 line

remove unused (redundant) chapter names
------------------------------------------------------------------------
r66332 | mame | 2018-12-11 15:35:40 +0900 (Tue, 11 Dec 2018) | 3 lines

doc/contributing.rdoc: remove IA-64 from active platform list

Now takano32-san has no IA-64 machine for test.
------------------------------------------------------------------------
r66331 | nobu | 2018-12-11 14:09:35 +0900 (Tue, 11 Dec 2018) | 1 line

test/date: removed unnecessaruy `__send__`
------------------------------------------------------------------------
r66330 | nobu | 2018-12-11 14:09:34 +0900 (Tue, 11 Dec 2018) | 1 line

ext/date: Fix !NDEBUG code
------------------------------------------------------------------------
r66329 | nobu | 2018-12-11 13:35:13 +0900 (Tue, 11 Dec 2018) | 5 lines

date_core.c: moved some methods to DateTime

* ext/date/date_core.c (Init_date_core): moved methods which make
  sense only for DateTime to that class, instead of defining
  private methods in Date and making them public in DateTime.
------------------------------------------------------------------------
r66328 | nobu | 2018-12-11 13:30:31 +0900 (Tue, 11 Dec 2018) | 4 lines

date_core.c: reorder ComplexDateData

* ext/date/date_core.c (ComplexDateData): reordered to adjust
  common part with SimpleDateData.
------------------------------------------------------------------------
r66327 | mame | 2018-12-11 13:26:04 +0900 (Tue, 11 Dec 2018) | 1 line

NEWS: add a ticket number
------------------------------------------------------------------------
r66326 | nobu | 2018-12-11 13:14:31 +0900 (Tue, 11 Dec 2018) | 5 lines

Fix infinite loop by ensure

* compile.c (iseq_insert_nop_between_end_and_cont): insert nop so
  that the end of rescue and continuing points are not same, to
  get rid of infinite loop.  [Bug #15385]
------------------------------------------------------------------------
r66325 | svn | 2018-12-11 13:13:13 +0900 (Tue, 11 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66324 | nobu | 2018-12-11 13:13:09 +0900 (Tue, 11 Dec 2018) | 1 line

Modify insn list only when compiling
------------------------------------------------------------------------
r66323 | hsbt | 2018-12-11 12:07:37 +0900 (Tue, 11 Dec 2018) | 5 lines

Downgrade Bundler 1.17.x from 2.0.0.

  We have the platform issue on heroku:
    * https://gist.github.com/schneems/26452540f6e2bbbcf2ea144f45f6b305
    * https://github.com/heroku/heroku-buildpack-ruby/issues/833
------------------------------------------------------------------------
r66322 | duerst | 2018-12-11 09:44:24 +0900 (Tue, 11 Dec 2018) | 1 line

add clarification about details of update to Unicode 11.0.0 [ci skip]
------------------------------------------------------------------------
r66321 | nobu | 2018-12-11 09:36:46 +0900 (Tue, 11 Dec 2018) | 4 lines

ReFix r663197

Stringify after downcase, to restrict arguments.
[Bug#15394]
------------------------------------------------------------------------
r66320 | nobu | 2018-12-11 09:05:53 +0900 (Tue, 11 Dec 2018) | 1 line

Fix r663197
------------------------------------------------------------------------
r66319 | naruse | 2018-12-11 08:54:14 +0900 (Tue, 11 Dec 2018) | 5 lines

Preserve HTTP header key as string [Bug #15394]

to prevent send Host header twice accidentally.

From: Sangyong Sim <sangyong-sim@cookpad.com>
------------------------------------------------------------------------
r66318 | kazu | 2018-12-11 08:52:59 +0900 (Tue, 11 Dec 2018) | 1 line

Sort [ci skip]
------------------------------------------------------------------------
r66317 | nobu | 2018-12-11 08:40:14 +0900 (Tue, 11 Dec 2018) | 5 lines

Add the deprecation of flip-flops to NEWS page [ci skip]

[Fix GH-2047]

From: Junichi Ito <jit@sonicgarden.jp>
------------------------------------------------------------------------
r66316 | svn | 2018-12-11 08:23:00 +0900 (Tue, 11 Dec 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66315 | odaira | 2018-12-11 08:22:56 +0900 (Tue, 11 Dec 2018) | 7 lines

Native coroutine implementation for ppc64le Linux

* configure.ac: enable fiber coroutine for powerpc64le-linux

* coroutine/ppc64le/Context.S: coroutine_transfer implementation

* coroutine/ppc64le/Context.h: coroutine implementation
------------------------------------------------------------------------
r66314 | duerst | 2018-12-11 08:12:12 +0900 (Tue, 11 Dec 2018) | 9 lines

add a test to make sure some unassigned codepoints do not get converted

In test/ruby/enc/test_case_mapping.rb, add a test to make sure the
unassigned codepoints in the Georgian MTAVRULI range (U+1CBB, U+1CBC)
do not get converted to unrelated codepoints by String#capitalize.
(It turns out that this test was not strictly necessary, because
unassigned codepoints are already excluded by the fact that they are
not found in the onigenc_unicode_fold_lookup table. So this test only
serves to check against future regressions.)
------------------------------------------------------------------------
r66313 | svn | 2018-12-11 00:48:49 +0900 (Tue, 11 Dec 2018) | 1 line

* 2018-12-11
------------------------------------------------------------------------
r66312 | naruse | 2018-12-11 00:48:45 +0900 (Tue, 11 Dec 2018) | 1 line

fix r66311
------------------------------------------------------------------------
r66311 | naruse | 2018-12-10 22:58:36 +0900 (Mon, 10 Dec 2018) | 1 line

Define HAVE_STMT_AND_DECL_IN_EXPR and use it [Bug #15293]
------------------------------------------------------------------------
r66310 | nobu | 2018-12-10 21:43:16 +0900 (Mon, 10 Dec 2018) | 1 line

LEGAL: gathered util.c [ci skip]
------------------------------------------------------------------------
r66308 | usa | 2018-12-10 16:11:18 +0900 (Mon, 10 Dec 2018) | 5 lines

Net::ReadTimeout and Net::WriteTimeout should tell the cause socket

* lib/net/protocol.rb (ReadTimeout, WriteTimeout): Net::ReadTimeout and Net::WriteTimeout should tell the cause socket
  [Feature #14832] [ruby-core:87440]

------------------------------------------------------------------------
r66307 | nobu | 2018-12-10 11:58:01 +0900 (Mon, 10 Dec 2018) | 1 line

win32/Makefile.sub: missing dependency of mjit_config.h
------------------------------------------------------------------------
r66306 | nobu | 2018-12-10 11:01:21 +0900 (Mon, 10 Dec 2018) | 4 lines

Initialize bin

* hash.c (linear_update): initialize `bin` just to silence false
  warnings by old gcc 4.8.  [Bug #15299]
------------------------------------------------------------------------
r66305 | nobu | 2018-12-10 10:58:28 +0900 (Mon, 10 Dec 2018) | 5 lines

Limit uplevel travarsing

* tool/vcs.rb (VCS.detect): limit level of travarsing parent
  directories, 0 by the default.  curretly always detecting at the
  source directory itself.
------------------------------------------------------------------------
r66304 | nobu | 2018-12-10 10:58:27 +0900 (Mon, 10 Dec 2018) | 4 lines

Detection order

* tool/vcs.rb (VCS.detect): detect each VCS while travarsing
  parent directories.
------------------------------------------------------------------------
r66303 | nobu | 2018-12-10 10:57:48 +0900 (Mon, 10 Dec 2018) | 1 line

Updated dates in man pages
------------------------------------------------------------------------
r66302 | svn | 2018-12-10 09:05:44 +0900 (Mon, 10 Dec 2018) | 1 line

* 2018-12-10
------------------------------------------------------------------------
r66301 | nobu | 2018-12-10 09:05:43 +0900 (Mon, 10 Dec 2018) | 32 lines

Remove unnecessary require of fileutils

Today I updated my ruby core clone, and I run the usual steps to compile
ruby. When running "make", I run into the following error:

```
(... stuff ...)
encdb.h unchanged
Traceback (most recent call last):
	5: from ./tool/mkconfig.rb:19:in `<main>'
	4: from ./tool/mkconfig.rb:19:in `require'
	3: from /home/deivid/Code/ruby/lib/fileutils.rb:4:in `<top (required)>'
	2: from /home/deivid/Code/ruby/lib/fileutils.rb:4:in `require'
	1: from /home/deivid/Code/ruby/rbconfig.rb:11:in `<top (required)>'
/home/deivid/Code/ruby/rbconfig.rb:13:in `<module:RbConfig>': ruby lib version (2.5.0) doesn't match executable version (2.6.0) (RuntimeError)
uncommon.mk:780: recipe for target '.rbconfig.time' failed
make: *** [.rbconfig.time] Error 1
```

Apparently, the script that generates the root `rbconfig.rb` file requires
`fileutils`, which in turn requires 'rbconfig' (for mjit-headers it says in a
comment), which uses the `rbconfig.rb` config file in the root folder if it
exists. In my case, this file existed but had been generated on 2.5.0, thus
causing the error.

I think we can avoid this sort of circular dependency by not requiring
`fileutils`, since it does not seem to be used anywhere in the
`tool/mkconfig.rb` script since r55338.

[Fix GH-2045]

From: David Rodriguez <deivid.rodriguez@riseup.net>
------------------------------------------------------------------------
r66300 | duerst | 2018-12-10 08:14:29 +0900 (Mon, 10 Dec 2018) | 31 lines

implement special behavior for Georgian for String#capitalize

The modern Georgian script is special in that it has an 'uppercase'
variant called MTAVRULI which can be used for emphasis of whole words,
for screamy headlines, and so on. However, in contrast to all other
bicameral scripts, there is no usage of capitalizing the first letter
in a word or a sentence. Words with mixed capitalization are not used
at all.

We therefore implement special behavior for String#capitalize. Formally,
we define String#capitalize as first applying String#downcase for the
whole string, then using titlecase on the first letter. Because Georgian
defines titlecase as the identity function both for MTAVRULI ('uppercase')
and Mkhedruli (lowercase), this results in String#capitalize being
equivalent to String#downcase for Georgian. This avoids undesirable
mixed case.

* enc/unicode.c: Actual implementation

* string.c: Add mention of this special case for documentation

* test/ruby/enc/test_case_mapping.rb: Add two tests, a general one
  that uses String#capitalize on some (including nonsensical)
  combinations of MTAVRULI and Mkhedruli, and a canary test to
  detect the potential assignment of characters to the currently
  open slots (holes) at U+1CBB and U+1CBC.

* test/ruby/enc/test_case_comprehensive.rb: Tweak generation of
  expectation data.

Together with r65933, this closes issue #14839.
------------------------------------------------------------------------
r66299 | k0kubun | 2018-12-09 21:35:13 +0900 (Sun, 09 Dec 2018) | 3 lines

test/rdoc/minitest_helper.rb: partially revert r66286

to resurrect r65613
------------------------------------------------------------------------
r66296 | nobu | 2018-12-09 11:08:56 +0900 (Sun, 09 Dec 2018) | 1 line

Break lines in LEGAL texts [ci skip]
------------------------------------------------------------------------
r66295 | duerst | 2018-12-09 11:02:45 +0900 (Sun, 09 Dec 2018) | 5 lines

delete Unicode 10.0.0 related files, no longer needed [#14802]
This line, and those below, will be ignored--

D    enc/unicode/10.0.0

------------------------------------------------------------------------
r66294 | nobu | 2018-12-09 10:53:14 +0900 (Sun, 09 Dec 2018) | 1 line

Blockquote LEGAL [ci skip]
------------------------------------------------------------------------
r66293 | nobu | 2018-12-09 10:34:23 +0900 (Sun, 09 Dec 2018) | 1 line

raise instead of rb_bug
------------------------------------------------------------------------
r66292 | nobu | 2018-12-09 10:22:16 +0900 (Sun, 09 Dec 2018) | 4 lines

Removed never-happening case

get_uniq_filename never returns NULL but raises an exception on
failure.
------------------------------------------------------------------------
r66291 | normal | 2018-12-09 07:04:43 +0900 (Sun, 09 Dec 2018) | 6 lines

Revert "thread_pthread.c: fix memory leak from fork loop leapfrog (v2)"

This reverts r66290 / commit 043047a8fd5315d98eac38ddbd04ebe8db361817.

Still fails on CI, and I'm not able to reproduce the failure, either :<
http://ci.rvm.jp/results/trunk-test@ruby-sky1/1508228
------------------------------------------------------------------------
r66290 | normal | 2018-12-09 06:45:50 +0900 (Sun, 09 Dec 2018) | 26 lines

thread_pthread.c: fix memory leak from fork loop leapfrog (v2)

Constantly forking a single-threaded process in a loop leads to
a memory leak when using POSIX timers.

v2: disarm before timer_delete

==> fork_leapfrog.rb <==
require 'io/wait'
Dir.chdir '/proc'
prev = 0
loop do
  pid = fork
  exit!(0) if pid

  # show the number of 4K pages used (Linux-only)
  n = File.read("#$$/statm").split(-' ')[1].to_i
  if n > prev
    puts "#{prev} => #{n}"
    prev = n
  end

  # since Ctrl-C from a terminal can't stop this loop,
  # allow the user to just hit any key to stop
  break if STDIN.wait(0)
end
------------------------------------------------------------------------
r66289 | normal | 2018-12-09 05:36:32 +0900 (Sun, 09 Dec 2018) | 5 lines

Revert "thread_pthread.c: fix memory leak from fork loop leapfrog"

Oops, CI failures...

This reverts r66288 / commit 2b1dcc1dd1eb260fd20ff1e6e0dfb0e5624a3cc6.
------------------------------------------------------------------------
r66288 | normal | 2018-12-09 04:25:37 +0900 (Sun, 09 Dec 2018) | 24 lines

thread_pthread.c: fix memory leak from fork loop leapfrog

Constantly forking a single-threaded process in a loop leads to
a memory leak when using POSIX timers.

==> fork_leapfrog.rb <==
require 'io/wait'
Dir.chdir '/proc'
prev = 0
loop do
  pid = fork
  exit!(0) if pid

  # show the number of 4K pages used (Linux-only)
  n = File.read("#$$/statm").split(-' ')[1].to_i
  if n > prev
    puts "#{prev} => #{n}"
    prev = n
  end

  # since Ctrl-C from a terminal can't stop this loop,
  # allow the user to just hit any key to stop
  break if STDIN.wait(0)
end
------------------------------------------------------------------------
r66287 | svn | 2018-12-09 02:39:54 +0900 (Sun, 09 Dec 2018) | 1 line

* 2018-12-09
------------------------------------------------------------------------
r66286 | aycabta | 2018-12-09 02:39:52 +0900 (Sun, 09 Dec 2018) | 1 line

Merge RDoc 6.1.0.beta3 from upstream
------------------------------------------------------------------------
r66284 | nobu | 2018-12-08 15:52:21 +0900 (Sat, 08 Dec 2018) | 1 line

Duplicate header name only if found
------------------------------------------------------------------------
r66283 | nobu | 2018-12-08 12:32:39 +0900 (Sat, 08 Dec 2018) | 1 line

Fix compile error at r66280
------------------------------------------------------------------------
r66282 | nobu | 2018-12-08 11:20:14 +0900 (Sat, 08 Dec 2018) | 3 lines

Honor configured ruby header locations as the MJIT header path

[Bug #15391]
------------------------------------------------------------------------
r66281 | nobu | 2018-12-08 11:05:06 +0900 (Sat, 08 Dec 2018) | 4 lines

Removed unnecessary dependency on mjit_config.h

MJIT_MIN_HEADER is passed via a command line option for
mjit_build_dir.so.
------------------------------------------------------------------------
r66280 | nobu | 2018-12-08 10:50:39 +0900 (Sat, 08 Dec 2018) | 5 lines

Give the MJIT header path name

Give the whole MJIT header path name by preloaded shared library
mjit_build_dir.so, than building the path from a given directory
name and the embedded base name.
------------------------------------------------------------------------
r66279 | nobu | 2018-12-08 10:49:02 +0900 (Sat, 08 Dec 2018) | 1 line

Use BUILDDIR in ruby-runner.h from config.status
------------------------------------------------------------------------
r66278 | svn | 2018-12-08 01:48:23 +0900 (Sat, 08 Dec 2018) | 1 line

* 2018-12-08
------------------------------------------------------------------------
r66277 | nobu | 2018-12-08 01:48:21 +0900 (Sat, 08 Dec 2018) | 1 line

Fix memory leak when failed to build pch path
------------------------------------------------------------------------
r66276 | nobu | 2018-12-07 23:37:28 +0900 (Fri, 07 Dec 2018) | 1 line

Array#any? just returns true/false
------------------------------------------------------------------------
r66275 | suke | 2018-12-07 21:12:45 +0900 (Fri, 07 Dec 2018) | 8 lines

should not use Internet Explorer

* spec/ruby/library/win32ole/fixtures/classes.rb: add
  SYSTEM_MONITOR_CONTROL_AVAILABLE.

* spec/ruby/library/win32ole/win32ole_method/event_spec.rb: Internet
  Explorer is not available in some environment. Instead, try to use
  System Monitor Control.
------------------------------------------------------------------------
r66274 | nobu | 2018-12-07 21:03:16 +0900 (Fri, 07 Dec 2018) | 4 lines

Adjust reserved hash values

The reserved hash values in hash.c must be consistend with st.c.
[ruby-core:90356] [Bug #15389]
------------------------------------------------------------------------
r66273 | nobu | 2018-12-07 20:45:03 +0900 (Fri, 07 Dec 2018) | 1 line

Should use the proper constant
------------------------------------------------------------------------
r66272 | hsbt | 2018-12-07 19:00:21 +0900 (Fri, 07 Dec 2018) | 1 line

Bump rake-12.3.2 on bundled gems.
------------------------------------------------------------------------
r66271 | duerst | 2018-12-07 18:01:13 +0900 (Fri, 07 Dec 2018) | 1 line

replace hardcoded emoji version by RbConfig::CONFIG['UNICODE_EMOJI_VERSION']
------------------------------------------------------------------------
r66270 | nobu | 2018-12-07 17:51:26 +0900 (Fri, 07 Dec 2018) | 1 line

Add UNICODE_EMOJI_VERSION to RbConfig [Feature #15341]
------------------------------------------------------------------------
r66269 | duerst | 2018-12-07 16:20:26 +0900 (Fri, 07 Dec 2018) | 7 lines

convert check for array length to assertion and comment out

In regparse.c, in function node_extended_grapheme_cluster,
we used a raw if() with exit(1) as a cross-check for our
length calculations for the common node array. Convert this
to an assertion and comment it out because it is not needed
for active code.
------------------------------------------------------------------------
r66268 | normal | 2018-12-07 16:09:31 +0900 (Fri, 07 Dec 2018) | 19 lines

zlib (gzfile_write_raw): do not resize string after .write call

Apparently, a component of Rails implements a buffering .write
method which keeps the String buffer around and makes it unsafe
for us to clear it after calling .write.

This caused Rack::Deflater to give empty results when enabled.

Fortunately, per r61631 / a55abcc0ca6f628fc05304f81e5a044d65ab4a68,
this misguided optimization was only worth a small (0.5MB) savings
and we still benefit from the majority of the memory savings in
that change.

Thanks to zunda for the bug report.

[ruby-core:90133] [Bug #15356]

Fixes: r61631 (commit a55abcc0ca6f628fc05304f81e5a044d65ab4a68)
       ("zlib: reduce garbage on gzip writes (deflate)")
------------------------------------------------------------------------
r66267 | duerst | 2018-12-07 16:04:00 +0900 (Fri, 07 Dec 2018) | 9 lines

remove code duplication and put everything into forward order

In file regparse.c, in function node_extended_grapheme_cluster(),
eliminate code duplication of CRLF and '.' (any character). This
uses the fact that both for Unicode encodings and for non-Unicode
encodings, the first alternative is CRLF, and the last alternative
is '.' (any character). This puts all of the pieces into forward
order (the order of the code follows the order of the syntax
definition).
------------------------------------------------------------------------
r66266 | nobu | 2018-12-07 10:42:03 +0900 (Fri, 07 Dec 2018) | 1 line

Dump the tested timestamp itself
------------------------------------------------------------------------
r66265 | nobu | 2018-12-07 08:51:45 +0900 (Fri, 07 Dec 2018) | 1 line

Dump more timestamps
------------------------------------------------------------------------
r66264 | k0kubun | 2018-12-07 08:26:53 +0900 (Fri, 07 Dec 2018) | 1 line

accept_loop_spec.rb: avoid random hang
------------------------------------------------------------------------
r66263 | k0kubun | 2018-12-07 08:16:01 +0900 (Fri, 07 Dec 2018) | 5 lines

test_gem_package_task.rb: suppress random failure

by Bundler.

http://ci.rvm.jp/results/trunk-vm-asserts@silicon-docker/1500762
------------------------------------------------------------------------
r66262 | nobu | 2018-12-07 08:06:13 +0900 (Fri, 07 Dec 2018) | 3 lines

Warn redefinitions of some methods on Object

[Bug #5473] [Bug #14670] [Bug #15382]
------------------------------------------------------------------------
r66261 | nobu | 2018-12-07 08:03:54 +0900 (Fri, 07 Dec 2018) | 1 line

Show the class of the receiver [Feature #15231]
------------------------------------------------------------------------
r66260 | suke | 2018-12-07 06:56:55 +0900 (Fri, 07 Dec 2018) | 5 lines

should not use Microsoft Internet Controller

* spec/ruby/library/win32ole/win32ole_method/helpcontext_spec.rb:
  Use FileSystemObject. Microsoft Internet Explorer is not available
  in some environment.
------------------------------------------------------------------------
r66259 | svn | 2018-12-07 03:28:26 +0900 (Fri, 07 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66258 | tenderlove | 2018-12-07 03:28:21 +0900 (Fri, 07 Dec 2018) | 111 lines

Speed up hash literals by duping

This commit replaces the `newhashfromarray` instruction with a `duphash`
instruction.  Instead of allocating a new hash from an array stored in
the Instruction Sequences, store a hash directly in the instruction
sequences and dup it on execution.

== Instruction sequence changes ==

```ruby
code = <<-eorby
  { "foo" => "bar", "baz" => "lol" }
eorby

insns = RubyVM::InstructionSequence.compile(code, __FILE__, nil, 0, frozen_string_literal: true)
puts insns.disasm
```

On Ruby 2.5:

```
== disasm: #<ISeq:<compiled>@test.rb:0 (0,0)-(0,36)>====================
0000 putobject        "foo"
0002 putobject        "bar"
0004 putobject        "baz"
0006 putobject        "lol"
0008 newhash          4
0010 leave
```

Ruby 2.6@r66174 3b6321083a2e3525da3b34d08a0b68bac094bd7f:

```
$ ./ruby test.rb
== disasm: #<ISeq:<compiled>@test.rb:0 (0,0)-(0,36)> (catch: FALSE)
0000 newhashfromarray             2, ["foo", "bar", "baz", "lol"]
0003 leave
```

Ruby 2.6 + This commit:

```
$ ./ruby test.rb
== disasm: #<ISeq:<compiled>@test.rb:0 (0,0)-(0,36)> (catch: FALSE)
0000 duphash                      {"foo"=>"bar", "baz"=>"lol"}
0002 leave
```

== Benchmark Results ==

Compared to 2.5.3:

```
$ make benchmark ITEM=hash_literal_small COMPARE_RUBY=/Users/aaron/.rbenv/versions/2.5.3/bin/ruby
generating known_errors.inc
known_errors.inc unchanged
./revision.h unchanged
/Users/aaron/.rbenv/shims/ruby --disable=gems -rrubygems -I./benchmark/lib ./benchmark/benchmark-driver/exe/benchmark-driver \
	            --executables="compare-ruby::/Users/aaron/.rbenv/versions/2.5.3/bin/ruby -I.ext/common --disable-gem" \
	            --executables="built-ruby::./miniruby -I./lib -I. -I.ext/common  -r./prelude --disable-gem" \
	            $(find ./benchmark -maxdepth 1 -name '*hash_literal_small*.yml' -o -name '*hash_literal_small*.rb' | sort)
Calculating -------------------------------------
                     compare-ruby  built-ruby
 hash_literal_small2        1.498       1.877 i/s -       1.000 times in 0.667581s 0.532656s
 hash_literal_small4        1.197       1.642 i/s -       1.000 times in 0.835375s 0.609160s
 hash_literal_small8        0.620       1.215 i/s -       1.000 times in 1.611638s 0.823090s

Comparison:
              hash_literal_small2
          built-ruby:         1.9 i/s
        compare-ruby:         1.5 i/s - 1.25x  slower

              hash_literal_small4
          built-ruby:         1.6 i/s
        compare-ruby:         1.2 i/s - 1.37x  slower

              hash_literal_small8
          built-ruby:         1.2 i/s
        compare-ruby:         0.6 i/s - 1.96x  slower
```

Compared to r66255

```
$ make benchmark ITEM=hash_literal_small COMPARE_RUBY=/Users/aaron/.rbenv/versions/ruby-trunk/bin/ruby
generating known_errors.inc
known_errors.inc unchanged
./revision.h unchanged
/Users/aaron/.rbenv/shims/ruby --disable=gems -rrubygems -I./benchmark/lib ./benchmark/benchmark-driver/exe/benchmark-driver \
	            --executables="compare-ruby::/Users/aaron/.rbenv/versions/ruby-trunk/bin/ruby -I.ext/common --disable-gem" \
	            --executables="built-ruby::./miniruby -I./lib -I. -I.ext/common  -r./prelude --disable-gem" \
	            $(find ./benchmark -maxdepth 1 -name '*hash_literal_small*.yml' -o -name '*hash_literal_small*.rb' | sort)
Calculating -------------------------------------
                     compare-ruby  built-ruby
 hash_literal_small2        1.567       1.831 i/s -       1.000 times in 0.638056s 0.546039s
 hash_literal_small4        1.298       1.652 i/s -       1.000 times in 0.770214s 0.605182s
 hash_literal_small8        0.873       1.216 i/s -       1.000 times in 1.145304s 0.822047s

Comparison:
              hash_literal_small2
          built-ruby:         1.8 i/s
        compare-ruby:         1.6 i/s - 1.17x  slower

              hash_literal_small4
          built-ruby:         1.7 i/s
        compare-ruby:         1.3 i/s - 1.27x  slower

              hash_literal_small8
          built-ruby:         1.2 i/s
        compare-ruby:         0.9 i/s - 1.39x  slower
```
------------------------------------------------------------------------
r66257 | svn | 2018-12-07 03:20:12 +0900 (Fri, 07 Dec 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66256 | tenderlove | 2018-12-07 03:20:11 +0900 (Fri, 07 Dec 2018) | 3 lines

Add benchmark for hash small literals

Co-Authored-By: Krzysztof Rybka <krzysztof.rybka@gmail.com>
------------------------------------------------------------------------
r66255 | svn | 2018-12-07 00:33:56 +0900 (Fri, 07 Dec 2018) | 1 line

* 2018-12-07
------------------------------------------------------------------------
r66254 | naruse | 2018-12-07 00:33:54 +0900 (Fri, 07 Dec 2018) | 4 lines

Add missing declaration to export

Additional fix for r66200:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-trunk/log/20181206T130002Z.fail.html.gz
------------------------------------------------------------------------
r66252 | ko1 | 2018-12-06 22:56:36 +0900 (Thu, 06 Dec 2018) | 1 line

add NEWS entries about script_compiled event
------------------------------------------------------------------------
r66251 | ko1 | 2018-12-06 22:53:48 +0900 (Thu, 06 Dec 2018) | 1 line

add tests for script_compiled TP event.
------------------------------------------------------------------------
r66250 | svn | 2018-12-06 22:42:35 +0900 (Thu, 06 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66249 | ko1 | 2018-12-06 22:42:32 +0900 (Thu, 06 Dec 2018) | 14 lines

`script_compiled` TracePoint event [Feature #15287]

* vm_trace.c: add `script_compiled` event. This event invoked
  after script compiling and before evaluating compiled script.
  Also the following methods are added:

  `TracePoint#compiled_instruction_sequence` method to get compiled
  `RubyVM::InstructionSequence` instance.

  `TracePoint#compiled_eval_script` method to get compiled script (String)
  by *eval methods (return nil if compiling by file).

* vm_trace.c (tracepoint_attr_raised_exception):

------------------------------------------------------------------------
r66248 | hsbt | 2018-12-06 22:19:06 +0900 (Thu, 06 Dec 2018) | 1 line

Added News entries about RubyGems and Bundler.
------------------------------------------------------------------------
r66247 | naruse | 2018-12-06 21:35:00 +0900 (Thu, 06 Dec 2018) | 1 line

Should be true fix for r66200
------------------------------------------------------------------------
r66246 | ko1 | 2018-12-06 19:52:27 +0900 (Thu, 06 Dec 2018) | 18 lines

Return same ISeq object for one src.

* iseq.c: before this patch, RubyVM::InstructionSequence.of(src) (ISeq in
  short) returns different ISeq (wrapper) objects point to one ISeq internal
  object. This patch changes this behavior to cache created ISeq (wrapper)
  objects and return same ISeq object for an internal ISeq object.

* iseq.h (ISEQ_EXECUTABLE_P): introduced to check executable ISeq objects.

* iseq.h (ISEQ_COMPILE_DATA_ALLOC): reordr setting flag line to avoid
  ISEQ_USE_COMPILE_DATA but compiled_data == NULL case.

* vm_core.h (rb_iseq_t): introduce `rb_iseq_t::wrapper` and
  `rb_iseq_t::aux::exec`.  Move `rb_iseq_t::local_hooks` to
  `rb_iseq_t::aux::exec::local_hooks`.

* test/ruby/test_iseq.rb: add ISeq.of() tests.

------------------------------------------------------------------------
r66245 | naruse | 2018-12-06 19:42:35 +0900 (Thu, 06 Dec 2018) | 1 line

suppress warning: unused variable 'vbits'
------------------------------------------------------------------------
r66244 | normal | 2018-12-06 19:41:07 +0900 (Thu, 06 Dec 2018) | 4 lines

io.c (io_fflush): eliminate redundant rb_io_check_closed

There is no need to call this function twice in a row since
thread switching won't happen in-between calls to it.
------------------------------------------------------------------------
r66243 | normal | 2018-12-06 19:09:35 +0900 (Thu, 06 Dec 2018) | 1 line

NEWS: fix typo (maesured => measured) [ci skip]
------------------------------------------------------------------------
r66242 | normal | 2018-12-06 19:09:30 +0900 (Thu, 06 Dec 2018) | 5 lines

io.c (io_write_nonblock): add RB_GC_GUARD, io_fflush may switch threads

Since io_fflush may block on mutex or rb_io_wait_readable and
switch threads, we need to ensure the `str' VALUE returned by
`rb_obj_as_string` is visible to GC.
------------------------------------------------------------------------
r66241 | naruse | 2018-12-06 19:02:04 +0900 (Thu, 06 Dec 2018) | 4 lines

refix of r66200

Though internal.h has the prototype, it still shows symbol lookup error...
https://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-trunk/log/20181206T050002Z.fail.html.gz
------------------------------------------------------------------------
r66240 | duerst | 2018-12-06 18:54:09 +0900 (Thu, 06 Dec 2018) | 1 line

remove an unused variable
------------------------------------------------------------------------
r66239 | duerst | 2018-12-06 18:16:43 +0900 (Thu, 06 Dec 2018) | 6 lines

make sure all nodes are freed on error in node_extended_grapheme_cluster()

regparse.c: In function node_extended_grapheme_cluster(), use function-global
array node_common and use it for list and alternate construction. This is done
so that in case of error, all nodes that have already been constructed can be
correctly freed in a single for loop. Document the layout structure.
------------------------------------------------------------------------
r66238 | nobu | 2018-12-06 16:49:24 +0900 (Thu, 06 Dec 2018) | 4 lines

Prefer rb_check_arity when 0 or 1 arguments

Especially over checking argc then calling rb_scan_args just to
raise an ArgumentError.
------------------------------------------------------------------------
r66237 | mame | 2018-12-06 15:40:54 +0900 (Thu, 06 Dec 2018) | 1 line

load.c (RubyVM.resolve_feature_path): New method.  [Feature #15230]
------------------------------------------------------------------------
r66236 | nobu | 2018-12-06 14:29:07 +0900 (Thu, 06 Dec 2018) | 1 line

Show diff in failure messages
------------------------------------------------------------------------
r66235 | nobu | 2018-12-06 14:29:04 +0900 (Thu, 06 Dec 2018) | 1 line

Add separator for test/-ext-
------------------------------------------------------------------------
r66234 | duerst | 2018-12-06 13:46:57 +0900 (Thu, 06 Dec 2018) | 13 lines

remove code duplication and streamline identifiers

In regparse.c:

* Reduce coode duplication by merging the almost identical functions
  create_sequence_node and create_alternate_node into a new function
  create_node_from_array, adding a parameter that distinguishes  between
  creating a list and creating an alternative.

* Streamline variable/function naming. Unicode UAX #29 uses 'sequence', but
  the regular expression library uses 'list' for the same concept. Keep
  'sequence' in the ccmments that are taken from UAX #29, but use 'list'
  in variable names.
------------------------------------------------------------------------
r66233 | naruse | 2018-12-06 11:57:04 +0900 (Thu, 06 Dec 2018) | 1 line

fix r66200 again
------------------------------------------------------------------------
r66232 | duerst | 2018-12-06 09:05:08 +0900 (Thu, 06 Dec 2018) | 7 lines

remove obsolete data from unicode.c

* unicode.c: Remove the arrays onigenc_unicode_GCB_ranges_GAZ,
  onigenc_unicode_GCB_ranges_E_Base, and onigenc_unicode_GCB_ranges_Emoji,
  because they are not needed anymore for Unicode 11.0.0.

* regparse.c: Remove external declarations for above arrays.
------------------------------------------------------------------------
r66231 | normal | 2018-12-06 04:01:29 +0900 (Thu, 06 Dec 2018) | 6 lines

Revert "fix typoe of r66200"

This reverts r66229 (commit e941daa6dd114b52356a63d3c3db5684e6c66717)

Many CI failures on this:
http://ci.rvm.jp/results/trunk-jemalloc@silicon-docker/1497858
------------------------------------------------------------------------
r66230 | normal | 2018-12-06 03:58:45 +0900 (Thu, 06 Dec 2018) | 9 lines

thread_sync.c (mutex_ptr): handle mutexes held by parent threads in children

Mutexes may be held by threads which only exist in the parent
process, so their waitqueues may be populated with references
to other dead threads.  We must reset them at fork.

I am a moron for introducing this bug :<

[ruby-core:90312] [Bug #15383]
------------------------------------------------------------------------
r66229 | naruse | 2018-12-06 03:37:47 +0900 (Thu, 06 Dec 2018) | 1 line

fix typoe of r66200
------------------------------------------------------------------------
r66228 | ko1 | 2018-12-06 02:23:32 +0900 (Thu, 06 Dec 2018) | 8 lines

Introduce "COLDFUNC" function attribute.

* include/ruby/defines.h: introduce "COLDFUNC" function attribute
  on several compilers for called unlikely functions.
  Apply to rb_memerror, rb_warn and rb_bug.

  A patch form  methodmissing <lourens@bearmetal.eu>.

------------------------------------------------------------------------
r66227 | svn | 2018-12-06 01:15:13 +0900 (Thu, 06 Dec 2018) | 1 line

* 2018-12-06
------------------------------------------------------------------------
r66226 | ko1 | 2018-12-06 01:15:09 +0900 (Thu, 06 Dec 2018) | 5 lines

fix C90 error.

* configure.ac (check broken_backtrace code): fix decl. position
  error because of `-Werror=declaration-after-statement`.

------------------------------------------------------------------------
r66224 | mrkn | 2018-12-05 20:30:26 +0900 (Wed, 05 Dec 2018) | 1 line

NEWS: update about bigdecimal [ci skip]
------------------------------------------------------------------------
r66223 | svn | 2018-12-05 20:30:26 +0900 (Wed, 05 Dec 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66222 | mrkn | 2018-12-05 20:30:24 +0900 (Wed, 05 Dec 2018) | 3 lines

Import bigdecimal 1.4.0.pre.20181205a

* https://github.com/ruby/bigdecimal/compare/74d25ef..v1.4.0.pre.20181205a
------------------------------------------------------------------------
r66221 | svn | 2018-12-05 20:29:57 +0900 (Wed, 05 Dec 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66220 | hsbt | 2018-12-05 20:29:56 +0900 (Wed, 05 Dec 2018) | 3 lines

Revert "Remove `libexec/bundle_ruby`"

This reverts commit 3f708604920f2fd7a105d5f092240737add15ef1.
------------------------------------------------------------------------
r66219 | kazu | 2018-12-05 20:20:29 +0900 (Wed, 05 Dec 2018) | 4 lines

Remove `libexec/bundle_ruby`

see r65979
[Bug #15291][ruby-dev:50663]
------------------------------------------------------------------------
r66218 | duerst | 2018-12-05 19:40:17 +0900 (Wed, 05 Dec 2018) | 1 line

remove unused variables in node_extended_grapheme_cluster()
------------------------------------------------------------------------
r66217 | duerst | 2018-12-05 19:11:57 +0900 (Wed, 05 Dec 2018) | 1 line

tweak/remove comments [ci skip]
------------------------------------------------------------------------
r66216 | duerst | 2018-12-05 19:06:47 +0900 (Wed, 05 Dec 2018) | 1 line

add update to Unicode 11.0.0 to NEWS [ci skip]
------------------------------------------------------------------------
r66215 | kazu | 2018-12-05 18:07:54 +0900 (Wed, 05 Dec 2018) | 5 lines

lib/monitor.rb: prevent to initialize MonitorMixin twice

and allow to initialize again when obj.dup.

Suggested by Benoit Daloze.  [ruby-core:88504] [Feature #15000]
------------------------------------------------------------------------
r66214 | duerst | 2018-12-05 18:00:40 +0900 (Wed, 05 Dec 2018) | 1 line

adjust some comments in node_extended_grapheme_cluster() [ci skip]
------------------------------------------------------------------------
r66213 | duerst | 2018-12-05 17:10:24 +0900 (Wed, 05 Dec 2018) | 11 lines

update to Unicode 11.0.0 (main step, not complete yet)

- common.mk: Change Unicode version to 11.0.0, and Emoji version to 11.0
- test/ruby/enc/test_emoji_breaks.rb: update hard-coded Emoji version
- enc/unicode/11.0.0, enc/unicode/11.0.0/casefold.h, enc/unicode/name2ctype.h:
  Add generated files. Files for Unicode 10.0.0 will be removed once we are
  sure 11.0.0 works.
- lib/unicode_normalize/tables.rb: Updated table.
- regparse.c: Almost completely reimplement grapheme cluster detection in
  function node_extended_grapheme_cluster().

------------------------------------------------------------------------
r66212 | nobu | 2018-12-05 13:25:44 +0900 (Wed, 05 Dec 2018) | 12 lines

implement Array-specific #all?, #none?, #one?

Before this patch Array#all? was not implemented in Array class
and alternatively Enumerable#all? was used, while #any? has its
own method entry in Array class.  Similarly, Array#none? and #one?
also lacks its own implementation.
This patch provides Array-specific implementations for above three
methods to enable faster method lookup.

[Fix GH-2041]

From: Koji Onishi <fursich0@gmail.com>
------------------------------------------------------------------------
r66211 | svn | 2018-12-05 13:01:55 +0900 (Wed, 05 Dec 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66210 | mrkn | 2018-12-05 13:01:53 +0900 (Wed, 05 Dec 2018) | 45 lines

Revert bigdecimal 1.4.0 related commits

* Revert "Remove unnecessary linker flags"

  This reverts commit 49efa01579272d52d28bd361c498d96ca92e986e.

* Revert "Move dependency on gemspec"

  This reverts commit bfb64d476578eadd61a738149726da37840f068d.

* Revert "Remove unnecessary directory listing"

  This reverts commit 86661b5c60b8da6e5641c9c772b57857a1f988f4.

* Revert "* expand tabs."

  This reverts commit 35ada33f8386b56611f10b1a0a4e5667e9b08071.

* Revert "Import bigdecimal-1.4.0.pre-20181204a"

  This reverts commit 8891bb3bd602bdbabd24260cf1e431475dc027c8.

* Revert "ext/bigdecimal/bigdecimal.c: drop unused function"

  This reverts commit 5ceeea4da1179193c2c7ddcebfd67019128473e3.

* Revert "* expand tabs."

  This reverts commit e021386e905b6d6799a84dfbc2f0592e42626366.

* Revert "Import bigdecimal-1.4.0.pre-20181130a"

  This reverts commit a0e438cd3c28d2eaf4efa18243d5b6edafa14d88.

* Revert "NEWS: write about bigdecimal updates"

  This reverts commit 89455ff2ba973f2a9ee7b79657e0e6f1f31501f9.

* Revert "Fix rubyspec of bigdecimal for ruby <2.6"

  This reverts commit 4bcdeeb65e57de4da306d347652898c767162e74.

* Revert "Fix rubyspec against bigdecimal updates"

  This reverts commit c8fb30fc9e0ee14e87be1e231869a12aaef1eedf.
------------------------------------------------------------------------
r66209 | hsbt | 2018-12-05 10:41:53 +0900 (Wed, 05 Dec 2018) | 3 lines

Update the latest bundled gems.

  test-unit-3.2.8 to 3.2.9
------------------------------------------------------------------------
r66208 | nobu | 2018-12-05 10:19:23 +0900 (Wed, 05 Dec 2018) | 6 lines

Fix documentation for Warning.warn [ci skip]

Warning.warn does not add any newlines to the message argument.
[Bug #15379]

From: Olle Jonsson <olle.jonsson@gmail.com>
------------------------------------------------------------------------
r66207 | nobu | 2018-12-05 10:11:32 +0900 (Wed, 05 Dec 2018) | 3 lines

Build error method name at failure

So `struct nmin_data` size is reduced.
------------------------------------------------------------------------
r66206 | nobu | 2018-12-05 10:11:31 +0900 (Wed, 05 Dec 2018) | 1 line

Adjust indent [ci skip]
------------------------------------------------------------------------
r66205 | nobu | 2018-12-05 10:09:44 +0900 (Wed, 05 Dec 2018) | 1 line

Prefer rb_check_arity when 0 or 1 arguments
------------------------------------------------------------------------
r66204 | hsbt | 2018-12-05 08:33:29 +0900 (Wed, 05 Dec 2018) | 3 lines

Merge 2-0-stable branch from bundler/bundler.

  It's release version of Bundler 2
------------------------------------------------------------------------
r66203 | normal | 2018-12-05 08:10:17 +0900 (Wed, 05 Dec 2018) | 4 lines

mjit.c: remove init_list

It is not needed since we have LIST_HEAD_INIT initializer in
mjit_worker.c
------------------------------------------------------------------------
r66202 | odaira | 2018-12-05 07:19:09 +0900 (Wed, 05 Dec 2018) | 11 lines

Enable MJIT on AIX

* configure.ac: disable using __builtin_setjmp to avoid errors when execution
  globally jumps out of JITted code. Specify -std=gnu99 to JIT compilation
  to avoid errors regarding the "restrict" keyword in the precompiled header.
  Specify -shared in addition to -Wl,-G when building shared libraries
  to make mjit_build_dir.so expose the MJIT_BUILD_DIR symbol.  Use LDR_PRELOAD
  to load mjit_build_dir.so.

* mjit_worker.c: do not specify -nodefaultlibs or -nostdlibs because on AIX
  JITted code internally refers to the memcpy function.
------------------------------------------------------------------------
r66201 | svn | 2018-12-05 03:48:47 +0900 (Wed, 05 Dec 2018) | 1 line

* 2018-12-05
------------------------------------------------------------------------
r66200 | naruse | 2018-12-05 03:48:44 +0900 (Wed, 05 Dec 2018) | 4 lines

Add prototype of rb_ary_ptr_use_start()

Without this icc fails to run.
http://rubyci.s3.amazonaws.com/icc-x64/ruby-trunk/log/20181203T130002Z.diff.html.gz
------------------------------------------------------------------------
r66199 | k0kubun | 2018-12-04 22:15:24 +0900 (Tue, 04 Dec 2018) | 3 lines

.travis.yml: config_2nd may not exist in ~/

https://travis-ci.org/ruby/ruby/jobs/463317607
------------------------------------------------------------------------
r66198 | hsbt | 2018-12-04 21:24:12 +0900 (Tue, 04 Dec 2018) | 3 lines

Merge upstream from ruby/psych

  * https://github.com/ruby/psych/pull/379
------------------------------------------------------------------------
r66197 | k0kubun | 2018-12-04 20:45:05 +0900 (Tue, 04 Dec 2018) | 5 lines

Re-commit r65722

which was accidentally reverted by r65904

158562dabb197d6efc53cabe6662177c6ec3f43e
------------------------------------------------------------------------
r66196 | nobu | 2018-12-04 20:16:15 +0900 (Tue, 04 Dec 2018) | 4 lines

Remove unnecessary linker flags

Cygwin/mingw linker should be able to link against shared library
itself.  Mswin build sets -def:$(DEFFILE) option by the default.
------------------------------------------------------------------------
r66195 | nobu | 2018-12-04 20:16:14 +0900 (Tue, 04 Dec 2018) | 1 line

Move dependency on gemspec
------------------------------------------------------------------------
r66194 | nobu | 2018-12-04 20:16:11 +0900 (Tue, 04 Dec 2018) | 1 line

Remove unnecessary directory listing
------------------------------------------------------------------------
r66193 | duerst | 2018-12-04 19:51:57 +0900 (Tue, 04 Dec 2018) | 1 line

commit miss
------------------------------------------------------------------------
r66192 | duerst | 2018-12-04 19:49:55 +0900 (Tue, 04 Dec 2018) | 7 lines

change diaeresis from above to below for better visibility

In test/ruby/test_regexp.rb and test/ruby/test_string.rb, change
some instances of COMBINING DIAERESIS (U+0308, above) to
COMBINING DIAERESIS BELOW (U+0324) to make it more easily visible
in test output, particularly in the context of double quotes
surrounding strings.
------------------------------------------------------------------------
r66191 | k0kubun | 2018-12-04 18:37:23 +0900 (Tue, 04 Dec 2018) | 3 lines

test/excludes/_appveyor: exclude memory-inefficient

test which AppVeyor sometimes can't run.
------------------------------------------------------------------------
r66190 | nobu | 2018-12-04 18:16:49 +0900 (Tue, 04 Dec 2018) | 3 lines

Fix error message

* array.c (ary_take_first_or_last): expected optional argument.
------------------------------------------------------------------------
r66189 | kazu | 2018-12-04 17:22:10 +0900 (Tue, 04 Dec 2018) | 1 line

Use delete_prefix instead of `sub(/\Afixed-pattern/, '')`
------------------------------------------------------------------------
r66188 | hsbt | 2018-12-04 17:00:57 +0900 (Tue, 04 Dec 2018) | 3 lines

Merge rubygems master@221bdea

  * Fixed https://github.com/rubygems/rubygems/pull/2506
------------------------------------------------------------------------
r66187 | naruse | 2018-12-04 16:52:08 +0900 (Tue, 04 Dec 2018) | 1 line

fix typo of r66177
------------------------------------------------------------------------
r66186 | usa | 2018-12-04 15:53:05 +0900 (Tue, 04 Dec 2018) | 2 lines

unconstify cast to get rid of VC++ warnings

------------------------------------------------------------------------
r66185 | duerst | 2018-12-04 15:31:40 +0900 (Tue, 04 Dec 2018) | 1 line

exclude skin tones as second component in TestEmojiBreaks#test_mixed_emoji
------------------------------------------------------------------------
r66184 | svn | 2018-12-04 13:22:12 +0900 (Tue, 04 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66183 | mrkn | 2018-12-04 13:22:09 +0900 (Tue, 04 Dec 2018) | 3 lines

Import bigdecimal-1.4.0.pre-20181204a

* https://github.com/ruby/bigdecimal/compare/v1.4.0.pre.20181130a..v1.4.0.pre.20181204a
------------------------------------------------------------------------
r66182 | mrkn | 2018-12-04 13:22:08 +0900 (Tue, 04 Dec 2018) | 3 lines

Revert "Symbol refinements"

Due to assertion failures when VM_CHECK_MODE >= 2.
------------------------------------------------------------------------
r66181 | mrkn | 2018-12-04 13:22:06 +0900 (Tue, 04 Dec 2018) | 6 lines

Symbol refinements

* vm_args.c (refine_sym_proc_call): enalbe accidentally disabled
  refinements in Symbol#to_proc.   [Bug #15114]

From: osyo (manga osyo) <manga.osyo@gmail.com>
------------------------------------------------------------------------
r66180 | duerst | 2018-12-04 13:11:51 +0900 (Tue, 04 Dec 2018) | 5 lines

change embedding character in TestEmojiBreaks#test_embedded_emoji

In test/ruby/enc/test_emoji_breaks.rb, in method
TestEmojiBreaks#test_embedded_emoji, change the surrounding characters
from A/Z to the more neutral \t in preparation for upgrade to Unicode 11.0.0.
------------------------------------------------------------------------
r66179 | nobu | 2018-12-04 11:24:15 +0900 (Tue, 04 Dec 2018) | 1 line

Prefer rb_check_arity when 0 or 1 arguments
------------------------------------------------------------------------
r66178 | nobu | 2018-12-04 10:41:55 +0900 (Tue, 04 Dec 2018) | 1 line

process.c (retry_fork_async_signal_safe): fix -Wclobbered
------------------------------------------------------------------------
r66177 | naruse | 2018-12-04 09:40:49 +0900 (Tue, 04 Dec 2018) | 1 line

Use getent and cut on Solaris to get home directory
------------------------------------------------------------------------
r66176 | naruse | 2018-12-04 09:40:48 +0900 (Tue, 04 Dec 2018) | 3 lines

Use Dir.home to avoid platform dependency

On Solaris 10, `echo ~#{ENV['USER']}` As expected
------------------------------------------------------------------------
r66175 | svn | 2018-12-04 08:53:16 +0900 (Tue, 04 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66174 | tenderlove | 2018-12-04 08:53:11 +0900 (Tue, 04 Dec 2018) | 28 lines

Collapse putobject, putobject, newarray

This collapses:

```
== disasm: #<ISeq:bar@bench.rb:3 (3,0)-(5,3)> (catch: FALSE)
0000 putobject                    "a"                                 (   4)[LiCa]
0002 putobject                    "b"
0004 putobject                    "c"
0006 putobject                    "d"
0008 putobject                    "e"
0010 putobject                    "f"
0012 putobject                    "g"
0014 putobject                    "h"
0016 putobject                    "i"
0018 putobject                    "j"
0020 putobject                    "k"
0022 newarray                     11
0024 leave                                                            (   5)[Re]
```

In to this:

```
== disasm: #<ISeq:bar@bench.rb:3 (3,0)-(5,3)> (catch: FALSE)
0000 duparray                     ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k"](   4)[LiCa]
0002 leave                                                            (   5)[Re]
```
------------------------------------------------------------------------
r66173 | normal | 2018-12-04 06:00:32 +0900 (Tue, 04 Dec 2018) | 1 line

process.c (retry_fork_async_signal_safe): fix -Wclobbered on i686
------------------------------------------------------------------------
r66172 | svn | 2018-12-04 04:49:56 +0900 (Tue, 04 Dec 2018) | 1 line

* 2018-12-04
------------------------------------------------------------------------
r66171 | normal | 2018-12-04 04:49:54 +0900 (Tue, 04 Dec 2018) | 26 lines

process.c: fix ETXTBUSY from MJIT compiler process

This affects test/ruby/test_process.rb (test_execopt_env_path).

Since MJIT uses vfork+execve in a separate thread, there can be
small window in-between vfork and execve where tmp_script.cmd is
held open by the vforked child.  vfork only pauses the MJIT
thread, not any Ruby Threads, so our call to Process.spawn will
hit ETXTBUSY in that window unless we fork.

main thread                       | MJIT thread
----------------------------------------------------
fd = open(tmp)                    |                |
                                  | vfork for CC   |   CC running
write                             |                | ---------------
fchmod                            |                |  sees "fd" here
close(fd)                         |                |
    Process.spawn called          |                |
vfork  (spawn)|    (new process)  |                |
              | execve => TXTBUSY |                |
              |                   |                | execve (FD_CLOEXEC on fd)
              |                   | vfork returns  |

Holding the waitpid_lock whenever we intend to spawn a process
prevents the MJIT thread from spawning a process while we are
spawning in Ruby-land.
------------------------------------------------------------------------
r66170 | ko1 | 2018-12-03 22:39:42 +0900 (Mon, 03 Dec 2018) | 1 line

add a NEWS entry of TracePoint#enable
------------------------------------------------------------------------
r66169 | nobu | 2018-12-03 22:12:34 +0900 (Mon, 03 Dec 2018) | 1 line

update-deps: support coroutine dependencies
------------------------------------------------------------------------
r66168 | nobu | 2018-12-03 22:12:29 +0900 (Mon, 03 Dec 2018) | 1 line

Ignore goruby wrapper
------------------------------------------------------------------------
r66167 | k0kubun | 2018-12-03 21:39:11 +0900 (Mon, 03 Dec 2018) | 5 lines

ext/bigdecimal/bigdecimal.c: drop unused function

This has been unused since r66124.

cc: @mrkn
------------------------------------------------------------------------
r66166 | svn | 2018-12-03 21:36:47 +0900 (Mon, 03 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66165 | ko1 | 2018-12-03 21:36:39 +0900 (Mon, 03 Dec 2018) | 16 lines

make `RARRAY_PTR_USE` more conservertive.

* include/ruby/ruby.h: de-transient at
  `RARRAY_PTR_USE` and `RARRAY_PTR_USE_START`.
  Introduce `RARRAY_PTR_USE_TRANSIENT` and
  `RARRAY_PTR_USE_START_TRANSIENT` if you don't want to
  de-transient an array. Generally, it is difficult
  so C-extension writers should not use them.

* array.c: use `RARRAY_PTR_USE_TRANSIENT` if possible.

* hash.c: ditto.

* enum.c (enum_sort_by): remove `rb_ary_transient_heap_evacuate()`
  because `RARRAY_PTR_USE` do de-transient.

------------------------------------------------------------------------
r66164 | k0kubun | 2018-12-03 21:32:01 +0900 (Mon, 03 Dec 2018) | 11 lines

mjit.c: eliminate -save-temps flag

in a new variable cc_common_args.

`cflags=-save-temps=obj` makes MJIT fail like:
https://rubyci.org/logs/www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20181203T095000Z.log.html.gz

This rubyci specifies -save-temps=obj in CFLAGS to use update-deps, and
the flag is harmful when we want to use -pipe flag.

mjit_worker.c: prefer cc_common_args over CC_COMMON_ARGS
------------------------------------------------------------------------
r66163 | hsbt | 2018-12-03 21:01:26 +0900 (Mon, 03 Dec 2018) | 4 lines

Fixed test fails against OpenSSL 1.1.1.

  * https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu/ruby-trunk/log/20181203T093003Z.fail.html.gz
  * https://rubyci.org/logs/rubyci.s3.amazonaws.com/arch/ruby-trunk/log/20181203T090002Z.fail.html.gz
------------------------------------------------------------------------
r66162 | k0kubun | 2018-12-03 21:00:27 +0900 (Mon, 03 Dec 2018) | 6 lines

mjit_worker.c: undefine CC_PATH

because we mostly use cc_path now and the comment is obsolete (CC_PATH
is now absolute path and the TODO is already resolved).

mjit.c: use CC_COMMON_ARGS[0] directly
------------------------------------------------------------------------
r66161 | mame | 2018-12-03 19:35:13 +0900 (Mon, 03 Dec 2018) | 5 lines

Fix typo in trick2018/README [ci skip]

s/dimentional/dimensional

From: "yuuji.yaginuma" <yuuji.yaginuma@gmail.com>
------------------------------------------------------------------------
r66160 | naruse | 2018-12-03 18:55:05 +0900 (Mon, 03 Dec 2018) | 4 lines

Use /bin/echo instead of shell builtin echo

builtin echo of Solaris 10's sh doesn't expand `~`.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20181203T061807Z.fail.html.gz
------------------------------------------------------------------------
r66159 | normal | 2018-12-03 18:34:49 +0900 (Mon, 03 Dec 2018) | 10 lines

spec/ruby/core/io/*_spec.rb: explain MJIT failures

These random failures happen because FD number allocation
is not predictable when multiple threads are running (since
MJIT thread is opening/closing files all the time).

Real-world code practically never relies on predictable FD
number allocation (because much real-world code is
multi-threaded); so it's highly unlikely there'll be any
breakage to the user.
------------------------------------------------------------------------
r66158 | mrkn | 2018-12-03 18:21:39 +0900 (Mon, 03 Dec 2018) | 3 lines

NEWS: write about bigdecimal updates

[ci skip]
------------------------------------------------------------------------
r66157 | normal | 2018-12-03 18:15:16 +0900 (Mon, 03 Dec 2018) | 4 lines

process.c (rb_execarg_init): mark as static

io.c has not used it since r36229, and we can re-export
it if we need it at another time.
------------------------------------------------------------------------
r66156 | normal | 2018-12-03 17:57:15 +0900 (Mon, 03 Dec 2018) | 4 lines

process.c (rb_f_system): cleanup to use rb_execarg_get

TypedData_* macros hide assignments and are confusing and too
long for users of giant fonts.
------------------------------------------------------------------------
r66155 | nobu | 2018-12-03 17:51:29 +0900 (Mon, 03 Dec 2018) | 3 lines

Revert "Symbol refinements"

Due to assertion failures when VM_CHECK_MODE >= 2.
------------------------------------------------------------------------
r66154 | shyouhei | 2018-12-03 14:46:46 +0900 (Mon, 03 Dec 2018) | 2 lines

string.c: [DOC] deprecate String#crypt [ci skip] [Feature #14915]

------------------------------------------------------------------------
r66153 | normal | 2018-12-03 13:51:13 +0900 (Mon, 03 Dec 2018) | 4 lines

drb: fix tests on Debian sid/unstable with OpenSSL 1.1.1a

OpenSSL complains abour our keys being small and weak :<
Make them big and strong with 2048-bit RSA keys and SHA256 digests
------------------------------------------------------------------------
r66152 | normal | 2018-12-03 13:51:08 +0900 (Mon, 03 Dec 2018) | 4 lines

webrick: fix tests on Debian sid/unstable with OpenSSL 1.1.1a

OpenSSL complains abour our keys being small and weak :<
Make them big and strong with 2048-bit RSA keys and SHA256 digests
------------------------------------------------------------------------
r66151 | nobu | 2018-12-03 13:44:34 +0900 (Mon, 03 Dec 2018) | 6 lines

Symbol refinements

* vm_args.c (refine_sym_proc_call): enalbe accidentally disabled
  refinements in Symbol#to_proc.   [Bug #15114]

From: osyo (manga osyo) <manga.osyo@gmail.com>
------------------------------------------------------------------------
r66150 | nobu | 2018-12-03 13:44:33 +0900 (Mon, 03 Dec 2018) | 1 line

Revert "Symbol refinements [Bug #15114]"
------------------------------------------------------------------------
r66149 | nobu | 2018-12-03 13:34:27 +0900 (Mon, 03 Dec 2018) | 1 line

Symbol refinements [Bug #15114]
------------------------------------------------------------------------
r66148 | ko1 | 2018-12-03 12:51:55 +0900 (Mon, 03 Dec 2018) | 10 lines

use RARRAY_AREF instead of RARRAY_PTR_USE.

* enumerator.c (enum_chain_total_size): use RARRAY_AREF
  instead of RARRAY_PTR_USE because we don't need non-const
  ptr.

* enumerator.c (enum_chain_each): ditto.

* enumerator.c (enum_chain_rewind): ditto.

------------------------------------------------------------------------
r66147 | nobu | 2018-12-03 12:15:42 +0900 (Mon, 03 Dec 2018) | 3 lines

Cherry-picked spec/mspec/lib/mspec/helpers/fs.rb

From https://github.com/MSP-Greg/ruby/commit/316f60e3befa312320b2cc600d7b59ba64f12329
------------------------------------------------------------------------
r66146 | kazu | 2018-12-03 11:53:57 +0900 (Mon, 03 Dec 2018) | 3 lines

Remove `(nanosecond)` too [ci skip]

[Bug #15322]
------------------------------------------------------------------------
r66145 | okkez | 2018-12-03 11:34:23 +0900 (Mon, 03 Dec 2018) | 7 lines

time.rb: remove the unsupported formatting options from the document [ci skip]

Time.strptime does not support %3N, %6N, and %9N.

close [Bug #15322]


------------------------------------------------------------------------
r66144 | mame | 2018-12-03 10:59:29 +0900 (Mon, 03 Dec 2018) | 3 lines

sample/trick2013/mame/music-box.mp4: removed

The tarball will be reduced by about 568 kB.
------------------------------------------------------------------------
r66143 | mame | 2018-12-03 10:39:45 +0900 (Mon, 03 Dec 2018) | 3 lines

lib/pp.rb (Range#pretty_print): support endless range

`pp(1..)` should print `"(1..)"` instead of `"(1..nil)"`.
------------------------------------------------------------------------
r66142 | nobu | 2018-12-03 10:06:34 +0900 (Mon, 03 Dec 2018) | 4 lines

Refine RubyVM::AbstractSyntaxTree::Node#type

* ast.c (rb_ast_node_type): simplified to return a Symbol without
  "NODE_" prefix.
------------------------------------------------------------------------
r66141 | nobu | 2018-12-03 09:57:06 +0900 (Mon, 03 Dec 2018) | 1 line

test_pp.rb: show the node when failed
------------------------------------------------------------------------
r66140 | nobu | 2018-12-03 09:24:38 +0900 (Mon, 03 Dec 2018) | 1 line

Add RubyVM::AST#pretty_print
------------------------------------------------------------------------
r66139 | duerst | 2018-12-03 08:28:42 +0900 (Mon, 03 Dec 2018) | 9 lines

remove unnecessary settings with NULL_NODE in \X implementation

Remove unnecessary settings of node_array elements to NULL_NODE.
We can do this because we initialize the whole array to NULL_NODEs
and set everything again to NULL_NODEs when creating a sequence or
alternative node.

Also, fix an index error in the initialization of node_array.
(issue #15343)
------------------------------------------------------------------------
r66138 | duerst | 2018-12-03 07:05:36 +0900 (Mon, 03 Dec 2018) | 1 line

fix order of declarations and code at start of node_extended_grapheme_cluster()
------------------------------------------------------------------------
r66137 | ko1 | 2018-12-03 07:01:29 +0900 (Mon, 03 Dec 2018) | 1 line

fix last commit (r66135)
------------------------------------------------------------------------
r66136 | svn | 2018-12-03 06:41:51 +0900 (Mon, 03 Dec 2018) | 1 line

* 2018-12-03
------------------------------------------------------------------------
r66135 | duerst | 2018-12-03 06:41:50 +0900 (Mon, 03 Dec 2018) | 6 lines

make sure all nodes are freed on error in node_extended_grapheme_cluster()

regparse.c: In function node_extended_grapheme_cluster(), introduce function-global
array node_array and use it for sequence and alternate construction. This is done
so that in case of error, all nodes that have already been constructed can be
correctly freed. (issue #15343)
------------------------------------------------------------------------
r66134 | nobu | 2018-12-02 21:50:19 +0900 (Sun, 02 Dec 2018) | 3 lines

optarse.rb: mention multiple descriptions [ci skip]

[ruby-list:50718]
------------------------------------------------------------------------
r66133 | duerst | 2018-12-02 19:07:42 +0900 (Sun, 02 Dec 2018) | 7 lines

solve the genie/zombie/wrestlers bug

enc/unicode.c: - Add U+1F93C (WRESTLERS), U+1F9DE (GENIE), and U+1F9DF
                 to onigenc_unicode_GCB_ranges_E_Base.
               - Add comments with character names.
test/ruby/enc/test_emoji_breaks.rb: Activate tests for genie/zombie/wrestlers.
This closes issue #15343.
------------------------------------------------------------------------
r66132 | duerst | 2018-12-02 19:00:35 +0900 (Sun, 02 Dec 2018) | 1 line

expand a small comment [ci skip]
------------------------------------------------------------------------
r66129 | mrkn | 2018-12-02 15:43:15 +0900 (Sun, 02 Dec 2018) | 1 line

Fix rubyspec of bigdecimal for ruby <2.6
------------------------------------------------------------------------
r66128 | svn | 2018-12-02 14:21:57 +0900 (Sun, 02 Dec 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66127 | mrkn | 2018-12-02 14:21:57 +0900 (Sun, 02 Dec 2018) | 1 line

Fix JSON::Parser against bigdecimal updates
------------------------------------------------------------------------
r66126 | svn | 2018-12-02 14:21:57 +0900 (Sun, 02 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66125 | mrkn | 2018-12-02 14:21:55 +0900 (Sun, 02 Dec 2018) | 1 line

Fix rubyspec against bigdecimal updates
------------------------------------------------------------------------
r66124 | mrkn | 2018-12-02 14:21:54 +0900 (Sun, 02 Dec 2018) | 3 lines

Import bigdecimal-1.4.0.pre-20181130a

* https://github.com/ruby/bigdecimal/compare/74d25ef..v1.4.0.pre.20181130a
------------------------------------------------------------------------
r66123 | duerst | 2018-12-02 10:33:24 +0900 (Sun, 02 Dec 2018) | 1 line

add/change some comments in node_extended_grapheme_cluster() [ci skip]
------------------------------------------------------------------------
r66122 | duerst | 2018-12-02 10:06:28 +0900 (Sun, 02 Dec 2018) | 1 line

reformat code [ci skip]
------------------------------------------------------------------------
r66121 | svn | 2018-12-02 08:28:17 +0900 (Sun, 02 Dec 2018) | 1 line

* 2018-12-02
------------------------------------------------------------------------
r66120 | nobu | 2018-12-02 08:28:16 +0900 (Sun, 02 Dec 2018) | 4 lines

LEGAL: update [ci skip]

* LEGAL: update configure, tool/config.guess, tool/config.sub and
  parse.c, to the latest versions.
------------------------------------------------------------------------
r66119 | nobu | 2018-12-01 21:05:37 +0900 (Sat, 01 Dec 2018) | 1 line

Include LEGAL in .document [ci skip]
------------------------------------------------------------------------
r66118 | hsbt | 2018-12-01 20:01:00 +0900 (Sat, 01 Dec 2018) | 3 lines

Merge rubygems-3.0.0.beta3.

  * [GSoC] Multi-factor feature for RubyGems https://github.com/rubygems/rubygems/pull/2369
------------------------------------------------------------------------
r66117 | mrkn | 2018-12-01 18:29:14 +0900 (Sat, 01 Dec 2018) | 5 lines

Let sub-directory exts depend on their parent ext

* ext/extmk.rb: Let sub-directory exts depend on their parent ext.

* template/exts.mk.tmpl: ditto.
------------------------------------------------------------------------
r66116 | duerst | 2018-12-01 17:26:39 +0900 (Sat, 01 Dec 2018) | 5 lines

remove unnecessary code removing CR/LF from range

Remove code that tries to remove CR and LF from Grapheme_Cluster_Break=Control.
This code is unnecessary because Grapheme_Cluster_Break=Control already excludes
CR and LF.
------------------------------------------------------------------------
r66115 | svn | 2018-12-01 16:31:35 +0900 (Sat, 01 Dec 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r66114 | duerst | 2018-12-01 16:31:34 +0900 (Sat, 01 Dec 2018) | 4 lines

introduce and use create_alternate_node()

Introduce new function create_alternate_node() to create an alternative node
from a list of nodes in one go. Use it once (two more uses expected).
------------------------------------------------------------------------
r66113 | duerst | 2018-12-01 15:07:53 +0900 (Sat, 01 Dec 2018) | 1 line

eliminate a list with only one element
------------------------------------------------------------------------
r66111 | samuel | 2018-12-01 12:49:52 +0900 (Sat, 01 Dec 2018) | 4 lines

Avoid GCing dead stack after switching away from a fiber

Fixes <https://bugs.ruby-lang.org/issues/14561> and discussed
<https://bugs.ruby-lang.org/issues/15362>.
------------------------------------------------------------------------
r66110 | k0kubun | 2018-12-01 09:37:54 +0900 (Sat, 01 Dec 2018) | 4 lines

tool/downloader.rb: retry Net::OpenTimeout

to prevent random failure
https://travis-ci.org/ruby/ruby/jobs/461667474
------------------------------------------------------------------------
r66109 | tenderlove | 2018-12-01 09:08:36 +0900 (Sat, 01 Dec 2018) | 3 lines

Revert "Collapse putobject, putobject, newarray"

This reverts commit cbdf5a1842cda89347a2c840d23c35f041aead68.
------------------------------------------------------------------------
r66108 | svn | 2018-12-01 08:58:17 +0900 (Sat, 01 Dec 2018) | 1 line

* 2018-12-01
------------------------------------------------------------------------
r66107 | svn | 2018-12-01 08:58:17 +0900 (Sat, 01 Dec 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66106 | tenderlove | 2018-12-01 08:58:13 +0900 (Sat, 01 Dec 2018) | 28 lines

Collapse putobject, putobject, newarray

This collapses:

```
== disasm: #<ISeq:bar@bench.rb:3 (3,0)-(5,3)> (catch: FALSE)
0000 putobject                    "a"                                 (   4)[LiCa]
0002 putobject                    "b"
0004 putobject                    "c"
0006 putobject                    "d"
0008 putobject                    "e"
0010 putobject                    "f"
0012 putobject                    "g"
0014 putobject                    "h"
0016 putobject                    "i"
0018 putobject                    "j"
0020 putobject                    "k"
0022 newarray                     11
0024 leave                                                            (   5)[Re]
```

In to this:

```
== disasm: #<ISeq:bar@bench.rb:3 (3,0)-(5,3)> (catch: FALSE)
0000 duparray                     ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k"](   4)[LiCa]
0002 leave                                                            (   5)[Re]
```
------------------------------------------------------------------------
r66104 | normal | 2018-11-30 20:44:21 +0900 (Fri, 30 Nov 2018) | 6 lines

test/ruby/test_io.rb (test_recycled_fd_close): remove hacks

I think I finally fixed the underlying bug in r65937
("io.c (fptr_finalize_flush): close race leading to EBADF")

I've run this test over 100000 times on a multicore system, now.
------------------------------------------------------------------------
r66103 | nobu | 2018-11-30 16:19:49 +0900 (Fri, 30 Nov 2018) | 1 line

Added words in the comment at r65088 [ci skip]
------------------------------------------------------------------------
r66102 | nobu | 2018-11-30 16:04:00 +0900 (Fri, 30 Nov 2018) | 1 line

Update source code URI in bundled_gems [ci skip]
------------------------------------------------------------------------
r66101 | normal | 2018-11-30 12:56:34 +0900 (Fri, 30 Nov 2018) | 3 lines

test/testunit/test_parallel.rb: respect subprocess timeout scale

MJIT tests take longer than 100s on my VM :<
------------------------------------------------------------------------
r66100 | normal | 2018-11-30 12:56:29 +0900 (Fri, 30 Nov 2018) | 7 lines

vm_trace.c: workqueue as thread-safe version of postponed_job

postponed_job is safe to use in signal handlers, but is not
thread-safe for MJIT.  Implement a workqueue for MJIT
thread-safety.

[Bug #15316]
------------------------------------------------------------------------
r66099 | normal | 2018-11-30 08:30:28 +0900 (Fri, 30 Nov 2018) | 1 line

io.c: fix clang -Werror,-Wshorten-64-to-32 on Linux sendfile
------------------------------------------------------------------------
r66098 | normal | 2018-11-30 08:28:15 +0900 (Fri, 30 Nov 2018) | 1 line

io.c: fix clang -Werror,-Wshorten-64-to-32 errors
------------------------------------------------------------------------
r66097 | svn | 2018-11-30 07:37:35 +0900 (Fri, 30 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66096 | normal | 2018-11-30 07:37:29 +0900 (Fri, 30 Nov 2018) | 7 lines

io.c: favor comparisons against zero rather than -1

On my 32-bit x86 userspace, I get the following .text savings:

    text	   data	    bss	    dec	    hex	filename
  152971	     56	    252	 153279	  256bf	io.o.before
  152863	     56	    252	 153171	  25653	io.o.after
------------------------------------------------------------------------
r66095 | tenderlove | 2018-11-30 05:39:51 +0900 (Fri, 30 Nov 2018) | 31 lines

Use a shared array for the `duparray` instruction

In this example code:

```ruby
def foo
  [1, 2, 3, 4]
end
```

The array literal uses a `duparray` instruction. Before this patch,
`rb_ary_resurrect` would malloc and memcpy a new array buffer.  This
patch changes `rb_ary_resurrect` to use `ary_make_partial` so that the
new array object shares the underlying buffer with the array stored in
the instruction sequences.

Before this patch, the new array object is not shared:

```
$ ruby -r objspace -e'p ObjectSpace.dump([1, 2, 3, 4])'
"{\"address\":\"0x7fa2718372d0\", \"type\":\"ARRAY\", \"class\":\"0x7fa26f8b0010\", \"length\":4, \"memsize\":72, \"flags\":{\"wb_protected\":true}}\n"
```

After this patch:

```
$ ./ruby -r objspace -e'p ObjectSpace.dump([1, 2, 3, 4])'
"{\"address\":\"0x7f9a76883638\", \"type\":\"ARRAY\", \"class\":\"0x7f9a758af900\", \"length\":4, \"shared\":true, \"references\":[\"0x7f9a768837c8\"], \"memsize\":40, \"flags\":{\"wb_protected\":true}}\n"
```

[Feature #15289] [ruby-core:90097]
------------------------------------------------------------------------
r66094 | svn | 2018-11-30 05:00:18 +0900 (Fri, 30 Nov 2018) | 1 line

* 2018-11-30
------------------------------------------------------------------------
r66093 | normal | 2018-11-30 05:00:00 +0900 (Fri, 30 Nov 2018) | 9 lines

disable non-blocking pipes and sockets by default

There seems to be a compatibility problems with Rails +
Rack::Deflater; so we revert this incompatibility.

This effectively reverts r65922; but keeps the bugfixes to
better support non-blocking sockets and pipes for future use.

[Bug #15356] [Bug #14968]
------------------------------------------------------------------------
r66092 | kazu | 2018-11-29 18:22:13 +0900 (Thu, 29 Nov 2018) | 1 line

Remove unused variable in example code [ci skip]
------------------------------------------------------------------------
r66091 | ko1 | 2018-11-29 17:03:55 +0900 (Thu, 29 Nov 2018) | 9 lines

clear dst Hash on Hash#replace. [Bug #15358]

* hash.c (linear_copy): solve two issues on `Hash#replace`.
  (1) fix memory leak
      (1-1) don't allocate memory if destination already
            has a memory area.
      (1-2) free destination memory if src is NULL.
  (2) clear transient heap flag if src is NULL. [Bug #15358]

------------------------------------------------------------------------
r66090 | nobu | 2018-11-29 16:45:54 +0900 (Thu, 29 Nov 2018) | 1 line

Create empty revision.h when srcdir is write-only [ci skip]
------------------------------------------------------------------------
r66089 | nobu | 2018-11-29 16:07:40 +0900 (Thu, 29 Nov 2018) | 1 line

Always try to update revision.h with GNU make
------------------------------------------------------------------------
r66088 | k0kubun | 2018-11-29 15:51:08 +0900 (Thu, 29 Nov 2018) | 5 lines

Revert "using_spec.rb: skip broken test for MinGW for now"

This reverts commit 110273c53461a9a7ecdcca705346be21f25f50c6.

Try this with r66087
------------------------------------------------------------------------
r66087 | ko1 | 2018-11-29 15:37:01 +0900 (Thu, 29 Nov 2018) | 2 lines

use __builtin_setjmp on mingw64 [Bug #15348].

------------------------------------------------------------------------
r66086 | shyouhei | 2018-11-29 15:16:31 +0900 (Thu, 29 Nov 2018) | 13 lines

Remove HEAP_ALIGN_LOG setting in configure.ac for OpenBSD/MirOS

The ruby setting was renamed to HEAP_PAGE_ALIGN_LOG, but the
configure.in (now configure.ac) file was not updated, so the
setting had no effect.  The configure setting is unnecessary
after OpenBSD 5.2 and MirOS has been discontinued (with the last
release being over 10 years ago), so it is better to just remove
the related configure setting.

Fix [Bug #13438]
From: Jeremy Evans <code@jeremyevans.net>


------------------------------------------------------------------------
r66085 | shyouhei | 2018-11-29 14:26:05 +0900 (Thu, 29 Nov 2018) | 10 lines

.travis.yml: cache unicode.org files

Before this changeset (since r58071) we did not download files
from unicode.org but just touch some files.  This is a kind of
hack that people normally don't do at home.

We are caching other files between builds now.  Why not also save
those files downloaded from elsewhere.  This covers more
realistic workload, I guess.

------------------------------------------------------------------------
r66084 | shyouhei | 2018-11-29 11:47:36 +0900 (Thu, 29 Nov 2018) | 5 lines

.travis.yml: fix YAML parse error

`[` is a meta character in YAML.  `- [` starts an array,
so it should end with `]`; but it was not.

------------------------------------------------------------------------
r66083 | svn | 2018-11-29 10:09:49 +0900 (Thu, 29 Nov 2018) | 1 line

* 2018-11-29
------------------------------------------------------------------------
r66082 | nobu | 2018-11-29 10:09:47 +0900 (Thu, 29 Nov 2018) | 6 lines

time.rb: Move documents and stop others

* lib/time.rb: Move method documents to each methods.  And stop
  documentation of the abstract and others, which were confusingly
  placed at the top of generated documents prior to the abstract
  in time.c.
------------------------------------------------------------------------
r66081 | nobu | 2018-11-28 23:56:19 +0900 (Wed, 28 Nov 2018) | 1 line

Executable scripts have been moved to libexec [ci skip]
------------------------------------------------------------------------
r66080 | nobu | 2018-11-28 23:08:35 +0900 (Wed, 28 Nov 2018) | 1 line

time.c: rescue find_timezone when loading
------------------------------------------------------------------------
r66079 | nobu | 2018-11-28 23:08:34 +0900 (Wed, 28 Nov 2018) | 1 line

Try with TZInfo and Timezone gems
------------------------------------------------------------------------
r66078 | nobu | 2018-11-28 23:08:33 +0900 (Wed, 28 Nov 2018) | 1 line

Time.at in: tz
------------------------------------------------------------------------
r66077 | nobu | 2018-11-28 23:08:32 +0900 (Wed, 28 Nov 2018) | 1 line

Timezone at Time.at
------------------------------------------------------------------------
r66076 | nobu | 2018-11-28 23:08:31 +0900 (Wed, 28 Nov 2018) | 1 line

Try Time.find_timezone to convert name to timezone
------------------------------------------------------------------------
r66075 | nobu | 2018-11-28 23:08:30 +0900 (Wed, 28 Nov 2018) | 1 line

Try Time.find_timezone to load
------------------------------------------------------------------------
r66072 | duerst | 2018-11-28 16:07:59 +0900 (Wed, 28 Nov 2018) | 1 line

remove two unnecessary variables (np2 and np3)
------------------------------------------------------------------------
r66071 | duerst | 2018-11-28 15:43:57 +0900 (Wed, 28 Nov 2018) | 1 line

eliminate intermediate variable in very short block (3 times)
------------------------------------------------------------------------
r66070 | duerst | 2018-11-28 15:21:52 +0900 (Wed, 28 Nov 2018) | 4 lines

use create_sequence_node() four more times

Four more use of create_sequence_node() in node_extended_grapheme_cluster
(a few more to come).
------------------------------------------------------------------------
r66069 | nobu | 2018-11-28 15:12:58 +0900 (Wed, 28 Nov 2018) | 4 lines

Get rid of block-less Proc.new

* lib/optparse.rb (OptionParser::Switch#initialize): get rid of
  `Proc.new` without a block, which may be deprecated in the future.
------------------------------------------------------------------------
r66068 | nobu | 2018-11-28 15:12:57 +0900 (Wed, 28 Nov 2018) | 4 lines

Remove useless backslash

* lib/optparse.rb (OptionParser::Switch#compsys): remove useless
  backslash which just confuse ruby-mode.el.
------------------------------------------------------------------------
r66067 | normal | 2018-11-28 13:31:42 +0900 (Wed, 28 Nov 2018) | 4 lines

test_settracefunc (test_tracepoint_enable_with_target_line): less fragile

Allow us to make other changes to the file and move the method
around without affecting this test.
------------------------------------------------------------------------
r66066 | hsbt | 2018-11-28 12:10:09 +0900 (Wed, 28 Nov 2018) | 1 line

Regenerated binstubs of bundler, rdoc and irb.
------------------------------------------------------------------------
r66065 | hsbt | 2018-11-28 12:08:14 +0900 (Wed, 28 Nov 2018) | 3 lines

Merge rubygems upstream from https://github.com/rubygems/rubygems/commit/2c499655f29070c809dfea9f5fda6fac6850e62e

  https://github.com/rubygems/rubygems/pull/2493
------------------------------------------------------------------------
r66064 | hsbt | 2018-11-28 11:38:29 +0900 (Wed, 28 Nov 2018) | 3 lines

Merge stringio.gemspec from github repository.

  Temporary ignored configuration of certificate sign.
------------------------------------------------------------------------
r66063 | duerst | 2018-11-28 10:58:35 +0900 (Wed, 28 Nov 2018) | 4 lines

use create_sequence_node() once more

One more use of create_sequence_node() in node_extended_grapheme_cluster
(several more to come).
------------------------------------------------------------------------
r66062 | k0kubun | 2018-11-28 10:53:46 +0900 (Wed, 28 Nov 2018) | 3 lines

using_spec.rb: skip broken test for MinGW for now

ko1 is fixing this and he suggested to skip it for now
------------------------------------------------------------------------
r66061 | shugo | 2018-11-28 10:51:44 +0900 (Wed, 28 Nov 2018) | 3 lines

lib/monitor.rb: avoid race conditions by Thread.handle_interrupt

Suggested by Benoit Daloze.  [ruby-core:88502] [Bug #14998]
------------------------------------------------------------------------
r66060 | normal | 2018-11-28 10:10:40 +0900 (Wed, 28 Nov 2018) | 9 lines

io.c (rb_update_max_fd): use F_GETFL if possible

On 64-bit Linux, fstat() needs to fill out a 144 byte struct
while F_GETFL only needs to return 8 bytes.

Fwiw, F_GETFD requires an additional rcu_read_lock and bitmap
check; so it's obviously more expensive than F_GETFL on Linux.

Reduce stack usage of rb_update_max_fd from 184 to 24 bytes.
------------------------------------------------------------------------
r66059 | nobu | 2018-11-28 10:04:39 +0900 (Wed, 28 Nov 2018) | 8 lines

Fix for coroutine/win32/Context.obj

* coroutine/win32/Context.asm: old ml version 9 needs CPU
  directive before `.model` directive.

* win32/Makefile.sub: specify object directories to separate Win32
  and Win64 targets.  Win32 rule was overridden by Win64 rule and
  just ignored.
------------------------------------------------------------------------
r66058 | nobu | 2018-11-28 10:04:38 +0900 (Wed, 28 Nov 2018) | 1 line

win32/Makefile.sub: add flags for AS
------------------------------------------------------------------------
r66057 | duerst | 2018-11-28 09:53:35 +0900 (Wed, 28 Nov 2018) | 5 lines

introduce macro R_ERR to reduce repetitive code

Introduce a new preprocessor macro R_ERR to visually reduce repetitive code
checking for return values and going to the err: label at the end of the
function node_extended_grapheme_cluster().
------------------------------------------------------------------------
r66056 | shyouhei | 2018-11-28 09:49:24 +0900 (Wed, 28 Nov 2018) | 9 lines

.travis.yaml: unquote

It was probably me, 7 years ago, in r33844, who started overly
quoting YAML strings.  But now, this file grown up 50+ times from
6 lines to more than 300.  It is more annoying than convenient to
quote everything to add backslashes here and there.

Just use quotes only when necessary.

------------------------------------------------------------------------
r66055 | hsbt | 2018-11-28 09:48:21 +0900 (Wed, 28 Nov 2018) | 1 line

Removed redundant empty line.
------------------------------------------------------------------------
r66054 | svn | 2018-11-28 09:35:27 +0900 (Wed, 28 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66053 | normal | 2018-11-28 09:35:22 +0900 (Wed, 28 Nov 2018) | 13 lines

io.c: reduce IO.copy_stream stack usage on Linux

nogvl_copy_file_range and nogvl_copy_stream_sendfile each
used 344 bytes of stack before this change.  Now, they are
inlined into nogvl_copy_stream_func which only uses 200 bytes
of stack.

"struct stat" is 144 bytes on my 64-bit Linux.

Note: this doesn't affect GC (yet) since GVL is released;
but increases safety if called from deep machine stacks.

It will affect GC if Thread::Light is merged.
------------------------------------------------------------------------
r66052 | duerst | 2018-11-28 09:28:52 +0900 (Wed, 28 Nov 2018) | 6 lines

reduce number of arguments on quantify_property_node()

There are only four patterns of the last two arguments to quantify_property_node().
By replacing the lower/upper arguments with a single char, we get more expressive
calls, the last argument directly corresponding to the quantifier that we want to
use (except for '2', which means exactly two).
------------------------------------------------------------------------
r66051 | kazu | 2018-11-28 08:57:55 +0900 (Wed, 28 Nov 2018) | 1 line

Add Float::INFINITY or nil to call-seq of Enumerator::Chain#size [ci skip]
------------------------------------------------------------------------
r66050 | normal | 2018-11-28 07:48:07 +0900 (Wed, 28 Nov 2018) | 3 lines

enumerator.c (enum_chain_yield_block): use predefined ID

No point in having rb_intern lookup and cache a predefined ID
------------------------------------------------------------------------
r66049 | normal | 2018-11-28 07:20:45 +0900 (Wed, 28 Nov 2018) | 4 lines

io.c (struct copy_stream_struct): packing

Reduce the struct to 80 bytes (from 88) on amd64 to reduce
stack use.
------------------------------------------------------------------------
r66048 | duerst | 2018-11-28 06:50:27 +0900 (Wed, 28 Nov 2018) | 1 line

fix order of subexpressions for Hangul
------------------------------------------------------------------------
r66047 | svn | 2018-11-28 06:38:55 +0900 (Wed, 28 Nov 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r66046 | duerst | 2018-11-28 06:38:53 +0900 (Wed, 28 Nov 2018) | 1 line

introduce two more uses of create_sequence_node in node_extended_grapheme_cluster
------------------------------------------------------------------------
r66045 | duerst | 2018-11-28 06:23:11 +0900 (Wed, 28 Nov 2018) | 4 lines

correctly handle return value from create_sequence_node()

In function node_extended_grapheme_cluster(), store and test
return value from create_sequence_node(). Never forget this!
------------------------------------------------------------------------
r66044 | svn | 2018-11-28 06:12:31 +0900 (Wed, 28 Nov 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r66043 | duerst | 2018-11-28 06:12:29 +0900 (Wed, 28 Nov 2018) | 7 lines

declare array for sequence at start of code creating sequence

In function node_extended_grapheme_cluster(),
move declaration up so that block encompasses all of the regular expression
creation that finally makes up the sequence. Having blocks like this will
be great because it directly shows the extent of code belonging to each
subexpression of the regular expression being created.
------------------------------------------------------------------------
r66042 | duerst | 2018-11-28 06:00:06 +0900 (Wed, 28 Nov 2018) | 4 lines

make sure all nodes are correctly freed in create_property_node()

We make sure that the newly created tree and all remaining nodes passed in
in the node_array are freed.
------------------------------------------------------------------------
r66041 | eregon | 2018-11-28 05:38:57 +0900 (Wed, 28 Nov 2018) | 1 line

Update to ruby/spec@cdd6ff7
------------------------------------------------------------------------
r66040 | svn | 2018-11-28 05:38:21 +0900 (Wed, 28 Nov 2018) | 1 line

* 2018-11-28
------------------------------------------------------------------------
r66039 | eregon | 2018-11-28 05:38:20 +0900 (Wed, 28 Nov 2018) | 1 line

Update to ruby/mspec@820486a
------------------------------------------------------------------------
r66038 | nobu | 2018-11-27 22:47:49 +0900 (Tue, 27 Nov 2018) | 4 lines

ruby-style.el: ruby-style-c-mode by VCS [ci skip]

* misc/ruby-style.el (ruby-style-c-mode): set ruby-style if the
  remote repository is ruby.
------------------------------------------------------------------------
r66037 | svn | 2018-11-27 21:08:21 +0900 (Tue, 27 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r66036 | hsbt | 2018-11-27 21:08:19 +0900 (Tue, 27 Nov 2018) | 1 line

Merge bundler-2.0.0.pre.2 from upstream.
------------------------------------------------------------------------
r66035 | k0kubun | 2018-11-27 21:00:51 +0900 (Tue, 27 Nov 2018) | 15 lines

mjit_worker.c: promote mjit_copy_job from function

-local variable to global variable.

Consider this case:
1. MJIT worker: dequeue ISeq (stop_worker_p was still FALSE)
2. Ruby thread: call Kernel#exec, which calls mjit_finish(FALSE),
                sets `stop_worker_p = TRUE`, and fires RUBY_VM_CHECK_INTS() once
3. MJIT worker: register copy job, but found stop_worker_p is TRUE.
                set `worker_stopped = TRUE` and the thread stops.
4. Function-local job variable expires by the thread stop (this is eliminated by this commit)
5. Ruby thread: find `worker_stopped` becamse TRUE, start Kernel#exec.
                Kernel#exec fails but exception is rescued.
6. Ruby thread: call RUBY_VM_CHECK_INTS. copy job is dispatched but job variable
                is already expired.
------------------------------------------------------------------------
r66034 | k0kubun | 2018-11-27 20:24:19 +0900 (Tue, 27 Nov 2018) | 7 lines

regparse.c: conform C90

../regparse.c:5908:28: error: initializer for aggregate is not a compile-time constant [-Werror,-Wc99-extensions]
      Node* sequence[] = { np1, np2, np3, ((Node* )0) };
                           ^~~

https://travis-ci.org/ruby/ruby/jobs/460197620
------------------------------------------------------------------------
r66033 | duerst | 2018-11-27 20:04:02 +0900 (Tue, 27 Nov 2018) | 5 lines

introduce helper function create_sequence_node()

The new function create_sequence_node() uses its second argument
(an array of Node*, from left to right, ending with NULL_NODE)
to create a sequence of expressions using node_new_list().
------------------------------------------------------------------------
r66032 | svn | 2018-11-27 19:15:46 +0900 (Tue, 27 Nov 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r66031 | duerst | 2018-11-27 19:15:45 +0900 (Tue, 27 Nov 2018) | 4 lines

introduce helper function quantify_property_node()

The new function quantify_property_node() combines the functions
create_property_node() and quantify_node(), which frequently appear together.
------------------------------------------------------------------------
r66030 | duerst | 2018-11-27 18:44:35 +0900 (Tue, 27 Nov 2018) | 1 line

introduce helper function quantify_node() to wrap function node_new_quantifier
------------------------------------------------------------------------
r66029 | nobu | 2018-11-27 17:39:40 +0900 (Tue, 27 Nov 2018) | 5 lines

.travis.yml: avoid bashism

GCC_FLAGS is not an array and CC is finally passed to configure as
single string.  Pass CC via the environment variable, so it does
not need to be quoted anymore.
------------------------------------------------------------------------
r66028 | nobu | 2018-11-27 17:39:39 +0900 (Tue, 27 Nov 2018) | 1 line

.travis.yml: discard config.cache if CC changed
------------------------------------------------------------------------
r66027 | nobu | 2018-11-27 17:39:38 +0900 (Tue, 27 Nov 2018) | 1 line

.travis.yml: split commands
------------------------------------------------------------------------
r66026 | svn | 2018-11-27 16:34:25 +0900 (Tue, 27 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66025 | mame | 2018-11-27 16:34:21 +0900 (Tue, 27 Nov 2018) | 5 lines

compile.c: prevent out-of-bound initialization of coverage counters

The coverage counters is initialized with `counter[lineno - 1] = 0`,
but lineno may be 0, which led to write access for index -1.
[ruby-core:90085] [Bug#15346]
------------------------------------------------------------------------
r66024 | aycabta | 2018-11-27 16:02:36 +0900 (Tue, 27 Nov 2018) | 1 line

Merge rdoc-6.1.0.bata2
------------------------------------------------------------------------
r66023 | nobu | 2018-11-27 15:44:02 +0900 (Tue, 27 Nov 2018) | 1 line

Embed the Emoji version
------------------------------------------------------------------------
r66022 | ko1 | 2018-11-27 14:42:33 +0900 (Tue, 27 Nov 2018) | 1 line

restore using_spec.rb
------------------------------------------------------------------------
r66021 | duerst | 2018-11-27 13:13:21 +0900 (Tue, 27 Nov 2018) | 1 line

use explicit property name when creating nodes for "Grapheme_Cluster_Break=Extend"
------------------------------------------------------------------------
r66020 | duerst | 2018-11-27 12:56:19 +0900 (Tue, 27 Nov 2018) | 1 line

use 'Regional_Indicator' script property instead of fixed constants
------------------------------------------------------------------------
r66019 | nobu | 2018-11-27 12:19:06 +0900 (Tue, 27 Nov 2018) | 4 lines

Add rb_typeddata_is_instance_of

Similar to rb_typeddata_is_kind_of, except for that inherited type
is not an instance.
------------------------------------------------------------------------
r66018 | ko1 | 2018-11-27 12:12:58 +0900 (Tue, 27 Nov 2018) | 1 line

enable another assertion
------------------------------------------------------------------------
r66017 | ko1 | 2018-11-27 12:02:41 +0900 (Tue, 27 Nov 2018) | 4 lines

fix for ISeq.of(method).

* iseq.c (iseqw_s_of): `rb_method_iseq(method)` can return NULL.

------------------------------------------------------------------------
r66016 | svn | 2018-11-27 11:45:26 +0900 (Tue, 27 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66015 | ko1 | 2018-11-27 11:45:25 +0900 (Tue, 27 Nov 2018) | 6 lines

`RubyVM::ISeq.of` accept ISeq.

* iseq.c (iseqw_s_of): return given object if the given object is
  a `RubyVM::InstructionSequence`. We can specify ISeq for
  `TracePoint#enable(target:)`.

------------------------------------------------------------------------
r66014 | duerst | 2018-11-27 11:18:29 +0900 (Tue, 27 Nov 2018) | 1 line

add some comments in function node_extended_grapheme_cluster() [ci skip]
------------------------------------------------------------------------
r66013 | nobu | 2018-11-27 10:25:16 +0900 (Tue, 27 Nov 2018) | 1 line

ALWAYS_INLINE implies inline always
------------------------------------------------------------------------
r66012 | ko1 | 2018-11-27 09:44:14 +0900 (Tue, 27 Nov 2018) | 1 line

enable at least one behavior
------------------------------------------------------------------------
r66011 | ko1 | 2018-11-27 09:39:46 +0900 (Tue, 27 Nov 2018) | 1 line

to debug https://ci.appveyor.com/project/ruby/ruby/builds/20566898/job/hda29416yal9h6hn use binary search
------------------------------------------------------------------------
r66010 | duerst | 2018-11-27 08:30:43 +0900 (Tue, 27 Nov 2018) | 1 line

improve messages for test failures
------------------------------------------------------------------------
r66009 | svn | 2018-11-27 05:16:16 +0900 (Tue, 27 Nov 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r66008 | ko1 | 2018-11-27 05:16:14 +0900 (Tue, 27 Nov 2018) | 6 lines

`TracePoint#enable(target_line:)` is supported. [Feature #15289]

* vm_trace.c: `TracePoint#enable(target_line:)` is supported.
  This option enables a hook only at specified target_line.
  target_line should be combination with target and :line event.

------------------------------------------------------------------------
r66007 | ko1 | 2018-11-27 04:59:08 +0900 (Tue, 27 Nov 2018) | 4 lines

Give up support for cross-callcc set_trace_func.

* cont.c (cont_restore_thread): cause error if trace-status is changed.

------------------------------------------------------------------------
r66006 | ko1 | 2018-11-27 03:48:48 +0900 (Tue, 27 Nov 2018) | 7 lines

fix for ansi-pedantic compile option.

* iseq.c (iseq_add_local_tracepoint_i): extract aggregate initialization.
  See https://travis-ci.org/ruby/ruby/jobs/459881277

* iseq.c (iseq_remove_local_tracepoint_i): ditto.

------------------------------------------------------------------------
r66005 | ko1 | 2018-11-27 03:27:02 +0900 (Tue, 27 Nov 2018) | 4 lines

fix type error.

* iseq.c (iseq_iterate_children): should use cast to `int`.

------------------------------------------------------------------------
r66004 | svn | 2018-11-27 03:16:54 +0900 (Tue, 27 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r66003 | ko1 | 2018-11-27 03:16:39 +0900 (Tue, 27 Nov 2018) | 57 lines

Support targetting TracePoint [Feature #15289]

* vm_trace.c (rb_tracepoint_enable_for_target): support targetting
  TracePoint. [Feature #15289]

  Tragetting TracePoint is only enabled on specified method, proc
  and so on, example: `tp.enable(target: code)`.

  `code` should be consisted of InstructionSeuqnece (iseq)
  (RubyVM::InstructionSeuqnece.of(code) should not return nil)
  If code is a tree of iseq, TracePoint is enabled on all of
  iseqs in a tree.

  Enabled tragetting TracePoints can not enabled again with
  and without target.

* vm_core.h (rb_iseq_t): introduce `rb_iseq_t::local_hooks`
  to store local hooks.
  `rb_iseq_t::aux::trace_events` is renamed to
  `global_trace_events` to contrast with `local_hooks`.

* vm_core.h (rb_hook_list_t): add `rb_hook_list_t::running`
  to represent how many Threads/Fibers are used this list.
  If this field is 0, nobody using this hooks and we can
  delete it.

  This is why we can remove code from cont.c.

* vm_core.h (rb_vm_t): because of above change, we can eliminate
  `rb_vm_t::trace_running` field.
  Also renamed from `rb_vm_t::event_hooks` to `global_hooks`.

* vm_core.h, vm.c (ruby_vm_event_enabled_global_flags): renamed
  from `ruby_vm_event_enabled_flags.

* vm_core.h, vm.c (ruby_vm_event_local_num): added to count
  enabled targetting TracePoints.

* vm_core.h, vm_trace.c (rb_exec_event_hooks): accepts
  hook list.

* vm_core.h (rb_vm_global_hooks): added for convinience.

* method.h (rb_method_bmethod_t): added to maintain Proc
  and `rb_hook_list_t` for bmethod (defined by define_method).

* prelude.rb (TracePoint#enable): extracet a keyword parameter
  (because it is easy than writing in C).
  It calls `TracePoint#__enable` internal method written in C.

* vm_insnhelper.c (vm_trace): check also iseq->local_hooks.

* vm.c (invoke_bmethod): check def->body.bmethod.hooks.

* vm.c (hook_before_rewind): check iseq->local_hooks
  and def->body.bmethod.hooks before rewind by exception.

------------------------------------------------------------------------
r66002 | k0kubun | 2018-11-27 01:13:56 +0900 (Tue, 27 Nov 2018) | 5 lines

test_jit.rb: skip a test for Windows for now

https://ci.appveyor.com/project/ruby/ruby/builds/20558412

removing CloseHandle disallows us to remove the DLL.
------------------------------------------------------------------------
r66001 | k0kubun | 2018-11-27 00:47:20 +0900 (Tue, 27 Nov 2018) | 3 lines

vm_trace.c: MJIT-limited thread-safety for postponed_job

[Bug #15316]
------------------------------------------------------------------------
r66000 | svn | 2018-11-27 00:12:34 +0900 (Tue, 27 Nov 2018) | 1 line

* 2018-11-27
------------------------------------------------------------------------
r65999 | k0kubun | 2018-11-27 00:12:31 +0900 (Tue, 27 Nov 2018) | 7 lines

process.c: avoid dlclose before exec

because JIT-ed code may still be on stack at this time, unlike
in ruby_cleanup().

This hopes to fix: (take 2)
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1480207
------------------------------------------------------------------------
r65998 | k0kubun | 2018-11-27 00:12:30 +0900 (Tue, 27 Nov 2018) | 6 lines

Revert "process.c: try to workaroun SEGV by r65994"

This reverts commit 0e6aba22c6b876a36adc39cac5314ce6e626954c.

because it didn't help, at all.
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1480207
------------------------------------------------------------------------
r65997 | k0kubun | 2018-11-26 23:45:39 +0900 (Mon, 26 Nov 2018) | 12 lines

process.c: try to workaroun SEGV by r65994

http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1480173

It tries to print C backtrace but fails. And core file on the server
seems to be stopping on the irrelevant place due to its own signal
handler for the dump.

And I failed to reproduce this SEGV on my machine.

I don't know why it's broken, so let me try this change to investigate
the reason of SEGV.
------------------------------------------------------------------------
r65996 | svn | 2018-11-26 23:03:00 +0900 (Mon, 26 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65995 | nobu | 2018-11-26 23:02:59 +0900 (Mon, 26 Nov 2018) | 1 line

Do not load rubygems when disabled
------------------------------------------------------------------------
r65994 | k0kubun | 2018-11-26 22:39:53 +0900 (Mon, 26 Nov 2018) | 5 lines

process.c: finish MJIT prior to #exec

to prevent ruby from leaving MJIT-related files.

test_jit.rb: add a test to prevent that
------------------------------------------------------------------------
r65993 | k0kubun | 2018-11-26 21:50:42 +0900 (Mon, 26 Nov 2018) | 6 lines

mjit_worker.c: disable running copy job

after MJIT worker stop.

r65928 didn't fix the SEGV. This commit hopes to fix
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1478576
------------------------------------------------------------------------
r65992 | k0kubun | 2018-11-26 21:36:45 +0900 (Mon, 26 Nov 2018) | 6 lines

lib/rubygems/indexer.rb: suppress random test-all error

by Bundler integration, like:
http://ci.rvm.jp/results/trunk-no-mjit@silicon-docker/1479769

This resurrects r65629 which was accidentally reverted by r65904.
------------------------------------------------------------------------
r65991 | hsbt | 2018-11-26 21:23:45 +0900 (Mon, 26 Nov 2018) | 1 line

Sync the executables of rdoc from upstream repository.
------------------------------------------------------------------------
r65990 | duerst | 2018-11-26 18:03:11 +0900 (Mon, 26 Nov 2018) | 7 lines

add tests for grapheme clusters using Unicode Emoji test data

Add file test/ruby/enc/test_emoji_breaks.rb to test String#each_grapheme_cluster
test data provided by Unicode (at https://www.unicode.org/Public/emoji/#{EMOJI_VERSION}/).

Lines containing emoji for genies, zombies, and wrestling are ignored
because there seems to be a bug (#15343) in the implementation.
------------------------------------------------------------------------
r65989 | mame | 2018-11-26 16:55:07 +0900 (Mon, 26 Nov 2018) | 7 lines

object.c: Deprecate Object#=~ and add NilClass#=~`

Object#=~ always returns nil.  This behavior is not only unuseful but
also troublesome because it may hide a type error.

This change deprecates Object#=~.  For compatibility, NilClass#=~ is
newly introduced.  [Feature #15231]
------------------------------------------------------------------------
r65988 | mame | 2018-11-26 16:13:53 +0900 (Mon, 26 Nov 2018) | 4 lines

lib/rubygems: explicitly clarify the type for =~ matching

RubyGems is very indifferent for type.
This change is needed for removal of `Object#=~`.  [Feature #15231]
------------------------------------------------------------------------
r65987 | mame | 2018-11-26 14:46:24 +0900 (Mon, 26 Nov 2018) | 1 line

lib/rubygems/command.rb: remove meaningless code
------------------------------------------------------------------------
r65986 | mame | 2018-11-26 14:46:02 +0900 (Mon, 26 Nov 2018) | 9 lines

test/rdoc/test_rdoc_rdoc.rb: add dummy finish

RDoc::Options#@exclude is initialized as an empty array.
Then, #finish converts it to a regexp or nil and reassign it to @exclude.
Some methods of RDoc assumes that #finish has been already called.
So, this change forces to assign nil to @exclude.

This type confusion was found during work for removal of `Object#=~`.
[Feature #15231]
------------------------------------------------------------------------
r65985 | mame | 2018-11-26 14:32:50 +0900 (Mon, 26 Nov 2018) | 9 lines

lib/rdoc/markup/: Remove wrong call to `=~` against Array

`@res` is an Array, so `@res =~ /\n\z/` calls `Object#=~` which always
returns nil.
I guess it should be `@res.last =~ /\n\z/`, but the change causes test
failures.

This bug was found during work for removal of `Object#=~`.
[Feature #15231]
------------------------------------------------------------------------
r65984 | mame | 2018-11-26 14:29:45 +0900 (Mon, 26 Nov 2018) | 11 lines

lib/webrick: explicitly convert header values to a string

The values of @header are expected to be all strings;
WEBrick::HTTPResponse::[]=(key, val) explicitly converts the second
argument to a string and assigns it to @header hash.
However, there were some points in WEBrick internal code that assigns
non-String to @header.  This change fixes the issues.

The values are checked by `header_value =~ /\r\n/` in check_header.
The type confusion caused conflict with removal of `Object#=~`
[Feature #15231].
------------------------------------------------------------------------
r65983 | nobu | 2018-11-26 12:47:47 +0900 (Mon, 26 Nov 2018) | 5 lines

common.mk: simplify for ruby.imp

* common.mk (ruby.imp): extract the first word on the next lines
  of MJIT_FUNC_EXPORTED, regardless the prefix.  duplicate symbols
  will be removed by `sort -u`.
------------------------------------------------------------------------
r65982 | shyouhei | 2018-11-26 11:46:50 +0900 (Mon, 26 Nov 2018) | 4 lines

.travis.yml: avoid bashism

We can set environment variables to avoid before_script.

------------------------------------------------------------------------
r65981 | kazu | 2018-11-26 11:31:46 +0900 (Mon, 26 Nov 2018) | 3 lines

un.rb: add more options for httpd to help message [ci skip]

see r65965
------------------------------------------------------------------------
r65980 | shyouhei | 2018-11-26 11:21:25 +0900 (Mon, 26 Nov 2018) | 5 lines

.travis.yml: update MSAN setups [ci skip]

Exclude OpenSSL because we don't plan to debug libssl,
also track origins of uninitialized bits.

------------------------------------------------------------------------
r65979 | hsbt | 2018-11-26 10:54:53 +0900 (Mon, 26 Nov 2018) | 3 lines

Removed `bundle_ruby` command. Because It's no longer shipped from Bundler 1.0.2.

  [Bug #15291][ruby-dev:50663]
------------------------------------------------------------------------
r65978 | hsbt | 2018-11-26 10:43:02 +0900 (Mon, 26 Nov 2018) | 1 line

Use libexec for distination directory.
------------------------------------------------------------------------
r65977 | hsbt | 2018-11-26 10:23:06 +0900 (Mon, 26 Nov 2018) | 1 line

Followed up r65963. Use libexec directory with sync tool.
------------------------------------------------------------------------
r65976 | duerst | 2018-11-26 08:16:18 +0900 (Mon, 26 Nov 2018) | 6 lines

add several emoji data files to UNICODE_EMOJI_DOWNLOAD for download

In common.mk, add the files emoji-sequences.txt, emoji-test.txt,
emoji-variation-sequences.txt, and emoji-zwj-sequences.txt to
UNICODE_EMOJI_DOWNLOAD for download with `make update-unicode-property-files`.
These files will be used for automated tests for /\X/.
------------------------------------------------------------------------
r65975 | svn | 2018-11-26 01:23:20 +0900 (Mon, 26 Nov 2018) | 1 line

* 2018-11-26
------------------------------------------------------------------------
r65974 | naruse | 2018-11-26 01:23:18 +0900 (Mon, 26 Nov 2018) | 4 lines

Normalize month-mday before finding epoch

Especially over the year 2038, 30 Feb and so on may cause odd behavior
on validating found epoch with given year-month-day [Bug #15340]
------------------------------------------------------------------------
r65973 | yui-knk | 2018-11-25 21:31:35 +0900 (Sun, 25 Nov 2018) | 21 lines

Fix locations of NODE_UNDEF in undef with multiple args

* parse.y: Fix the beginning position of trailing NODE_UNDEF.

  e.g. The location of the NODE_UNDEF for `b` is fixed:

  ```
  undef a, b
  ```

  * Before

  ```
  NODE_UNDEF (line: 1, location: (1,6)-(1,10))
  ```

  * After

  ```
  NODE_UNDEF (line: 1, location: (1,9)-(1,10))
  ```
------------------------------------------------------------------------
r65972 | duerst | 2018-11-25 20:02:41 +0900 (Sun, 25 Nov 2018) | 5 lines

create function create_property_node to extract recurring functionality

Refactoring: In regparse.c, extract creation of a new CClass node and
initialization using a property into a new function create_property_node().

------------------------------------------------------------------------
r65971 | duerst | 2018-11-25 19:12:45 +0900 (Sun, 25 Nov 2018) | 6 lines

deal with ONIGENC_CASE_IS_TITLECASE flag on lowercase characters

In the function onigenc_unicode_case_map() in enc/unicode.c, deal
with the case that the ONIGENC_CASE_IS_TITLECASE flag is set on
lowercase characters. This is in preparation for Georgian Mtavruli,
which are uppercase but not titlecase, in Unicode 11.0.0.
------------------------------------------------------------------------
r65970 | nobu | 2018-11-25 17:32:52 +0900 (Sun, 25 Nov 2018) | 22 lines

ChangeLog compatibility [ci skip]

* tool/vcs.rb (VCS::GIT#export_changelog): improve the
  compatibility with svn-log.
  remained differences are:

  - in svn-log

    - accented characters, left/right single quotation marks, and
      non-break spaces are translated to ASCII characters

    - other non-ASCII characters are excoded as `{U+XXXX}`

  - in git-log

    - tabs are expanded

  - in git-log (intentional)

    - lines looking too indented are unindented

    - empty lines between headers and bodies are squeezed
------------------------------------------------------------------------
r65969 | nobu | 2018-11-25 17:31:40 +0900 (Sun, 25 Nov 2018) | 5 lines

parser: improve error messages

[Fix GH-2011]

From: Akim Demaille <akim.demaille@gmail.com>
------------------------------------------------------------------------
r65968 | nobu | 2018-11-25 15:07:28 +0900 (Sun, 25 Nov 2018) | 1 line

NEWS: fix markup [ci skip]
------------------------------------------------------------------------
r65967 | nobu | 2018-11-25 13:05:09 +0900 (Sun, 25 Nov 2018) | 1 line

No new entry when getting undefined global variable
------------------------------------------------------------------------
r65966 | nobu | 2018-11-25 12:36:10 +0900 (Sun, 25 Nov 2018) | 1 line

Prefer ALLOCV over ALLOCA
------------------------------------------------------------------------
r65965 | nobu | 2018-11-25 12:36:09 +0900 (Sun, 25 Nov 2018) | 1 line

un.rb: more options for httpd
------------------------------------------------------------------------
r65964 | svn | 2018-11-25 10:20:06 +0900 (Sun, 25 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65963 | hsbt | 2018-11-25 10:20:00 +0900 (Sun, 25 Nov 2018) | 8 lines

Use stub executables generated by RubyGems istead of original executables.
It resolved the conflict issues when invoking `gem i rdoc` and the binstub
issues with Bundler and Rails.

  [Bug #5060][ruby-core:38257][Fix GH-2023]

  * https://github.com/rubygems/rubygems/pull/2338
  * https://github.com/heroku/heroku-buildpack-ruby/issues/829
------------------------------------------------------------------------
r65962 | normal | 2018-11-25 04:59:51 +0900 (Sun, 25 Nov 2018) | 6 lines

io.c: disable nonblocking-by-default on win32 pipes

Lets admit Windows will always be too different from POSIX-like
platforms and non-blocking may never work as well or consistently.

[ruby-core:90042] [ruby-core:90044] [Bug #14968]
------------------------------------------------------------------------
r65961 | svn | 2018-11-25 04:54:35 +0900 (Sun, 25 Nov 2018) | 1 line

* 2018-11-25
------------------------------------------------------------------------
r65960 | odaira | 2018-11-25 04:54:32 +0900 (Sun, 25 Nov 2018) | 1 line

* common.mk: revise r65767 because AIX's grep does not support -A
------------------------------------------------------------------------
r65959 | nobu | 2018-11-24 21:48:56 +0900 (Sat, 24 Nov 2018) | 1 line

assertions for r65956
------------------------------------------------------------------------
r65958 | duerst | 2018-11-24 21:33:10 +0900 (Sat, 24 Nov 2018) | 1 line

remove guard against bug #15337, because it is fixed
------------------------------------------------------------------------
r65957 | svn | 2018-11-24 21:26:11 +0900 (Sat, 24 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65956 | naruse | 2018-11-24 21:26:07 +0900 (Sat, 24 Nov 2018) | 1 line

fix r65954; Keep tainty
------------------------------------------------------------------------
r65955 | duerst | 2018-11-24 21:10:25 +0900 (Sat, 24 Nov 2018) | 9 lines

add tests using Unicode test data for grapheme clusters

Add file test/ruby/enc/test_grapheme_breaks.rb to test String#each_grapheme_cluster
and \X extended grapheme cluster matcher in regular expressions against test data
provided by Unicode (ucd/auxiliary/GraphemeBreakTest.txt).

Some lines in the data file are ignored, as follows:
- Lines with a surrogate, because Ruby doesn't handle these
- The case of "\r\n", because there is a bug (#15337) in the implementation
------------------------------------------------------------------------
r65954 | naruse | 2018-11-24 20:53:19 +0900 (Sat, 24 Nov 2018) | 3 lines

Don't use single byte optimization on grapheme clusters

Unicode Text Segmentation considers CRLF as a character. [Bug #15337]
------------------------------------------------------------------------
r65953 | samuel | 2018-11-24 20:35:34 +0900 (Sat, 24 Nov 2018) | 3 lines

Ensure stack is correctly protected

See https://bugs.ruby-lang.org/issues/15335 for more details.
------------------------------------------------------------------------
r65952 | samuel | 2018-11-24 20:35:29 +0900 (Sat, 24 Nov 2018) | 4 lines

Change Makefile rule for assembly to use .S rather than .s

It is more conventional to use compiler to pre-process and
assemble the `.S` file rather than forcing Makefile to use `.s`.
------------------------------------------------------------------------
r65951 | nobu | 2018-11-24 19:29:23 +0900 (Sat, 24 Nov 2018) | 8 lines

Makefile.in: use ASMEXT in implicit rules

Use $(ASMEXT) instead of `.s` directly, as well as `.SUFFIXES:`
line.

Also, use the same suffix at compiling from `.c`.  These are
different things traditionally, but we won't mix same name files
with `.c` and `.s`.
------------------------------------------------------------------------
r65950 | knu | 2018-11-24 17:38:36 +0900 (Sat, 24 Nov 2018) | 1 line

Add entries regarding Enumerator::Chain to NEWS
------------------------------------------------------------------------
r65949 | knu | 2018-11-24 17:38:35 +0900 (Sat, 24 Nov 2018) | 13 lines

Implement Enumerator#+ and Enumerable#chain [Feature #15144]

They return an Enumerator::Chain object which is a subclass of
Enumerator, which represents a chain of enumerables that works as a
single enumerator.

```ruby
e = (1..3).chain([4, 5])
e.to_a #=> [1, 2, 3, 4, 5]

e = (1..3).each + [4, 5]
e.to_a #=> [1, 2, 3, 4, 5]
```
------------------------------------------------------------------------
r65948 | normal | 2018-11-24 17:23:26 +0900 (Sat, 24 Nov 2018) | 9 lines

io.c: wait on FD readability w/o GVL reacquisition

Since non-blocking I/O is the default after [Bug #14968],
we will hit it more often and cause more acquisition/release
of GVL to wait on single FD.

This also lets us avoid touching the temporal string locking
as much and lets us clean up some test changes made for
[Bug #14968]
------------------------------------------------------------------------
r65947 | nobu | 2018-11-24 13:34:00 +0900 (Sat, 24 Nov 2018) | 7 lines

Add clean-srcs

Add `clean-srcs` target to clean sources in the build directory,
and `realclean-srcs` target to clean autogenerated sources in the
source directory.  Also `realclean-srcs-extra` target to clean
sources which are generatable but need to install extra commands,
in addition.
------------------------------------------------------------------------
r65946 | nobu | 2018-11-24 13:33:59 +0900 (Sat, 24 Nov 2018) | 4 lines

Make ext/etc/constdefs.h by srcs-ext

Make platform independent header, ext/etc/constdefs.h, by `make
srcs-ext`.
------------------------------------------------------------------------
r65945 | samuel | 2018-11-24 11:31:11 +0900 (Sat, 24 Nov 2018) | 1 line

Fix argument order.
------------------------------------------------------------------------
r65944 | samuel | 2018-11-24 11:31:06 +0900 (Sat, 24 Nov 2018) | 1 line

Enable msys2 to check build status.
------------------------------------------------------------------------
r65943 | k0kubun | 2018-11-24 09:55:26 +0900 (Sat, 24 Nov 2018) | 5 lines

Fix r65926 test_dir.rb for windows (tilde)

[Fix GH-2022]

From: MSP-Greg <greg.mpls@gmail.com>
------------------------------------------------------------------------
r65942 | duerst | 2018-11-24 08:18:47 +0900 (Sat, 24 Nov 2018) | 5 lines

add GraphemeBreakeTests.txt file to UNICODE_PROPERTY_FILES for download

In common.mk, add the file GraphemeBreakeTests.txt to UNICODE_PROPERTY_FILES
to be downloaded. This will be used for automatic tests for /\X/ and
String#each_grapheme_cluster.
------------------------------------------------------------------------
r65941 | svn | 2018-11-24 07:01:38 +0900 (Sat, 24 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65940 | normal | 2018-11-24 07:01:35 +0900 (Sat, 24 Nov 2018) | 9 lines

thread.c (rb_wait_for_single_fd): do not miss IO#close notifications

RUBY_VM_CHECK_INTS_BLOCKING may switch threads and cause `fd'
to be closed.  So we must ensure we register the waiting_fd
before checking for interrupts.

This only affects the ppoll/poll-using implementation of
rb_wait_for_single_fd, as the select-based implementation
already register waiting_fd before checking for interrupts.
------------------------------------------------------------------------
r65939 | normal | 2018-11-24 06:38:41 +0900 (Sat, 24 Nov 2018) | 6 lines

io.c (io_fd_check_closed): prioritize cross-thread "stream closed"

This may fix failures from TestIO#test_recycled_fd_close because
interrupts may be missed due to TOCTOU in other places.

cf. http://ci.rvm.jp/results/trunk-nopara@silicon-docker/1475034
------------------------------------------------------------------------
r65938 | svn | 2018-11-24 03:19:13 +0900 (Sat, 24 Nov 2018) | 1 line

* 2018-11-24
------------------------------------------------------------------------
r65937 | normal | 2018-11-24 03:19:07 +0900 (Sat, 24 Nov 2018) | 22 lines

io.c (fptr_finalize_flush): close race leading to EBADF

The previous ordering was:

a) notify waiting_fd threads of impending close
b) waiting on busy list from a)
c) invalidate fptr->fd
d) calling close()

However, it was possible for a new thread to enter
the waiting_fd list while scheduling on b), leading
to EBADF from those threads when we hit d).

Instead, we now avoid triggering EBADF in other threads by
reordering b) and c)

a) notify waiting_fd threads of impending close
c) invalidate fptr->fd
b) waiting on busy list from a)
d) calling close()

cf. http://ci.rvm.jp/results/trunk-nopara@silicon-docker/1474526
------------------------------------------------------------------------
r65936 | nobu | 2018-11-23 21:12:10 +0900 (Fri, 23 Nov 2018) | 1 line

Ignore more DLEXT files [ci skip]
------------------------------------------------------------------------
r65935 | nobu | 2018-11-23 20:42:50 +0900 (Fri, 23 Nov 2018) | 4 lines

proc.c: [DOC] refine proc-compistion examples [ci skip]

* proc.c: [DOC] refine proc-compistion examples by using same
  Proc/Method and different composition orders.
------------------------------------------------------------------------
r65934 | kazu | 2018-11-23 19:59:59 +0900 (Fri, 23 Nov 2018) | 1 line

test/ruby/test_thread.rb: use safe navigation operator.
------------------------------------------------------------------------
r65933 | duerst | 2018-11-23 15:45:26 +0900 (Fri, 23 Nov 2018) | 6 lines

prepare for Unicode 11.0.0 update

- enc/unicode/case-folding.rb:
  - Convert unpredicted case to actual flag setting
  - Eliminate an unused variable
  - Change a variable name to avoid a warning
------------------------------------------------------------------------
r65932 | nobu | 2018-11-23 10:57:26 +0900 (Fri, 23 Nov 2018) | 1 line

split each assert_nothing_raised
------------------------------------------------------------------------
r65931 | normal | 2018-11-23 07:44:06 +0900 (Fri, 23 Nov 2018) | 10 lines

io.c: revalidate fptr->fd after rb_io_wait_readable

fptr->fd may become -1 while GVL is released in
rb_wait_for_single_fd, so we must check it after reacquiring
GVL.  This should avoid EBADF errors exposed by making pipes
non-blocking by default:

http://ci.rvm.jp/results/trunk-test@ruby-sky3/1473710

[Bug #14968]
------------------------------------------------------------------------
r65930 | svn | 2018-11-23 05:02:39 +0900 (Fri, 23 Nov 2018) | 1 line

* 2018-11-23
------------------------------------------------------------------------
r65929 | normal | 2018-11-23 05:02:36 +0900 (Fri, 23 Nov 2018) | 9 lines

socket: disable nonblocking-by-default on win32

Perhaps this fixes test failures reported by Greg and k0kubun.

However, the failure of certain tests to handle non-blocking I/O
seems to indicate pre-existing problems on win32 platforms.
Somebody knowledgeable about win32 should be able to fix it.

[ruby-core:89973] [ruby-core:89976] [ruby-core:89977] [Bug #14968]
------------------------------------------------------------------------
r65928 | k0kubun | 2018-11-22 22:29:44 +0900 (Thu, 22 Nov 2018) | 3 lines

mjit.c: avoid running copy job handler after ISeq GC

like this http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1471633
------------------------------------------------------------------------
r65927 | naruse | 2018-11-22 20:03:19 +0900 (Thu, 22 Nov 2018) | 3 lines

Wait accept is ready also on Solaris

https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20181121T212405Z.diff.html.gz
------------------------------------------------------------------------
r65926 | naruse | 2018-11-22 19:43:42 +0900 (Thu, 22 Nov 2018) | 6 lines

Use File.expand_path("~username") instead of ENV["HOME"]

File.expand_path("~username") uses getpwnam() independently from
Dir.home. [Bug #15324]

From: Chris Seaton <chris@chrisseaton.com>
------------------------------------------------------------------------
r65925 | normal | 2018-11-22 19:13:21 +0900 (Thu, 22 Nov 2018) | 6 lines

ext/socket/init.c (rsock_socket0): non-blocking for non-SOCK_NONBLOCK

We need to make sockets non-blocking for systems without
SOCK_CLOEXEC/SOCK_NONBLOCK macros at all.

[ruby-core:89965] [Bug #14968]
------------------------------------------------------------------------
r65924 | svn | 2018-11-22 18:18:43 +0900 (Thu, 22 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65923 | nobu | 2018-11-22 18:18:40 +0900 (Thu, 22 Nov 2018) | 4 lines

Revert r63030

* array.c (rb_ary_collect): no longer splat sole array for lambda.
  [ruby-core:89734] [Bug #15285]
------------------------------------------------------------------------
r65922 | normal | 2018-11-22 17:46:51 +0900 (Thu, 22 Nov 2018) | 26 lines

io + socket: make pipes and sockets nonblocking by default

All normal Ruby IO methods (IO#read, IO#gets, IO#write, ...) are
all capable of appearing to be "blocking" when presented with a
file description with the O_NONBLOCK flag set; so there is
little risk of incompatibility within Ruby-using programs.

The biggest compatibility risk is when spawning external
programs.  As a result, stdin, stdout, and stderr are now always
made blocking before exec-family calls.

This change will make an event-oriented MJIT usable if it is
waiting on pipes on POSIX_like platforms.

It is ALSO necessary to take advantage of (proposed lightweight
concurrency (aka "auto-Fiber") or any similar proposal for
network concurrency: https://bugs.ruby-lang.org/issues/13618

Named-pipe (FIFO) are NOT yet non-blocking by default since
they are rarely-used and may introduce compatibility problems
and extra syscall overhead for a common path.

Please revert this commit if there are problems and if I am afk
since I am afk a lot, lately.

[ruby-core:89950] [Bug #14968]
------------------------------------------------------------------------
r65921 | normal | 2018-11-22 17:46:44 +0900 (Thu, 22 Nov 2018) | 3 lines

configure.ac: support 32-bit builds on x86-64 systems

Because RAM is still expensive :<
------------------------------------------------------------------------
r65920 | nobu | 2018-11-22 17:29:02 +0900 (Thu, 22 Nov 2018) | 5 lines

Enable refinements at Object#respond_to?

[Feature #15327] [Fix GH-2020]

From: osyo-manga <manga.osyo@gmail.com>
------------------------------------------------------------------------
r65919 | nobu | 2018-11-22 16:53:07 +0900 (Thu, 22 Nov 2018) | 5 lines

Enable refinements to public_send.

[Feature #15326] [Fix GH-2019]

From: manga_osyo <manga.osyo@gmail.com>
------------------------------------------------------------------------
r65918 | nobu | 2018-11-22 15:09:07 +0900 (Thu, 22 Nov 2018) | 3 lines

mjit_archflag.sh: fix bare word in the header

[ruby-dev:50674] [Bug #15319]
------------------------------------------------------------------------
r65917 | kazu | 2018-11-22 15:08:50 +0900 (Thu, 22 Nov 2018) | 1 line

.gitignore: add mjit_build_dir.c [ci skip]
------------------------------------------------------------------------
r65916 | kazu | 2018-11-22 15:08:49 +0900 (Thu, 22 Nov 2018) | 1 line

.gitignore: add .time under coroutine [ci skip]
------------------------------------------------------------------------
r65915 | kazu | 2018-11-22 15:08:47 +0900 (Thu, 22 Nov 2018) | 3 lines

.gitignore: revert r65834 partially [ci skip]

and exclude under coroutine only.
------------------------------------------------------------------------
r65914 | nobu | 2018-11-22 14:51:43 +0900 (Thu, 22 Nov 2018) | 3 lines

Proc#<< and Proc#>>

[Feature #6284]
------------------------------------------------------------------------
r65913 | nobu | 2018-11-22 14:51:42 +0900 (Thu, 22 Nov 2018) | 15 lines

proc.c: Support any callable when composing Procs

* proc.c (proc_compose): support any object with a call method rather
  than supporting only procs. [Feature #6284]

* proc.c (compose): use the function call on the given object rather
  than rb_proc_call_with_block in order to support any object.

* test/ruby/test_proc.rb: Add test cases for composing Procs with
  callable objects.

* test/ruby/test_method.rb: Add test cases for composing Methods with
  callable objects.

From: Paul Mucur <paul@altmetric.com>
------------------------------------------------------------------------
r65912 | nobu | 2018-11-22 14:51:41 +0900 (Thu, 22 Nov 2018) | 8 lines

proc.c: Implement Method#* for Method composition

* proc.c (rb_method_compose): Implement Method#* for Method composition,
  which delegates to Proc#*.

* test/ruby/test_method.rb: Add test cases for Method composition.

From: Paul Mucur <mudge@mudge.name>
------------------------------------------------------------------------
r65911 | nobu | 2018-11-22 14:51:40 +0900 (Thu, 22 Nov 2018) | 8 lines

proc.c: Implement Proc#* for Proc composition

* proc.c (proc_compose): Implement Proc#* for Proc composition, enabling
  composition of Procs and Methods. [Feature #6284]

* test/ruby/test_proc.rb: Add test cases for Proc composition.

From: Paul Mucur <mudge@mudge.name>
------------------------------------------------------------------------
r65910 | k0kubun | 2018-11-22 12:39:07 +0900 (Thu, 22 Nov 2018) | 5 lines

Revert "test_gem_remote_fetcher.rb: give up testing MJIT here"

This reverts commit d12bcfc186f2aea5e83f2f59716958ea12b5c937.

pause on --jit-wait looks not working... I'll fix that first.
------------------------------------------------------------------------
r65909 | samuel | 2018-11-22 11:17:44 +0900 (Thu, 22 Nov 2018) | 1 line

Use VirtualAlloc/VirtualProtect/VirtualFree for windows stack allocation.
------------------------------------------------------------------------
r65908 | odaira | 2018-11-22 07:44:24 +0900 (Thu, 22 Nov 2018) | 3 lines

* configure.ac: On AIX, LDFLAGS must be after -L../.. in TRY_LINK,
  not to refer to a system-installed libruby-static.a
  when configuring the ext libraries
------------------------------------------------------------------------
r65907 | svn | 2018-11-22 05:39:12 +0900 (Thu, 22 Nov 2018) | 1 line

* 2018-11-22
------------------------------------------------------------------------
r65906 | odaira | 2018-11-22 05:39:09 +0900 (Thu, 22 Nov 2018) | 7 lines

errno.h must be included after config.h because config.h might define
_REENTRANT, _THREAD_SAFE, etc., which affect how errno is defined
on some architectures

* ext/openssl/ossl.h: include errno.h after ruby.h

* include/ruby/io.h: include errno.h after ruby/config.h
------------------------------------------------------------------------
r65905 | k0kubun | 2018-11-21 20:33:25 +0900 (Wed, 21 Nov 2018) | 7 lines

test_gem_remote_fetcher.rb: give up testing MJIT here

because we can't configure timeout for remote fetcher.

We've sometimes hit timeout.
https://app.wercker.com/ruby/ruby/runs/mjit-test2/5bf5213c183106002857d355?step=5bf530de63e94600071b0785
https://app.wercker.com/ruby/ruby/runs/mjit-test2/5be3d719567ae90007681ed6?step=5be43b3887436a0006d00d21
------------------------------------------------------------------------
r65904 | hsbt | 2018-11-21 19:20:47 +0900 (Wed, 21 Nov 2018) | 10 lines

Merge master branch from rubygems/rubygems upstream.

  * Enable Style/MethodDefParentheses in Rubocop
    https://github.com/rubygems/rubygems/pull/2478
  * Enable Style/MultilineIfThen in Rubocop
    https://github.com/rubygems/rubygems/pull/2479
  * Fix required_ruby_version with prereleases and improve error message
    https://github.com/rubygems/rubygems/pull/2344
  * Fix bundler rubygems binstub not properly looking for bundler
    https://github.com/rubygems/rubygems/pull/2426
------------------------------------------------------------------------
r65903 | nobu | 2018-11-21 19:09:21 +0900 (Wed, 21 Nov 2018) | 1 line

Get rid of variable modifiers of BSD make
------------------------------------------------------------------------
r65902 | nobu | 2018-11-21 18:27:47 +0900 (Wed, 21 Nov 2018) | 3 lines

Makefile.in: get rid of `local` for Solaris sh

[ruby-dev:50673] [Bug #15319]
------------------------------------------------------------------------
r65901 | nobu | 2018-11-21 18:11:06 +0900 (Wed, 21 Nov 2018) | 1 line

configure.ac: silence `command -v` outpout
------------------------------------------------------------------------
r65900 | shyouhei | 2018-11-21 17:51:39 +0900 (Wed, 21 Nov 2018) | 7 lines

char is not unsigned

It seems that decades ago, ruby was written under assumption that
char is unsigned.  Which is of course a false assumption.  We
need to explicitly store a numeric value into an unsigned char
variable to tell we expect 0..255 value.

------------------------------------------------------------------------
r65899 | nobu | 2018-11-21 12:26:59 +0900 (Wed, 21 Nov 2018) | 4 lines

configure.ac: add --disable-fiber-coroutine option

* configure.ac: add --disable-fiber-coroutine option, and disable
  it on x86-mingw32 for now.
------------------------------------------------------------------------
r65898 | nobu | 2018-11-21 12:26:58 +0900 (Wed, 21 Nov 2018) | 1 line

configure.ac: gather preset variables on mingw
------------------------------------------------------------------------
r65897 | naruse | 2018-11-21 07:40:21 +0900 (Wed, 21 Nov 2018) | 4 lines

Show function name based on dladdr

If there's no dwarf and symbol table, this will be a last resort.
(mainly on macOS)
------------------------------------------------------------------------
r65896 | naruse | 2018-11-21 07:40:20 +0900 (Wed, 21 Nov 2018) | 1 line

Support Universal Binary for macOS
------------------------------------------------------------------------
r65895 | samuel | 2018-11-21 05:09:38 +0900 (Wed, 21 Nov 2018) | 1 line

Fix indentation.
------------------------------------------------------------------------
r65894 | svn | 2018-11-21 00:46:11 +0900 (Wed, 21 Nov 2018) | 1 line

* 2018-11-21
------------------------------------------------------------------------
r65893 | k0kubun | 2018-11-21 00:46:09 +0900 (Wed, 21 Nov 2018) | 4 lines

Skip known MJIT random test failures

Let me silence this until I have time to work on them, and make the CI
usable for testing other features.
------------------------------------------------------------------------
r65892 | k0kubun | 2018-11-20 23:40:55 +0900 (Tue, 20 Nov 2018) | 13 lines

configure.ac: disable native-fiber for MinGW

because it had already been SEGV-ed in pull request'S CI
https://ci.appveyor.com/project/ruby/ruby/builds/20427065/job/32oahrcd58b8ubb1
and has never worked on trunk either.

Please make sure it does not SEGVs on your MinGW environment or pull
request before enabling native fiber on MinGW.

appveyor.yml: reverted commits to make CI green with native fiber
test/excludes/_appveyor/msys2/TestArray.rb: ditto
test/excludes/_appveyor/msys2/TestEnumerable.rb: ditto
test/excludes/_appveyor/vs/TestArray.rb: ditto
------------------------------------------------------------------------
r65891 | k0kubun | 2018-11-20 23:13:12 +0900 (Tue, 20 Nov 2018) | 5 lines

appveyor.yml: do not undefine everything [ci skip]

https://ci.appveyor.com/project/ruby/ruby/builds/20432223/job/yhwbku8dg2s40e9e
C:/projects/ruby/test/lib/test/unit.rb:1004: warning: undefining `object_id' may cause serious problems
C:/projects/ruby/test/lib/test/unit.rb:1004: warning: undefining `__send__' may cause serious problems
------------------------------------------------------------------------
r65890 | svn | 2018-11-20 22:39:51 +0900 (Tue, 20 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65889 | k0kubun | 2018-11-20 22:39:50 +0900 (Tue, 20 Nov 2018) | 4 lines

appveyor.yml: exclude TestEnumerable.rb on msys2

because it SEGVs on setup like:
https://ci.appveyor.com/project/ruby/ruby/builds/20431217/job/97no5h1gqv50k1vf
------------------------------------------------------------------------
r65888 | k0kubun | 2018-11-20 21:59:32 +0900 (Tue, 20 Nov 2018) | 7 lines

appveyor.yml: native-fiber crashes Enumerator

test on MinGW.
https://ci.appveyor.com/project/ruby/ruby/builds/20427662/job/tnnw50opqtj6x0xq
https://ci.appveyor.com/project/ruby/ruby/builds/20429129/job/dpgbx5atkxjiwh7q

To investigate issues, let's try running this without -j.
------------------------------------------------------------------------
r65887 | nobu | 2018-11-20 21:02:29 +0900 (Tue, 20 Nov 2018) | 1 line

Make coroutine object directory for each arch
------------------------------------------------------------------------
r65886 | k0kubun | 2018-11-20 21:01:18 +0900 (Tue, 20 Nov 2018) | 1 line

test/excludes/_appveyor: exclude AppVeyor killer
------------------------------------------------------------------------
r65885 | nobu | 2018-11-20 20:45:13 +0900 (Tue, 20 Nov 2018) | 4 lines

Change ASMEXT to s

By the default of GNU make, .S is used to be compiled with CC, but
we have already used .s as ia64.s, and now coroutine/*/Context.s.
------------------------------------------------------------------------
r65884 | k0kubun | 2018-11-20 20:24:30 +0900 (Tue, 20 Nov 2018) | 5 lines

Makefile.in: fix Travis i686 build

by r65880

https://travis-ci.org/ruby/ruby/jobs/457384539
------------------------------------------------------------------------
r65883 | k0kubun | 2018-11-20 20:18:59 +0900 (Tue, 20 Nov 2018) | 4 lines

mjit_worker.c: avoid GC when modifying ISeq

This is hoped to fix the SEGV:
https://app.wercker.com/ruby/ruby/runs/mjit-test1/5bf392cf183106002856c1f0?step=5bf3bddc87436a0006292535
------------------------------------------------------------------------
r65882 | nobu | 2018-11-20 19:51:27 +0900 (Tue, 20 Nov 2018) | 4 lines

Fix condition

FIBER_USE_NATIVE is always defined as 0 or 1, use `#if` instead of
`#ifdef`.
------------------------------------------------------------------------
r65881 | nobu | 2018-11-20 19:43:41 +0900 (Tue, 20 Nov 2018) | 1 line

Make fiber_entry static
------------------------------------------------------------------------
r65880 | nobu | 2018-11-20 19:29:03 +0900 (Tue, 20 Nov 2018) | 6 lines

Fix typo and make directory

* common.mk (coroutine/amd64/Context.$(OBJEXT)): fix a typo,
  $(OBJECT).

* common.mk (coroutine/amd64): recipe to make object directory.
------------------------------------------------------------------------
r65879 | samuel | 2018-11-20 19:18:25 +0900 (Tue, 20 Nov 2018) | 1 line

Support Visual C++ (mswin)
------------------------------------------------------------------------
r65878 | samuel | 2018-11-20 19:18:21 +0900 (Tue, 20 Nov 2018) | 1 line

Fix windows builds.
------------------------------------------------------------------------
r65877 | svn | 2018-11-20 19:18:17 +0900 (Tue, 20 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65876 | samuel | 2018-11-20 19:18:16 +0900 (Tue, 20 Nov 2018) | 1 line

GAS style assembly for win64 (mingw).
------------------------------------------------------------------------
r65875 | samuel | 2018-11-20 19:18:12 +0900 (Tue, 20 Nov 2018) | 1 line

Expose stack functions to coroutine and non-windows implementations.
------------------------------------------------------------------------
r65874 | samuel | 2018-11-20 19:18:08 +0900 (Tue, 20 Nov 2018) | 1 line

Fix exposure of stack allocations.
------------------------------------------------------------------------
r65873 | samuel | 2018-11-20 19:18:04 +0900 (Tue, 20 Nov 2018) | 1 line

Use malloc/free for windows stack allocation.
------------------------------------------------------------------------
r65872 | samuel | 2018-11-20 19:18:01 +0900 (Tue, 20 Nov 2018) | 1 line

Fix struct usage.
------------------------------------------------------------------------
r65871 | samuel | 2018-11-20 19:17:56 +0900 (Tue, 20 Nov 2018) | 1 line

Fix message result.
------------------------------------------------------------------------
r65870 | samuel | 2018-11-20 19:17:52 +0900 (Tue, 20 Nov 2018) | 1 line

Fix configure.ac typo.
------------------------------------------------------------------------
r65869 | samuel | 2018-11-20 19:17:49 +0900 (Tue, 20 Nov 2018) | 1 line

Fix line endings.
------------------------------------------------------------------------
r65868 | samuel | 2018-11-20 19:17:44 +0900 (Tue, 20 Nov 2018) | 1 line

Initial support for x64-mingw32
------------------------------------------------------------------------
r65867 | samuel | 2018-11-20 19:17:39 +0900 (Tue, 20 Nov 2018) | 1 line

Better (?) support for Windows TIB.
------------------------------------------------------------------------
r65866 | samuel | 2018-11-20 19:17:35 +0900 (Tue, 20 Nov 2018) | 1 line

Be even more specific, for some reason it was selecting amd64 on x64-mingw32.
------------------------------------------------------------------------
r65865 | samuel | 2018-11-20 19:17:31 +0900 (Tue, 20 Nov 2018) | 1 line

Limit coroutine implementations to Linux.
------------------------------------------------------------------------
r65864 | samuel | 2018-11-20 19:17:27 +0900 (Tue, 20 Nov 2018) | 1 line

Tidy up assembly make rule.
------------------------------------------------------------------------
r65863 | samuel | 2018-11-20 19:17:24 +0900 (Tue, 20 Nov 2018) | 1 line

Expose dependency between cont.c and coroutine implementation.
------------------------------------------------------------------------
r65862 | svn | 2018-11-20 19:17:19 +0900 (Tue, 20 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65861 | samuel | 2018-11-20 19:17:17 +0900 (Tue, 20 Nov 2018) | 1 line

Prefer "static inline" to avoid duplicate symbols.
------------------------------------------------------------------------
r65860 | samuel | 2018-11-20 19:17:12 +0900 (Tue, 20 Nov 2018) | 1 line

Remove trailing whitespace.
------------------------------------------------------------------------
r65859 | samuel | 2018-11-20 19:17:08 +0900 (Tue, 20 Nov 2018) | 1 line

Rename fiber chain benchmark.
------------------------------------------------------------------------
r65858 | samuel | 2018-11-20 19:17:04 +0900 (Tue, 20 Nov 2018) | 1 line

Restore native non-coroutine code path.
------------------------------------------------------------------------
r65857 | samuel | 2018-11-20 19:17:00 +0900 (Tue, 20 Nov 2018) | 1 line

Formatting changes.
------------------------------------------------------------------------
r65856 | samuel | 2018-11-20 19:16:54 +0900 (Tue, 20 Nov 2018) | 1 line

Ensure start function has correct declaration.
------------------------------------------------------------------------
r65855 | samuel | 2018-11-20 19:16:49 +0900 (Tue, 20 Nov 2018) | 1 line

Try using compiler for assembling.
------------------------------------------------------------------------
r65854 | samuel | 2018-11-20 19:16:45 +0900 (Tue, 20 Nov 2018) | 1 line

Print out what the assembler is doing to figure out why it's not working.
------------------------------------------------------------------------
r65853 | samuel | 2018-11-20 19:16:41 +0900 (Tue, 20 Nov 2018) | 1 line

Mark COROUTINE as noreturn.
------------------------------------------------------------------------
r65852 | svn | 2018-11-20 19:16:35 +0900 (Tue, 20 Nov 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r65851 | samuel | 2018-11-20 19:16:34 +0900 (Tue, 20 Nov 2018) | 1 line

Remove `Benchmark` times.
------------------------------------------------------------------------
r65850 | samuel | 2018-11-20 19:16:29 +0900 (Tue, 20 Nov 2018) | 1 line

Tidy up comments.
------------------------------------------------------------------------
r65849 | svn | 2018-11-20 19:14:03 +0900 (Tue, 20 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65848 | svn | 2018-11-20 19:14:03 +0900 (Tue, 20 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65847 | samuel | 2018-11-20 19:13:59 +0900 (Tue, 20 Nov 2018) | 1 line

Initial effort to support 32-bit Linux.
------------------------------------------------------------------------
r65846 | samuel | 2018-11-20 19:13:55 +0900 (Tue, 20 Nov 2018) | 1 line

It cannot be const because it is being passed to destructive operation (destroy).
------------------------------------------------------------------------
r65845 | samuel | 2018-11-20 19:13:51 +0900 (Tue, 20 Nov 2018) | 1 line

Better benchmark name.
------------------------------------------------------------------------
r65844 | svn | 2018-11-20 19:09:55 +0900 (Tue, 20 Nov 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r65843 | samuel | 2018-11-20 19:09:53 +0900 (Tue, 20 Nov 2018) | 1 line

Fix broken benchmark
------------------------------------------------------------------------
r65842 | svn | 2018-11-20 19:06:59 +0900 (Tue, 20 Nov 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r65841 | samuel | 2018-11-20 19:06:58 +0900 (Tue, 20 Nov 2018) | 1 line

Fix code climate cognitive complexity issue
------------------------------------------------------------------------
r65840 | samuel | 2018-11-20 19:06:54 +0900 (Tue, 20 Nov 2018) | 1 line

Create output directory when assembling file
------------------------------------------------------------------------
r65839 | samuel | 2018-11-20 18:59:23 +0900 (Tue, 20 Nov 2018) | 1 line

Restore return value assignment
------------------------------------------------------------------------
r65838 | svn | 2018-11-20 18:59:20 +0900 (Tue, 20 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65837 | svn | 2018-11-20 18:59:19 +0900 (Tue, 20 Nov 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r65836 | samuel | 2018-11-20 18:59:18 +0900 (Tue, 20 Nov 2018) | 1 line

Rewrite fiber benchmark
------------------------------------------------------------------------
r65835 | samuel | 2018-11-20 18:59:14 +0900 (Tue, 20 Nov 2018) | 1 line

Better support for amd64 platforms
------------------------------------------------------------------------
r65834 | samuel | 2018-11-20 18:59:10 +0900 (Tue, 20 Nov 2018) | 1 line

Native implementation of coroutines to improve performance of fibers
------------------------------------------------------------------------
r65833 | nobu | 2018-11-20 18:29:37 +0900 (Tue, 20 Nov 2018) | 1 line

common.mk: BTESTS to direct tests by btest
------------------------------------------------------------------------
r65832 | normal | 2018-11-20 16:27:28 +0900 (Tue, 20 Nov 2018) | 6 lines

thread_pthread.c (rb_reserved_fd_p): false-positive on negative FD

Negative-numbered FDs are never valid FDs on POSIX-like
platforms, and we initialize our self-pipes/eventfd values
to "-1", so stop treating -1 as a reserved FD if our system
is too low on resources to allocate FDs at startup.
------------------------------------------------------------------------
r65831 | nobu | 2018-11-20 15:13:42 +0900 (Tue, 20 Nov 2018) | 1 line

run single test [ci skip]
------------------------------------------------------------------------
r65830 | shyouhei | 2018-11-20 14:58:12 +0900 (Tue, 20 Nov 2018) | 2 lines

vm_insnhelper.c: fix indent [ci skip]

------------------------------------------------------------------------
r65829 | usa | 2018-11-20 14:18:28 +0900 (Tue, 20 Nov 2018) | 2 lines

Simply treat IO::WaitReadable just like Errno::EAGAIN

------------------------------------------------------------------------
r65828 | shyouhei | 2018-11-20 13:51:09 +0900 (Tue, 20 Nov 2018) | 14 lines

vm_insnhelper.c: recv -1 + 3 overflows

Here, recv can be INT2FIX(-1), which is 0xFFFF_FFFFul.
INT2FIX(1) is 3ul.  So `recv - 1 + INT2FIX(1)` is:

recv              0xFFFF_FFFFul
recv-1            0xFFFF_FFFEul (note: unsigned)
recv-1+INT2FIX(1) 0x0000_0001ul Here is the overflow.

Given recv is a Fixnum, it can never be 0xFFFF_FFFD.  0xFFFF_FFFF is
the only value that can overflow this way, so special-casing this
value should just suffice.


------------------------------------------------------------------------
r65827 | shugo | 2018-11-20 12:56:51 +0900 (Tue, 20 Nov 2018) | 15 lines

revert r65822

Because mon_initialized may be used to re-initialize copied objects intentionally.

mon_initialize_spec.rb fails:

1)
MonitorMixin#mon_initialize can be called in initialize_copy to get a new Mutex and used with synchronize ERROR
ThreadError: already initialized
/home/shugo/src/ruby/lib/monitor.rb:255:in `mon_initialize'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:19:in `initialize_copy'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:28:in `initialize_dup'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:28:in `dup'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:28:in `block (2 levels) in <top (required)>'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:4:in `<top (required)>'
------------------------------------------------------------------------
r65826 | nobu | 2018-11-20 12:07:46 +0900 (Tue, 20 Nov 2018) | 1 line

rdoc query
------------------------------------------------------------------------
r65825 | kazu | 2018-11-20 12:03:02 +0900 (Tue, 20 Nov 2018) | 1 line

mjit.c: fix typos [ci skip]
------------------------------------------------------------------------
r65824 | kazu | 2018-11-20 12:03:01 +0900 (Tue, 20 Nov 2018) | 1 line

Remove unnecessary space
------------------------------------------------------------------------
r65823 | svn | 2018-11-20 12:01:57 +0900 (Tue, 20 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65822 | shugo | 2018-11-20 12:01:55 +0900 (Tue, 20 Nov 2018) | 3 lines

lib/monitor.rb: prevent to initialize MonitorMixin twice

Suggested by Benoit Daloze.  [ruby-core:88504] [Feature #15000]
------------------------------------------------------------------------
r65821 | k0kubun | 2018-11-20 11:16:30 +0900 (Tue, 20 Nov 2018) | 5 lines

revert r65820 and retry assert_finish

From: MSP-Greg <greg.mpls@gmail.com>

https://github.com/ruby/ruby/commit/5187ea768f57315e61486122d688f1992d4cb21f
------------------------------------------------------------------------
r65820 | k0kubun | 2018-11-20 10:28:43 +0900 (Tue, 20 Nov 2018) | 7 lines

test_thread.rb: skip test_thread.rb broken for Windows

msys2.

https://ci.appveyor.com/project/ruby/ruby/builds/20419607/job/fuvrfcmrhxr1r1cr
https://ci.appveyor.com/project/ruby/ruby/builds/20395349/job/2nqewb06b5eanwea
https://ci.appveyor.com/project/ruby/ruby/builds/20382452/job/658pvl1cqolyrixm
------------------------------------------------------------------------
r65819 | nobu | 2018-11-20 09:39:07 +0900 (Tue, 20 Nov 2018) | 4 lines

Check -fcf-protection

* configure.ac: Check if CFLAGS actually includes -fcf-protection
  instead of checking if the flag is valid by RUBY_TRY_CFLAGS.
------------------------------------------------------------------------
r65818 | k0kubun | 2018-11-20 09:07:36 +0900 (Tue, 20 Nov 2018) | 1 line

thread.c: fix obsoleted comment [ci skip]
------------------------------------------------------------------------
r65817 | k0kubun | 2018-11-20 09:04:19 +0900 (Tue, 20 Nov 2018) | 5 lines

process.c: do not try to pause MJIT

while child handler is disabled.

trying to fix [Bug #15320]
------------------------------------------------------------------------
r65816 | k0kubun | 2018-11-20 08:28:30 +0900 (Tue, 20 Nov 2018) | 4 lines

test_process.rb: Process.daemon seems irrelevant [ci skip]

in the backtrace:
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1468677
------------------------------------------------------------------------
r65815 | k0kubun | 2018-11-20 08:05:11 +0900 (Tue, 20 Nov 2018) | 5 lines

configure.ac: avoid crashing MJIT with -fcf-protection

by avoiding using __builtin_longjmp, like r64983.

[Bug #15307]
------------------------------------------------------------------------
r65814 | k0kubun | 2018-11-20 07:10:12 +0900 (Tue, 20 Nov 2018) | 6 lines

revert r65807

it didn't work.
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1468677

and skips broken tests for now. But this issue should be fixed soon.
------------------------------------------------------------------------
r65813 | svn | 2018-11-20 00:00:37 +0900 (Tue, 20 Nov 2018) | 1 line

* 2018-11-20
------------------------------------------------------------------------
r65812 | nobu | 2018-11-20 00:00:35 +0900 (Tue, 20 Nov 2018) | 4 lines

ruby/ruby.h: void rb_scan_args_verify

* include/ruby/ruby.h (rb_scan_args_verify): void the never used
  result.
------------------------------------------------------------------------
r65811 | k0kubun | 2018-11-19 23:21:55 +0900 (Mon, 19 Nov 2018) | 4 lines

appveyor.yml: separately execute test_bignum

because that may crash worker with -j.
https://ci.appveyor.com/project/ruby/ruby/builds/20403179/job/mkdcb6uy8qn2djgl
------------------------------------------------------------------------
r65810 | k0kubun | 2018-11-19 23:00:49 +0900 (Mon, 19 Nov 2018) | 8 lines

ruby.c: do not surface MJIT to user

In some places, both JIT and MJIT are being used, but it could be
confusing for new comers. We're not explaining MJIT on NEWS file or release
notes as well. So we consider MJIT as an internal term of implementation
like YARV.

configure.ac: ditto
------------------------------------------------------------------------
r65809 | k0kubun | 2018-11-19 22:48:07 +0900 (Mon, 19 Nov 2018) | 1 line

internal.h: resurrect --disable-mjit-support
------------------------------------------------------------------------
r65808 | nobu | 2018-11-19 22:43:44 +0900 (Mon, 19 Nov 2018) | 6 lines

fix for Solaris sh

* Makefile.in (mjit_config.h): removed unnecessary assignment.

* tool/mjit_archflag.sh (define_arch_flags): need to quote on
  Solaris.  [ruby-dev:50669] [Bug #15319]
------------------------------------------------------------------------
r65807 | k0kubun | 2018-11-19 22:33:07 +0900 (Mon, 19 Nov 2018) | 7 lines

process.c: do not run signal handler before fork

to prevent from proceeding one for MJIT while it's not safe yet.
By that situation, MJIT worker could be waiting for compiler process forever
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1468033

[Bug #15320]
------------------------------------------------------------------------
r65806 | nobu | 2018-11-19 22:21:48 +0900 (Mon, 19 Nov 2018) | 4 lines

configure.ac: rename extra_warning as extra_warnflags

Adjusted to warnflags variable.  This variable will have flags for
warnings, but not a warning itself.
------------------------------------------------------------------------
r65805 | nobu | 2018-11-19 19:15:20 +0900 (Mon, 19 Nov 2018) | 1 line

configure.ac: respect extra_warnflags if given
------------------------------------------------------------------------
r65804 | shyouhei | 2018-11-19 18:52:46 +0900 (Mon, 19 Nov 2018) | 5 lines

string.c: setbyte silently ignores upper bits

The behaviour of String#setbyte has been depending on the width
of int, which is not portable.  Must check explicitly.

------------------------------------------------------------------------
r65803 | nobu | 2018-11-19 18:42:10 +0900 (Mon, 19 Nov 2018) | 1 line

.travis.yml: do not pass unnecessary warnflags
------------------------------------------------------------------------
r65802 | shyouhei | 2018-11-19 17:10:48 +0900 (Mon, 19 Nov 2018) | 6 lines

io.c: ungetbyte silently ignores upper bits

The behaviour of IO#ungetbyte has been depending on the width of
Fixnums.  Fixnums should be invisible nowadays.  It must be a
bug. Fix [Bug #14359]

------------------------------------------------------------------------
r65801 | nobu | 2018-11-19 16:00:12 +0900 (Mon, 19 Nov 2018) | 5 lines

_colorize_result_prepare.m4: do not save CONFIGURE_TTY

redirection to a tty, file or pipe is not a permanent status.
`rb_cv_` prefix means that it should be saved/restored across
re-configurations.
------------------------------------------------------------------------
r65800 | nobu | 2018-11-19 15:52:55 +0900 (Mon, 19 Nov 2018) | 1 line

Makefile.in: reconfig with the original warnflags
------------------------------------------------------------------------
r65799 | nobu | 2018-11-19 15:52:54 +0900 (Mon, 19 Nov 2018) | 4 lines

.travis.yml: use dedicated flags

* .travis.yml: use dedicated flags, cflags and others, not to
  override optflags, warnflags and debugflags.
------------------------------------------------------------------------
r65798 | shyouhei | 2018-11-19 15:48:09 +0900 (Mon, 19 Nov 2018) | 7 lines

array.c: avoid (VALUE)--

This args[1]-- overflows when it is zero.  Should do that only
when we can say it is nonzero.



------------------------------------------------------------------------
r65797 | shyouhei | 2018-11-19 14:04:02 +0900 (Mon, 19 Nov 2018) | 2 lines

.travis.yml: -Wno-unknown-warning-option is needed, too.

------------------------------------------------------------------------
r65796 | shyouhei | 2018-11-19 12:08:32 +0900 (Mon, 19 Nov 2018) | 5 lines

.travis.yml: extra CFLAGS to suppress warnings

When CFLAGS is passed on travis, warnflags seems not working.
Let's add them directly to prevent clang form messing up the logs.

------------------------------------------------------------------------
r65795 | shyouhei | 2018-11-19 12:01:55 +0900 (Mon, 19 Nov 2018) | 5 lines

-Wno-unused-value [ci skip]

Without this option clang outputs tons of warnings, which
are annoying. See https://travis-ci.org/ruby/ruby/jobs/456553420#L1817

------------------------------------------------------------------------
r65794 | shyouhei | 2018-11-19 11:58:51 +0900 (Mon, 19 Nov 2018) | 4 lines

sort lines [ci skip]

... for aethetic reasons.

------------------------------------------------------------------------
r65793 | svn | 2018-11-19 08:29:42 +0900 (Mon, 19 Nov 2018) | 1 line

* 2018-11-19
------------------------------------------------------------------------
r65792 | nobu | 2018-11-19 08:29:41 +0900 (Mon, 19 Nov 2018) | 1 line

Also clean ruby-runner.o and ruby.imp [ci skip]
------------------------------------------------------------------------
r65791 | nobu | 2018-11-19 08:29:40 +0900 (Mon, 19 Nov 2018) | 3 lines

update-deps: fix runtime error [ci skip]

* tool/update-deps (init_global): environment strings are frozen.
------------------------------------------------------------------------
r65790 | k0kubun | 2018-11-18 22:32:49 +0900 (Sun, 18 Nov 2018) | 14 lines

mjit.c: fix deadlock introduced by r65785

in mjit_pause() fired by before_fork_ruby(). When calling
RUBY_VM_CHECK_INTS() in mjit_pause()'s loop, other threads may call
start_worker() which sets `stop_worker_p = FALSE` and it could wait for
MJIT worker stop forever even while `stop_worker_p` is FALSE.

http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1466333
https://gist.github.com/ko1/a57ef1a03e1c7cfd22f1495e0864b63d

http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1466335
https://gist.github.com/ko1/96e867e36e6b75559b3d926f8c0bdaeb

https://app.wercker.com/ruby/ruby/runs/mjit-test1/5bf1221c183106002855989c?step=5bf1225987436a0006192c31
------------------------------------------------------------------------
r65789 | k0kubun | 2018-11-18 18:32:29 +0900 (Sun, 18 Nov 2018) | 4 lines

wercker.yml: debug problematic test on test-all

Some test seems to hang
https://app.wercker.com/ruby/ruby/runs/mjit-test1/5bf1221c183106002855989c?step=5bf1225987436a0006192c31
------------------------------------------------------------------------
r65788 | k0kubun | 2018-11-18 18:22:48 +0900 (Sun, 18 Nov 2018) | 4 lines

test_jit.rb: loosen output check

for interleaving between processes
https://gist.github.com/ko1/ace0374825377b41628d4590b7377601
------------------------------------------------------------------------
r65787 | k0kubun | 2018-11-18 17:44:16 +0900 (Sun, 18 Nov 2018) | 4 lines

test_jit.rb: dump information to debug test failure

debugging
http://ci.rvm.jp/results/trunk-vm-asserts@silicon-docker/1466123
------------------------------------------------------------------------
r65786 | svn | 2018-11-18 17:25:54 +0900 (Sun, 18 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65785 | k0kubun | 2018-11-18 17:25:48 +0900 (Sun, 18 Nov 2018) | 5 lines

mjit_worker.c: support MJIT in forked Ruby process

by launching MJIT worker thread in child Ruby process.

See the comment before `mjit_child_after_fork` for details.
------------------------------------------------------------------------
r65784 | k0kubun | 2018-11-18 17:23:05 +0900 (Sun, 18 Nov 2018) | 1 line

thread.c: rb_fiber_atfork has nothing to do with mjit.c [ci skip]
------------------------------------------------------------------------
r65783 | k0kubun | 2018-11-18 17:22:46 +0900 (Sun, 18 Nov 2018) | 1 line

mjit_worker.c: fix typo [ci skip]
------------------------------------------------------------------------
r65782 | k0kubun | 2018-11-18 17:22:30 +0900 (Sun, 18 Nov 2018) | 3 lines

test_jit.rb: fix typo [ci skip]

we don't have such VM register
------------------------------------------------------------------------
r65781 | normal | 2018-11-18 13:34:52 +0900 (Sun, 18 Nov 2018) | 5 lines

vm_trace.c (rb_postponed_job_flush): use rb_atomic_t for mask

ec->interrupt_mask will remain rb_atomic_t and is 32-bit on some
64-bit systems while "unsigned long" is 64-bits.  So avoid
mismatching lengths and stick to rb_atomic_t.
------------------------------------------------------------------------
r65780 | nobu | 2018-11-18 13:21:52 +0900 (Sun, 18 Nov 2018) | 1 line

common.mk: dependency of io.c for r65779
------------------------------------------------------------------------
r65779 | normal | 2018-11-18 12:37:04 +0900 (Sun, 18 Nov 2018) | 3 lines

io.c: include vm_core.h for VM_UNREACHABLE

Thanks to Greg L <greg.mpls@gmail.com> for the report
------------------------------------------------------------------------
r65778 | svn | 2018-11-18 10:37:46 +0900 (Sun, 18 Nov 2018) | 1 line

* 2018-11-18
------------------------------------------------------------------------
r65777 | normal | 2018-11-18 10:37:46 +0900 (Sun, 18 Nov 2018) | 4 lines

io.c (novl_wait_for_single_fd): VM_UNREACHABLE instead of assert

This respects VM_CHECK_MODE and is more consistent with
the rest of our code.
------------------------------------------------------------------------
r65776 | svn | 2018-11-18 10:37:45 +0900 (Sun, 18 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65775 | normal | 2018-11-18 10:37:41 +0900 (Sun, 18 Nov 2018) | 6 lines

vm_core.h (rb_thread_set_current*): convert to static inline

We already use "static inline" heavily and there should be no
penalty for modern compilers; this adds type-checking, too.

This will make future changes easier-to-review.
------------------------------------------------------------------------
r65774 | nobu | 2018-11-17 10:42:30 +0900 (Sat, 17 Nov 2018) | 1 line

test/mkmf/base.rb: use CC_WRAPPER same as the toplevel
------------------------------------------------------------------------
r65773 | nobu | 2018-11-17 10:21:18 +0900 (Sat, 17 Nov 2018) | 1 line

[DOC] rational and imaginary literals [ci skip]
------------------------------------------------------------------------
r65772 | svn | 2018-11-17 08:27:38 +0900 (Sat, 17 Nov 2018) | 1 line

* 2018-11-17
------------------------------------------------------------------------
r65771 | svn | 2018-11-17 08:27:38 +0900 (Sat, 17 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65770 | hsbt | 2018-11-17 08:27:37 +0900 (Sat, 17 Nov 2018) | 3 lines

Switch to 2-0-stable branch of bundler/bundler repository from our fork repository.

  https://github.com/bundler/bundler/tree/2-0-stable
------------------------------------------------------------------------
r65769 | nobu | 2018-11-16 21:11:23 +0900 (Fri, 16 Nov 2018) | 3 lines

Makefile.in: test-almost also needs mjit_build_dir.so

[ruby-core:89830] [Bug #15311]
------------------------------------------------------------------------
r65768 | shyouhei | 2018-11-16 18:04:34 +0900 (Fri, 16 Nov 2018) | 13 lines

pack.c: cast from double to float can be undefined

Generally speaking, a value of double is not always representable
when demoted to a float. ISO C defines what to do when such
conversion loses precision, but leaves it undefined when the
value is completely out of range. (cf: ISO/IEC 9899:1990 section
6.2.1.4).

Because ruby do not have half-precision floating-point types this
is not a frequent headache but for pack / unpack, there are
specifiers that has something to do with C float types.  We have
to explicitly care these situations.

------------------------------------------------------------------------
r65767 | nobu | 2018-11-16 16:08:58 +0900 (Fri, 16 Nov 2018) | 1 line

common.mk: hack to export symbols for MJIT in ruby.imp
------------------------------------------------------------------------
r65766 | k0kubun | 2018-11-16 15:52:12 +0900 (Fri, 16 Nov 2018) | 6 lines

test/excludes/_wercker: remove obsoleted pipeline name

from excludes directory names. test-mjit-wait / test-mjit are combined
and distributed as mjit-test1 and mjit-test2 now.

So the subdirectory names are changed to option names, --jit and --jit-wait.
------------------------------------------------------------------------
r65765 | nobu | 2018-11-16 15:52:01 +0900 (Fri, 16 Nov 2018) | 4 lines

common.mk: fix the pattern to be hidden

* common.mk (ruby.imp): consider symbol prefix, remove InitVM, and
  fix internal symbols start with a dot.
------------------------------------------------------------------------
r65764 | nobu | 2018-11-16 15:52:00 +0900 (Fri, 16 Nov 2018) | 1 line

Make some internal functions static
------------------------------------------------------------------------
r65763 | nobu | 2018-11-16 15:51:57 +0900 (Fri, 16 Nov 2018) | 1 line

Prefix rb_ec_set_vm_stack
------------------------------------------------------------------------
r65762 | k0kubun | 2018-11-16 15:47:37 +0900 (Fri, 16 Nov 2018) | 3 lines

appveyor.yml: skip reverting comment improvement [ci skip]

This part was not intended in r65760
------------------------------------------------------------------------
r65761 | svn | 2018-11-16 15:45:17 +0900 (Fri, 16 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65760 | k0kubun | 2018-11-16 15:45:16 +0900 (Fri, 16 Nov 2018) | 6 lines

appveyor.yml: give up running test_push_over_ary_max

because separately running it without -j didn't work.

Revert "appveyor.yml: run memory-exchausting test separately"
This reverts commit r65703.
------------------------------------------------------------------------
r65759 | nobu | 2018-11-16 13:32:48 +0900 (Fri, 16 Nov 2018) | 4 lines

[DOC] mention class method `new` [ci skip]

* NEWS: mention `new` class methods, instead of `initialize`
  insetance methods whic are not called by users directly.
------------------------------------------------------------------------
r65758 | k0kubun | 2018-11-16 13:25:07 +0900 (Fri, 16 Nov 2018) | 5 lines

[doc] Fix grammar typo in Pty_init() docstring [ci skip]

[Fix GH-2014]

From: Olle Jonsson <olle.jonsson@gmail.com>
------------------------------------------------------------------------
r65757 | k0kubun | 2018-11-16 13:21:57 +0900 (Fri, 16 Nov 2018) | 6 lines

Test for undef'ed method in class hierachy

This probably should have been `#bar` on the instance of class `Undef2` all along
[Fix GH-2015]

From: Alex Snaps <alex.snaps@gmail.com>
------------------------------------------------------------------------
r65756 | shyouhei | 2018-11-16 13:05:53 +0900 (Fri, 16 Nov 2018) | 4 lines

numeric.c: avoid division by zero

Forgot to add in r65751.

------------------------------------------------------------------------
r65755 | shyouhei | 2018-11-16 12:34:53 +0900 (Fri, 16 Nov 2018) | 4 lines

bignum.c: fix bug in big2dbl()

I was wrong at r65753.

------------------------------------------------------------------------
r65754 | shyouhei | 2018-11-16 12:09:00 +0900 (Fri, 16 Nov 2018) | 2 lines

bignum.c: avoid (size_t)--

------------------------------------------------------------------------
r65753 | shyouhei | 2018-11-16 11:59:30 +0900 (Fri, 16 Nov 2018) | 7 lines

bignum.c: BDIGIT might or might not integer-promote

BDIGIT can be unsigned int or unsigned short, depending on BDIGIT_DBL.
Given that, unsigned int and unsigned short are different in how
integer promotion works.  BOGLO assumes its argument is wider than
BDIGIT, which is not always true.  We have to force that explicitly.

------------------------------------------------------------------------
r65752 | shyouhei | 2018-11-16 11:34:00 +0900 (Fri, 16 Nov 2018) | 18 lines

enc/unicode.c: 'a' is bigger than 'A'

In ASCII, 'a' is bigger than 'A'. Which means 'A' - 'a' is a negative
number (-32, to be precise). In C, the type of 'a' and 'A' are signed
int (cf: ISO/IEC 9899:1990 section 6.1.3.4). So 'A' - 'a' is also a
signed int. It is `(signed int)-32`.

The problem is, OnigCodePoint is unsigned int. Adding a negative
number to a variable of OnigCodepoint (`code` here) introduces an
unintentional cast of `(unsigned)(signed)-32`, which is
4,294,967,264. Adding this value to code then overflows, and the
result eventually becomes normal codepoint.

The series of operations are not a serious problem but because
`code >= 'a'` holds, we can `(code - 'a') + 'A'` to reroute this.

See also: https://github.com/k-takata/Onigmo/pull/107

------------------------------------------------------------------------
r65751 | shyouhei | 2018-11-16 10:52:39 +0900 (Fri, 16 Nov 2018) | 11 lines

avoid division by zero

* cvt(): use signbit() instead of 1/d < 0
* w_float(): ditto
* ruby_float_step_size(): unit==0 check shall be prior to divisions
* arith_seq_float_step_size(): ditto
* rb_big_divide(): same as r65642
* fix_divide(): ditto
* rb_big_fdiv_double(): ditto
* fix_fdiv_double(): ditto

------------------------------------------------------------------------
r65750 | nobu | 2018-11-16 09:37:48 +0900 (Fri, 16 Nov 2018) | 1 line

rbinstall.rb: do not install rdoc flag files [ci skip]
------------------------------------------------------------------------
r65749 | nobu | 2018-11-16 09:28:43 +0900 (Fri, 16 Nov 2018) | 1 line

bignum.c: suppress unused variable warning
------------------------------------------------------------------------
r65748 | nobu | 2018-11-16 09:25:54 +0900 (Fri, 16 Nov 2018) | 4 lines

pack.c: refine warning

* pack.c (unknown_directive): refine warning message at unknown
  directive in unpack too, and quote unprintable characters.
------------------------------------------------------------------------
r65747 | nobu | 2018-11-16 09:25:53 +0900 (Fri, 16 Nov 2018) | 1 line

pack.c: adjust indent [ci skip]
------------------------------------------------------------------------
r65746 | svn | 2018-11-16 07:28:07 +0900 (Fri, 16 Nov 2018) | 1 line

* 2018-11-16
------------------------------------------------------------------------
r65745 | svn | 2018-11-16 07:28:06 +0900 (Fri, 16 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65744 | normal | 2018-11-16 07:28:03 +0900 (Fri, 16 Nov 2018) | 5 lines

include/ruby/ruby.h (RB_ALLOCV*): remove unnecessary GC guard

    text	   data	    bss	    dec	    hex	filename
 3535061	  21232	  72944	3629237	 3760b5	ruby.before
 3534141	  21232	  72944	3628317	 375d1d	ruby.after
------------------------------------------------------------------------
r65743 | shyouhei | 2018-11-15 18:03:03 +0900 (Thu, 15 Nov 2018) | 7 lines

eval_error.c: log10(0) is ERANGE

By definition, the logarithm of 0 is negative infinity.  This is a
pole error (cf: cf: ISO/IEC 9899:1999 section 7.12.1 paragraph 3) and
of course, cannot fit into an `int` value.  We have to resort to
INT_MIN.

------------------------------------------------------------------------
r65742 | shyouhei | 2018-11-15 17:33:38 +0900 (Thu, 15 Nov 2018) | 6 lines

.travis.yml: give up mac universal binary [ci skip]

OK, nobody is actively willing to maintain this configuration.  Just
stop annoying people by build failures.  See:
https://travis-ci.org/ruby/ruby/jobs/455377387

------------------------------------------------------------------------
r65741 | shyouhei | 2018-11-15 16:37:05 +0900 (Thu, 15 Nov 2018) | 10 lines

.travis.yml: -j3 [ci skip]

Now that ccache is enabled.  Compilations are made IO heavy, not CPU
bound.  This means parallel jobs beyond CPU count could gain more
speed.  From my experiment, I can conclude the good old "number of
cores plus one" tactics works the best.

The experiment: https://travis-ci.org/shyouhei/ruby/builds/454891855


------------------------------------------------------------------------
r65740 | svn | 2018-11-15 16:34:06 +0900 (Thu, 15 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65739 | shyouhei | 2018-11-15 16:34:01 +0900 (Thu, 15 Nov 2018) | 6 lines

suppress integer overflow warnings

* util.c: annotate as NO_SANITIZE
* bignum.c: avoid (size_t)--
* marshal.c: ditto.

------------------------------------------------------------------------
r65738 | nobu | 2018-11-15 15:22:17 +0900 (Thu, 15 Nov 2018) | 1 line

. command in some sh cannot take arguments
------------------------------------------------------------------------
r65737 | shyouhei | 2018-11-15 15:17:53 +0900 (Thu, 15 Nov 2018) | 17 lines

hash.c: cast from double to unsigned is undefined

When a negative double is casted into an unsigned type, that operation
is undefined (cf: ISO/IEC 9899:1990 section 6.2.9.3).  Recent versions
of C kindly footnotes that "The remaindering operation performed when
a value of integer type is converted to unsigned type need not be
performed when a value of real floating type is converted to unsigned
type" (cf: ISO/IEC 9899:1999 section 6.3.1.4 footnote 50).

So it is a wrong idea to just cast a double to st_data_t.

The intention of the code is commented as "mix the actual float value
in".  It seems we should do a reinterpret_cast and rule out
static_cast.

Confirmed this changeset does not affect `make benchmark`.

------------------------------------------------------------------------
r65736 | svn | 2018-11-15 14:22:45 +0900 (Thu, 15 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65735 | nobu | 2018-11-15 14:22:44 +0900 (Thu, 15 Nov 2018) | 1 line

tool/mjit_archflag.sh: separated, too many escapes
------------------------------------------------------------------------
r65734 | shyouhei | 2018-11-15 14:10:40 +0900 (Thu, 15 Nov 2018) | 6 lines

bignum.c: ee should be signed

In C, signed + unsigned of the same size results in unsigned (cf:
ISO/IEC 9899:1990 section 6.2.1.5). However `num` is signed here.
Which means the addition must be done in signed.

------------------------------------------------------------------------
r65733 | kazu | 2018-11-15 12:45:34 +0900 (Thu, 15 Nov 2018) | 3 lines

Revert "Use CC without ccache as MJIT_CC"

because CI failed: https://travis-ci.org/ruby/ruby/builds/455313917
------------------------------------------------------------------------
r65732 | kazu | 2018-11-15 12:01:20 +0900 (Thu, 15 Nov 2018) | 1 line

Use CC without ccache as MJIT_CC
------------------------------------------------------------------------
r65731 | shyouhei | 2018-11-15 11:25:25 +0900 (Thu, 15 Nov 2018) | 22 lines

.travis.yml: enable ccache

Travis has `cache: ccache` feature so let us enable it.  Also, because
`config.cache` is generated during the compilation why not cache that
file for a later use.  [fix GH-2013]

Caveats:

- When something went wrong, cache entries can be deleted from
  https://travis-ci.org/ruby/ruby/caches (requires login).

- See `ccache(1)` manual page for the new environment variables.

- `ccache` thinks two compilations are not identical if they produce
  different diagnostics.  The -fno-diagnostics-color option is to
  prevent such cache missihts only because TTY is present / absent at
  the compilation time.

- In this changeset two "ccache --show-stats" invocations are inserted
  before and after the compilation to measure cache hit rates etc.
  Will revisit their outputs once the cache is warmed up.

------------------------------------------------------------------------
r65730 | svn | 2018-11-15 06:04:59 +0900 (Thu, 15 Nov 2018) | 1 line

* 2018-11-15
------------------------------------------------------------------------
r65729 | k0kubun | 2018-11-15 06:04:57 +0900 (Thu, 15 Nov 2018) | 8 lines

Fix syntax on Binding.irb documentation [ci skip]

There was incorrect backticks (`) instead of plus signs to denote method
references, and a typo.

[Fix GH-2016]

From: Olivier Lacan <hi@olivierlacan.com>
------------------------------------------------------------------------
r65727 | nobu | 2018-11-14 23:12:30 +0900 (Wed, 14 Nov 2018) | 1 line

rational.c (nurat_div): use the dedicated function nurat_to_f
------------------------------------------------------------------------
r65726 | svn | 2018-11-14 18:53:13 +0900 (Wed, 14 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65725 | shyouhei | 2018-11-14 18:53:11 +0900 (Wed, 14 Nov 2018) | 4 lines

numeric.c: avoid division by zero

same as r65642.

------------------------------------------------------------------------
r65724 | k0kubun | 2018-11-14 17:21:05 +0900 (Wed, 14 Nov 2018) | 4 lines

test_ftp.rb: loosen another timeout requirement

for Travis osx.
https://travis-ci.org/ruby/ruby/jobs/454864155
------------------------------------------------------------------------
r65723 | k0kubun | 2018-11-14 16:44:30 +0900 (Wed, 14 Nov 2018) | 3 lines

test_ftp.rb: loosen timeout for Travis osx

https://travis-ci.org/ruby/ruby/jobs/454798071
------------------------------------------------------------------------
r65722 | k0kubun | 2018-11-14 16:38:05 +0900 (Wed, 14 Nov 2018) | 3 lines

test_gem_stream_ui.rb: loosen timeout for --jit-wait

https://app.wercker.com/ruby/ruby/runs/mjit-test2/5beba9be183106002852f8a6?step=5bebc1a087436a0006f94a22
------------------------------------------------------------------------
r65721 | shyouhei | 2018-11-14 13:50:59 +0900 (Wed, 14 Nov 2018) | 4 lines

.travis.yml: specify git -q

We are not interested in git(1) output.

------------------------------------------------------------------------
r65720 | nobu | 2018-11-14 13:42:14 +0900 (Wed, 14 Nov 2018) | 1 line

Add RbConfig.fire_update!
------------------------------------------------------------------------
r65719 | svn | 2018-11-14 12:52:31 +0900 (Wed, 14 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65718 | normal | 2018-11-14 12:52:28 +0900 (Wed, 14 Nov 2018) | 4 lines

thread.c (rb_thread_fd_select): favor rb_thread_* when no FDs

select() is a crap API for even sleeping on sigwait_fd, so favor
the native_sleep-based functions when there are no FDs, instead.
------------------------------------------------------------------------
r65717 | nobu | 2018-11-14 11:27:17 +0900 (Wed, 14 Nov 2018) | 1 line

defs/known_errors.def: update on macOS Mojave Xcode 10.1
------------------------------------------------------------------------
r65716 | nobu | 2018-11-14 11:27:16 +0900 (Wed, 14 Nov 2018) | 6 lines

Makefile.in: update-known-errors

* Makefile.in (update-known-errors): update defs/known_errors.def
  by using errno(1).

* defs/known_errors.def: sort alphabetically for merger.
------------------------------------------------------------------------
r65715 | shyouhei | 2018-11-14 09:43:45 +0900 (Wed, 14 Nov 2018) | 2 lines

.travis.yml: add empty lines for readability [ci skip]

------------------------------------------------------------------------
r65714 | svn | 2018-11-14 08:06:51 +0900 (Wed, 14 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65713 | k0kubun | 2018-11-14 08:06:49 +0900 (Wed, 14 Nov 2018) | 6 lines

test/excludes/../TestWEBrickUtils.rb: exclude unstable test

for now. This seems to get unstable after r65691.

test/excludes/_travis/osx: renamed from test/excludes/_travis because
it's only for osx builds.
------------------------------------------------------------------------
r65712 | svn | 2018-11-14 06:36:59 +0900 (Wed, 14 Nov 2018) | 1 line

* 2018-11-14
------------------------------------------------------------------------
r65711 | k0kubun | 2018-11-14 06:36:58 +0900 (Wed, 14 Nov 2018) | 3 lines

.travis.yml: stop allowing osx failure

it seems to be more stable than the timing we upgraded travis image.
------------------------------------------------------------------------
r65710 | nobu | 2018-11-13 23:56:49 +0900 (Tue, 13 Nov 2018) | 1 line

Makefile.in: `$` for shell needs to be escaped in Makefile
------------------------------------------------------------------------
r65709 | kazu | 2018-11-13 23:35:19 +0900 (Tue, 13 Nov 2018) | 1 line

Remove duplicated assignment
------------------------------------------------------------------------
r65708 | shyouhei | 2018-11-13 16:19:12 +0900 (Tue, 13 Nov 2018) | 7 lines

.travis.tml: reintroduce exclusions for osx

Sorry, seen the failures again.  Was a wrong idea to delete
the --exclude.

See https://travis-ci.org/ruby/ruby/jobs/454329443#L2233

------------------------------------------------------------------------
r65707 | shyouhei | 2018-11-13 16:17:02 +0900 (Tue, 13 Nov 2018) | 2 lines

.travis.yml: eliminate remaining --color=never [ci skip]

------------------------------------------------------------------------
r65706 | marcandre | 2018-11-13 15:20:06 +0900 (Tue, 13 Nov 2018) | 3 lines

Pathname: Have #relative_path_from accept String argument.

[Fix GH-1975]
------------------------------------------------------------------------
r65705 | k0kubun | 2018-11-13 15:17:57 +0900 (Tue, 13 Nov 2018) | 15 lines

test_function.rb: loosen delta boundary

On osx build https://travis-ci.org/ruby/ruby/jobs/454309945,

```
1) Failure:
Fiddle::TestFunction#test_nogvl_poll [/Users/travis/build/ruby/ruby/test/fiddle/test_function.rb:95]:
slept amount of time.
Expected |200 - 322| (122) to be <= 100.
```

but it succeeds on my macOS machine as is. So it seems that the boundary is
just too strict and prone to random failure by overload.

To make osx Travis build usable, let me loosen the delta requirement.
------------------------------------------------------------------------
r65704 | nobu | 2018-11-13 15:16:56 +0900 (Tue, 13 Nov 2018) | 1 line

Moved REVISION_FORCE before uncommon.mk
------------------------------------------------------------------------
r65703 | k0kubun | 2018-11-13 14:46:41 +0900 (Tue, 13 Nov 2018) | 5 lines

appveyor.yml: run memory-exchausting test separately

r65690 had no impact
https://ci.appveyor.com/project/ruby/ruby/builds/20253561/job/p5u235m8xx85t9o5.
Gave up to solve the issue inside the test.
------------------------------------------------------------------------
r65702 | shyouhei | 2018-11-13 13:55:43 +0900 (Tue, 13 Nov 2018) | 8 lines

.travis.yml: specify --tty=no

To reduce the amount of output, prefer --tty=no instead of
--color=never.  This option not only disables color output but also
kill some tty-related features, like spinners.  Travis limits its
output by the physical size of the log, not by the number of lines.
This change should make more room for new logs.

------------------------------------------------------------------------
r65701 | nobu | 2018-11-13 13:51:46 +0900 (Tue, 13 Nov 2018) | 1 line

date_core.c: use static ID variables
------------------------------------------------------------------------
r65700 | shyouhei | 2018-11-13 13:33:10 +0900 (Tue, 13 Nov 2018) | 6 lines

.travis.yml: delete test-all options for osx

While we are experiencing build failures, no hangs had been
seen for a while.  Also it seems the excluded tests now pass.
I think it's time to delete this line.

------------------------------------------------------------------------
r65699 | nobu | 2018-11-13 13:29:32 +0900 (Tue, 13 Nov 2018) | 6 lines

date_core.c: obey to the allocation framework

* ext/date/date_core.c (date_initialize): separate from
  date_s_civil and obey the allocation framework.

* ext/date/date_core.c (datetime_initialize): ditto.
------------------------------------------------------------------------
r65698 | nobu | 2018-11-13 13:29:31 +0900 (Tue, 13 Nov 2018) | 4 lines

date_core.c: respect COMPLEX_DAT bit

* ext/date/date_core.c (d_lite_marshal_load): respect COMPLEX_DAT
  bit in the pre-allocated structure.
------------------------------------------------------------------------
r65697 | nobu | 2018-11-13 13:29:30 +0900 (Tue, 13 Nov 2018) | 5 lines

date_core.c: keep COMPLEX_DAT bit

* ext/date/date_core.c (d_lite_initialize_copy): do not change
  COMPLEX_DAT bit, as the structure does not change.  initialize
  member-wise instead.
------------------------------------------------------------------------
r65696 | nobu | 2018-11-13 13:29:29 +0900 (Tue, 13 Nov 2018) | 5 lines

date_core.c: set/reset COMPLEX_DAT

* ext/date/date_core.c (set_to_simple, set_to_complex): always
  set/reset COMPLEX_DAT bit, which is very tightly bound to the
  structure.
------------------------------------------------------------------------
r65695 | nobu | 2018-11-13 12:24:18 +0900 (Tue, 13 Nov 2018) | 8 lines

gmake.mk: force updating revision.h

Since `.revision.time` recipe needs `$(BASERUBY)`, it should not
try to get updated unconditionally, or tarballs fail to build on
environments where BASERUBY is not available.

All developers who build frequently use GNU make anyway, don't
you?
------------------------------------------------------------------------
r65694 | shyouhei | 2018-11-13 11:58:41 +0900 (Tue, 13 Nov 2018) | 4 lines

.travis.yml: allow osx failures [experimental]

Tests are failing due to network timeouts.  Temporary allow failrues for them.

------------------------------------------------------------------------
r65693 | shyouhei | 2018-11-13 11:19:49 +0900 (Tue, 13 Nov 2018) | 4 lines

addr2line.c: more on suppressing warnings

See also: https://travis-ci.org/ruby/ruby/jobs/454269559#L1898

------------------------------------------------------------------------
r65692 | k0kubun | 2018-11-13 11:06:51 +0900 (Tue, 13 Nov 2018) | 10 lines

common.mk: force updating revision.h on each commit

by making .revision.time PHONY. Prior to this commit, RUBY_DESCRIPTION
has been updated only when version.h (or tool/file2lastrev.rb) is updated.

.revision.time (REVISION_H) target internally has IFCHANGE to update
revision.h. So it doesn't touch revision.h when it's not updated,
and thus it's safe to run every time.

defs/gmake.mk: drop obsoleted reference to REVISION_FORCE
------------------------------------------------------------------------
r65691 | shyouhei | 2018-11-13 11:03:33 +0900 (Tue, 13 Nov 2018) | 5 lines

.travis.yml: update VM images

xeinal for Linux and xcode 10.1 for osx.  Also deleted few outdated
lines that are no longer necessary.

------------------------------------------------------------------------
r65690 | k0kubun | 2018-11-13 10:35:09 +0900 (Tue, 13 Nov 2018) | 7 lines

test_array.rb: try to avoid NoMemoryError on AppVeyor

We somehow hit NoMemoryError twice on that place.
https://ci.appveyor.com/project/ruby/ruby/builds/20224556/job/hlgt963e0cgjbj3c
https://ci.appveyor.com/project/ruby/ruby/builds/20250696/job/gm559bu2jbd6youm

Let me try firing GC here.
------------------------------------------------------------------------
r65689 | svn | 2018-11-13 09:40:57 +0900 (Tue, 13 Nov 2018) | 1 line

* 2018-11-13
------------------------------------------------------------------------
r65688 | shyouhei | 2018-11-13 09:40:52 +0900 (Tue, 13 Nov 2018) | 10 lines

suppress integer overflow warnings

* random.c: annotate rb_hash_start with NO_SANITIZE (seed.key.hash + h
  overflows and that seems intentional)
* bignum.c: avoid (size_t)--
* cont.c: ditto
* util.c: ditto
* vm_insnhelper.c: ditto


------------------------------------------------------------------------
r65687 | nobu | 2018-11-12 19:19:04 +0900 (Mon, 12 Nov 2018) | 1 line

Revert r65681 which had a race condition issue
------------------------------------------------------------------------
r65686 | shyouhei | 2018-11-12 17:18:35 +0900 (Mon, 12 Nov 2018) | 5 lines

.travis.yml: resurrect -j on mac

The "osx build randomly fails with `-j`" happens on make -j test-all.
Should be safe to do make -j all.

------------------------------------------------------------------------
r65685 | shyouhei | 2018-11-12 17:14:09 +0900 (Mon, 12 Nov 2018) | 12 lines

vm_insnhelper.c: avoid nevative sp

space_size can be zero here, under the following script.  We would
better bail out before bptr calculation.

% ./miniruby --dump=i -e '* = nil'
== disasm: #<ISeq:<main>@-e:1 (1,0)-(1,7)> (catch: FALSE)
0000 putnil                                                           (   1)[Li]
0001 dup
0002 expandarray                  0, 0
0005 leave

------------------------------------------------------------------------
r65684 | k0kubun | 2018-11-12 16:58:29 +0900 (Mon, 12 Nov 2018) | 1 line

erb/new_spec.rb: fix spec failure by other specs
------------------------------------------------------------------------
r65683 | nobu | 2018-11-12 16:32:21 +0900 (Mon, 12 Nov 2018) | 1 line

Adopt [Misc #15294]
------------------------------------------------------------------------
r65682 | nobu | 2018-11-12 16:14:43 +0900 (Mon, 12 Nov 2018) | 1 line

Export rb_flo_div_flo for MJIT
------------------------------------------------------------------------
r65681 | nobu | 2018-11-12 15:56:52 +0900 (Mon, 12 Nov 2018) | 1 line

srcs-ext should update ext/ripper/eventids2table.c
------------------------------------------------------------------------
r65680 | shyouhei | 2018-11-12 13:09:24 +0900 (Mon, 12 Nov 2018) | 2 lines

numeric.c: fix typo

------------------------------------------------------------------------
r65679 | svn | 2018-11-12 12:26:44 +0900 (Mon, 12 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65678 | shyouhei | 2018-11-12 12:26:39 +0900 (Mon, 12 Nov 2018) | 4 lines

vm_insnhelper.c: avoid division by zero

same as r65642.

------------------------------------------------------------------------
r65677 | shyouhei | 2018-11-12 11:39:24 +0900 (Mon, 12 Nov 2018) | 7 lines

char is neither signed nor unsigned

read_escaped_byte() returns values of range -1...256. -1 indicates
error.  So the function basically expects char to be 0..255 range.
There is no such guarantee. `char` is not always unsigned.  We
need to explicitly declare chbuf to be unsigned char.

------------------------------------------------------------------------
r65676 | kazu | 2018-11-12 11:00:08 +0900 (Mon, 12 Nov 2018) | 1 line

lib/irb.rb: fix up r65674
------------------------------------------------------------------------
r65675 | shyouhei | 2018-11-12 10:08:35 +0900 (Mon, 12 Nov 2018) | 21 lines

~(unsigned char) is not unsigned char

The unary ~ operator excercises integer promotion of the operand
_before_ actually applying bitwise complement (cf: ISO/IEC 9899:1990
section 6.3.3.3).  Which means `~buf[i]` is in fact
`(int)~(int)buf[i]`.

The problem is, when buf[i] is 0xFF:

      buf[i]        0xFF
 (int)buf[i] 0x0000_00FF
~(int)buf[i] 0xFFFF_FF00 This is -256, out of unsigned char range.

The proposed fix is to change the char signed.  By doing so,

                   buf[i]        0xFF
      (signed char)buf[i]        0xFF
 (int)(signed char)buf[i] 0xFFFF_FFFF
~(int)(signed char)buf[i] 0x0000_0000 This is 0, does not overflow.


------------------------------------------------------------------------
r65674 | k0kubun | 2018-11-12 09:55:34 +0900 (Mon, 12 Nov 2018) | 13 lines

Document binding.irb on Binding [ci skip]

For some reason this very useful method was undocumented since it was added in
493e48897421d176a8faf0f0820323d79ecdf94a which makes finding it in the docs
impossible before this change.

I've added a detailed example with sample code because it's one of the most
powerful tools to debug Ruby code and I believe very few people are aware of it
due to the lack of documentation.

[Fix GH-2010]

From: Olivier Lacan <hi@olivierlacan.com>
------------------------------------------------------------------------
r65673 | svn | 2018-11-12 09:53:17 +0900 (Mon, 12 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65672 | hsbt | 2018-11-12 09:53:15 +0900 (Mon, 12 Nov 2018) | 1 line

Merge Bundler-2.0.0.pre1 from upstream.
------------------------------------------------------------------------
r65671 | k0kubun | 2018-11-12 09:37:15 +0900 (Mon, 12 Nov 2018) | 3 lines

erb.rb: warn invalid trim_mode [Misc #15294]

From: Justin Collins <justin@presidentbeef.com>
------------------------------------------------------------------------
r65670 | svn | 2018-11-12 08:22:55 +0900 (Mon, 12 Nov 2018) | 1 line

* 2018-11-12
------------------------------------------------------------------------
r65669 | nobu | 2018-11-12 08:22:54 +0900 (Mon, 12 Nov 2018) | 1 line

win32/setup.mak: Substitute slashes in `MJIT_CC`
------------------------------------------------------------------------
r65668 | nobu | 2018-11-12 08:22:53 +0900 (Mon, 12 Nov 2018) | 3 lines

`MJIT_BUILD_DIR` is not used on Windows

Because `LOAD_RELATIVE` is always enabled on Windows.
------------------------------------------------------------------------
r65667 | nobu | 2018-11-11 21:40:40 +0900 (Sun, 11 Nov 2018) | 1 line

Fix for bison 3.2 [Bug #15284]
------------------------------------------------------------------------
r65666 | yui-knk | 2018-11-11 21:15:15 +0900 (Sun, 11 Nov 2018) | 1 line

Add docs to RubyVM::AbstractSyntaxTree.of
------------------------------------------------------------------------
r65665 | nobu | 2018-11-11 20:58:38 +0900 (Sun, 11 Nov 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r65664 | nobu | 2018-11-11 10:25:33 +0900 (Sun, 11 Nov 2018) | 5 lines

Use friendlier terminology in leaf helpers

[Fix GH-2009]

From: Juanito Fatas <juanito.fatas@shopify.com>
------------------------------------------------------------------------
r65663 | yui-knk | 2018-11-11 09:55:19 +0900 (Sun, 11 Nov 2018) | 3 lines

Make some functions to be static

These functions are used only in ast.c.
------------------------------------------------------------------------
r65662 | nobu | 2018-11-11 09:46:31 +0900 (Sun, 11 Nov 2018) | 5 lines

Use friendlier terminology in rubysocket.h comment

[Fix GH-2008]

From: Juanito Fatas <juanito.fatas@shopify.com>
------------------------------------------------------------------------
r65661 | nobu | 2018-11-11 09:46:30 +0900 (Sun, 11 Nov 2018) | 3 lines

Revert "Use friendlier terminology in rubysocket.h comment"

This reverts commit dcd41bbbdb021b5e0e74f8a33c2c58cecf595f29.
------------------------------------------------------------------------
r65660 | nobu | 2018-11-11 09:40:25 +0900 (Sun, 11 Nov 2018) | 1 line

Use friendlier terminology in rubysocket.h comment
------------------------------------------------------------------------
r65659 | nobu | 2018-11-11 09:20:27 +0900 (Sun, 11 Nov 2018) | 3 lines

Make rubygems follow the upstream of psych

And merge psych again.
------------------------------------------------------------------------
r65658 | mame | 2018-11-11 07:26:37 +0900 (Sun, 11 Nov 2018) | 5 lines

Revert "Merge psych from upstream."

This reverts commit db3101ff301b8e6f52170df0891f4fc35579354f.

This caused build error: http://ci.rvm.jp/results/trunk-test@ruby-sky3/1452708
------------------------------------------------------------------------
r65657 | svn | 2018-11-11 03:06:54 +0900 (Sun, 11 Nov 2018) | 1 line

* 2018-11-11
------------------------------------------------------------------------
r65656 | hsbt | 2018-11-11 03:06:51 +0900 (Sun, 11 Nov 2018) | 3 lines

Merge psych from upstream.

  * https://github.com/ruby/psych/pull/378
------------------------------------------------------------------------
r65655 | nobu | 2018-11-10 21:04:18 +0900 (Sat, 10 Nov 2018) | 4 lines

Constified ruby_sourcefile

which usually refers ruby_sourcefile_string and is not freed
directly.
------------------------------------------------------------------------
r65654 | nobu | 2018-11-10 20:43:02 +0900 (Sat, 10 Nov 2018) | 1 line

AST.of -e script
------------------------------------------------------------------------
r65653 | nobu | 2018-11-10 20:40:33 +0900 (Sat, 10 Nov 2018) | 1 line

Parse the source in SCRIPT_LINES__ as array
------------------------------------------------------------------------
r65652 | nobu | 2018-11-10 20:16:36 +0900 (Sat, 10 Nov 2018) | 1 line

Check the argument before creating a parser
------------------------------------------------------------------------
r65651 | nobu | 2018-11-10 19:39:58 +0900 (Sat, 10 Nov 2018) | 1 line

Parse the source in SCRIPT_LINES__ if possible
------------------------------------------------------------------------
r65650 | nobu | 2018-11-10 18:29:00 +0900 (Sat, 10 Nov 2018) | 1 line

Fix potential NULL pointer access [ci skip]
------------------------------------------------------------------------
r65649 | svn | 2018-11-10 08:24:17 +0900 (Sat, 10 Nov 2018) | 1 line

* 2018-11-10
------------------------------------------------------------------------
r65648 | normal | 2018-11-10 08:24:14 +0900 (Sat, 10 Nov 2018) | 4 lines

thread_pthread.c (rb_sigwait_sleep): add note about spurious wakeup

I already forgot why we needed to jump through such hoops :x
[ruby-core:88102]
------------------------------------------------------------------------
r65647 | nobu | 2018-11-09 22:39:36 +0900 (Fri, 09 Nov 2018) | 1 line

Get rid of setting SCRIPT_LINES__ by AST.parse
------------------------------------------------------------------------
r65646 | nobu | 2018-11-09 22:39:35 +0900 (Fri, 09 Nov 2018) | 1 line

Hoisted out rb_ast_parse_str and rb_ast_parse_file
------------------------------------------------------------------------
r65645 | kazu | 2018-11-09 22:00:03 +0900 (Fri, 09 Nov 2018) | 3 lines

Remove unused default value of MJIT_CC [ci skip]

because always set `MJIT_CC` at `: ${MJIT_CC=$CC}`
------------------------------------------------------------------------
r65644 | nobu | 2018-11-09 20:19:23 +0900 (Fri, 09 Nov 2018) | 1 line

addr2line.c: fix compilation for i386-darwin
------------------------------------------------------------------------
r65643 | shyouhei | 2018-11-09 18:44:49 +0900 (Fri, 09 Nov 2018) | 5 lines

util.c: suppress warnings

These functions handle overflows correctly.


------------------------------------------------------------------------
r65642 | shyouhei | 2018-11-09 18:14:23 +0900 (Fri, 09 Nov 2018) | 16 lines

numeric.c: avoid division by zero

In C, division by zero is undefined, even if the expression is double
(cf: ISO/IEC 9899:1990 section 6.3.5).  OTOH we have tests about such
operations and results, means we expect no exceptional situation shall
occur.  We need to carefully reroute the situation, and generate what
is needed.

See also: https://travis-ci.org/ruby/ruby/jobs/452680646#L2943

PS: Recently (last two decades), C have Annex. F document. It
normatively specifies that the division operator is IEEE 754's
division operator (cf: ISO/IEC 9899:1999 section F.3).  If we could
move to such newer version this could be no problem.  But that is not
possible today.

------------------------------------------------------------------------
r65641 | yui-knk | 2018-11-09 10:37:41 +0900 (Fri, 09 Nov 2018) | 3 lines

Rename `AST` module to `AbstractSyntaxTree`

Follow the same naming convention of `InstructionSequence` class.
------------------------------------------------------------------------
r65640 | svn | 2018-11-09 10:13:22 +0900 (Fri, 09 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65639 | ko1 | 2018-11-09 10:13:20 +0900 (Fri, 09 Nov 2018) | 5 lines

There is a path to use bmethod with ifunc.

* vm_insnhelper.c (vm_yield_with_cfunc): use passed me as bmethod.
  We also need to set `VM_FRAME_FLAG_BMETHOD` if needed.

------------------------------------------------------------------------
r65638 | svn | 2018-11-09 10:02:20 +0900 (Fri, 09 Nov 2018) | 1 line

* 2018-11-09
------------------------------------------------------------------------
r65637 | svn | 2018-11-09 10:02:20 +0900 (Fri, 09 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65636 | ko1 | 2018-11-09 10:02:13 +0900 (Fri, 09 Nov 2018) | 31 lines

fix passing wrong `passed_bmethod_me`.

* vm_core.h: remove `rb_execution_context_t::passed_bmethod_me`
  and fix functions to pass the `me` directly.
  `passed_bmethod_me` was used to make bmethod (methods defined by
  `defined_method`). `rb_vm_invoke_bmethod` invoke `Proc` with `me`
  information as method frame (`lambda` frame, actually).
  If the proc call is not bmethod call, `passed_bmethod_me` should
  be NULL. However, there is a bug which passes wrong `me` for
  normal block call.

  http://ci.rvm.jp/results/trunk-asserts@silicon-docker/1449470

  This is because wrong `me` was remained in `passed_bmethod_me`
  (and used incorrectly it after collected by GC).

  We need to clear `passed_bmethod_me` just after bmethod call,
  but clearing is not enough.

  To solve this issue, I removed `passed_bmethod_me` and pass `me`
  information as a function parameter of `rb_vm_invoke_bmethod`,
  `invoke_block_from_c_proc` and `invoke_iseq_block_from_c` in vm.c.

* vm.c (invoke_iseq_block_from_c): the number of parameters is too
  long so that I try to specify `ALWAYS_INLINE`.

* vm.c (invoke_block_from_c_proc): ditto.

* vm_insnhelper.c (vm_yield_with_cfunc): now there are no pathes
  to use bmethod here.

------------------------------------------------------------------------
r65635 | shyouhei | 2018-11-08 18:52:14 +0900 (Thu, 08 Nov 2018) | 6 lines

st.c: bin might be zero

When EMPTY_OR_DELETED_BIN_P(bin) is true, it is a wrong idea to
subtract ENTRY_BASE from it.  Delay doing so until we are sure to be
safe.

------------------------------------------------------------------------
r65634 | svn | 2018-11-08 18:46:15 +0900 (Thu, 08 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65633 | shyouhei | 2018-11-08 18:46:09 +0900 (Thu, 08 Nov 2018) | 34 lines

gc.c: avoid integer overflow at process exit

This is rather nitpicking but at the moment the process terminates,
heap_pages_final_slots overflows.

(lldb) bt
* thread #1: tid = 0xc0903, 0x00000001002b3bf7 miniruby`finalize_list(objspace=0x0000000101c09240, zombie=4329149840) + 999 at gc.c:2946, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
  * frame #0: 0x00000001002b3bf7 miniruby`finalize_list(objspace=0x0000000101c09240, zombie=4329149840) + 999 at gc.c:2946
    frame #1: 0x000000010026a69e miniruby`rb_objspace_call_finalizer(objspace=0x0000000101c09240) + 7118 at gc.c:3092
    frame #2: 0x0000000100268ac5 miniruby`rb_gc_call_finalizer_at_exit + 149 at gc.c:3015
    frame #3: 0x00000001002272bc miniruby`ruby_finalize_1 + 156 at eval.c:146
    frame #4: 0x00000001002282b6 miniruby`ruby_cleanup(ex=0) + 4070 at eval.c:238
    frame #5: 0x0000000100228785 miniruby`ruby_run_node(n=0x0000000102060ad8) + 85 at eval.c:317
    frame #6: 0x0000000100000b9c miniruby`main(argc=2, argv=0x00007fff5fbfdc38) + 124 at main.c:42
    frame #7: 0x00007fff9966a5ad libdyld.dylib`start + 1
    frame #8: 0x00007fff9966a5ad libdyld.dylib`start + 1
(lldb) p objspace->heap_pages
(rb_objspace::(anonymous struct)) $0 = {
  sorted = 0x0000000101c070b0
  allocated_pages = 24
  allocatable_pages = 0
  sorted_length = 24
  range = {
    [0] = 0x0000000102020028
    [1] = 0x00000001020dbfd0
  }
  freeable_pages = 0
  final_slots = 0
  deferred_final = 4329149840
}
(lldb)



------------------------------------------------------------------------
r65632 | shyouhei | 2018-11-08 16:41:24 +0900 (Thu, 08 Nov 2018) | 10 lines

hash.c: +(-1) is a wrong idea

Before this changeset RHASH_ARRAY_SIZE_DEC() was expaneded to include
an expression like `RHASH_ARRAY_SIZE+(-1)`.  RHASH_ARRAY_SIZE is by
definition unsigned int.  -1 is signed, of course.  Adding a signed
and an unsigned value requires the "usual arithmetic conversions" (cf:
ISO/IEC 9899:1990 section 6.2.1.5).  -1 is converted to 0xFFFF by that.

This patch prevents that conversion.

------------------------------------------------------------------------
r65631 | k0kubun | 2018-11-08 15:26:21 +0900 (Thu, 08 Nov 2018) | 3 lines

vm_core.h: conform C90

https://travis-ci.org/ruby/ruby/jobs/452230859
------------------------------------------------------------------------
r65630 | shyouhei | 2018-11-08 15:22:57 +0900 (Thu, 08 Nov 2018) | 8 lines

avoid (size_t)-- (2nd try)

The decrements overflow and these variables remain ~0 when leaving the
while loops.  They are not fatal by accident, but better replace with
ordinal for loops.

See also: https://travis-ci.org/ruby/ruby/jobs/452218871#L3246

------------------------------------------------------------------------
r65629 | k0kubun | 2018-11-08 15:19:36 +0900 (Thu, 08 Nov 2018) | 5 lines

lib/rubygems/indexer.rb: suppress random test-all error

by bundler. Similar to r65613, but fixing this more carefully
because here is not just inside tests but inside rubygems code.
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/1448239
------------------------------------------------------------------------
r65628 | ko1 | 2018-11-08 14:35:46 +0900 (Thu, 08 Nov 2018) | 5 lines

initialize VM postponed_job first. [Bug #15288]

* inits.c: call `Init_vm_postponed_job` first because
  postponed_job is used by transient heap.

------------------------------------------------------------------------
r65627 | shyouhei | 2018-11-08 14:34:58 +0900 (Thu, 08 Nov 2018) | 4 lines

svn merge -r 65625:65623 .

Was breaking make test-all

------------------------------------------------------------------------
r65626 | k0kubun | 2018-11-08 14:34:36 +0900 (Thu, 08 Nov 2018) | 1 line

.travis.yml: simplify travis matrix description
------------------------------------------------------------------------
r65625 | shyouhei | 2018-11-08 14:24:07 +0900 (Thu, 08 Nov 2018) | 2 lines

st.c: fix comparison between signed and unsigned

------------------------------------------------------------------------
r65624 | shyouhei | 2018-11-08 14:06:52 +0900 (Thu, 08 Nov 2018) | 8 lines

avoid (size_t)--

The decrements overflow and these variables remain ~0 when leaving the
while loops.  They are not fatal by accident, but better replace with
ordinal for loops.

See also: https://travis-ci.org/ruby/ruby/jobs/452218871#L3246

------------------------------------------------------------------------
r65623 | svn | 2018-11-08 14:01:30 +0900 (Thu, 08 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65622 | ko1 | 2018-11-08 14:01:23 +0900 (Thu, 08 Nov 2018) | 22 lines

separate Thread type (func or proc) explicitly.

* vm_core.h (rb_thread_struct): introduce new fields `invoke_type`
  and `invoke_arg`.
  There are two types threads: invoking proc (normal Ruby thread
  created by `Thread.new do ... end`) and invoking func, created
  by C-API. `invoke_type` shows the types.

* thread.c (thread_do_start): copy `invoke_arg.proc.args` contents
  from Array to ALLOCA stack memory if args length is enough small (<8).
  We don't need to keep Array and don't need to cancel using transient heap.

* vm.c (thread_mark): For func invoking threads, they can pass (void *)
  parameter (rb_thread_t::invoke_arg::func::arg). However, a rubyspec test
  (thread_spec.c) passes an Array object and it expect to mark it.
  Clealy it is out of scope (misuse of `rb_thread_create` C-API). However,
  I'm not sure someone else has such kind of misunderstanding.
  So now we mark conservatively this (void *) arg with rb_gc_mark_maybe.

  This misuse is found by this error log.
  http://ci.rvm.jp/results/trunk-theap-asserts@silicon-docker/1448164

------------------------------------------------------------------------
r65621 | shyouhei | 2018-11-08 13:24:26 +0900 (Thu, 08 Nov 2018) | 8 lines

st.c: straight-forward comparison of characters

These functions are used in strcasehash, which is used to store encoding
names.  Encoding names often include hyphens (e.g. "UTF-8"), and
` '-' - 'A' ` is negative (cannot express in unsigned int).

Don't be tricky, just do what to do.

------------------------------------------------------------------------
r65620 | k0kubun | 2018-11-08 13:06:15 +0900 (Thu, 08 Nov 2018) | 4 lines

test_ftp.rb: extend timeout for --jit-wait testing

to avoid random failures like
https://app.wercker.com/ruby/ruby/runs/mjit-test1/5be394b818310600284f2b50?step=5be394f1591ca800079b1329
------------------------------------------------------------------------
r65619 | normal | 2018-11-08 12:27:16 +0900 (Thu, 08 Nov 2018) | 5 lines

ext/socket/init.c (wait_connectable): bail out early on some errors

This becomes necesary if sockets become non-blocking by
default <https://bugs.ruby-lang.org/issues/14968>; but it's
always been possible to make sockets non-blocking anyways.
------------------------------------------------------------------------
r65618 | nobu | 2018-11-08 11:25:44 +0900 (Thu, 08 Nov 2018) | 7 lines

refine parse_rat

* rational.c (read_num): return the exponent instead of the
  divisor, to get rid of huge bignums.

* rational.c (parse_rat): subtract exponents instead of reduction
  of powers.
------------------------------------------------------------------------
r65617 | nobu | 2018-11-08 10:57:03 +0900 (Thu, 08 Nov 2018) | 7 lines

compile.c: compile error than rb_bug [ci skip]

* compile.c (get_local_var_idx, get_dyna_var_idx): raise a compile
  error which is useful than rb_bug, when ID is not found.

* compile.c (iseq_set_sequence): ditto when IC index overflow,
  with dumping generated code.
------------------------------------------------------------------------
r65616 | shyouhei | 2018-11-08 10:43:07 +0900 (Thu, 08 Nov 2018) | 5 lines

st.c: suppress integer overlow warnings

This `i += h;` overflows.  Don't know the intention of the
operation, so just suppress UBSAN.

------------------------------------------------------------------------
r65615 | yui-knk | 2018-11-08 09:36:35 +0900 (Thu, 08 Nov 2018) | 1 line

NEWS: Add `RubyVM::AST.of` to NEWS [ci skip]
------------------------------------------------------------------------
r65614 | nobu | 2018-11-08 09:12:53 +0900 (Thu, 08 Nov 2018) | 4 lines

compile.c: unreachable than rb_bug [ci skip]

* compile.c (iseq_calc_param_size): use UNREACHABLE than rb_bug,
  at where never reachable.
------------------------------------------------------------------------
r65613 | k0kubun | 2018-11-08 09:06:38 +0900 (Thu, 08 Nov 2018) | 8 lines

test/rdoc/minitest_helper.rb: suppress bundler error

maybe after bundler introduction to this repository, we randomly hit
errors like:
http://ci.rvm.jp/results/trunk-gc-asserts@silicon-docker/1447918

As we would require minitest in this repository anyway, it should be
fine to suppress the error there.
------------------------------------------------------------------------
r65612 | hsbt | 2018-11-08 02:18:14 +0900 (Thu, 08 Nov 2018) | 1 line

Following up r65583. Removed VCR files when retrieving code from upstream.
------------------------------------------------------------------------
r65611 | nobu | 2018-11-08 01:51:19 +0900 (Thu, 08 Nov 2018) | 1 line

Clear CC_WRAPPER in other than the toplevel
------------------------------------------------------------------------
r65610 | hsbt | 2018-11-08 00:55:14 +0900 (Thu, 08 Nov 2018) | 22 lines

Dir.children is available since Feature #11302. FileUtils uses
Dir.each on an internal method encapsulated on a private class
`Entry_#entry`, having no '.' neither '..' entries would make
now superfluous a chained reject filtering.

This change can improve the performance of these FileUtils
methods when the provided path covers thousands of files or
directories:

- chmod_R
- chown_R
- remove_entry
- remove_entry_secure
- rm_r
- remove_dir
- copy_entry

Related: Feature #13896 https://bugs.ruby-lang.org/issues/13896

[Feature #14109][Fix GH-1754]

Co-Authored-By: esparta <esparta@gmail.com>
------------------------------------------------------------------------
r65609 | svn | 2018-11-08 00:47:23 +0900 (Thu, 08 Nov 2018) | 1 line

* 2018-11-08
------------------------------------------------------------------------
r65608 | nobu | 2018-11-08 00:47:21 +0900 (Thu, 08 Nov 2018) | 1 line

Expand MJIT_CC on mswin too
------------------------------------------------------------------------
r65607 | nobu | 2018-11-07 23:27:27 +0900 (Wed, 07 Nov 2018) | 1 line

Convert MJIT_CC to Windows path on msys too
------------------------------------------------------------------------
r65606 | svn | 2018-11-07 21:48:39 +0900 (Wed, 07 Nov 2018) | 1 line

* expand tabs. [ci skip]
------------------------------------------------------------------------
r65605 | nobu | 2018-11-07 21:48:36 +0900 (Wed, 07 Nov 2018) | 1 line

Add cast to suppress warnings on Solaris [ci skip]
------------------------------------------------------------------------
r65604 | nobu | 2018-11-07 20:38:08 +0900 (Wed, 07 Nov 2018) | 1 line

`+` sign in the path of ruby needs to be escaped
------------------------------------------------------------------------
r65603 | nobu | 2018-11-07 19:55:24 +0900 (Wed, 07 Nov 2018) | 1 line

Generalize r65594
------------------------------------------------------------------------
r65602 | nobu | 2018-11-07 19:55:23 +0900 (Wed, 07 Nov 2018) | 1 line

clean mjit_build_dir.dylib.dSYM directory on macOS
------------------------------------------------------------------------
r65601 | svn | 2018-11-07 17:13:24 +0900 (Wed, 07 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65600 | mame | 2018-11-07 17:13:20 +0900 (Wed, 07 Nov 2018) | 4 lines

Rename get/setinlinecache to opt_get/opt_setinlinecache

The instructions are just for optimization.  To clarity the intention,
this change adds the prefix "opt_", like "opt_case_dispatch".
------------------------------------------------------------------------
r65599 | k0kubun | 2018-11-07 17:04:39 +0900 (Wed, 07 Nov 2018) | 7 lines

mjit_worker.c: stop expanding already-absolute MJIT_CC

r65577 seems to have made MJIT_CC (MJIT_CC_COMMONA) become an absolute
path. So start_process doesn't need to find that from PATH by dln_find_exe_r.

This commit is motivated by the msys2 AppVeyor CI failure:
https://ci.appveyor.com/project/ruby/ruby/builds/20084104/job/1pg15os4dtttyl0q
------------------------------------------------------------------------
r65598 | shyouhei | 2018-11-07 17:04:33 +0900 (Wed, 07 Nov 2018) | 28 lines

vm_backtrace.c: pos can be zero

(lldb) target create "./miniruby"
Current executable set to './miniruby' (x86_64).
(lldb) settings set -- target.run-args  "-e0"
(lldb) run
Process 97005 launched: './miniruby' (x86_64)
./miniruby(rb_print_backtrace+0x15) [0x10024f7d5] vm_dump.c:715
./miniruby(rb_vm_get_sourceline+0x85) [0x10024c4f5] vm_backtrace.c:43
./miniruby(rb_vm_make_binding+0x146) [0x100236976] vm.c:941
./miniruby(Init_VM+0x592) [0x100249f02] vm.c:3091
./miniruby(rb_call_inits+0xc2) [0x1000c5a72] inits.c:58
./miniruby(ruby_setup+0xcb) [0x100098c6b] eval.c:74
./miniruby(ruby_init+0x9) [0x100098c99] eval.c:91
./miniruby(main+0x4d) [0x10025ddbd] addr2line.c:246
Process 97005 stopped
* thread #1: tid = 0x639bb, 0x000000010024c4f5 miniruby`rb_vm_get_sourceline(cfp=<unavailable>) + 133 at vm_backtrace.c:44, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    frame #0: 0x000000010024c4f5 miniruby`rb_vm_get_sourceline(cfp=<unavailable>) + 133 at vm_backtrace.c:44
   41       else {
   42           /* SDR() is not possible; that causes infinite loop. */
   43           rb_print_backtrace();
-> 44           __builtin_trap();
   45       }
   46   #endif
   47       return rb_iseq_line_no(iseq, pos);
(lldb)


------------------------------------------------------------------------
r65597 | shyouhei | 2018-11-07 17:03:10 +0900 (Wed, 07 Nov 2018) | 4 lines

insns.def: forgot add cast [ci skip]

See r65595

------------------------------------------------------------------------
r65596 | nobu | 2018-11-07 16:21:00 +0900 (Wed, 07 Nov 2018) | 1 line

ruby-runner.c: enable MJIT_SEARCH_BUILD_DIR only if no relative loading
------------------------------------------------------------------------
r65595 | shyouhei | 2018-11-07 16:16:50 +0900 (Wed, 07 Nov 2018) | 24 lines

insns.def: avoid integer overflow

In these expressions `1` is of type `signed int` (cf: ISO/IEC
9899:1990 section 6.1.3.2). The variable (e.g. `num`) is of type
`rb_num_t`, which is in fact `unsigned long`.  These two expressions
then exercises the "usual arithmetic conversions" (cf: ISO/IEC
9899:1990 section 6.2.1.5) and both eventually become `unsigned long`.
The two unsigned expressions are then subtracted to generate another
unsigned integer expression (cf: ISO/IEC 9899:1990 section 6.3.6).
This is where integer overflows can occur.  OTOH the left hand side of
the assignments are `rb_snum_t` which is `signed long`.  The
assignments exercise the "implicit conversion" of "an unsigned integer
is converted to its corresponding signed integer" case (cf: ISO/IEC
9899:1990 section 6.2.1.2), which is "implementation-defined" (read:
not portable).

Casts are the proper way to avoid this problem.  Because all
expressions are converted to some integer types before any binary
operations are performed, the assignments now have fully defined
behaviour.  These values can never exceed LONG_MAX so the casts must
not lose any information.

See also: https://travis-ci.org/ruby/ruby/jobs/451726874#L4357

------------------------------------------------------------------------
r65594 | k0kubun | 2018-11-07 16:15:33 +0900 (Wed, 07 Nov 2018) | 4 lines

test_process.rb: avoid test failure by r65588

on macOS.
https://travis-ci.org/ruby/ruby/jobs/451709313
------------------------------------------------------------------------
r65593 | shyouhei | 2018-11-07 14:26:11 +0900 (Wed, 07 Nov 2018) | 5 lines

.travis.yml: UNALIGNED_WORD_ACCESS=0 for UBSAN

Unaligned word access warnings generated by UBSAN are often
treated well already, depending on this macro.

------------------------------------------------------------------------
r65592 | shyouhei | 2018-11-07 14:23:03 +0900 (Wed, 07 Nov 2018) | 9 lines

string.c: this assumption is false [ci skip]

Looking at the lines right above, it is clear than a blue sky
that we cannot assume `p` to be aligned at all when
UNALIGNED_WORD_ACCESS is true.  It is a wrong idea to use
__builtin_assume_aligned for that situation.

See also: https://travis-ci.org/ruby/ruby/jobs/451710732#L2007

------------------------------------------------------------------------
r65591 | kazu | 2018-11-07 14:07:56 +0900 (Wed, 07 Nov 2018) | 1 line

Fix call-seq [ci skip]
------------------------------------------------------------------------
r65590 | shyouhei | 2018-11-07 13:56:24 +0900 (Wed, 07 Nov 2018) | 4 lines

suppress GCC warning about unknown sanitizers

See also: https://travis-ci.org/ruby/ruby/jobs/451710726#L1941

------------------------------------------------------------------------
r65589 | shyouhei | 2018-11-07 13:09:05 +0900 (Wed, 07 Nov 2018) | 9 lines

blacklist UBSAN's unsigned integer overflow

Integer overflow for unsigned types are fully defined in C. They
are not always problematic (but not always OK).  These functions
in this changeset intentionally utilizes that behaviour.
Blacklist from UBSAN checks for better output.

See also: https://travis-ci.org/ruby/ruby/jobs/451624829

------------------------------------------------------------------------
r65588 | nobu | 2018-11-07 13:02:14 +0900 (Wed, 07 Nov 2018) | 1 line

ruby-runner.c: enable MJIT_SEARCH_BUILD_DIR
------------------------------------------------------------------------
r65587 | nobu | 2018-11-07 11:49:26 +0900 (Wed, 07 Nov 2018) | 4 lines

mjit_build_dir: separate MJIT_BUILD_DIR

* Makefile.in (mjit_build_dir.so): separate MJIT_BUILD_DIR to
  eliminate the feature for test-all after installation.
------------------------------------------------------------------------
r65586 | nobu | 2018-11-07 08:50:50 +0900 (Wed, 07 Nov 2018) | 1 line

Fix build_os:host_os pair
------------------------------------------------------------------------
r65585 | svn | 2018-11-07 07:56:00 +0900 (Wed, 07 Nov 2018) | 1 line

* 2018-11-07
------------------------------------------------------------------------
r65584 | mame | 2018-11-07 07:55:57 +0900 (Wed, 07 Nov 2018) | 6 lines

Revert "thread.c (rb_wait_for_single_fd): no point initializing pollfd.revents"

It may cause an access to uninitialized variables.
The call to ppoll will set the `revents` field, but ppoll is not always
called because it is in the guard `!RUBY_VM_INTERRUPTED(th->ec)`.
This issue was found by Coverity Scan.
------------------------------------------------------------------------
r65583 | hsbt | 2018-11-07 05:47:09 +0900 (Wed, 07 Nov 2018) | 3 lines

Removed VCR cassettes files for reducing package size.

  [Bug #14219]
------------------------------------------------------------------------
r65577 | nobu | 2018-11-06 21:08:54 +0900 (Tue, 06 Nov 2018) | 1 line

Expand MJIT_CC in configure
------------------------------------------------------------------------
r65576 | shyouhei | 2018-11-06 20:53:01 +0900 (Tue, 06 Nov 2018) | 4 lines

workaround C++ism in ASAN header 

See also: https://travis-ci.org/ruby/ruby/jobs/451299690

------------------------------------------------------------------------
r65575 | svn | 2018-11-06 19:19:59 +0900 (Tue, 06 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65574 | shyouhei | 2018-11-06 19:19:55 +0900 (Tue, 06 Nov 2018) | 8 lines

cont.c: direct use of rb_thread_t

The only usage of rb_fiber_reset_root_local_storage() is from
ruby_vm_destruct(), where the object space is already terminated.
This `th->self` is not alive.  Why not just use `th` itself.

See also: https://travis-ci.org/ruby/ruby/jobs/451294954

------------------------------------------------------------------------
r65573 | shyouhei | 2018-11-06 19:06:07 +0900 (Tue, 06 Nov 2018) | 5 lines

adopt sanitizer API

These APIs are much like <valgrind/memcheck.h>. Use them to
fine-grain annotate the usage of our memory.

------------------------------------------------------------------------
r65572 | k0kubun | 2018-11-06 17:01:28 +0900 (Tue, 06 Nov 2018) | 1 line

mjit.c: don't use mutex before checking availability
------------------------------------------------------------------------
r65571 | k0kubun | 2018-11-06 16:30:37 +0900 (Tue, 06 Nov 2018) | 7 lines

mjit_worker.c: don't use _one for now

I'm planning to use _one later, but it may be doubly registered by
switching `stop_worker_p` now and so we should not use _one for now.

Otherwise stale job may reject new job registration and
copy_cache_from_main_thread may wait forever.
------------------------------------------------------------------------
r65570 | nobu | 2018-11-06 16:28:11 +0900 (Tue, 06 Nov 2018) | 4 lines

Makefile.in: do not expand MJIT_CC if cross compiling

* Makefile.in (mjit_config.h): expand MJIT_CC only if native
  build, the path on cross compiling host is useless.
------------------------------------------------------------------------
r65569 | k0kubun | 2018-11-06 16:22:25 +0900 (Tue, 06 Nov 2018) | 9 lines

mjit_worker.c: strictly control MJIT copy job

-available region. reducing risk of SEGV in mjit_copy_job_handler() like
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1446117

I'm not sure which exact part is causing "[BUG] Segmentation fault at 0x0000000000000008"
on `(mjit_copy_job_handler+0x12) [0x564a6c4ce632] /home/ko1/ruby/src/trunk-mjit/mjit.c:26`...

mjit.c: ditto
------------------------------------------------------------------------
r65568 | nobu | 2018-11-06 16:03:24 +0900 (Tue, 06 Nov 2018) | 4 lines

Makefile.in: convert MJIT_CC to Windows path

* Makefile.in (mjit_config.h): convert MJIT_CC to Windows path on
  mingw.
------------------------------------------------------------------------
r65567 | ko1 | 2018-11-06 15:36:51 +0900 (Tue, 06 Nov 2018) | 16 lines

Fix TracePoint for nested iseq loaded from binary [Bug#14702]

When loading iseq from binary while a TracePoint is on, we need to
recompile instructions to their "trace_" variant. Before this commit
we only recompiled instructions in the top level iseq, which meant
that TracePoint was malfunctioning for code inside module/class/method
definitions.

* compile.c: Move rb_iseq_init_trace to rb_ibf_load_iseq_complete.
  It is called on all iseqs during loading.

* test_iseq.rb: Test that tracepoints fire within children iseq when
  using load_from_binary.

This patch is from: Alan Wu <XrXr@users.noreply.github.com>

------------------------------------------------------------------------
r65566 | nobu | 2018-11-06 14:14:36 +0900 (Tue, 06 Nov 2018) | 1 line

Revert "mjit_build_dir: separate MJIT_BUILD_DIR"
------------------------------------------------------------------------
r65565 | shyouhei | 2018-11-06 14:07:54 +0900 (Tue, 06 Nov 2018) | 2 lines

do not delete function declarations in case of non-sanitizing builds

------------------------------------------------------------------------
r65564 | shyouhei | 2018-11-06 14:06:20 +0900 (Tue, 06 Nov 2018) | 9 lines

annotate functions to blacklist MSAN

In these functions we are intentionally reading memory address
not owned by us.  These reads should not be diagnosed.

See also [Bug #8680]
See also https://travis-ci.org/ruby/ruby/jobs/451202718


------------------------------------------------------------------------
r65563 | nobu | 2018-11-06 13:13:48 +0900 (Tue, 06 Nov 2018) | 4 lines

mjit_build_dir: separate MJIT_BUILD_DIR

* Makefile.in (mjit_build_dir.so): separate MJIT_BUILD_DIR to
  eliminate the feature for test-all after installation.
------------------------------------------------------------------------
r65562 | nobu | 2018-11-06 13:13:47 +0900 (Tue, 06 Nov 2018) | 4 lines

Makefile.in: make MJIT_CC_COMMON an absolute path

* Makefile.in (mjit_config.h): expand MJIT_CC_COMMON path to
  mitigate potential security risks.
------------------------------------------------------------------------
r65561 | nobu | 2018-11-06 12:32:57 +0900 (Tue, 06 Nov 2018) | 5 lines

configure.ac: insert DLDSHARED

* configure.ac (DLDSHARED): `.dylib` (created by `-dynamiclib`)
  and `.bundle` (created by `-dynamic -bundle`) on macOS are
  different.  `LIBRUBY_LDSHARED` should be the former always.
------------------------------------------------------------------------
r65560 | usa | 2018-11-06 12:18:23 +0900 (Tue, 06 Nov 2018) | 5 lines

Fixed compile error introduced at r65558

* internal.h (ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS): of course, parens around
  function signature in its definition is syntax error.

------------------------------------------------------------------------
r65559 | shyouhei | 2018-11-06 12:06:33 +0900 (Tue, 06 Nov 2018) | 5 lines

.travis.yml: FIBER_USE_NATIVE=0

I remember this configuration unveiled several bugs before.
Better check it occasionally.

------------------------------------------------------------------------
r65558 | shyouhei | 2018-11-06 11:57:28 +0900 (Tue, 06 Nov 2018) | 11 lines

gc.c: move ASAN check to configure

Availability of attributes are checked in configure these days,
rather than compiler macros.  Also
__attribute__((no_address_safety_analysis)) is considered
deprecated in both GCC and Clang.  Use the current best practice
if available.  See also:

https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
https://clang.llvm.org/docs/AddressSanitizer.html

------------------------------------------------------------------------
r65557 | shyouhei | 2018-11-06 10:45:09 +0900 (Tue, 06 Nov 2018) | 4 lines

.travis.yml: allow UBSAN to fail

Forgot this line, sorry! 

------------------------------------------------------------------------
r65556 | shyouhei | 2018-11-06 10:36:20 +0900 (Tue, 06 Nov 2018) | 7 lines

.travis.yml: add cron-only builds

Inspired by [GH-1984], let us add some tests that run only
once a day.  These configurations are either slow to compile
or slow to run.  But I think they are worth done occasionally.


------------------------------------------------------------------------
r65555 | svn | 2018-11-06 08:06:58 +0900 (Tue, 06 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65554 | naruse | 2018-11-06 08:06:50 +0900 (Tue, 06 Nov 2018) | 1 line

Don't set throw data as cause [Bug #15282]
------------------------------------------------------------------------
r65553 | normal | 2018-11-06 07:56:57 +0900 (Tue, 06 Nov 2018) | 6 lines

thread.c (rb_wait_for_single_fd): no point initializing pollfd.revents

poll(2) and ppoll(2) implementations need to check and write to
.revents on the initial scan, anyways.  So any poll/ppoll call
which returns a positive result can be expected to have an
initialized .revents value.
------------------------------------------------------------------------
r65552 | svn | 2018-11-06 02:27:12 +0900 (Tue, 06 Nov 2018) | 1 line

* 2018-11-06
------------------------------------------------------------------------
r65551 | nobu | 2018-11-06 02:27:10 +0900 (Tue, 06 Nov 2018) | 4 lines

Relax MJIT_BUILD_DIR restriction

* mjit.c (init_header_filename): sticky-mode directory probably
  would be less unsafe even if it is not owned.
------------------------------------------------------------------------
r65550 | svn | 2018-11-05 17:02:31 +0900 (Mon, 05 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65549 | ko1 | 2018-11-05 17:02:29 +0900 (Mon, 05 Nov 2018) | 6 lines

use `RSTRUCT_CONST_PTR` carefully.

* struct.c: should not use `RSTRUCT_CONST_PTR` with method dispatch
  because pointers can be obsolete after method dispatch. `rb_equal()`
  and so on can dispatch Ruby's methods.

------------------------------------------------------------------------
r65548 | kazu | 2018-11-05 16:01:49 +0900 (Mon, 05 Nov 2018) | 1 line

Fix up r65505 [ci skip]
------------------------------------------------------------------------
r65547 | kazu | 2018-11-05 16:01:47 +0900 (Mon, 05 Nov 2018) | 1 line

Sort in alphabetical order [ci skip]
------------------------------------------------------------------------
r65546 | kazu | 2018-11-05 15:02:42 +0900 (Mon, 05 Nov 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r65545 | nobu | 2018-11-05 11:57:06 +0900 (Mon, 05 Nov 2018) | 1 line

Respect explicitly given MJIT_CC
------------------------------------------------------------------------
r65544 | nobu | 2018-11-05 11:25:46 +0900 (Mon, 05 Nov 2018) | 1 line

Create MJIT header with strict permission
------------------------------------------------------------------------
r65543 | svn | 2018-11-05 11:14:00 +0900 (Mon, 05 Nov 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65542 | yui-knk | 2018-11-05 11:13:45 +0900 (Mon, 05 Nov 2018) | 1 line

Implement `RubyVM::AST.of` [Feature #14836]
------------------------------------------------------------------------
r65541 | nobu | 2018-11-05 11:05:12 +0900 (Mon, 05 Nov 2018) | 1 line

More verbose message at unsafe header
------------------------------------------------------------------------
r65540 | naruse | 2018-11-05 07:36:05 +0900 (Mon, 05 Nov 2018) | 3 lines

addr2line.c uses c99ism

https://travis-ci.org/ruby/ruby/jobs/450505006
------------------------------------------------------------------------
r65539 | sorah | 2018-11-05 00:39:00 +0900 (Mon, 05 Nov 2018) | 6 lines

Fix RubyGems extension build failure after r65470

Port of upstream patch https://github.com/rubygems/rubygems/pull/2457

Since r65470 (Upstream: https://github.com/rubygems/rubygems/pull/2441),
builds of extension gem had always failed under really_verbose mode.
------------------------------------------------------------------------
r65538 | svn | 2018-11-05 00:14:44 +0900 (Mon, 05 Nov 2018) | 1 line

* 2018-11-05
------------------------------------------------------------------------
r65537 | naruse | 2018-11-05 00:14:42 +0900 (Mon, 05 Nov 2018) | 1 line

Use symtab if there's no .dSYM file
------------------------------------------------------------------------
r65536 | nobu | 2018-11-04 21:46:50 +0900 (Sun, 04 Nov 2018) | 1 line

Check MJIT_BUILD_DIR strictly
------------------------------------------------------------------------
r65535 | nobu | 2018-11-04 21:24:03 +0900 (Sun, 04 Nov 2018) | 1 line

MJIT_CC should not use CC_WRAPPER
------------------------------------------------------------------------
r65534 | stomar | 2018-11-04 20:46:49 +0900 (Sun, 04 Nov 2018) | 1 line

hash.c: [DOC] add docs for ENV.{filter,filter!}
------------------------------------------------------------------------
r65533 | stomar | 2018-11-04 20:45:59 +0900 (Sun, 04 Nov 2018) | 1 line

hash.c: [DOC] fix wrong cross-references
------------------------------------------------------------------------
r65532 | stomar | 2018-11-04 20:45:11 +0900 (Sun, 04 Nov 2018) | 1 line

hash.c: [DOC] add missing `block' in call-seq's
------------------------------------------------------------------------
r65531 | stomar | 2018-11-04 20:44:13 +0900 (Sun, 04 Nov 2018) | 1 line

struct.c: [DOC] add docs for Struct#filter
------------------------------------------------------------------------
r65530 | stomar | 2018-11-04 20:43:09 +0900 (Sun, 04 Nov 2018) | 1 line

hash.c: [DOC] add docs for Hash#{filter,filter!}
------------------------------------------------------------------------
r65529 | stomar | 2018-11-04 20:41:52 +0900 (Sun, 04 Nov 2018) | 1 line

hash.c: [DOC] improve Hash#{select!,keep_if} docs
------------------------------------------------------------------------
r65528 | stomar | 2018-11-04 20:40:32 +0900 (Sun, 04 Nov 2018) | 1 line

array.c: [DOC] add docs for Array#{filter,filter!}
------------------------------------------------------------------------
r65527 | stomar | 2018-11-04 20:39:28 +0900 (Sun, 04 Nov 2018) | 1 line

array.c: [DOC] improve Array#{select,select!,keep_if} docs
------------------------------------------------------------------------
r65526 | nobu | 2018-11-04 11:09:01 +0900 (Sun, 04 Nov 2018) | 1 line

Hide Time::TM as Time::tm
------------------------------------------------------------------------
r65525 | nobu | 2018-11-04 11:02:28 +0900 (Sun, 04 Nov 2018) | 1 line

Refine Timezone class in test-spec
------------------------------------------------------------------------
r65524 | svn | 2018-11-04 10:14:52 +0900 (Sun, 04 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65523 | hsbt | 2018-11-04 10:14:48 +0900 (Sun, 04 Nov 2018) | 3 lines

Merge upstream changes from 2-0-stable branch of bundler/bundler.

  * It update bundler 2 mode to bundler 3.
------------------------------------------------------------------------
r65522 | nobu | 2018-11-04 09:22:13 +0900 (Sun, 04 Nov 2018) | 4 lines

complex.c: rb_dbl_complex_polar_pi

* complex.c (rb_dbl_complex_polar_pi): suffixed with _pi to
  clarify that `ang` is not radian, but multiplied by PI.
------------------------------------------------------------------------
r65521 | nobu | 2018-11-04 08:43:17 +0900 (Sun, 04 Nov 2018) | 7 lines

Makefile.in: use CC_WRAPPER

* Makefile.in (CC_WRAPPER): use the wrapper to suppress warnings
  by Apple's broken packages when linking in the toplevel
  directory.

* configure.ac (CC_WRAPPER): separate from CC.
------------------------------------------------------------------------
r65520 | nobu | 2018-11-04 08:10:57 +0900 (Sun, 04 Nov 2018) | 1 line

configure.ac: set CC_WRAPPER by checking message
------------------------------------------------------------------------
r65519 | svn | 2018-11-04 08:08:10 +0900 (Sun, 04 Nov 2018) | 1 line

* 2018-11-04
------------------------------------------------------------------------
r65518 | naruse | 2018-11-04 08:08:08 +0900 (Sun, 04 Nov 2018) | 4 lines

Just skip on armv7l-linux

it seems ssl.close doesn't cause EOFError on client side, but just skip
because it breaks test-all.
------------------------------------------------------------------------
r65517 | hsbt | 2018-11-03 21:31:51 +0900 (Sat, 03 Nov 2018) | 3 lines

Merge rubygems-3.0.0.beta2.

  * It enabled `USE_BUNDLER_FOR_GEMDEPS` for using gemdeps of rubygems.
------------------------------------------------------------------------
r65516 | k0kubun | 2018-11-03 21:24:49 +0900 (Sat, 03 Nov 2018) | 7 lines

Always inline rb_to_integer to prevent a method call penalty

for integer types

Close https://github.com/ruby/ruby/pull/2001

Co-Authored-By: methodmissing <lourens@methodmissing.com>
------------------------------------------------------------------------
r65515 | ko1 | 2018-11-03 20:20:54 +0900 (Sat, 03 Nov 2018) | 5 lines

expose `rb_ary_detransient`.

* internal.h: expose `rb_ary_detransient`. I'm not sure why there are
  no many troubles without this patch...

------------------------------------------------------------------------
r65514 | stomar | 2018-11-03 17:43:19 +0900 (Sat, 03 Nov 2018) | 5 lines

lib/racc/parser.rb: use require for racc/cparse

* lib/racc/parser.rb: reverted r65505.  require_relative does
  not work for racc/cparse.so, as extension libraries are placed
  in other directories than Ruby libraries.
------------------------------------------------------------------------
r65513 | nobu | 2018-11-03 16:58:56 +0900 (Sat, 03 Nov 2018) | 7 lines

hash.c: fix types

* hash.c (RHASH_ARRAY_BOUND_RAW): should be unsigned as well as
  RHASH_ARRAY_SIZE_RAW.

* hash.c (find_entry): return unsigned for the consistency with
  RHASH_ARRAY_SIZE and RHASH_ARRAY_BOUND.
------------------------------------------------------------------------
r65512 | nobu | 2018-11-03 15:55:57 +0900 (Sat, 03 Nov 2018) | 3 lines

internal.h: RHASH_ARRAY_SIZE_RAW value is unsigned

and get rid of warnings.  [ruby-core:89688] [Bug #15279]
------------------------------------------------------------------------
r65511 | nobu | 2018-11-03 14:29:02 +0900 (Sat, 03 Nov 2018) | 5 lines

lib/cgi/util.rb: use require

* lib/cgi/util.rb: reverted r65505.  require_relative does not
  work for cgi/escape.so, as extension libraries are placed in
  other directories than ruby libraries.  [Bug #15206]
------------------------------------------------------------------------
r65510 | k0kubun | 2018-11-03 09:44:04 +0900 (Sat, 03 Nov 2018) | 1 line

wercker.yml: use pipeline name for notification [ci skip]
------------------------------------------------------------------------
r65509 | hsbt | 2018-11-03 08:07:56 +0900 (Sat, 03 Nov 2018) | 8 lines

Added bundler as default gems. Revisit [Feature #12733]

  * bin/*, lib/bundler/*, lib/bundler.rb, spec/bundler, man/*:
    Merge from latest stable branch of bundler/bundler repository and
    added workaround patches. I will backport them into upstream.
  * common.mk, defs/gmake.mk: Added `test-bundler` task for test suite
    of bundler.
  * tool/sync_default_gems.rb: Added sync task for bundler.
------------------------------------------------------------------------
r65508 | ktsj | 2018-11-03 07:28:21 +0900 (Sat, 03 Nov 2018) | 1 line

common.mk: --no-ri and --no-rdoc options were removed
------------------------------------------------------------------------
r65507 | marcandre | 2018-11-03 02:52:51 +0900 (Sat, 03 Nov 2018) | 3 lines

lib/matrix.rb: Make Matrix & Vector mutable. Add #[]=, #map!.

Adapted from patch by Grzegorz Jakubiak. [#14151] [Fix GH-1769] [Fix GH-1905]
------------------------------------------------------------------------
r65506 | marcandre | 2018-11-03 02:52:43 +0900 (Sat, 03 Nov 2018) | 3 lines

lib/*: Prefer require_relative over require, remove explicit extension

[#15206] [Fix GH-1976]
------------------------------------------------------------------------
r65505 | marcandre | 2018-11-03 02:52:33 +0900 (Sat, 03 Nov 2018) | 3 lines

lib/*: Prefer require_relative over require.

[#15206] [Fix GH-1976]
------------------------------------------------------------------------
r65504 | marcandre | 2018-11-03 02:52:20 +0900 (Sat, 03 Nov 2018) | 1 line

lib/matrix: Use consistent style
------------------------------------------------------------------------
r65503 | marcandre | 2018-11-03 02:52:12 +0900 (Sat, 03 Nov 2018) | 1 line

lib/matrix: use consistent style
------------------------------------------------------------------------
r65502 | marcandre | 2018-11-03 02:52:05 +0900 (Sat, 03 Nov 2018) | 1 line

lib/matrix.rb: Alias antisymmetric? with skew_symmetric?
------------------------------------------------------------------------
r65501 | svn | 2018-11-03 02:51:57 +0900 (Sat, 03 Nov 2018) | 1 line

* 2018-11-03
------------------------------------------------------------------------
r65500 | marcandre | 2018-11-03 02:51:56 +0900 (Sat, 03 Nov 2018) | 3 lines

Revert "Matrix: Add #reflexive? method. [Fix GH-1730]"

This reverts commit 19fe6552c456e41c0b85816806399ca1609255c0.
------------------------------------------------------------------------
r65499 | naruse | 2018-11-02 22:30:48 +0900 (Fri, 02 Nov 2018) | 3 lines

Add timeout

it breaks armv7 CI.
------------------------------------------------------------------------
r65498 | k0kubun | 2018-11-02 21:21:59 +0900 (Fri, 02 Nov 2018) | 3 lines

README.md: add wercker status badge [ci skip]

and show trunk branch's build status for travis as well
------------------------------------------------------------------------
r65497 | svn | 2018-11-02 20:40:46 +0900 (Fri, 02 Nov 2018) | 1 line

* 2018-11-02
------------------------------------------------------------------------
r65496 | k0kubun | 2018-11-02 20:40:43 +0900 (Fri, 02 Nov 2018) | 4 lines

mjit_worker.c: do no access pointer after free

When we return there, `unit` is already freed.
This is detected by coverity scan.
------------------------------------------------------------------------
r65495 | normal | 2018-11-01 23:10:47 +0900 (Thu, 01 Nov 2018) | 17 lines

thread_pthread.c (native_ppoll_sleep): new eventfd (or pipe) for ubf

Relying on ubf_select + ubf_list for main thread is not
guaranteed to wake a process up as it does not acquire
sigwait_fd and all other threads may be sleeping.
native_cond_sleep and the sigwait_fd path are immune to TOCTOU
issues, but native_ppoll_sleep may have its wakeup stolen
by sigwait_fd sleeper and the RUBY_VM_INTERRUPTED check is
insufficient.

Note: for pthreads platforms without POSIX timers, this becomes
more expensive than Ruby 2.5, as six pipe FDs come into use.
Linux is best off with only two descriptors for eventfd.

[ruby-core:89655]
cf. http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1437559
    http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1437673
------------------------------------------------------------------------
r65494 | k0kubun | 2018-11-01 22:49:33 +0900 (Thu, 01 Nov 2018) | 6 lines

wercker.yml: stop allowing webrick failure

Failure seems no longer reproductive recently...

Also I wrote a comment about this complicated test matrix and improved
parallelism a little more again.
------------------------------------------------------------------------
r65493 | svn | 2018-11-01 17:53:53 +0900 (Thu, 01 Nov 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r65492 | ko1 | 2018-11-01 17:53:44 +0900 (Thu, 01 Nov 2018) | 5 lines

introduce USE_TRANSIENT_HEAP to enable/disable theap.

* include/ruby/ruby.h: intrdocue `USE_TRANSIENT_HEAP` macro
  to enable/disable transient heap.

------------------------------------------------------------------------
r65491 | ko1 | 2018-11-01 17:15:42 +0900 (Thu, 01 Nov 2018) | 2 lines

add dependencies to transient_heap.h.

------------------------------------------------------------------------
r65490 | svn | 2018-11-01 16:49:07 +0900 (Thu, 01 Nov 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65489 | k0kubun | 2018-11-01 16:49:06 +0900 (Thu, 01 Nov 2018) | 6 lines

TestDelegateClass.rb: skip test_frozen for --jit-wait

for now. Investigating.
https://app.wercker.com/ruby/ruby/runs/mjit-test2/5bda979a191eda000655a8d2?step=5bda9fe4591ca80007653f64

wercker.yml: improve parallelism again.
------------------------------------------------------------------------
r65488 | kazu | 2018-11-01 16:25:50 +0900 (Thu, 01 Nov 2018) | 1 line

Fix call-seq of OpenSSL.fips_mode and WIN32OLE_METHOD#name [ci skip]
------------------------------------------------------------------------
r65487 | kazu | 2018-11-01 15:36:04 +0900 (Thu, 01 Nov 2018) | 5 lines

Fix call-seq of Encoding::Converter#putback [ci skip]

[Fix GH-1999]

From: Takayuki Matsubara <takayuki.1229@gmail.com>
------------------------------------------------------------------------
r65486 | k0kubun | 2018-11-01 15:03:29 +0900 (Thu, 01 Nov 2018) | 3 lines

wercker.yml: improve parallelism more

mjit-test2 is taking more time now.
------------------------------------------------------------------------
r65485 | usa | 2018-11-01 14:19:16 +0900 (Thu, 01 Nov 2018) | 4 lines

Remove wrong spec.

[Bug#15067] [ruby-core:88828]

------------------------------------------------------------------------
r65484 | k0kubun | 2018-11-01 14:17:08 +0900 (Thu, 01 Nov 2018) | 1 line

wercker.yml: improve CI step message [ci skip]
------------------------------------------------------------------------
r65483 | k0kubun | 2018-11-01 14:03:59 +0900 (Thu, 01 Nov 2018) | 3 lines

wercker.yml: change pipeline names

because the name "-wait" is no longer distinguishing these pipelines
------------------------------------------------------------------------
r65482 | k0kubun | 2018-11-01 13:46:46 +0900 (Thu, 01 Nov 2018) | 1 line

wercker.yml: delete obsoleted test definition
------------------------------------------------------------------------
r65481 | k0kubun | 2018-11-01 13:43:40 +0900 (Thu, 01 Nov 2018) | 1 line

wercker.yml: improve parallelism of test-mjit and test-mjit-wait
------------------------------------------------------------------------
r65480 | k0kubun | 2018-11-01 13:20:26 +0900 (Thu, 01 Nov 2018) | 4 lines

test_win32ole_event.rb: retry #test_s_new_loop with sleep

It seems to fail randomly:
https://ci.appveyor.com/project/ruby/ruby/builds/19963142/job/8gaxepksa0i3b998
------------------------------------------------------------------------
r65479 | ko1 | 2018-11-01 11:50:35 +0900 (Thu, 01 Nov 2018) | 4 lines

fix WB miss.

* hash.c (linear_copy): remember a hash object to mark pointing objects.

------------------------------------------------------------------------
r65478 | k0kubun | 2018-11-01 11:50:10 +0900 (Thu, 01 Nov 2018) | 4 lines

wercker.yml: harder test-mjit-wait testing

Currently TracePoint enablement may cancel all JITs. So for now,
separating test executions would reveal more failures.
------------------------------------------------------------------------
r65477 | k0kubun | 2018-11-01 10:47:26 +0900 (Thu, 01 Nov 2018) | 4 lines

mjit_worker.c: emphasize free_list of compact_units [ci skip]

In https://bugs.ruby-lang.org/issues/14867#note-98, it's considered
useless at once. So I emphasized the necessity of it in the comment.
------------------------------------------------------------------------
r65476 | svn | 2018-11-01 08:55:24 +0900 (Thu, 01 Nov 2018) | 1 line

* 2018-11-01
------------------------------------------------------------------------
r65475 | normal | 2018-11-01 08:55:22 +0900 (Thu, 01 Nov 2018) | 10 lines

mjit: get rid of rb_mjit_unit_node and use ccan/list

rb_mjit_unit can either exist in unit_queue or active_units, but
not both.  This will make state transitions for event-based MJIT
process management easier.

v2: recheck unit->iseq after GC wakeup

The iseq may be GC-ed while we were waiting for it since we
delete the unit from unit_queue during get_from_list
------------------------------------------------------------------------
r65474 | k0kubun | 2018-10-31 22:12:39 +0900 (Wed, 31 Oct 2018) | 5 lines

Revert "revert r65471 and include Eric's patch as well"

This reverts commit ff5dc2cbbf9e7b67c8579ef166bf6a4755507304.

Deadlock: http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1438883
------------------------------------------------------------------------
r65473 | k0kubun | 2018-10-31 21:21:55 +0900 (Wed, 31 Oct 2018) | 6 lines

revert r65471 and include Eric's patch as well

https://bugs.ruby-lang.org/issues/14867#note-112

I wanna touch similar places. To avoid our conflict, let me merge Eric's patch earlier.
Let's watch trunk-mjit / trunk-mjit-wait CIs.
------------------------------------------------------------------------
r65472 | naruse | 2018-10-31 20:08:07 +0900 (Wed, 31 Oct 2018) | 1 line

Use C90 comments
------------------------------------------------------------------------
r65471 | normal | 2018-10-31 15:44:42 +0900 (Wed, 31 Oct 2018) | 6 lines

Revert "mjit: get rid of rb_mjit_unit_node and use ccan/list"

This reverts commit c5177fa8464ac304547e384583f9c287e124d34a. r65468

Many CI failures like:
 http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1438415
------------------------------------------------------------------------
r65470 | hsbt | 2018-10-31 12:23:30 +0900 (Wed, 31 Oct 2018) | 1 line

Merge upstream from rubygems/rubygems master branch.
------------------------------------------------------------------------
r65469 | shyouhei | 2018-10-31 12:19:37 +0900 (Wed, 31 Oct 2018) | 6 lines

explicit cast to void* required for %p

No automatic type promotion is expected for variadic arguments.
You have to do it by hand.


------------------------------------------------------------------------
r65468 | normal | 2018-10-31 12:02:01 +0900 (Wed, 31 Oct 2018) | 7 lines

mjit: get rid of rb_mjit_unit_node and use ccan/list

rb_mjit_unit can either exist in unit_queue or active_units, but
not both.  This will make state transitions for event-based MJIT
process management easier.

[ruby-core:89654]
------------------------------------------------------------------------
r65467 | nobu | 2018-10-31 11:57:30 +0900 (Wed, 31 Oct 2018) | 5 lines

parse.y: last node of NODE_ARRAY

* parse.y (heredoc_dedent): manage the last node of NODE_ARRAY,
  when concatenating dedented literals.
  [ruby-core:89649] [Bug #15272]
------------------------------------------------------------------------
r65466 | ko1 | 2018-10-31 11:39:08 +0900 (Wed, 31 Oct 2018) | 5 lines

remove '//' style comments.

* variable.c (obj_ivar_set): remove '//' style comments pointed out by the
  following build log: https://travis-ci.org/ruby/ruby/jobs/448551951

------------------------------------------------------------------------
r65465 | normal | 2018-10-31 11:31:15 +0900 (Wed, 31 Oct 2018) | 8 lines

thread_pthread.c (ubf_select): avoid deadlock on contention

vm->gvl.lock can be held by another thread, we must not wait
on it when called by the MJIT worker thread when it migrates
work to another thread.  ubf_select is designed to do retrying
anyways, so it has no obligation to wake up a timer thread.

cf.  http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1437880
------------------------------------------------------------------------
r65464 | ko1 | 2018-10-31 11:06:33 +0900 (Wed, 31 Oct 2018) | 5 lines

remove '//' style comments.

* hash.c: remove '//' style comments pointed out by the following
  build log: https://travis-ci.org/ruby/ruby/jobs/448551951

------------------------------------------------------------------------
r65463 | ko1 | 2018-10-31 10:36:39 +0900 (Wed, 31 Oct 2018) | 5 lines

add casts.

* gc.c (rb_raw_obj_info): fix type mismatch specified by the following
  build log: https://travis-ci.org/ruby/ruby/jobs/448634481

------------------------------------------------------------------------
r65462 | shyouhei | 2018-10-31 09:53:43 +0900 (Wed, 31 Oct 2018) | 7 lines

.travis.yml: mandate -ansi check

Seems it is failing to compile right now; make it mandatory
so that other devs can be aware of it.

Will revert this change once the source code gets stable.

------------------------------------------------------------------------
r65461 | hsbt | 2018-10-31 09:13:56 +0900 (Wed, 31 Oct 2018) | 1 line

Removed control characters from gemspec.
------------------------------------------------------------------------
r65460 | nobu | 2018-10-31 08:43:13 +0900 (Wed, 31 Oct 2018) | 5 lines

parse.y: last location from bison

* parse.y (command): set the last location from the location
  managed by bison, so that other nodes are not needed.
  [ruby-core:89648] [Bug #15271]
------------------------------------------------------------------------
r65459 | k0kubun | 2018-10-31 08:16:16 +0900 (Wed, 31 Oct 2018) | 7 lines

revert r65441

I could collect 2 test failure information:
https://app.wercker.com/ruby/ruby/runs/test-mjit-wait/5bd8a253191eda0006545d47?step=5bd8a29387436a0006842ef0
https://app.wercker.com/ruby/ruby/runs/test-mjit-wait/5bd8c6e0191eda0006547273?step=5bd8c71a591ca8000756f4a3

I'll skip this again to make it functional as CI
------------------------------------------------------------------------
r65458 | ko1 | 2018-10-31 07:55:31 +0900 (Wed, 31 Oct 2018) | 13 lines

fix type.

* internal.h (RHASH_ARRAY_SIZE_RAW): should be `int` because
  it returns n<=8.

* hash.c (RHASH_ARRAY_BOUND_RAW): ditto.

* hash.c (RHASH_ARRAY_SIZE_RAW): remove a duplicated definition.

* hash.c (linear_keys, linear_values): return `long`.

* hash.c (linear_keys): fix initialize expression of `key_end`.

------------------------------------------------------------------------
r65457 | ko1 | 2018-10-31 07:24:35 +0900 (Wed, 31 Oct 2018) | 1 line

update NEWS about theap
------------------------------------------------------------------------
r65456 | ko1 | 2018-10-31 07:16:26 +0900 (Wed, 31 Oct 2018) | 4 lines

fix type.

* string.c (rb_str_format_m): should pass `int`.

------------------------------------------------------------------------
r65455 | svn | 2018-10-31 07:12:12 +0900 (Wed, 31 Oct 2018) | 1 line

* remove trailing spaces, expand tabs.
------------------------------------------------------------------------
r65454 | ko1 | 2018-10-31 07:11:51 +0900 (Wed, 31 Oct 2018) | 14 lines

support theap for T_HASH. [Feature #14989]

* hash.c, internal.h: support theap for small Hash.
  Introduce RHASH_ARRAY (li_table) besides st_table and small Hash
  (<=8 entries) are managed by an array data structure.
  This array data can be managed by theap.
  If st_table is needed, then converting array data to st_table data.

  For st_table using code, we prepare "stlike" APIs which accepts hash value
  and are very similar to st_ APIs.

  This work is based on the GSoC achievement
  by tacinight <tacingiht@gmail.com> and refined by ko1.

------------------------------------------------------------------------
r65453 | svn | 2018-10-31 07:03:48 +0900 (Wed, 31 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65452 | ko1 | 2018-10-31 07:03:42 +0900 (Wed, 31 Oct 2018) | 4 lines

support theap for T_STRUCT.

* struct.c: members memory can use theap.

------------------------------------------------------------------------
r65451 | ko1 | 2018-10-31 07:01:17 +0900 (Wed, 31 Oct 2018) | 7 lines

support theap for T_OBJECT.

* variable.c: now instance variable space has theap supports.
  obj_ivar_heap_alloc() tries to acquire memory from theap.

* debug_counter.h: add some counters for theap.

------------------------------------------------------------------------
r65450 | svn | 2018-10-31 06:54:13 +0900 (Wed, 31 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65449 | ko1 | 2018-10-31 06:53:56 +0900 (Wed, 31 Oct 2018) | 28 lines

introduce TransientHeap. [Bug #14858]

* transient_heap.c, transient_heap.h: implement TransientHeap (theap).
  theap is designed for Ruby's object system. theap is like Eden heap
  on generational GC terminology. theap allocation is very fast because
  it only needs to bump up pointer and deallocation is also fast because
  we don't do anything. However we need to evacuate (Copy GC terminology)
  if theap memory is long-lived. Evacuation logic is needed for each type.

  See [Bug #14858] for details.

* array.c: Now, theap for T_ARRAY is supported.

  ary_heap_alloc() tries to allocate memory area from theap. If this trial
  sccesses, this array has theap ptr and RARRAY_TRANSIENT_FLAG is turned on.
  We don't need to free theap ptr.

* ruby.h: RARRAY_CONST_PTR() returns malloc'ed memory area. It menas that
  if ary is allocated at theap, force evacuation to malloc'ed memory.
  It makes programs slow, but very compatible with current code because
  theap memory can be evacuated (theap memory will be recycled).

  If you want to get transient heap ptr, use RARRAY_CONST_PTR_TRANSIENT()
  instead of RARRAY_CONST_PTR(). If you can't understand when evacuation
  will occur, use RARRAY_CONST_PTR().

(re-commit of r65444)

------------------------------------------------------------------------
r65448 | svn | 2018-10-31 06:02:12 +0900 (Wed, 31 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65447 | ko1 | 2018-10-31 06:01:55 +0900 (Wed, 31 Oct 2018) | 1 line

revert r65444 and r65446 because of commit miss
------------------------------------------------------------------------
r65446 | ko1 | 2018-10-31 05:49:35 +0900 (Wed, 31 Oct 2018) | 7 lines

support theap for T_OBJECT.

* variable.c: now instance variable space has theap supports.
  obj_ivar_heap_alloc() tries to acquire memory from theap.

* debug_counter.h: add some counters for theap.

------------------------------------------------------------------------
r65445 | svn | 2018-10-31 05:46:47 +0900 (Wed, 31 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65444 | ko1 | 2018-10-31 05:46:24 +0900 (Wed, 31 Oct 2018) | 26 lines

introduce TransientHeap. [Bug #14858]

* transient_heap.c, transient_heap.h: implement TransientHeap (theap).
  theap is designed for Ruby's object system. theap is like Eden heap
  on generational GC terminology. theap allocation is very fast because
  it only needs to bump up pointer and deallocation is also fast because
  we don't do anything. However we need to evacuate (Copy GC terminology)
  if theap memory is long-lived. Evacuation logic is needed for each type.

  See [Bug #14858] for details.

* array.c: Now, theap for T_ARRAY is supported.

  ary_heap_alloc() tries to allocate memory area from theap. If this trial
  sccesses, this array has theap ptr and RARRAY_TRANSIENT_FLAG is turned on.
  We don't need to free theap ptr.

* ruby.h: RARRAY_CONST_PTR() returns malloc'ed memory area. It menas that
  if ary is allocated at theap, force evacuation to malloc'ed memory.
  It makes programs slow, but very compatible with current code because
  theap memory can be evacuated (theap memory will be recycled).

  If you want to get transient heap ptr, use RARRAY_CONST_PTR_TRANSIENT()
  instead of RARRAY_CONST_PTR(). If you can't understand when evacuation
  will occur, use RARRAY_CONST_PTR().

------------------------------------------------------------------------
r65443 | normal | 2018-10-31 03:26:12 +0900 (Wed, 31 Oct 2018) | 6 lines

mjit.c (free_list): clear .length

For robustness against future changes. There should be no impact
at the moment,here, but we may call mjit_finish more than once
in a process lifetime in the future (implementing "stop"
instead of just "pause")
------------------------------------------------------------------------
r65442 | svn | 2018-10-31 00:39:19 +0900 (Wed, 31 Oct 2018) | 1 line

* 2018-10-31
------------------------------------------------------------------------
r65441 | k0kubun | 2018-10-31 00:39:18 +0900 (Wed, 31 Oct 2018) | 5 lines

wercker.yml: try testing wercker again

I don't think we fixed that, but if so, I would like to see more test
failures. Previous failures didn't keep enough C-backtrace information
about the failure and it's hard to debug for now.
------------------------------------------------------------------------
r65440 | k0kubun | 2018-10-30 23:57:03 +0900 (Tue, 30 Oct 2018) | 8 lines

_mjit_compile_send.erb: do not inline tailcall ISeq

because it's not supported by this file. Also, shared `def_iseq_ptr`
instead of copying the main definition of it.

vm_core.h: moved `def_iseq_ptr` to this place. added `inline` to avoid
compiler warnings since it's not used in some files including vm_core.h.
vm_insnhelper.c: moved `def_iseq_ptr` to vm_core.h.
------------------------------------------------------------------------
r65439 | svn | 2018-10-30 12:22:09 +0900 (Tue, 30 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65438 | ko1 | 2018-10-30 12:21:56 +0900 (Tue, 30 Oct 2018) | 2 lines

use RARRAY_AREF() instead of RARRAY_CONST_PTR().

------------------------------------------------------------------------
r65437 | normal | 2018-10-30 10:34:48 +0900 (Tue, 30 Oct 2018) | 16 lines

process.c: implement rb_f_system without toggling ruby_nocldwait

Following how mjit_worker.c currently works, rb_f_system
now ensures the VM-wide waitpid lists is locked before
creating a new process via fork/vfork.

This ensures other rb_waitpid callers cannot steal work and
there are no possible race conditions from toggling
ruby_nocldwait without the use of atomics.

This sets us up for implementing MJIT process management
logic using normal Ruby APIs prepares us for VM-wide
asynchronous/event-base waitpid which can allow MJIT to
work without worker threads.

Take 2: set waitpid_state.pid on platforms w/o fork.
------------------------------------------------------------------------
r65436 | normal | 2018-10-30 10:12:38 +0900 (Tue, 30 Oct 2018) | 4 lines

revert r65434

http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20181030T003541Z.fail.html.gz
I have no chance of getting anything to work on proprietary platforms :<
------------------------------------------------------------------------
r65435 | svn | 2018-10-30 08:52:45 +0900 (Tue, 30 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65434 | normal | 2018-10-30 08:52:39 +0900 (Tue, 30 Oct 2018) | 14 lines

process.c: implement rb_f_system without toggling ruby_nocldwait

Following how mjit_worker.c currently works, rb_f_system
now ensures the VM-wide waitpid lists is locked before
creating a new process via fork/vfork.

This ensures other rb_waitpid callers cannot steal work and
there are no possible race conditions from toggling
ruby_nocldwait without the use of atomics.

This sets us up for implementing MJIT process management
logic using normal Ruby APIs prepares us for VM-wide
asynchronous/event-base waitpid which can allow MJIT to
work without worker threads.
------------------------------------------------------------------------
r65433 | ko1 | 2018-10-30 03:03:13 +0900 (Tue, 30 Oct 2018) | 5 lines

use `rb_hash_new_compare_by_id()`.

* vm_eval.c (local_var_list_init): use `rb_hash_new_compare_by_id()`
  directly instead of manipulating st_table.

------------------------------------------------------------------------
r65432 | svn | 2018-10-30 03:00:15 +0900 (Tue, 30 Oct 2018) | 1 line

* 2018-10-30
------------------------------------------------------------------------
r65431 | svn | 2018-10-30 03:00:14 +0900 (Tue, 30 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65430 | ko1 | 2018-10-30 03:00:02 +0900 (Tue, 30 Oct 2018) | 6 lines

use RARRAY_AREF() instead of RARRAY_CONST_PTR().

* class.c (rb_keyword_error_new): use RARRAY_AREF() because
  RARRAY_CONST_PTR() can introduce additional overhead in a futre.
  Same fixes for other files.

------------------------------------------------------------------------
r65429 | kazu | 2018-10-29 22:30:01 +0900 (Mon, 29 Oct 2018) | 1 line

compile.c: fix up r65411
------------------------------------------------------------------------
r65428 | nobu | 2018-10-29 17:11:25 +0900 (Mon, 29 Oct 2018) | 1 line

time.c: [DOC] fix method names to refer class methods [ci skip]
------------------------------------------------------------------------
r65427 | nobu | 2018-10-29 15:23:21 +0900 (Mon, 29 Oct 2018) | 3 lines

Mark up code inside link text as <code>

Merged https://github.com/ruby/rdoc/pull/660
------------------------------------------------------------------------
r65426 | shyouhei | 2018-10-29 12:21:22 +0900 (Mon, 29 Oct 2018) | 7 lines

less verbose code by sharing attribute definitions

The idea behind this commit is that handles_sp and leaf are two
concepts that are not mutually independent.  By making one explicitly
depend another, we can reduces the number of lines of codes written,
thus making things concise.

------------------------------------------------------------------------
r65425 | shyouhei | 2018-10-29 11:07:52 +0900 (Mon, 29 Oct 2018) | 6 lines

bare_instructions.rb: sort attributes [ci skip]

This enhances stability of the generated source code (namely
insns_info.inc) across attribute insertion / deletion.  It does
not change the compiled binary at all; just a bit of readability.

------------------------------------------------------------------------
r65424 | naruse | 2018-10-29 02:03:36 +0900 (Mon, 29 Oct 2018) | 3 lines

Revert "Add test for cause on pty"

This reverts commit r65422.
------------------------------------------------------------------------
r65423 | svn | 2018-10-29 01:06:57 +0900 (Mon, 29 Oct 2018) | 1 line

* 2018-10-29
------------------------------------------------------------------------
r65422 | naruse | 2018-10-29 01:06:56 +0900 (Mon, 29 Oct 2018) | 1 line

Add test for cause on pty
------------------------------------------------------------------------
r65421 | nobu | 2018-10-28 21:05:19 +0900 (Sun, 28 Oct 2018) | 1 line

time.c: added Time::TM#+ and Time::TM#-
------------------------------------------------------------------------
r65420 | nobu | 2018-10-28 21:05:18 +0900 (Sun, 28 Oct 2018) | 4 lines

time.c: ignore 7th arg

* time.c (tm_initialize): allow 7th argument as well as
  Time#initialize, but just ignore.
------------------------------------------------------------------------
r65419 | nobu | 2018-10-28 21:05:17 +0900 (Sun, 28 Oct 2018) | 1 line

time.c: [DOC] add description and fix markups [ci skip]
------------------------------------------------------------------------
r65418 | k0kubun | 2018-10-28 18:06:54 +0900 (Sun, 28 Oct 2018) | 1 line

appveyor.yml: fix wrong path to test directory
------------------------------------------------------------------------
r65417 | k0kubun | 2018-10-28 16:44:59 +0900 (Sun, 28 Oct 2018) | 4 lines

appveyor.yml: run test_open-uri separately

on msys2 because it sometimes crashes worker like
https://ci.appveyor.com/project/ruby/ruby/builds/19853558/job/8v1ehnv40bggiode
------------------------------------------------------------------------
r65416 | suke | 2018-10-28 15:37:33 +0900 (Sun, 28 Oct 2018) | 17 lines

require fixtures/classes only when platform is windows.

* spec/ruby/library/win32ole/fixtures/classes.rb: remove rescue block
  because this file is required when platform is Windows.
* spec/ruby/library/win32ole/win32ole/_getproperty_spec.rb:
  fixtures/classes is required when platform is Windows
* spec/ruby/library/win32ole/win32ole/_invoke_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/codepage_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/connect_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/const_load_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/constants_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/create_guid_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/invoke_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/locale_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/new_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/ole_get_methods_spec.rb: ditto.
------------------------------------------------------------------------
r65415 | suke | 2018-10-28 15:16:18 +0900 (Sun, 28 Oct 2018) | 4 lines

Refactoring. remove Internet Explorer.

* spec/ruby/library/win32ole/win32ole/ole_methods_spec.rb: refactoring.
  remove Internet Explorer.
------------------------------------------------------------------------
r65414 | suke | 2018-10-28 15:11:30 +0900 (Sun, 28 Oct 2018) | 6 lines

use MSXML.DOMDocument instead of InternetExplorer.Application

* spec/ruby/library/win32ole/fixtures/event.xml use MSXML.DOMDocument
  instead of InternetExplorer.Application. InternetExplorer.Application
  is not available on some environments. Thanks to MSP-Greg (Greg L).
* spec/ruby/library/win32ole/win32ole_event/on_event_spec.rb: ditto.
------------------------------------------------------------------------
r65413 | nobu | 2018-10-28 14:53:57 +0900 (Sun, 28 Oct 2018) | 1 line

time.c: [DOC] fix rdoc-ref [ci skip]
------------------------------------------------------------------------
r65412 | suke | 2018-10-28 14:40:41 +0900 (Sun, 28 Oct 2018) | 5 lines

use MSXML.DOMDocument instead of InternetExplorer.Application.

* spec/ruby/library/win32ole/win32ole_event/new_spec.rb: use
  MSXML.DOMDocument. InternetExplorer.Application is not available on
  some environments. Thanks to MSP-Greg (Greg L).
------------------------------------------------------------------------
r65411 | ko1 | 2018-10-28 14:09:58 +0900 (Sun, 28 Oct 2018) | 5 lines

use a rb_ function instead of st_ directly.

* compile.c (ibf_dump_object_hash): use `rb_hash_foreach()`
  instead of using `st_foreach()`.

------------------------------------------------------------------------
r65410 | suke | 2018-10-28 14:08:37 +0900 (Sun, 28 Oct 2018) | 5 lines

use Scripting.Dictionary instead of InternetExplorer.Application.

* spec/ruby/library/win32ole/win32ole/shared/setproperty.rb: use
  Scripting.Dictionary. InternetExplorer.Application is not available on
  some environments. Thanks to MSP-Greg (Greg L).
------------------------------------------------------------------------
r65409 | suke | 2018-10-28 13:38:49 +0900 (Sun, 28 Oct 2018) | 5 lines

use Scripting.Dictionary instead of InternetExplorer.Application.

* spec/ruby/library/win32ole/win32ole/ole_put_methods_spec.rb: use
  Scripting.Dictionary. InternetExplorer.Application is not available on
  some enviroments. Thanks to MSP-Greg (Greg L).
------------------------------------------------------------------------
r65408 | suke | 2018-10-28 13:25:55 +0900 (Sun, 28 Oct 2018) | 5 lines

use Scripting.Dictionary instead of InternetExplorer.Application.

* spec/ruby/library/win32ole/win32ole/ole_methods_spec.rb: use Scripting
  Dictionary. InternetExplorer.Application is not available on some
  environments. Thanks to MSP-Greg (Greg L).
------------------------------------------------------------------------
r65407 | suke | 2018-10-28 13:18:53 +0900 (Sun, 28 Oct 2018) | 5 lines

use Scripting.Dictionary instead of InternetExplorer.Application

* spec/ruby/library/win32ole/win32ole/ole_obj_help_spec.rb: use
  Scripting.Dictionary. InternetExplorer.Application is not available on
  some environments. Thanks to MSP-Greg (Greg L).
------------------------------------------------------------------------
r65406 | nobu | 2018-10-28 13:00:26 +0900 (Sun, 28 Oct 2018) | 1 line

time.c: [DOC] about timezone arguemnt [ci skip]
------------------------------------------------------------------------
r65405 | suke | 2018-10-28 12:48:17 +0900 (Sun, 28 Oct 2018) | 8 lines

use Scripting.Dictionary instead of InternetExplorer.Application

* spec/ruby/library/win32ole/win32ole/ole_method_spec.rb: recuire in
  platform_is block.
* spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/shared/ole_method.rb: use
  Scripting.Dictionary. InternetExplorer.Application is not available on
  some environments. Thanks to MSP-Greg (Greg L).
------------------------------------------------------------------------
r65404 | nobu | 2018-10-28 10:58:27 +0900 (Sun, 28 Oct 2018) | 1 line

NEWS: codify keywords and callback methods [ci skip]
------------------------------------------------------------------------
r65403 | nobu | 2018-10-28 10:56:28 +0900 (Sun, 28 Oct 2018) | 6 lines

rdoc/parser/c.rb: ignore dynamically added methods

* lib/rdoc/parser/c.rb (RDoc::Parser::C#deduplicate_call_seq):
  skip dynamically added methods at runtime, because the class
  name is unknown and the defined methods are not accessible from
  that class.
------------------------------------------------------------------------
r65402 | k0kubun | 2018-10-28 10:19:30 +0900 (Sun, 28 Oct 2018) | 4 lines

revert r65401

Because it does break Linux CI like:
https://gist.github.com/ko1/2c561f9185492f339cf7a763ea219e79
------------------------------------------------------------------------
r65401 | suke | 2018-10-28 10:08:42 +0900 (Sun, 28 Oct 2018) | 4 lines

remove rescue block when win32ole is required

* spec/ruby/library/win32ole/fixtures/classes.rb: remove rescue block
  because this file is required on Windows only.
------------------------------------------------------------------------
r65400 | suke | 2018-10-28 10:03:49 +0900 (Sun, 28 Oct 2018) | 5 lines

use Scripting.Dictionary instead of InternetExplorer.Application

* spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb: use
  Scripting.Dictionary. InternetExplorer.Application is not available on
  some environment. Thanks to MSP-Greg (Greg L).
------------------------------------------------------------------------
r65399 | suke | 2018-10-28 08:37:58 +0900 (Sun, 28 Oct 2018) | 5 lines

use Scripting.Dictionary instead of InternetExplorer.Application.

* spec/ruby/library/win32ole/invoke_spec.rb: use Scripting.Dictionary
  instead of InternetExplorer.Application. InternetExplorer.Application
  is not available on some environment. Thanks to MSP-Greg (Greg L).
------------------------------------------------------------------------
r65398 | suke | 2018-10-28 08:21:29 +0900 (Sun, 28 Oct 2018) | 6 lines

use Scripting.Dictionary instead of InternetExplorer.Application for
_getproperty spec.

* spec/ruby/library/win32ole/_getproperty_spec.rb: use
  Scripting.Dictionary. InternetExplorer.Application is not available on
  some environment. (Thanks to MSP-Greg (Greg L))
------------------------------------------------------------------------
r65397 | naruse | 2018-10-28 08:15:43 +0900 (Sun, 28 Oct 2018) | 1 line

fix test
------------------------------------------------------------------------
r65396 | naruse | 2018-10-28 08:13:34 +0900 (Sun, 28 Oct 2018) | 1 line

fix error message and backtrace order
------------------------------------------------------------------------
r65395 | suke | 2018-10-28 07:50:08 +0900 (Sun, 28 Oct 2018) | 4 lines

add WIN32OLESpecs::MSXML_AVAILABLE

* spec/ruby/library/win32ole/fixtures/classes.rb: add
WIN32OLESpecs::MSXML_AVAILABLE
------------------------------------------------------------------------
r65394 | svn | 2018-10-28 06:45:32 +0900 (Sun, 28 Oct 2018) | 1 line

* 2018-10-28
------------------------------------------------------------------------
r65393 | naruse | 2018-10-28 06:45:30 +0900 (Sun, 28 Oct 2018) | 4 lines

Print exception's cause like Java

Print `cause` of the exception if the exception is not caught and printed
its backtraces and error message [Feature #8257]
------------------------------------------------------------------------
r65392 | k0kubun | 2018-10-27 23:06:44 +0900 (Sat, 27 Oct 2018) | 6 lines

spec/../shared/exit.rb: move the mingw guard to here

from terminate_spec.rb, as suggested here:
https://github.com/ruby/ruby/commit/c7220bd3dea0a113b81f267cc3b656da7d7d7abb#commitcomment-31068714

to guard other inclusions.
------------------------------------------------------------------------
r65391 | k0kubun | 2018-10-27 22:57:23 +0900 (Sat, 27 Oct 2018) | 3 lines

revert r65389 and r64993

and move retry logic to internal method
------------------------------------------------------------------------
r65390 | eregon | 2018-10-27 20:42:21 +0900 (Sat, 27 Oct 2018) | 3 lines

Run specs on latest Ruby 2.3, which includes taint fixes

* The 2.3 alias in RVM seems to resolve to 2.3.7.
------------------------------------------------------------------------
r65389 | k0kubun | 2018-10-27 19:49:56 +0900 (Sat, 27 Oct 2018) | 4 lines

ole_func_methods_spec.rb: apply r64993 retry

to this spec as well, since the same issue was reproduced here
https://ci.appveyor.com/project/ruby/ruby/builds/19842006/job/y35ae6bquf4t3x30
------------------------------------------------------------------------
r65388 | eregon | 2018-10-27 19:48:40 +0900 (Sat, 27 Oct 2018) | 1 line

Update to ruby/spec@8b743a3
------------------------------------------------------------------------
r65387 | eregon | 2018-10-27 19:48:09 +0900 (Sat, 27 Oct 2018) | 1 line

Update to ruby/mspec@4729971
------------------------------------------------------------------------
r65386 | k0kubun | 2018-10-27 18:57:30 +0900 (Sat, 27 Oct 2018) | 6 lines

.travis.yml: investigate silent death of mspec

It looks like mspec worker may immediately die on Linux as well.
https://travis-ci.org/ruby/ruby/jobs/447018758

Dropping -j and add -fs to know which test dies.
------------------------------------------------------------------------
r65385 | kazu | 2018-10-27 17:17:01 +0900 (Sat, 27 Oct 2018) | 1 line

bootstraptest/test_insns.rb: test newhashfromarray
------------------------------------------------------------------------
r65384 | knu | 2018-10-27 16:22:38 +0900 (Sat, 27 Oct 2018) | 4 lines

Update the example of local variable shadowing

I came up with this snippet when we were trying to convince Matz.

------------------------------------------------------------------------
r65383 | k0kubun | 2018-10-27 14:14:46 +0900 (Sat, 27 Oct 2018) | 4 lines

test_io.rb: skip busy wait test again

which I tried to avoid skipping this in r65311, but the test seems not
working under some high load of ci.rvm.jp.
------------------------------------------------------------------------
r65382 | stomar | 2018-10-27 05:30:09 +0900 (Sat, 27 Oct 2018) | 6 lines

string.c: improve docs for String#strip and related

* string.c: [DOC] improve docs for String#{strip,lstrip,rstrip}{,!}:
  small clarification, avoid referring to the receiver as `str'
  (does not appear in the call-seq of the generated HTML docs),
  enable links for cross-references, simplify rdoc.
------------------------------------------------------------------------
r65381 | svn | 2018-10-27 02:08:33 +0900 (Sat, 27 Oct 2018) | 1 line

* 2018-10-27
------------------------------------------------------------------------
r65380 | nobu | 2018-10-27 02:08:30 +0900 (Sat, 27 Oct 2018) | 5 lines

Do not :stopdoc: entire classes/modules

It disables cross-references to the classes/modules, even if those
are defined in other places.  I suspect this is not an intentional
behavior, however make a workaround for the time being.
------------------------------------------------------------------------
r65379 | stomar | 2018-10-26 21:23:25 +0900 (Fri, 26 Oct 2018) | 1 line

proc.c: [DOC] improve docs for {Method,Proc}#===
------------------------------------------------------------------------
r65378 | stomar | 2018-10-26 21:21:22 +0900 (Fri, 26 Oct 2018) | 1 line

proc.c: [DOC] fix grammar in doc for Method#to_s
------------------------------------------------------------------------
r65377 | stomar | 2018-10-26 21:19:04 +0900 (Fri, 26 Oct 2018) | 1 line

object.c: [DOC] fix typos in doc for yield_self
------------------------------------------------------------------------
r65376 | stomar | 2018-10-26 21:16:25 +0900 (Fri, 26 Oct 2018) | 1 line

NEWS: fix typos
------------------------------------------------------------------------
r65375 | k0kubun | 2018-10-26 17:34:42 +0900 (Fri, 26 Oct 2018) | 5 lines

appveyor.yml: run second half of vs with -v

because it may silently die like
https://ci.appveyor.com/project/ruby/ruby/builds/19813015/job/a99c4hrs69g4iorg
and we can't know which test was bad.
------------------------------------------------------------------------
r65374 | nobu | 2018-10-26 15:41:34 +0900 (Fri, 26 Oct 2018) | 1 line

Fix a condition and just call rb_fstring [Feature #15251]
------------------------------------------------------------------------
r65373 | svn | 2018-10-26 15:18:30 +0900 (Fri, 26 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65372 | nobu | 2018-10-26 15:18:28 +0900 (Fri, 26 Oct 2018) | 1 line

Simplify conditions [Feature #15251]
------------------------------------------------------------------------
r65371 | normal | 2018-10-26 14:32:47 +0900 (Fri, 26 Oct 2018) | 9 lines

hash.c: aset deduplicates un-tainted string

We revisit [Bug #9188] since st.c is much improved since then,
and benchmarks against so_k_nucleotide seem to indicate little
or no performance change compared to before.

[ruby-core:89555] [Feature #15251]

From: Anmol Chopra <chopraanmol1@gmail.com>
------------------------------------------------------------------------
r65370 | nobu | 2018-10-26 13:46:24 +0900 (Fri, 26 Oct 2018) | 1 line

Indent as a code block [ci skip]
------------------------------------------------------------------------
r65369 | mame | 2018-10-26 12:10:02 +0900 (Fri, 26 Oct 2018) | 8 lines

parse.y: remove "shadowing outer local variable" warning

You can now write the following without warning.

    user = User.all.find {|user| cond(user) }

Fixes [Feature #12490].
A patch from Soutaro Matsumoto <matsumoto@soutaro.com>.
------------------------------------------------------------------------
r65368 | mame | 2018-10-26 12:08:10 +0900 (Fri, 26 Oct 2018) | 3 lines

Revert "parse.y: remove "shadowing outer local variable" warning"

I forgot to add the copyright of the patch...
------------------------------------------------------------------------
r65367 | mame | 2018-10-26 11:54:01 +0900 (Fri, 26 Oct 2018) | 7 lines

parse.y: remove "shadowing outer local variable" warning

You can now write the following without warning.

  user = User.all.find {|user| cond(user) }

Fixes [Feature #12490].
------------------------------------------------------------------------
r65366 | svn | 2018-10-26 10:47:14 +0900 (Fri, 26 Oct 2018) | 1 line

* 2018-10-26
------------------------------------------------------------------------
r65365 | nobu | 2018-10-26 10:47:09 +0900 (Fri, 26 Oct 2018) | 1 line

Update for tzdata-2018f
------------------------------------------------------------------------
r65364 | hsbt | 2018-10-25 19:16:28 +0900 (Thu, 25 Oct 2018) | 1 line

Added initialization task for default gems.
------------------------------------------------------------------------
r65363 | k0kubun | 2018-10-25 12:25:19 +0900 (Thu, 25 Oct 2018) | 5 lines

wercker.yml: skip webrick for test-mjit-wait for now

as failing
https://app.wercker.com/ruby/ruby/runs/test-mjit-wait/5bd092a89b1e440006d5780d?step=5bd092e3591ca80007258400
now and it needs some fix.
------------------------------------------------------------------------
r65362 | ko1 | 2018-10-25 11:23:58 +0900 (Thu, 25 Oct 2018) | 4 lines

add new counter about GC.

* debug_counter.h: add `gc_major_oldmalloc`.

------------------------------------------------------------------------
r65361 | kazu | 2018-10-25 11:07:47 +0900 (Thu, 25 Oct 2018) | 1 line

Fix a typo
------------------------------------------------------------------------
r65360 | nobu | 2018-10-25 09:36:23 +0900 (Thu, 25 Oct 2018) | 7 lines

time.c: benchmark recovery

* time.c (time_localtime): check if `vtm.zone` is a simple zone
  name string before trying to call the conversion method.  since
  r64952, `Time.getlocal` on UTC time has lost the performance
  about 45%, due to this call.  the performance is about 90% of
  r64951 by avoiding it.
------------------------------------------------------------------------
r65359 | ko1 | 2018-10-25 07:17:03 +0900 (Thu, 25 Oct 2018) | 4 lines

add new debug_counters for GC.

* debug_counter.h: add new debug counters to count GC.

------------------------------------------------------------------------
r65358 | k0kubun | 2018-10-25 00:49:03 +0900 (Thu, 25 Oct 2018) | 3 lines

wercker.yml: rearrange test split times

test-all2 is taking much longer time than test-all1 now.
------------------------------------------------------------------------
r65357 | svn | 2018-10-25 00:41:15 +0900 (Thu, 25 Oct 2018) | 1 line

* 2018-10-25
------------------------------------------------------------------------
r65356 | k0kubun | 2018-10-25 00:41:14 +0900 (Thu, 25 Oct 2018) | 24 lines

_mjit_compile_ivar.erb: cancel on undefined ivar

I assumed somehow this check was not needed, but it did need.
By canceling this instead of just warning here, we didn't lose the
current performance so much.

test_jit.rb: test the case that reproduces SEGV by that.

TestGemStreamUI.rb: delete. This test on --jit-wait is fixed.

=== Optcarrot Benchmark ===

$ benchmark-driver benchmark.yml --rbenv 'before::before --disable-gems --jit;after::after --disable-gems --jit' -v --repeat-count 24
before: ruby 2.6.0dev (2018-10-24 trunk 65355) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-10-24 trunk 65355) +JIT [x86_64-linux]
last_commit=_mjit_compile_ivar.erb: cancel on undefined ivar
Calculating -------------------------------------
                             before       after
Optcarrot Lan_Master.nes     85.344      84.849 fps

Comparison:
             Optcarrot Lan_Master.nes
                  before:        85.3 fps
                   after:        84.8 fps - 1.01x  slower
------------------------------------------------------------------------
r65355 | k0kubun | 2018-10-24 23:24:34 +0900 (Wed, 24 Oct 2018) | 1 line

test_jit.rb: test newhashfromarray
------------------------------------------------------------------------
r65354 | k0kubun | 2018-10-24 21:19:39 +0900 (Wed, 24 Oct 2018) | 5 lines

revert r65353 [ci skip]

As Wercker is managing workflow by GUI, the commit had no impact for
behavior... I already fixed the workflow on GUI. Let revert that to
change it back to natural order.
------------------------------------------------------------------------
r65353 | k0kubun | 2018-10-24 21:14:26 +0900 (Wed, 24 Oct 2018) | 3 lines

wercker.yml: run slower job first

to reduce time taken for finishing all jobs.
------------------------------------------------------------------------
r65352 | svn | 2018-10-24 21:13:29 +0900 (Wed, 24 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65351 | k0kubun | 2018-10-24 21:13:28 +0900 (Wed, 24 Oct 2018) | 4 lines

test/excludes/_wercker: skip tests

which are under investigation. I'm debugging it right now, but let's
make it green to stop bothering other development.
------------------------------------------------------------------------
r65350 | nobu | 2018-10-24 19:38:39 +0900 (Wed, 24 Oct 2018) | 5 lines

compile.c: fix peephole optimization

* compile.c (iseq_peephole_optimize): should `pop` before jump
  instruction which succeeds to `newarray` of a literal object,
  not after.  [ruby-core:89536] [Bug #15245]
------------------------------------------------------------------------
r65349 | svn | 2018-10-24 19:29:40 +0900 (Wed, 24 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65348 | k0kubun | 2018-10-24 19:29:39 +0900 (Wed, 24 Oct 2018) | 3 lines

wercker.yml: skip TestParallel::TestParallel#test_separate

for now. It's randomly failing on test-mjit-wait.
------------------------------------------------------------------------
r65347 | k0kubun | 2018-10-24 18:52:01 +0900 (Wed, 24 Oct 2018) | 4 lines

wercker.yml: try to split test-all again

TestParallel in test/testunit/... seems to be slow. Let's see if this
contributes to loosen timeout or not.
------------------------------------------------------------------------
r65346 | k0kubun | 2018-10-24 12:05:43 +0900 (Wed, 24 Oct 2018) | 4 lines

wercker.yml: skip test_queue_with_trap on -wait as well

It randomly failed.
https://app.wercker.com/ruby/ruby/runs/test-mjit-wait/5bcfd19aa9806e000655c598?step=5bcfd1d5acc4510006e00f77
------------------------------------------------------------------------
r65345 | ko1 | 2018-10-24 11:40:13 +0900 (Wed, 24 Oct 2018) | 5 lines

newhashfromarray should be a leaf insn.

* insns.def (newhashfromarray): `rb_hash_bulk_insert()` can call
  Ruby methods like #hash so that it should not be a leaf insn.

------------------------------------------------------------------------
r65344 | ko1 | 2018-10-24 11:12:35 +0900 (Wed, 24 Oct 2018) | 1 line

need a cast
------------------------------------------------------------------------
r65343 | ko1 | 2018-10-24 10:57:27 +0900 (Wed, 24 Oct 2018) | 31 lines

introduce new YARV insn newhashfromarray.

* insns.def (newhashfromarray): added to replace `core_hash_from_ary`
  method to eliminate method call overhead.

  On my environment, I got the following benchmark results:

  x = {x: 1}

                    modified:   7864988.6 i/s
                       trunk:   6004098.1 i/s - 1.31x  slower


  x = {x: 1, y: 2}

                       trunk:   6127338.4 i/s
                    modified:   5232380.0 i/s - 1.17x  slower


  x = {x: 1, y: 2, z: 3}

                    modified:   6089553.1 i/s
                       trunk:   5249333.5 i/s - 1.16x  slower

  This trivial improvement should be reconsider because of usage of
  this instruction.

* compile.c: ditto.

* defs/id.def, vm.c: remove unused functions.

------------------------------------------------------------------------
r65341 | svn | 2018-10-24 07:51:30 +0900 (Wed, 24 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65340 | k0kubun | 2018-10-24 07:51:28 +0900 (Wed, 24 Oct 2018) | 3 lines

wercker.yml: skip #test_queue_with_trap for now

only on --jit CI. This test doesn't work on AppVeyor mswin either.
------------------------------------------------------------------------
r65339 | k0kubun | 2018-10-24 01:49:55 +0900 (Wed, 24 Oct 2018) | 6 lines

wercker.yml: increase timeout scale

mainly for test-mjit.

TestThreadQueue#test_queue_with_trap timed out with 10s.
https://app.wercker.com/ruby/ruby/runs/test-mjit/5bcf4b5c9065740006f790ca?step=5bcf4b9787436a000648fbb7
------------------------------------------------------------------------
r65338 | k0kubun | 2018-10-24 01:23:55 +0900 (Wed, 24 Oct 2018) | 1 line

wercker.yml: run both --jit and --jit-wait
------------------------------------------------------------------------
r65337 | k0kubun | 2018-10-24 00:54:11 +0900 (Wed, 24 Oct 2018) | 1 line

wercker.yml: stop using my personal Docker container
------------------------------------------------------------------------
r65336 | nobu | 2018-10-24 00:29:01 +0900 (Wed, 24 Oct 2018) | 1 line

getifaddrs_spec.rb: `should` returned `nil` on success
------------------------------------------------------------------------
r65335 | k0kubun | 2018-10-24 00:09:49 +0900 (Wed, 24 Oct 2018) | 4 lines

wercker.yml: stop splitting test-all

since it actually doesn't contribute to CI build time so much, rather it
seems making it worse.
------------------------------------------------------------------------
r65334 | svn | 2018-10-24 00:05:10 +0900 (Wed, 24 Oct 2018) | 1 line

* 2018-10-24
------------------------------------------------------------------------
r65333 | kazu | 2018-10-24 00:05:09 +0900 (Wed, 24 Oct 2018) | 1 line

Skip BUGs on Solaris
------------------------------------------------------------------------
r65332 | nobu | 2018-10-23 23:58:08 +0900 (Tue, 23 Oct 2018) | 6 lines

getifaddrs_spec.rb: allow no address

* spec/ruby/library/socket/socket/getifaddrs_spec.rb: allow no
  address for platform dependent failures.

  https://travis-ci.org/ruby/ruby/jobs/445126982#L2234-L2244
------------------------------------------------------------------------
r65331 | k0kubun | 2018-10-23 23:43:19 +0900 (Tue, 23 Oct 2018) | 4 lines

appveyor.yml: give up using mspec -j

for all Windows environments. It also hanged on msys2 build
https://ci.appveyor.com/project/ruby/ruby/builds/19719943/job/cxg00jgvt1ifml97
------------------------------------------------------------------------
r65330 | nobu | 2018-10-23 23:26:23 +0900 (Tue, 23 Oct 2018) | 13 lines

test/unit.rb: glob w/o prefix/suffix

* test/lib/test/unit.rb (Test::Unit::GlobOption#non_options): glob
  the given pattern as-is under the TESTSDIR without the prefix
  nor the suffix, when it has separator(s) but does not end with a
  separator nor is not a directory.  e.g.:

      make test-all TESTS='ruby/test_time*'

  runs `ruby/test_time.rb` and `ruby/test_time_tz.rb` only, like
  as the following:

      make test-all TESTS='$(TESTSDIR)/ruby/test_time*'
------------------------------------------------------------------------
r65329 | nobu | 2018-10-23 23:17:16 +0900 (Tue, 23 Oct 2018) | 8 lines

test/unit.rb: fixed wrong method name

* test/lib/test/unit.rb (Test::Unit::Parallel#deal): fixed wrong
  method name at r36388.

* test/testunit/test_parallel.rb (TestParallel::TestParallel#test_separate):
  refine the pattern to process IDs but not backtrace lines, and
  add a better message.
------------------------------------------------------------------------
r65328 | k0kubun | 2018-10-23 23:10:12 +0900 (Tue, 23 Oct 2018) | 5 lines

.travis.yml: run the slowest jobs first

to shorten time taken for finishing overall builds.

appveyor.yml: comment the same intention in AppVeyor as well
------------------------------------------------------------------------
r65327 | k0kubun | 2018-10-23 23:06:36 +0900 (Tue, 23 Oct 2018) | 1 line

wercker.yml: profile slow tests
------------------------------------------------------------------------
r65326 | k0kubun | 2018-10-23 22:58:01 +0900 (Tue, 23 Oct 2018) | 4 lines

.travis.yml: let osx build print verbose output

because it may hang with no output like this:
https://travis-ci.org/ruby/ruby/jobs/445101860
------------------------------------------------------------------------
r65325 | k0kubun | 2018-10-23 22:34:50 +0900 (Tue, 23 Oct 2018) | 6 lines

wercker.yml: explain the usage of Wercker

at ruby repository. I also added a woraround to loosen timeout for
test-all. I resolved the issue that lets --jit-wait CI timeout, so this
workaround is not strictly needed, but this might make it easier to
debug when things go wrong.
------------------------------------------------------------------------
r65324 | k0kubun | 2018-10-23 22:22:07 +0900 (Tue, 23 Oct 2018) | 1 line

wercker.yml: setup MJIT wait CI
------------------------------------------------------------------------
r65323 | k0kubun | 2018-10-23 22:05:29 +0900 (Tue, 23 Oct 2018) | 4 lines

mjit_worker.c: don't ask MJIT copy job to main thread

when main thread is waiting for MJIT worker forever without executing
RUBY_VM_CHECK_INTS due to --jit-wait.
------------------------------------------------------------------------
r65322 | k0kubun | 2018-10-23 21:48:21 +0900 (Tue, 23 Oct 2018) | 4 lines

appveyor.yml: separately execute problematic test case

that may crash worker like:
https://ci.appveyor.com/project/ruby/ruby/builds/19706703/job/5dmi22mgua9r2qfu
------------------------------------------------------------------------
r65321 | nobu | 2018-10-23 21:43:07 +0900 (Tue, 23 Oct 2018) | 1 line

Let Time::TM share the implementation with Time
------------------------------------------------------------------------
r65320 | mame | 2018-10-23 21:38:48 +0900 (Tue, 23 Oct 2018) | 3 lines

addr2line.c: add explicit casts for clang on 32bit environment

Assigning uint64_t to size_t or uintptr_t caused a build error.
------------------------------------------------------------------------
r65319 | mame | 2018-10-23 21:23:04 +0900 (Tue, 23 Oct 2018) | 4 lines

file.c: use correct integer-conversion function

The return value of major() and minor() is unsigned int, not dev_t.
So, UINT2NUM() is a better choice than DEVT2NUM().
------------------------------------------------------------------------
r65318 | k0kubun | 2018-10-23 21:01:34 +0900 (Tue, 23 Oct 2018) | 1 line

_mjit_compile_send.erb: fix wrong cc usages
------------------------------------------------------------------------
r65317 | svn | 2018-10-23 12:47:48 +0900 (Tue, 23 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65316 | normal | 2018-10-23 12:47:45 +0900 (Tue, 23 Oct 2018) | 6 lines

Revert "vm_trace: implement postponed_jobs as st_table"

This reverts commit 5a1dfb04bc2b09fcf8f3427cac72d0ce52a45eb2 (r63451)

And mark the functions as async-signal-safe while we're at it to
prevent future developers from making the same mistake as I did :x
------------------------------------------------------------------------
r65315 | k0kubun | 2018-10-23 10:13:38 +0900 (Tue, 23 Oct 2018) | 7 lines

test/lib/test/unit/assertions.rb: skip memory leak check

for all test cases on MJIT. In addition to those 2 tests,
TestAutoload#test_no_leak newly failed and most of assert_no_memory_leak
usages are likely to randomly fail.

Let me just skip all of them but let's revisit this to check it properly later.
------------------------------------------------------------------------
r65314 | k0kubun | 2018-10-23 09:27:08 +0900 (Tue, 23 Oct 2018) | 6 lines

wercker.yml: pending for now

As the Wercker integration is already enabled, I added wercker.yml but
it's not working due to migration to this repository and I don't have
enough time to fix it immediately. I'll make it work in this evening.
Let me show green status on GitHub commit logs.
------------------------------------------------------------------------
r65313 | k0kubun | 2018-10-23 09:19:53 +0900 (Tue, 23 Oct 2018) | 3 lines

wercker.yml: run --jit-wait test on Wercker

New. This was formerly https://github.com/k0kubun/mjit-test.
------------------------------------------------------------------------
r65312 | k0kubun | 2018-10-23 09:09:10 +0900 (Tue, 23 Oct 2018) | 8 lines

mjit.c: prevent from accessing expired job

Given that `copy_cache_from_main_thread()` breaks the loop when `stop_worker_p`
is TRUE, memory of `job` allocated by `alloca` may be invalid if `stop_worker_p`
is already TRUE.

mjit_worker.c: explain why `copy_cache_from_main_thread()` should not
stop checking `stop_worker_p`.
------------------------------------------------------------------------
r65311 | k0kubun | 2018-10-23 00:49:22 +0900 (Tue, 23 Oct 2018) | 13 lines

revisit more MJIT test skips

r65308 passed both trunk-mjit and trunk-mjit-wait CIs. MJIT copy job
looks working fine. Then this commit skips 5 more tests. Some of them
were skipped in a very early stage and may still need to be skipped, but
I want to confirm them since they haven't been changed for a long time.

And this prefers having inline information on `RubyVM::MJIT.enabled?`.
This commit makes it easier to confirm whether there's suspicious test
skip by RubyVM::MJIT.enabled? or not.

After this commit, tentatively we're not skipping tests for MJIT other
than `assert_no_memory_leak` ones.
------------------------------------------------------------------------
r65310 | svn | 2018-10-23 00:19:36 +0900 (Tue, 23 Oct 2018) | 1 line

* 2018-10-23
------------------------------------------------------------------------
r65309 | k0kubun | 2018-10-23 00:19:34 +0900 (Tue, 23 Oct 2018) | 6 lines

test/ruby/test_string.rb: skip test_crypt for MJIT again

Partially reverting r65285. Actually this one is failing due to memory
consumption on MJIT, so this seems not catching the bug of MJIT.

test/ruby/test_io.rb: unify the skip message with it
------------------------------------------------------------------------
r65308 | k0kubun | 2018-10-22 23:26:47 +0900 (Mon, 22 Oct 2018) | 4 lines

revert r65292 and r65297

now mjit CIs are stable. Let me try this to confirm if it's fixed or
not.
------------------------------------------------------------------------
r65307 | nobu | 2018-10-22 23:02:59 +0900 (Mon, 22 Oct 2018) | 1 line

No longer subsec and isdst members
------------------------------------------------------------------------
r65306 | nobu | 2018-10-22 22:56:41 +0900 (Mon, 22 Oct 2018) | 1 line

Revert TM_IS_TIME to 1
------------------------------------------------------------------------
r65305 | nobu | 2018-10-22 22:53:20 +0900 (Mon, 22 Oct 2018) | 1 line

Return fixed values at subsec, utc_offset, and isdst
------------------------------------------------------------------------
r65304 | kazu | 2018-10-22 21:21:19 +0900 (Mon, 22 Oct 2018) | 8 lines

Add debug option to check ci failures on solaris

failed to start extserv?:
- https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20181020T132506Z.fail.html.gz

BUG in sysread of OpenSSL:
- https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20181020T132408Z.fail.html.gz
- https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20181020T131807Z.fail.html.gz
------------------------------------------------------------------------
r65303 | svn | 2018-10-22 20:23:57 +0900 (Mon, 22 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65302 | knu | 2018-10-22 20:23:56 +0900 (Mon, 22 Oct 2018) | 6 lines

Set the size of a new enumerator created by Enumerator#each with arguments to nil

When each() takes arguments, it is never safe to assume that the iteration
would repeat the same number of times as with each() without any
argument.  Actually, there is no way to get the exact number, so the
size should be set to nil to denote that.
------------------------------------------------------------------------
r65301 | k0kubun | 2018-10-22 18:53:00 +0900 (Mon, 22 Oct 2018) | 4 lines

mjit_worker.c: return more appropriate result

of copy job. When job is being stopped but job is actually finished,
returning FALSE could be a little confusing from the function name.
------------------------------------------------------------------------
r65300 | k0kubun | 2018-10-22 18:48:35 +0900 (Mon, 22 Oct 2018) | 3 lines

mjit_worker.c: check appropriate flag to stop

This was not intentional in r65299.
------------------------------------------------------------------------
r65299 | k0kubun | 2018-10-22 18:40:44 +0900 (Mon, 22 Oct 2018) | 4 lines

mjit_worker.c: make sure copy job wait is unblocked

by stop_worker(). Previously copy_cache_from_main_thread() might loop forever
even with stop_worker() is being called from ruby_cleanup().
------------------------------------------------------------------------
r65298 | shyouhei | 2018-10-22 12:59:48 +0900 (Mon, 22 Oct 2018) | 7 lines

.travis.yml: give up -O0

This configuration timed out.
https://travis-ci.org/ruby/ruby/jobs/444523912

Try speed things up.

------------------------------------------------------------------------
r65297 | k0kubun | 2018-10-22 12:31:13 +0900 (Mon, 22 Oct 2018) | 4 lines

test_thread.rb: another temporary skip for MJIT

to make trunk-mjit-wait CI green for now. I'll take a look at this
later.
------------------------------------------------------------------------
r65296 | nobu | 2018-10-22 10:25:29 +0900 (Mon, 22 Oct 2018) | 4 lines

time.c: optional arguments of Time::TM#initialize

* time.c (tm_initialize): arguments other than year are optional
  now as Time.new.
------------------------------------------------------------------------
r65295 | hsbt | 2018-10-22 09:32:16 +0900 (Mon, 22 Oct 2018) | 3 lines

Merge stringio.gemspec from github repository.

  It fixed the wrong paths of libraries.
------------------------------------------------------------------------
r65294 | hsbt | 2018-10-22 09:27:02 +0900 (Mon, 22 Oct 2018) | 1 line

Merge rubygems master branch from github.com/rubygems/rubygems.
------------------------------------------------------------------------
r65293 | nobu | 2018-10-22 08:53:39 +0900 (Mon, 22 Oct 2018) | 1 line

test_time_tz.rb: refactor dummy TZ tests and add another timezone
------------------------------------------------------------------------
r65292 | k0kubun | 2018-10-22 08:53:24 +0900 (Mon, 22 Oct 2018) | 4 lines

skip 2 tests for MJIT for now

These tests seem to be broken by r65275.
Let me skip this to confirm if other things are fine or not.
------------------------------------------------------------------------
r65291 | k0kubun | 2018-10-22 08:20:32 +0900 (Mon, 22 Oct 2018) | 3 lines

revert revert of r65285

because CI was actually hitting another one.
------------------------------------------------------------------------
r65290 | k0kubun | 2018-10-22 08:07:18 +0900 (Mon, 22 Oct 2018) | 3 lines

revert r65285

because it didn't work. Partially leaving "sometimes fail" tests.
------------------------------------------------------------------------
r65289 | naruse | 2018-10-22 05:01:22 +0900 (Mon, 22 Oct 2018) | 4 lines

check VLIW case

If maximum_operations_per_instruction != 1, it is VLIW.
But there seems no need to support such architecture now.
------------------------------------------------------------------------
r65288 | stomar | 2018-10-22 05:00:46 +0900 (Mon, 22 Oct 2018) | 1 line

lib/net/http.rb: [DOC] fix typos
------------------------------------------------------------------------
r65287 | naruse | 2018-10-22 01:42:23 +0900 (Mon, 22 Oct 2018) | 1 line

initialize is_stmt with default_is_stmt
------------------------------------------------------------------------
r65286 | naruse | 2018-10-22 01:37:24 +0900 (Mon, 22 Oct 2018) | 1 line

Use inline function with stable code instead of macro
------------------------------------------------------------------------
r65285 | k0kubun | 2018-10-22 00:54:50 +0900 (Mon, 22 Oct 2018) | 6 lines

try to remove some test skips for MJIT

Eric Wong made some effort to keep compatibility around fd with MJIT.
Also I'm hoping r65279 (and r65280) eliminates major MJIT bugs, so I
want to start solely testing MJIT. Other test skips branched by MJIT
enablement seemed reasonable to me.
------------------------------------------------------------------------
r65284 | k0kubun | 2018-10-22 00:41:00 +0900 (Mon, 22 Oct 2018) | 1 line

NEWS: note about --disable-mjit-support [ci skip]
------------------------------------------------------------------------
r65283 | aycabta | 2018-10-22 00:33:30 +0900 (Mon, 22 Oct 2018) | 5 lines

Improve docs of Proc / Method

* proc.c: Add descriptions and code examples.

[ruby-core:85600] [Bug #14483]
------------------------------------------------------------------------
r65282 | svn | 2018-10-22 00:29:02 +0900 (Mon, 22 Oct 2018) | 1 line

* 2018-10-22
------------------------------------------------------------------------
r65281 | k0kubun | 2018-10-22 00:29:01 +0900 (Mon, 22 Oct 2018) | 15 lines

NEWS: prefer advertising --jit option [ci skip]

In addition to `--enable=jit` and `--enable-jit`, we're going to ship
`--jit` as a short hand of it in Ruby 2.6.0.

That's because both --enable=jit and --enable-jit are super hard to
type everytime on command line, and I want make it easier to use so
that many people use it. First of all, `--enable=jit` is accidentally
added for consistency with `--disable=jit` and it's not added for human.

As it's a short hand, once JIT became enabled by default, the `--jit`
option would be removed after some deprecation warning period and only
`--enable=jit`/`--disable=jit` will survive. That being said, I still
think having `--jit` as a temporary short hand is valuable for the above
reasons.
------------------------------------------------------------------------
r65280 | k0kubun | 2018-10-21 23:30:18 +0900 (Sun, 21 Oct 2018) | 17 lines

mjit.c: remove wrongly-committed debug code

mistake in r65279.

=== Optcarrot Benchmark ===
$ benchmark-driver benchmark.yml --rbenv 'before::before --disable-gems --jit;after::after --disable-gems --jit' -v --repeat-count 24
before: ruby 2.6.0dev (2018-10-21 trunk 65277) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-10-21 trunk 65279) +JIT [x86_64-linux]
last_commit=mjit.c: remove wrongly-committed debug code
Calculating -------------------------------------
                             before       after
Optcarrot Lan_Master.nes     85.008      86.078 fps

Comparison:
             Optcarrot Lan_Master.nes
                   after:        86.1 fps
                  before:        85.0 fps - 1.01x  slower
------------------------------------------------------------------------
r65279 | k0kubun | 2018-10-21 23:23:24 +0900 (Sun, 21 Oct 2018) | 17 lines

mjit.c: copy call cache values to MJIT worker

same as r65275 but for call cache.

=== Optcarrot Benchmark ===
$ benchmark-driver benchmark.yml --rbenv 'before::before --disable-gems --jit;after::after --disable-gems --jit' -v --repeat-count 24
before: ruby 2.6.0dev (2018-10-21 trunk 65277) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-10-21 trunk 65277) +JIT [x86_64-linux]
last_commit=mjit.c: copy call cache values to MJIT worker
Calculating -------------------------------------
                             before       after
Optcarrot Lan_Master.nes     85.372      85.359 fps

Comparison:
             Optcarrot Lan_Master.nes
                  before:        85.4 fps
                   after:        85.4 fps - 1.00x  slower
------------------------------------------------------------------------
r65278 | stomar | 2018-10-21 23:02:00 +0900 (Sun, 21 Oct 2018) | 4 lines

lib/mutex_m.rb: fix example code in documentation

* lib/mutex_m.rb: [DOC] fix invalid example code to make it
  syntax highlighted.
------------------------------------------------------------------------
r65277 | k0kubun | 2018-10-21 22:45:36 +0900 (Sun, 21 Oct 2018) | 5 lines

vm_core.h: fix typo [ci skip]

The comment didn't make sense. As it's allocated with
`ZALLOC_N(struct rb_call_cache, body->ci_size + body->ci_kw_size)`,
it's very likely to be forgotten to press shift key on US keyboard.
------------------------------------------------------------------------
r65276 | k0kubun | 2018-10-21 22:37:13 +0900 (Sun, 21 Oct 2018) | 6 lines

_mjit_compile_send.erb: don't split send_guard

to another file, because it's no longer shared. It was created when
attr_reader was inlined but it's no longer included.

common.mk: ditto
------------------------------------------------------------------------
r65275 | k0kubun | 2018-10-21 22:21:28 +0900 (Sun, 21 Oct 2018) | 28 lines

mjit.c: copy inline cache values to MJIT worker

on VM_CHECK_INTS. Letting MJIT worker directly see inline cache which
may be being updated could result in inconsistent IC index and serial.

mjit_worker.c: request the copy job after dequeue, and receive the
result synchronously.

tool/ruby_vm/views/_mjit_compile_ivar.erb: use the copied IC

mjit_compile.c: change the interface to pass is_entries
mjit.h: ditto

=== Optcarrot Benchmark ===
Thankfully this didn't have major performance regression.

$ benchmark-driver benchmark.yml --rbenv 'before::before --disable-gems --jit;after::after --disable-gems --jit' -v --repeat-count 24
before: ruby 2.6.0dev (2018-10-21 trunk 65263) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-10-21 trunk 65263) +JIT [x86_64-linux]
last_commit=mjit.c: copy inline cache values to MJIT worker
Calculating -------------------------------------
                             before       after
Optcarrot Lan_Master.nes     85.421      85.454 fps

Comparison:
             Optcarrot Lan_Master.nes
                   after:        85.5 fps
                  before:        85.4 fps - 1.00x  slower
------------------------------------------------------------------------
r65272 | naruse | 2018-10-21 19:46:56 +0900 (Sun, 21 Oct 2018) | 1 line

fix sign of integer variable
------------------------------------------------------------------------
r65271 | aycabta | 2018-10-21 16:15:44 +0900 (Sun, 21 Oct 2018) | 3 lines

Improve doc of yield_self

* object.c: Add code samples for yield_self.
------------------------------------------------------------------------
r65270 | aycabta | 2018-10-21 16:04:20 +0900 (Sun, 21 Oct 2018) | 4 lines

Add missing info for Mutex_m to the doc [Bug #13598]

* lib/mutex_m.rb: The #initialize method in a class that includes
  Mutex_m needs calling #super.
------------------------------------------------------------------------
r65269 | aycabta | 2018-10-21 15:42:53 +0900 (Sun, 21 Oct 2018) | 3 lines

Improve doc of Regexp about "ignore case" behavior [Misc #10836]

* doc/regexp.rdoc: RDoc for "ignore case" behavior
------------------------------------------------------------------------
r65268 | nobu | 2018-10-21 12:52:20 +0900 (Sun, 21 Oct 2018) | 1 line

`--excludes` option must be in TEST_ALL_TESTOPTS
------------------------------------------------------------------------
r65267 | nobu | 2018-10-21 12:42:46 +0900 (Sun, 21 Oct 2018) | 1 line

Quote `$(TESTSDIR)`
------------------------------------------------------------------------
r65266 | svn | 2018-10-21 12:38:53 +0900 (Sun, 21 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65265 | nobu | 2018-10-21 12:38:52 +0900 (Sun, 21 Oct 2018) | 1 line

Exclude CI platform specific failures by --excludes option
------------------------------------------------------------------------
r65264 | ko1 | 2018-10-21 11:38:26 +0900 (Sun, 21 Oct 2018) | 2 lines

fix a warning message.

------------------------------------------------------------------------
r65263 | k0kubun | 2018-10-21 11:28:43 +0900 (Sun, 21 Oct 2018) | 1 line

skip tests broken with OpenSSL 1.1.1 on Travis osx
------------------------------------------------------------------------
r65262 | k0kubun | 2018-10-21 11:18:39 +0900 (Sun, 21 Oct 2018) | 7 lines

appveyor.yml: workaround wrong command line escape

backslash in %APPVEYOR_BUILD_FOLDER% is somehow dropped somewhere
when being passed to test runner via mingw32-make.

Anyway we know the relative path to the project directory, so we can
specify that with slash.
------------------------------------------------------------------------
r65261 | k0kubun | 2018-10-21 10:27:43 +0900 (Sun, 21 Oct 2018) | 5 lines

.travis.yml: mspec -j is unstable

https://travis-ci.org/ruby/ruby/jobs/444232677

Instead of that, add -fs to know problematic test case when failed.
------------------------------------------------------------------------
r65260 | k0kubun | 2018-10-21 10:25:20 +0900 (Sun, 21 Oct 2018) | 4 lines

.travis.yml: use --job-status=replace

-v is too long, and "--color=never --job-status=normal" is too verbose.
Trying --job-status=replace to make Travis log easier to read.
------------------------------------------------------------------------
r65259 | k0kubun | 2018-10-21 09:31:46 +0900 (Sun, 21 Oct 2018) | 1 line

appveyor.yml: fix wrong spec directory
------------------------------------------------------------------------
r65258 | k0kubun | 2018-10-21 09:18:32 +0900 (Sun, 21 Oct 2018) | 4 lines

.travis.yml: debug problematic test case on osx

osx build is stucking somewhere. We want to debug that.
https://travis-ci.org/ruby/ruby/jobs/444059226
------------------------------------------------------------------------
r65257 | naruse | 2018-10-21 09:08:02 +0900 (Sun, 21 Oct 2018) | 3 lines

check version of .debug_info

and refactor related code.
------------------------------------------------------------------------
r65256 | naruse | 2018-10-21 09:07:53 +0900 (Sun, 21 Oct 2018) | 1 line

Skip dwarf if its version is not supported
------------------------------------------------------------------------
r65255 | k0kubun | 2018-10-21 08:58:02 +0900 (Sun, 21 Oct 2018) | 4 lines

appveyor.yml: don't run win32ole with -j

since it lets worker crash
https://ci.appveyor.com/project/ruby/ruby/builds/19659321/job/swnu2b5yj960t9gr
------------------------------------------------------------------------
r65254 | nobu | 2018-10-21 02:19:37 +0900 (Sun, 21 Oct 2018) | 1 line

lldb_cruby.py: T_COMPLEX support [ci skip]
------------------------------------------------------------------------
r65253 | kazu | 2018-10-21 00:00:02 +0900 (Sun, 21 Oct 2018) | 1 line

NEWS: Fix keywords [ci skip]
------------------------------------------------------------------------
r65252 | svn | 2018-10-21 00:00:01 +0900 (Sun, 21 Oct 2018) | 1 line

* 2018-10-21
------------------------------------------------------------------------
r65251 | kazu | 2018-10-21 00:00:00 +0900 (Sun, 21 Oct 2018) | 1 line

NEWS: Fix `,`s [ci skip]
------------------------------------------------------------------------
r65250 | suke | 2018-10-20 23:34:30 +0900 (Sat, 20 Oct 2018) | 1 line

Merge branch 'modify_test_win32ole' into trunk
------------------------------------------------------------------------
r65249 | ko1 | 2018-10-20 23:07:59 +0900 (Sat, 20 Oct 2018) | 11 lines

support --disable-mjit-support on mswin32/64.

* win32/configure.bat: add --enable/disable-mjit-support
  configure.bat options.

* win32/setup.mak: ditto.

* win32/Makefile.sub: ditto.

* win32/Makefile.sub: fix typo for congig.status file.

------------------------------------------------------------------------
r65248 | suke | 2018-10-20 22:16:25 +0900 (Sat, 20 Oct 2018) | 3 lines

refactoring. suppress warning.

* test/win32ole/test_win32ole_record.rb: refactoring. suppress warning.
------------------------------------------------------------------------
r65247 | kazu | 2018-10-20 22:14:02 +0900 (Sat, 20 Oct 2018) | 4 lines

Run background threads while testing drb

Do not start background thread on load test/drb/drbtest.rb,
and stop threads on each test.
------------------------------------------------------------------------
r65246 | kazu | 2018-10-20 22:14:00 +0900 (Sat, 20 Oct 2018) | 5 lines

Revert "Revert "Reset primary_server when remove_server"" [ci skip]

This reverts commit d2671c96f32e6fbbd39162a2c9042dcaf3bf2d68.

previous reverting is commit miss
------------------------------------------------------------------------
r65245 | stomar | 2018-10-20 22:02:02 +0900 (Sat, 20 Oct 2018) | 1 line

NEWS: fix language
------------------------------------------------------------------------
r65244 | nobu | 2018-10-20 21:48:07 +0900 (Sat, 20 Oct 2018) | 1 line

lldb_cruby.py: T_RATIONAL support [ci skip]
------------------------------------------------------------------------
r65243 | kazu | 2018-10-20 21:28:52 +0900 (Sat, 20 Oct 2018) | 1 line

Allow to stop by push(nil) for test
------------------------------------------------------------------------
r65242 | kazu | 2018-10-20 21:28:45 +0900 (Sat, 20 Oct 2018) | 3 lines

Revert "Reset primary_server when remove_server"

This reverts commit 2948d3bd2e78b5b9110454a7135a81c3fecb2575.
------------------------------------------------------------------------
r65241 | suke | 2018-10-20 21:21:30 +0900 (Sat, 20 Oct 2018) | 4 lines

use System Monitor Control to test win32ole

* test/win32ole/test_win32ole_method_event.rb: use System Monitor
  Control to test.
------------------------------------------------------------------------
r65240 | hsbt | 2018-10-20 21:17:18 +0900 (Sat, 20 Oct 2018) | 1 line

Added entry about new default gems.
------------------------------------------------------------------------
r65239 | k0kubun | 2018-10-20 21:08:48 +0900 (Sat, 20 Oct 2018) | 6 lines

NEWS: update about MJIT [ci skip]

Rails performance is somewhat improved by compaction. Still not great
though.

MinGW support is much stable now, and mswin support is added.
------------------------------------------------------------------------
r65238 | mame | 2018-10-20 21:01:41 +0900 (Sat, 20 Oct 2018) | 1 line

Add the oneshot coverage feature to NEWS
------------------------------------------------------------------------
r65237 | svn | 2018-10-20 20:54:10 +0900 (Sat, 20 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65236 | suke | 2018-10-20 20:54:09 +0900 (Sat, 20 Oct 2018) | 6 lines

refactoring define AvailableOLE.sysmon_available?

* test/win32ole/test_win32ole_type_event.rb: refactoring. use
  AvailableOLE.sysmon_available?

* test/win32ole/available_ole.rb: define AvailableOLE.sysmon_available?
------------------------------------------------------------------------
r65235 | aycabta | 2018-10-20 20:47:45 +0900 (Sat, 20 Oct 2018) | 8 lines

Document File.{setuid?,setgid?,sticky?} support for IO objects [Bug #13972]

* file.c (rb_file_setuid_p): rdoc for IO object support
  (rb_file_sgid_p): ditto (rb_file_sticky_p): ditto
* NEWS: inform users of new feature
* test/file/test_file_exhaustive.rb (io_open): wrapper for bare IO
  object (test_suid): test for bare IO support (test_sgid): ditto
  (test_sticky): ditto
------------------------------------------------------------------------
r65234 | ko1 | 2018-10-20 20:35:11 +0900 (Sat, 20 Oct 2018) | 4 lines

fix macro-name.

* win32/Makefile.sub: Not MJIT_SUPPORT, but USE_MJIT.

------------------------------------------------------------------------
r65233 | naruse | 2018-10-20 20:29:38 +0900 (Sat, 20 Oct 2018) | 4 lines

Add negotiated SSL protocol and cipher to Net::HTTP debug output

From: Bart de Water <bartdewater@gmail.com>
https://github.com/ruby/ruby/pull/1877 [Feature #15009]
------------------------------------------------------------------------
r65232 | ko1 | 2018-10-20 20:27:48 +0900 (Sat, 20 Oct 2018) | 5 lines

fix MJIT_SUPPORT on win32.

* win32/Makefile.sub: add MJIT_SUPPORT macro for C codes
  and variable for Makefile.

------------------------------------------------------------------------
r65231 | k0kubun | 2018-10-20 20:21:07 +0900 (Sat, 20 Oct 2018) | 3 lines

mjit_worker.c: don't refer to freed value

remove_from_list() frees node, but after that node->next could be used
------------------------------------------------------------------------
r65230 | aycabta | 2018-10-20 20:09:34 +0900 (Sat, 20 Oct 2018) | 5 lines

Improve doc of multipart/form-data [Bug #15019]

* lib/net/http.rb: Documentation for Net::HTTP claims that
  multipart/form-data is not supported, but Net::HTTPHeader#set_form
  supports it since 1.9.3.
------------------------------------------------------------------------
r65229 | yui-knk | 2018-10-20 20:06:05 +0900 (Sat, 20 Oct 2018) | 3 lines

parse.y: Fix the compile error

* parse.y: Fix "error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]"
------------------------------------------------------------------------
r65228 | aycabta | 2018-10-20 19:57:33 +0900 (Sat, 20 Oct 2018) | 3 lines

Improve safe navigation operator's docs [Misc #15109]

* doc/syntax/calling_methods.rdoc: Add Safe navigation operator section.
------------------------------------------------------------------------
r65227 | yui-knk | 2018-10-20 19:53:31 +0900 (Sat, 20 Oct 2018) | 21 lines

Fix locations of NODE_SCOPE in lambda.

* parse.y: Fix to start with the argument.

  e.g. The locations of the NODE_SCOPE is fixed:

  ```
  -> x { 1 + 2 }
  ```

  * Before

  ```
  NODE_SCOPE (line: 1, location: (1,2)-(1,14))
  ```

  * After

  ```
  NODE_SCOPE (line: 1, location: (1,3)-(1,14))
  ```
------------------------------------------------------------------------
r65226 | svn | 2018-10-20 19:45:55 +0900 (Sat, 20 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65225 | mame | 2018-10-20 19:45:48 +0900 (Sat, 20 Oct 2018) | 4 lines

Remove tracecoverage instructions

The instructions were used only for branch coverage.
Instead, it now uses a trace framework [Feature #14104].
------------------------------------------------------------------------
r65224 | hsbt | 2018-10-20 19:30:42 +0900 (Sat, 20 Oct 2018) | 3 lines

Retry r65211.

  * Maybe, RbConfig.ruby only provides after Ruby installation.
------------------------------------------------------------------------
r65223 | svn | 2018-10-20 19:20:53 +0900 (Sat, 20 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65222 | k0kubun | 2018-10-20 19:20:49 +0900 (Sat, 20 Oct 2018) | 3 lines

revert r65213 and r65215

as we didn't agree on the actual implementation yet
------------------------------------------------------------------------
r65221 | yui-knk | 2018-10-20 19:10:46 +0900 (Sat, 20 Oct 2018) | 23 lines

Fix locations of NODE_LAMBDA.

* node.h: Add `nd_first_loc` and `nd_set_first_loc`

* parse.y: Fix to start with the beginning of `->` .

  e.g. The locations of the NODE_LAMBDA is fixed:

  ```
  -> x { 1 + 2 }
  ```

  * Before

  ```
  NODE_LAMBDA (line: 1, location: (1,2)-(1,14))
  ```

  * After

  ```
  NODE_LAMBDA (line: 1, location: (1,0)-(1,14))
  ```
------------------------------------------------------------------------
r65220 | hsbt | 2018-10-20 19:05:05 +0900 (Sat, 20 Oct 2018) | 3 lines

Revert "Mergr etc from github repository."

This reverts commit a85200277921dbefc1dfc9edd9ed26e9cea009f8.
------------------------------------------------------------------------
r65219 | ko1 | 2018-10-20 17:47:26 +0900 (Sat, 20 Oct 2018) | 6 lines

require 'rbconifg' earlier.

* test/lib/jit_support.rb: require rbconfig here.

* test/ruby/test_jit.rb: rbconfig should be required before.

------------------------------------------------------------------------
r65218 | ko1 | 2018-10-20 17:06:50 +0900 (Sat, 20 Oct 2018) | 7 lines

skip tests if --disable-mjit-support.

* test/ruby/test_rubyoptions.rb: skip MJIT related test
  if an interpreter is built with --disable-mjit-support.

* test/ruby/test_rubyvm_mjit.rb: ditto.

------------------------------------------------------------------------
r65217 | ko1 | 2018-10-20 17:00:42 +0900 (Sat, 20 Oct 2018) | 17 lines

rename configure option `--disable-mjit` to `--disable-mjit-support`

* configure.ac: rename configure option `--disable-mjit` to
  `--disable-mjit-support` because `--disable-mjit` is ambiguous that
  runtime MJIT default enable option or supporting MJIT features.
  `ENABLE_MJIT` is also renamed to `MJIT_SUPPORT`

* Makefile.in: catch up this fix.

* common.mk: ditto.

* test/ruby/test_jit.rb: ditto.

* win32/Makefile.sub: catch up this fix on mswin.

* tool/mkconfig.rb: fix to pass `MJIT_SUPPORT` key.

------------------------------------------------------------------------
r65216 | hsbt | 2018-10-20 16:54:58 +0900 (Sat, 20 Oct 2018) | 3 lines

Merge irb from github repository.

  * IRB::VERSION is available on irb session.
------------------------------------------------------------------------
r65215 | k0kubun | 2018-10-20 16:54:34 +0900 (Sat, 20 Oct 2018) | 3 lines

vm_insnhelper.c: never cache setinstancevariable twice

same as r65213
------------------------------------------------------------------------
r65214 | kazu | 2018-10-20 16:49:34 +0900 (Sat, 20 Oct 2018) | 1 line

Reset primary_server when remove_server
------------------------------------------------------------------------
r65213 | k0kubun | 2018-10-20 16:43:50 +0900 (Sat, 20 Oct 2018) | 14 lines

vm_insnhelper.c: never cache getinstancevariable twice

We have several options to ensure there's no race condition between main
thread and MJIT thead about IC reference:

1) Give up caching ivar for multiple classes (or multiple versions of the
   same class) in the same getinstancevariable (This commit's approach)
2) Allocate new inline cache every time

Other ideas we could think of couldn't eliminate possibilities of race
condition.
In 2, it's memory allocation would be slow and it may trigger JIT
cancellation frequently. So 1 would be fast for both VM and JIT
situations.
------------------------------------------------------------------------
r65212 | tadd | 2018-10-20 16:40:45 +0900 (Sat, 20 Oct 2018) | 1 line

fix typo.
------------------------------------------------------------------------
r65211 | hsbt | 2018-10-20 16:38:19 +0900 (Sat, 20 Oct 2018) | 4 lines

Mergr etc from github repository.

  * ext/etc/extconf.rb: It supports to generate dependency header
    on standalone gem with github repository.
------------------------------------------------------------------------
r65210 | hsbt | 2018-10-20 16:27:18 +0900 (Sat, 20 Oct 2018) | 3 lines

Merge fiddle from github repository.

  * ext/fiddle/extconf.rb: It supports to build libffi with standalone gem.
------------------------------------------------------------------------
r65209 | hsbt | 2018-10-20 16:21:14 +0900 (Sat, 20 Oct 2018) | 1 line

Cleanup fiddle extenstion when sync them from github repo.
------------------------------------------------------------------------
r65208 | svn | 2018-10-20 16:03:56 +0900 (Sat, 20 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65207 | hsbt | 2018-10-20 16:03:55 +0900 (Sat, 20 Oct 2018) | 3 lines

Merge fileutils from ruby/fileutils on GitHub.

  * It was separated version file for gemspec.
------------------------------------------------------------------------
r65206 | naruse | 2018-10-20 15:56:51 +0900 (Sat, 20 Oct 2018) | 1 line

fix header_length's type to unsigned long
------------------------------------------------------------------------
r65205 | svn | 2018-10-20 15:53:11 +0900 (Sat, 20 Oct 2018) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r65204 | ko1 | 2018-10-20 15:53:00 +0900 (Sat, 20 Oct 2018) | 17 lines

add disabling MJIT features option.

* configure.ac: introduce new configure option `--enable-mjit` and
  `--disable-mjit`. Default is "enable".
  `--disable-mjit` disables all of MJIT features so that `ruby --jit`
  can't enable MJIT.
  This option affect a macro `USE_MJIT`.
  This change remove `--enable/disable-install-mjit-header` option.

* Makefile.in: introduce the `ENABLE_MJIT` variable.

* common.mk: use `ENABLE_MJIT` option.

* internal.h: respect `USE_MJIT`. Same as other *.c, *.h.

* test/ruby/test_jit.rb: check `ENABLE_MJIT` key of rbconfg.rb.

------------------------------------------------------------------------
r65203 | naruse | 2018-10-20 15:45:51 +0900 (Sat, 20 Oct 2018) | 1 line

fix r65202 on ELF environment
------------------------------------------------------------------------
r65202 | naruse | 2018-10-20 15:35:25 +0900 (Sat, 20 Oct 2018) | 1 line

Support Mach-O on backtrace with DWARF
------------------------------------------------------------------------
r65201 | naruse | 2018-10-20 15:18:41 +0900 (Sat, 20 Oct 2018) | 4 lines

Support DWARF4's .debug_line

ICC uses DWARF4 for .debug_line which adds
maximum_operations_per_instruction in its header.
------------------------------------------------------------------------
r65200 | mame | 2018-10-20 14:44:14 +0900 (Sat, 20 Oct 2018) | 4 lines

thread.c (rb_clear_coverages): defined out of #ifdef

It failed to build on windows.
https://ci.appveyor.com/project/ruby/ruby/builds/19655876
------------------------------------------------------------------------
r65199 | mame | 2018-10-20 14:44:12 +0900 (Sat, 20 Oct 2018) | 3 lines

iseq.c (rb_iseq_trace_flag_cleared): Accept size_t for type consistency

It caused "implicit conversion loses integer precision" on clang.
------------------------------------------------------------------------
r65198 | yui-knk | 2018-10-20 14:33:37 +0900 (Sat, 20 Oct 2018) | 1 line

parse.y (struct ripper_args): Remove not used struct definition
------------------------------------------------------------------------
r65197 | svn | 2018-10-20 14:33:13 +0900 (Sat, 20 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65196 | svn | 2018-10-20 14:33:13 +0900 (Sat, 20 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65195 | mame | 2018-10-20 14:33:04 +0900 (Sat, 20 Oct 2018) | 9 lines

ext/coverage/: add the oneshot mode

This patch introduces "oneshot_lines" mode for `Coverage.start`, which
checks "whether each line was executed at least once or not", instead of
"how many times each line was executed".  A hook for each line is fired
at most once, and after it is fired, the hook flag was removed; it runs
with zero overhead.

See [Feature #15022] in detail.
------------------------------------------------------------------------
r65194 | yui-knk | 2018-10-20 13:41:19 +0900 (Sat, 20 Oct 2018) | 4 lines

ast.c: Fix the documents of `RubyVM::AST.parse` and `RubyVM::AST.parse_file`

* ast.c: r63602 fixed to raise `SyntaxError` when `RubyVM::AST.parse`
  or `RubyVM::AST.parse_file` fail to parse input.
------------------------------------------------------------------------
r65193 | hsbt | 2018-10-20 13:25:04 +0900 (Sat, 20 Oct 2018) | 3 lines

Merge Pysch-3.1.0.pre2 from ruby/psych.

  * Added deprecated warnings for the new interface of keyword argument.
------------------------------------------------------------------------
r65192 | hsbt | 2018-10-20 11:51:09 +0900 (Sat, 20 Oct 2018) | 1 line

Support keyword arguments with Pysch.safe_load provided by after Psych 3.1.0.pre1.
------------------------------------------------------------------------
r65191 | svn | 2018-10-20 11:49:23 +0900 (Sat, 20 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65190 | nobu | 2018-10-20 11:49:18 +0900 (Sat, 20 Oct 2018) | 5 lines

complex.c: small optimization of Complex#**

* complex.c (rb_complex_pow): calculate power of a Fixnum without
  allocating intermediate Complex objects, and avoid unexpected
  NaNs.
------------------------------------------------------------------------
r65189 | suke | 2018-10-20 11:24:21 +0900 (Sat, 20 Oct 2018) | 4 lines

try to use System Monitor Control

* test/win32ole/test_win32ole_type_event.rb: try to use System Monitor
  Control to test. ADO is not available in AppVeyor(Mingw only?)
------------------------------------------------------------------------
r65188 | k0kubun | 2018-10-20 10:10:09 +0900 (Sat, 20 Oct 2018) | 5 lines

test_win32ole_event.rb: fire message_loop on retry

because it's failing even after sleeping 31s in total.
https://ci.appveyor.com/project/ruby/ruby/builds/19642619/job/pkaj5svr8glk8twt
https://ci.appveyor.com/project/ruby/ruby/builds/19641381/job/spdvrptpaq1d5778
------------------------------------------------------------------------
r65187 | k0kubun | 2018-10-20 10:00:37 +0900 (Sat, 20 Oct 2018) | 5 lines

appveyor.yml: increase timeout for mswin

because
https://ci.appveyor.com/project/ruby/ruby/builds/19643041/job/jlqs65wsvoqdguj0
failed with timeout on vs140
------------------------------------------------------------------------
r65186 | stomar | 2018-10-20 06:37:04 +0900 (Sat, 20 Oct 2018) | 1 line

NEWS: small fixes
------------------------------------------------------------------------
r65185 | stomar | 2018-10-20 06:35:51 +0900 (Sat, 20 Oct 2018) | 1 line

array.c, file.c, string.c: [DOC] fix typos
------------------------------------------------------------------------
r65184 | stomar | 2018-10-20 06:26:15 +0900 (Sat, 20 Oct 2018) | 3 lines

array.c: improve docs for Array#difference

* array.c: [DOC] small doc fixes for Array#difference and Array#-.
------------------------------------------------------------------------
r65183 | normal | 2018-10-20 05:56:10 +0900 (Sat, 20 Oct 2018) | 3 lines

rb_execution_context_t: pack bits, 256 -> 252 bytes (on 32-bit)

Maybe execution contexts will become more common.
------------------------------------------------------------------------
r65182 | normal | 2018-10-20 05:14:41 +0900 (Sat, 20 Oct 2018) | 4 lines

rb_sigwait_sleep: change internal API to use rb_hrtime_t

rb_hrtime_t is a more pleasant type to use and this can make
future changes around sleeping/scheduling easier.
------------------------------------------------------------------------
r65181 | nobu | 2018-10-20 00:24:42 +0900 (Sat, 20 Oct 2018) | 1 line

.travis.yml: separate apt addons for i686-linux
------------------------------------------------------------------------
r65180 | svn | 2018-10-20 00:08:57 +0900 (Sat, 20 Oct 2018) | 1 line

* 2018-10-20
------------------------------------------------------------------------
r65179 | k0kubun | 2018-10-20 00:08:55 +0900 (Sat, 20 Oct 2018) | 5 lines

mjit.c: don't let MJIT.pause hang on full active units

test/ruby/test_rubyvm_mjit.rb: add reproductive test

[Bug #15071]
------------------------------------------------------------------------
r65178 | k0kubun | 2018-10-19 23:26:29 +0900 (Fri, 19 Oct 2018) | 5 lines

test/lib/jit_support.rb: continue to skip test_jit

for icc since it's not supported yet but running on rubyci.

This reverts some part of r65175, r65176 and r65177.
------------------------------------------------------------------------
r65177 | k0kubun | 2018-10-19 23:19:19 +0900 (Fri, 19 Oct 2018) | 3 lines

test_rubyoptions.rb: don't use obsoleted method

It was removed on r65175.
------------------------------------------------------------------------
r65176 | k0kubun | 2018-10-19 23:08:45 +0900 (Fri, 19 Oct 2018) | 3 lines

test_rubyvm_mjit.rb: don't use obsoleted method

It was removed on r65175.
------------------------------------------------------------------------
r65175 | k0kubun | 2018-10-19 23:03:37 +0900 (Fri, 19 Oct 2018) | 5 lines

test/lib/jit_support.rb: fire test_jit everywhere

That was a workaround to make rubyci green for a short term after the
MJIT merge. As we've done many portability fixes for MJIT, let's try
running test_jit on all rubyci platforms.
------------------------------------------------------------------------
r65174 | k0kubun | 2018-10-19 22:47:02 +0900 (Fri, 19 Oct 2018) | 3 lines

mjit_worker.c: don't compile more than max_cache_size

Prior to this commit, max_cache_size + 1 methods could be active.
------------------------------------------------------------------------
r65173 | nobu | 2018-10-19 22:11:33 +0900 (Fri, 19 Oct 2018) | 1 line

transform_mjit_header.rb: fix up r65169
------------------------------------------------------------------------
r65172 | k0kubun | 2018-10-19 22:05:05 +0900 (Fri, 19 Oct 2018) | 5 lines

appveyor.yml: use -fs for test-spec

to debug silent death on vs120 builds
https://ci.appveyor.com/project/ruby/ruby/builds/19630104/job/tm8at8kfnvwxwe58
https://ci.appveyor.com/project/ruby/ruby/builds/19631779/job/qpjanaho1lc1e5a0
------------------------------------------------------------------------
r65171 | k0kubun | 2018-10-19 21:31:02 +0900 (Fri, 19 Oct 2018) | 8 lines

configure.ac: add --disable-install-mjit-header

and substitute INSTALL_MJIT_HEADER. This would be convenient as a workaround
for user if we found a platform that can't compile Ruby after Ruby 2.6.0 release.

common.mk: Install MJIT header only when INSTALL_MJIT_HEADER
Makefile.in: ditto
win32/Makefile.sub: ditto
------------------------------------------------------------------------
r65170 | nobu | 2018-10-19 21:29:47 +0900 (Fri, 19 Oct 2018) | 1 line

transform_mjit_header.rb: `inline` may be a macro
------------------------------------------------------------------------
r65169 | nobu | 2018-10-19 21:29:46 +0900 (Fri, 19 Oct 2018) | 5 lines

transform_mjit_header.rb: add system_header pragma

* tool/transform_mjit_header.rb: insert GCC system_header pragma
  to get rid of errors caused by the contents included from system
  headers.
------------------------------------------------------------------------
r65168 | k0kubun | 2018-10-19 20:30:32 +0900 (Fri, 19 Oct 2018) | 7 lines

.travis.yml: try promoting osx to non-allow_failures

somehow it gets stable there days...

Later, we may be able to add wrapper to apply timeout appropriately
and dump threads, in case that it stucks. It's not super easy to write
it, so this commit just tries to enable osx for now.
------------------------------------------------------------------------
r65167 | shyouhei | 2018-10-19 17:46:41 +0900 (Fri, 19 Oct 2018) | 8 lines

compile.c: default_len is positive

Recent GCC warns that default_len can be negative (thus can
overflow PTRDIFF_MAX), which is a false assert.  Suppresses
warnings by adding __builtin_unreachable.

See also: https://travis-ci.org/ruby/ruby/jobs/443568193#L2227

------------------------------------------------------------------------
r65166 | shyouhei | 2018-10-19 16:48:45 +0900 (Fri, 19 Oct 2018) | 5 lines

_mjit_compile_ivar.rb: use PRIuSIZE

`ic->ic_value.index` is size_t, not always unsigned long.
See also: https://travis-ci.org/ruby/ruby/jobs/443560810#L2263

------------------------------------------------------------------------
r65165 | shyouhei | 2018-10-19 16:36:31 +0900 (Fri, 19 Oct 2018) | 5 lines

.travis.yml: delete duplicated --disable-install-doc [ci skip]

The flag was already specified inside of before_script


------------------------------------------------------------------------
r65164 | shyouhei | 2018-10-19 16:32:28 +0900 (Fri, 19 Oct 2018) | 4 lines

.travis.yml: name each builds [ci-skip]

Just cosmetic update.

------------------------------------------------------------------------
r65163 | shyouhei | 2018-10-19 16:26:48 +0900 (Fri, 19 Oct 2018) | 8 lines

.travis.yml: add i686-linux tests

This is a better-than-nothing compilation check that compiles
32bit binary on a 64bit VM.

Commented out are universal.i386-darwin17 biulds, which I think
are in very low priority.

------------------------------------------------------------------------
r65162 | ko1 | 2018-10-19 14:26:35 +0900 (Fri, 19 Oct 2018) | 5 lines

check before access.

* vm_insnhelper.c (vm_push_frame): validate prev_frame because
  prev_frame can be the end of frame.

------------------------------------------------------------------------
r65161 | shyouhei | 2018-10-19 12:33:48 +0900 (Fri, 19 Oct 2018) | 12 lines

vm_core.h: NSIG is a BSDism.

Surprisingly, this constant (been there since around 1983) has
never been a part of any standards until now.  We have to find
out the appropriate value.

NSIG_MAX is expected to become a part of forthcoming POSIX.
See: http://austingroupbugs.net/view.php?id=741

_SIG_MAXSIG is here because that is greater than NSIG. See
Python's relevant discussion: https://bugs.python.org/issue20584

------------------------------------------------------------------------
r65160 | shyouhei | 2018-10-19 11:01:46 +0900 (Fri, 19 Oct 2018) | 4 lines

addr2line.c: minimal workaround to prevent parse error

"//*" is super dangerous for non-C++ compiler.

------------------------------------------------------------------------
r65159 | shyouhei | 2018-10-19 09:35:42 +0900 (Fri, 19 Oct 2018) | 5 lines

addr2line.c: this file has no portability

It seems nobody on earth is interested in such thing for it.
Ignore compiler warnings.

------------------------------------------------------------------------
r65158 | svn | 2018-10-19 08:58:23 +0900 (Fri, 19 Oct 2018) | 1 line

* 2018-10-19
------------------------------------------------------------------------
r65157 | nobu | 2018-10-19 08:58:21 +0900 (Fri, 19 Oct 2018) | 1 line

tool/insns2vm.rb: get rid of expanding paths
------------------------------------------------------------------------
r65154 | shyouhei | 2018-10-18 18:21:05 +0900 (Thu, 18 Oct 2018) | 6 lines

configure.ac: do not overwrite -std=

Set -std=gnu99 only when no such compiler flag(s) are set in any
compiler-related environment variables.  This enables users to
specify something more modern, say, -std=c11.

------------------------------------------------------------------------
r65153 | shyouhei | 2018-10-18 17:58:18 +0900 (Thu, 18 Oct 2018) | 7 lines

.travis.yml: add -pedantic build (2nd try)

Now that we have allow_failures, why not add configurations
that are prone to fail.  The first thing I want to add is
$CC -ansi -pedantic, which spots lots of bugs on my local
machine.

------------------------------------------------------------------------
r65152 | shyouhei | 2018-10-18 17:39:15 +0900 (Thu, 18 Oct 2018) | 2 lines

revert r65151, because the other tests were broken.

------------------------------------------------------------------------
r65151 | shyouhei | 2018-10-18 17:33:52 +0900 (Thu, 18 Oct 2018) | 7 lines

.travis.yml: add -pedantic build

Now that we have allow_failures, why not add configurations
that are prone to fail.  The first thing I want to add is
$CC -ansi -pedantic, which spots lots of bugs on my local
machine.

------------------------------------------------------------------------
r65150 | nobu | 2018-10-18 15:36:30 +0900 (Thu, 18 Oct 2018) | 1 line

make-snapshot: package with TarHeader
------------------------------------------------------------------------
r65149 | svn | 2018-10-18 14:51:35 +0900 (Thu, 18 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65148 | shyouhei | 2018-10-18 14:51:29 +0900 (Thu, 18 Oct 2018) | 37 lines

fix SEGV in rb_raw_obj_info()

This funcion can be called from inside of rb_ast_new().
Should add appropriate case branches.

(lldb) run
Process 9135 launched: './miniruby' (x86_64)
Process 9135 stopped
* thread #1: tid = 0xdf36b, 0x00000001000ca4f9 miniruby`rb_raw_obj_info(buff="0x000000010205d158 [0    ] T_IMEMO", buff_size=256, obj=4328903000) + 2361 at gc.c:9617, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    frame #0: 0x00000001000ca4f9 miniruby`rb_raw_obj_info(buff="0x000000010205d158 [0    ] T_IMEMO", buff_size=256, obj=4328903000) + 2361 at gc.c:9617
   9614                 IMEMO_NAME(iseq);
   9615                 IMEMO_NAME(tmpbuf);
   9616 #undef IMEMO_NAME
-> 9617               default: UNREACHABLE;
   9618             }
   9619             snprintf(buff, buff_size, "%s %s", buff, imemo_name);
   9620
(lldb) bt
* thread #1: tid = 0xdf36b, 0x00000001000ca4f9 miniruby`rb_raw_obj_info(buff="0x000000010205d158 [0    ] T_IMEMO", buff_size=256, obj=4328903000) + 2361 at gc.c:9617, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
  * frame #0: 0x00000001000ca4f9 miniruby`rb_raw_obj_info(buff="0x000000010205d158 [0    ] T_IMEMO", buff_size=256, obj=4328903000) + 2361 at gc.c:9617
    frame #1: 0x00000001000c433f miniruby`obj_info(obj=4328903000) + 95 at gc.c:9671
    frame #2: 0x00000001000ce2ac miniruby`newobj_init(klass=4302478608, flags=36890, v1=0, v2=0, v3=0, wb_protected=1, objspace=0x0000000101800410, obj=4328903000) + 444 at gc.c:1882
    frame #3: 0x00000001000c0a49 miniruby`newobj_of(klass=4302478608, flags=36890, v1=0, v2=0, v3=0, wb_protected=1) + 217 at gc.c:1968
    frame #4: 0x00000001000c0bcb miniruby`rb_imemo_new(type=imemo_ast, v1=0, v2=0, v3=0, v0=4302478608) + 75 at gc.c:2017
    frame #5: 0x0000000100148f2a miniruby`rb_ast_new + 58 at node.c:1118
    frame #6: 0x000000010018d9e2 miniruby`yycompile(vparser=4328903720, p=0x0000000100729670, fname=4328903160, line=1) + 98 at parse.y:4925
    frame #7: 0x000000010018d66f miniruby`parser_compile_string(vparser=4328903720, fname=4328903160, s=4328904440, line=1) + 143 at parse.y:4995
    frame #8: 0x000000010018d768 miniruby`rb_parser_compile_string_path(vparser=4328903720, f=4328903160, s=4328904440, line=1) + 56 at parse.y:5015
    frame #9: 0x000000010018d71e miniruby`rb_parser_compile_string(vparser=4328903720, f="-e", s=4328904440, line=1) + 62 at parse.y:5008
    frame #10: 0x00000001002130d5 miniruby`process_options(argc=0, argv=0x00007fff5fbfdc08, opt=0x00007fff5fbfd9e8) + 3477 at ruby.c:1754
    frame #11: 0x00000001002122dd miniruby`ruby_process_options(argc=2, argv=0x00007fff5fbfdbf8) + 285 at ruby.c:2332
    frame #12: 0x00000001000aa966 miniruby`ruby_options(argc=2, argv=0x00007fff5fbfdbf8) + 262 at eval.c:118
    frame #13: 0x0000000100000ed4 miniruby`main(argc=2, argv=0x00007fff5fbfdbf8) + 116 at main.c:42
    frame #14: 0x00007fff933845ad libdyld.dylib`start + 1
    frame #15: 0x00007fff933845ad libdyld.dylib`start + 1
(lldb)

------------------------------------------------------------------------
r65147 | nobu | 2018-10-18 11:32:25 +0900 (Thu, 18 Oct 2018) | 1 line

.travis.yml: no additional apt packages for spec/ruby [ci skip]
------------------------------------------------------------------------
r65146 | shyouhei | 2018-10-18 11:22:26 +0900 (Thu, 18 Oct 2018) | 4 lines

.travis.yml: should escape spaces

workarounds for https://github.com/travis-ci/travis-ci/issues/1444

------------------------------------------------------------------------
r65145 | shyouhei | 2018-10-18 10:56:30 +0900 (Thu, 18 Oct 2018) | 6 lines

.travis.yml: just use env

You don't have to use `before_install` to introduce
new environment variables; that is to be done using
`env` command.

------------------------------------------------------------------------
r65144 | nobu | 2018-10-18 10:52:50 +0900 (Thu, 18 Oct 2018) | 4 lines

.travis.yml: no PR in spec/ruby [ci skip]

* .travis.yml (before_script): spec/ruby has been incorporated
  already, no pull-requests to merge.
------------------------------------------------------------------------
r65143 | shyouhei | 2018-10-18 10:34:45 +0900 (Thu, 18 Oct 2018) | 2 lines

.travis.yml: fix typo in configure arguments

------------------------------------------------------------------------
r65142 | nobu | 2018-10-18 10:10:56 +0900 (Thu, 18 Oct 2018) | 5 lines

.travis.yml: split before_install into the matrix

* .travis.yml (before_install): split shell commands into the
  matrix per OSs, so that the commands will appear in the logs
  separately.
------------------------------------------------------------------------
r65141 | nobu | 2018-10-18 09:55:05 +0900 (Thu, 18 Oct 2018) | 1 line

zlib: fix Zlib::VERSION
------------------------------------------------------------------------
r65140 | usa | 2018-10-18 09:54:32 +0900 (Thu, 18 Oct 2018) | 2 lines

remove message already unnecesary

------------------------------------------------------------------------
r65139 | rhe | 2018-10-18 09:24:49 +0900 (Thu, 18 Oct 2018) | 13 lines

openssl: sync with upstream repository

Import current master (01b23fa8eee2) of ruby/openssl.git.

----------------------------------------------------------------
Kazuki Yamaguchi (3):
      x509name: fix OpenSSL::X509::Name#{cmp,<=>}
      Ruby/OpenSSL 2.0.9
      Ruby/OpenSSL 2.1.2

nobu (2):
      needs openssl/opensslv.h
      Remove -Wno-parentheses flag.
------------------------------------------------------------------------
r65138 | k0kubun | 2018-10-18 00:42:34 +0900 (Thu, 18 Oct 2018) | 7 lines

.travis.yml: revert r65131 too

because it succeeded https://travis-ci.org/ruby/ruby/jobs/442733840.

It looks that it randomly succeeds. Let's just leave it and see how
stable it is, starting from `allow_failures` because it hasn't hanged
only once so far.
------------------------------------------------------------------------
r65131 | k0kubun | 2018-10-18 00:13:36 +0900 (Thu, 18 Oct 2018) | 7 lines

revert r65124 and try non-parallel test-all on osx

OpenSSL error was fixed but r65124 hanged too
https://travis-ci.org/ruby/ruby/jobs/442727035.

So it seems to be an independent issue.
Let me try removing -j.
------------------------------------------------------------------------
r65127 | svn | 2018-10-18 00:03:12 +0900 (Thu, 18 Oct 2018) | 1 line

* 2018-10-18
------------------------------------------------------------------------
r65126 | svn | 2018-10-18 00:03:11 +0900 (Thu, 18 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65125 | nagachika | 2018-10-18 00:03:10 +0900 (Thu, 18 Oct 2018) | 6 lines

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.
------------------------------------------------------------------------
r65124 | k0kubun | 2018-10-17 23:50:35 +0900 (Wed, 17 Oct 2018) | 5 lines

.travis.yml: try openssl stable version

macOS build is handing on OpenSSL::SSL::SSLError https://travis-ci.org/ruby/ruby/jobs/442706479
Now 1.0.2p is stable version https://formulae.brew.sh/formula/openssl,
so let me try that version to make CI green
------------------------------------------------------------------------
r65123 | mame | 2018-10-17 23:35:02 +0900 (Wed, 17 Oct 2018) | 7 lines

sample/trick2018/03-tompng: merge upstream fixes

* Remove `ruby '2.5.0'`
* Add `source 'https://rubygems.org'`
* Avoid `Kernel#Integer`

Thanks to tompng.  Fixes #14930.
------------------------------------------------------------------------
r65122 | shyouhei | 2018-10-17 23:09:24 +0900 (Wed, 17 Oct 2018) | 5 lines

.travis.yml: enhance build matrix

add OS=osx compiler=clang build matrix so that we can make sure
things are built smoothly on that platform.

------------------------------------------------------------------------
r65121 | nobu | 2018-10-17 20:35:28 +0900 (Wed, 17 Oct 2018) | 4 lines

NEWS in rdoc mode [ci skip]

* NEWS: reverted to rdoc mode.  markdown mode does not make
  class/module/method references in HTML.
------------------------------------------------------------------------
r65120 | nobu | 2018-10-17 20:35:27 +0900 (Wed, 17 Oct 2018) | 5 lines

Fix NEWS format [ci skip]

* doc/NEWS-2.5.0: append bracketed tags to the previous lines, not
  to be parsed as description lists, and expand braces for method
  references.
------------------------------------------------------------------------
r65108 | svn | 2018-10-17 16:16:58 +0900 (Wed, 17 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65107 | mame | 2018-10-17 16:16:50 +0900 (Wed, 17 Oct 2018) | 3 lines

Remove the level information from throw instruction

It is no longer used.
------------------------------------------------------------------------
r65106 | aycabta | 2018-10-17 15:28:20 +0900 (Wed, 17 Oct 2018) | 1 line

Merge rdoc-6.1.0.beta2
------------------------------------------------------------------------
r65105 | naruse | 2018-10-17 10:29:49 +0900 (Wed, 17 Oct 2018) | 1 line

Check the end of Compilation Unit by unit length instead of level of tree
------------------------------------------------------------------------
r65104 | naruse | 2018-10-17 08:57:47 +0900 (Wed, 17 Oct 2018) | 1 line

Support base address selection entry
------------------------------------------------------------------------
r65103 | naruse | 2018-10-17 08:52:28 +0900 (Wed, 17 Oct 2018) | 4 lines

Correct the handling of .debug_ranges

Though DWARF specifies "the applicable base address defaults to the base
address of the compilation unit", but GCC seems to use zero as default.
------------------------------------------------------------------------
r65102 | naruse | 2018-10-17 08:52:28 +0900 (Wed, 17 Oct 2018) | 1 line

The value of .debug_ranges are uintptr_t
------------------------------------------------------------------------
r65101 | naruse | 2018-10-17 08:52:26 +0900 (Wed, 17 Oct 2018) | 1 line

If high_pc uses DW_FORM_addr, it's not size but address
------------------------------------------------------------------------
r65099 | svn | 2018-10-17 07:42:39 +0900 (Wed, 17 Oct 2018) | 1 line

* 2018-10-17
------------------------------------------------------------------------
r65098 | marcandre | 2018-10-17 07:42:37 +0900 (Wed, 17 Oct 2018) | 2 lines

Spec: Fix spec/ruby/core/array/reject_spec.rb & misc
Patch by @MSP-Greg.
------------------------------------------------------------------------
r65097 | k0kubun | 2018-10-16 18:29:23 +0900 (Tue, 16 Oct 2018) | 4 lines

tool/downloader.rb: retry Net::ReadTimeout

as failed in
https://ci.appveyor.com/project/ruby/ruby/builds/19540849/job/9p9pq0b7hfrb2r8q
------------------------------------------------------------------------
r65096 | nobu | 2018-10-16 18:11:12 +0900 (Tue, 16 Oct 2018) | 4 lines

string.c: grapheme cluster regexp failure

* string.c (get_reg_grapheme_cluster): show error info and relax
  to rb_fatal from rb_bug.
------------------------------------------------------------------------
r65095 | nobu | 2018-10-16 18:10:56 +0900 (Tue, 16 Oct 2018) | 1 line

regerror.c: lenghten MAX_ERROR_PAR_LEN to contain old property names
------------------------------------------------------------------------
r65094 | nobu | 2018-10-16 17:13:58 +0900 (Tue, 16 Oct 2018) | 1 line

regparse.c: check the result of propname2ctype
------------------------------------------------------------------------
r65093 | duerst | 2018-10-16 16:53:37 +0900 (Tue, 16 Oct 2018) | 2 lines

revert r65091, r65090 because ci fails

------------------------------------------------------------------------
r65092 | naruse | 2018-10-16 16:12:26 +0900 (Tue, 16 Oct 2018) | 1 line

check dwarf version and skip non Dwarf v4
------------------------------------------------------------------------
r65091 | duerst | 2018-10-16 16:01:55 +0900 (Tue, 16 Oct 2018) | 12 lines

update to Unicode 11.0.0 (basic step, not complete yet)

- common.mk: Change Unicode version to 11.0.0
- enc/unicode/case-folding.rb, enc/unicode.c: Initial changes to deal with
  Gregorian Mtavruli. This should bring us up to the same level as e.g.
  Python 3.7, by following the Unicode tables exactly. But it will
  produce undesirable (mixed-case) results for String#capitalize.
  This will be addressed in a later commit.
- enc/unicode/11.0.0, enc/unicode/11.0.0/casefold.h, enc/unicode/name2ctype.h:
  Add generated files.
- lib/unicode_normalize/tables.rb: Updated table.

------------------------------------------------------------------------
r65090 | duerst | 2018-10-16 15:41:47 +0900 (Tue, 16 Oct 2018) | 2 lines

add some comments to enc/unicode/case-folding.rb [ci skip]

------------------------------------------------------------------------
r65089 | svn | 2018-10-16 14:15:01 +0900 (Tue, 16 Oct 2018) | 1 line

* 2018-10-16
------------------------------------------------------------------------
r65088 | nobu | 2018-10-16 14:14:59 +0900 (Tue, 16 Oct 2018) | 1 line

Removed data for old Unicode [ci skip]
------------------------------------------------------------------------
r65087 | nobu | 2018-10-15 22:48:20 +0900 (Mon, 15 Oct 2018) | 4 lines

unicode.c: moved addtional GCB ranges

* enc/unicode.c: moved additional Grapheme Cluster Break ranges
  which depend on the Unicode version.
------------------------------------------------------------------------
r65086 | nobu | 2018-10-15 21:31:25 +0900 (Mon, 15 Oct 2018) | 5 lines

regparse.c: Suppress duplicated range warning by mere \X

* regparse.c (node_extended_grapheme_cluster): as Unicode 10 has
  added Grapheme_Cluster_Break properties to some characters,
  remove duplicated ranges for Unicode 9.
------------------------------------------------------------------------
r65085 | nobu | 2018-10-15 21:31:22 +0900 (Mon, 15 Oct 2018) | 1 line

regparse.c: warn all duplicated ranges when debugging
------------------------------------------------------------------------
r65084 | k0kubun | 2018-10-15 19:03:57 +0900 (Mon, 15 Oct 2018) | 4 lines

.travis.yml: try `addons.apt.config.retries: true` as well

This is suggested by Travis
https://github.com/travis-ci/travis-ci/issues/9112#issuecomment-376305909
------------------------------------------------------------------------
r65083 | k0kubun | 2018-10-15 18:51:32 +0900 (Mon, 15 Oct 2018) | 4 lines

.travis.yml: try `addons.apt.update: true` for gcc-8

because gcc-8 setup is super unstable like this
https://travis-ci.org/ruby/ruby/jobs/441528813
------------------------------------------------------------------------
r65082 | shyouhei | 2018-10-15 13:05:32 +0900 (Mon, 15 Oct 2018) | 5 lines

detect clang++

Given $CC is clang-* in this case branch the sed should
match against clang, not gcc.

------------------------------------------------------------------------
r65081 | nobu | 2018-10-15 09:11:45 +0900 (Mon, 15 Oct 2018) | 1 line

Pass cflags given to configure to mjit
------------------------------------------------------------------------
r65080 | nobu | 2018-10-15 08:45:33 +0900 (Mon, 15 Oct 2018) | 1 line

Moved hexdump macro before used
------------------------------------------------------------------------
r65079 | nobu | 2018-10-15 08:40:27 +0900 (Mon, 15 Oct 2018) | 1 line

Make local functions static
------------------------------------------------------------------------
r65078 | svn | 2018-10-15 01:59:16 +0900 (Mon, 15 Oct 2018) | 1 line

* 2018-10-15
------------------------------------------------------------------------
r65077 | naruse | 2018-10-15 01:59:15 +0900 (Mon, 15 Oct 2018) | 1 line

Read debug_info to show inline functions in backtrace
------------------------------------------------------------------------
r65076 | k0kubun | 2018-10-14 22:25:21 +0900 (Sun, 14 Oct 2018) | 25 lines

_mjit_compile_ivar.erb: optimize setivar as well

mjit_compile.inc.erb: ditto
common.mk: update dependency for the rename from getivar.erb

=== Optcarrot benchmark ===
```
$ benchmark-driver benchmark.yml --rbenv '2.0.0::2.0.0-p648 --disable-gems;before::before --disable-gems;before+JIT::before --disable-gems --jit;after::after --disable-gems;after+JIT::after --disable-gems --jit' -v --repeat-count 24
2.0.0: ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-linux]
before: ruby 2.6.0dev (2018-10-14 trunk 65074) [x86_64-linux]
before+JIT: ruby 2.6.0dev (2018-10-14 trunk 65074) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-10-14 trunk 65074) [x86_64-linux]
after+JIT: ruby 2.6.0dev (2018-10-14 trunk 65074) +JIT [x86_64-linux]
Calculating -------------------------------------
                              2.0.0      before  before+JIT       after   after+JIT
Optcarrot Lan_Master.nes     34.434      53.125      84.782      53.321      86.812 fps

Comparison:
             Optcarrot Lan_Master.nes
               after+JIT:        86.8 fps
              before+JIT:        84.8 fps - 1.02x  slower
                   after:        53.3 fps - 1.63x  slower
                  before:        53.1 fps - 1.63x  slower
                   2.0.0:        34.4 fps - 2.52x  slower
```
------------------------------------------------------------------------
r65075 | k0kubun | 2018-10-14 20:50:52 +0900 (Sun, 14 Oct 2018) | 3 lines

_mjit_compile_getivar.erb: we may not say receiver [ci skip]

for instance variable access, unlike method call.
------------------------------------------------------------------------
r65074 | k0kubun | 2018-10-14 20:25:36 +0900 (Sun, 14 Oct 2018) | 7 lines

vm_opts.h: share USE_IC_FOR_IVAR as OPT_IC_FOR_IVAR

with mjit_compile.c (tool/ruby_vm/views/_mjit_compile_getivar.erb).

mjit_compile.c: ditto
tool/ruby_vm/views/_mjit_compile_getivar.erb: ditto
vm_opts.h: ditto
------------------------------------------------------------------------
r65073 | k0kubun | 2018-10-14 18:24:43 +0900 (Sun, 14 Oct 2018) | 34 lines

_mjit_compile_getivar.erb: optimize IC-hit getivar

by inlining index (and serial to invalidate that) and simplifying the
branch by using JIT cancellation.

mjit_compile.inc.erb: use the above file
mjit_compile.c: copy USE_IC_FOR_IVAR definition. will move this to
another shared file later.
common.mk: add new dependency
test/ruby/test_jit.rb: cover this case

=== Optcarrot benchmark ===
```
$ benchmark-driver benchmark.yml --rbenv '2.0.0::2.0.0-p648;before::before --disable-gems;before+JIT::before --disable-gems --jit;after::after --disable-gems;after+JIT::after --disable-gems --jit' -v --repeat-count 24
2.0.0: ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-linux]
before: ruby 2.6.0dev (2018-10-14 trunk 65072) [x86_64-linux]
before+JIT: ruby 2.6.0dev (2018-10-14 trunk 65072) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-10-14 trunk 65072) [x86_64-linux]
last_commit=_mjit_compile_getivar.erb: optimize IC-hit getivar
after+JIT: ruby 2.6.0dev (2018-10-14 trunk 65072) +JIT [x86_64-linux]
last_commit=_mjit_compile_getivar.erb: optimize IC-hit getivar
Calculating -------------------------------------
                              2.0.0      before  before+JIT       after   after+JIT
Optcarrot Lan_Master.nes     36.065      53.896      71.565      53.856      84.747 fps

Comparison:
             Optcarrot Lan_Master.nes
               after+JIT:        84.7 fps
              before+JIT:        71.6 fps - 1.18x  slower
                  before:        53.9 fps - 1.57x  slower
                   after:        53.9 fps - 1.57x  slower
                   2.0.0:        36.1 fps - 2.35x  slower

```
------------------------------------------------------------------------
r65072 | k0kubun | 2018-10-14 14:50:06 +0900 (Sun, 14 Oct 2018) | 3 lines

vm_insnhelper.c: remove obsoleted comment [ci skip]

see also: r65061
------------------------------------------------------------------------
r65071 | k0kubun | 2018-10-14 10:24:21 +0900 (Sun, 14 Oct 2018) | 5 lines

appveyor.yml: test open-uri separately

This randomly crashes test worker
https://ci.appveyor.com/project/ruby/ruby/builds/19488746/job/pf1c78dlh8lqcj06
and running it without -j is suggested.
------------------------------------------------------------------------
r65070 | stomar | 2018-10-14 05:53:56 +0900 (Sun, 14 Oct 2018) | 1 line

NEWS: Hash#update! does not exist
------------------------------------------------------------------------
r65069 | stomar | 2018-10-14 05:36:03 +0900 (Sun, 14 Oct 2018) | 7 lines

hash.c: improve docs for Hash#{merge,merge!,update}

* hash.c: [DOC] improve docs for Hash#{merge,merge!,update}:
  various rewordings, avoid referring to the receiver as `hsh'
  (does not appear in the call-seq of the generated HTML docs),
  mention that Hash#update is an alias for Hash#merge!,
  use more distinct example values, fix spacing in code.
------------------------------------------------------------------------
r65068 | stomar | 2018-10-14 04:04:02 +0900 (Sun, 14 Oct 2018) | 1 line

string.c: [DOC] add example code for String#strip!
------------------------------------------------------------------------
r65067 | stomar | 2018-10-14 04:02:51 +0900 (Sun, 14 Oct 2018) | 4 lines

string.c: small doc improvement

* string.c: [DOC] move unaltered case for String#strip to the end,
  similar to other strip methods.
------------------------------------------------------------------------
r65066 | stomar | 2018-10-14 04:01:22 +0900 (Sun, 14 Oct 2018) | 4 lines

array.c: fix rdoc syntax

* array.c: [DOC] use `<code>other_ary</code>s' instead of `+other_ary+s',
  which is not rendered correctly.
------------------------------------------------------------------------
r65065 | svn | 2018-10-14 01:21:10 +0900 (Sun, 14 Oct 2018) | 1 line

* 2018-10-14
------------------------------------------------------------------------
r65064 | nobu | 2018-10-14 01:21:07 +0900 (Sun, 14 Oct 2018) | 1 line

Define PRIdPTR etc
------------------------------------------------------------------------
r65063 | nobu | 2018-10-14 01:21:06 +0900 (Sun, 14 Oct 2018) | 1 line

Remove compile-time dependencies on ruby/version.h
------------------------------------------------------------------------
r65062 | k0kubun | 2018-10-13 23:49:41 +0900 (Sat, 13 Oct 2018) | 4 lines

vm_insinhelper.c: prefer using inlinable function

No major performance impact, but just in case for some platform
that matters.
------------------------------------------------------------------------
r65061 | k0kubun | 2018-10-13 23:03:48 +0900 (Sat, 13 Oct 2018) | 4 lines

vm_insnhelper.c: finish reverting r63333

That optimization is already reverted and we're not retrying the
optimization soon. Let me simplify the code of vm_getivar.
------------------------------------------------------------------------
r65060 | nobu | 2018-10-13 18:59:23 +0900 (Sat, 13 Oct 2018) | 1 line

Add missing require
------------------------------------------------------------------------
r65059 | nobu | 2018-10-13 18:59:22 +0900 (Sat, 13 Oct 2018) | 4 lines

Prefer `rb_fstring_lit` over `rb_fstring_cstr`

The former states explicitly that the argument must be a literal,
and can optimize away `strlen` on all compilers.
------------------------------------------------------------------------
r65058 | nobu | 2018-10-13 18:23:56 +0900 (Sat, 13 Oct 2018) | 5 lines

Added comments to rb_setup_fake_str and rb_fstring_new [ci skip]

`ptr` for these functions must refer constant string literals.
Otherwise, the result string's content can be modified/discarded
unexpectedly.
------------------------------------------------------------------------
r65057 | svn | 2018-10-13 14:36:51 +0900 (Sat, 13 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65056 | normal | 2018-10-13 14:36:50 +0900 (Sat, 13 Oct 2018) | 3 lines

addr2line.c: fix *printf type warnings on 32-bit

Yup, back to using an ancient 32-bit system...
------------------------------------------------------------------------
r65055 | normal | 2018-10-13 14:18:49 +0900 (Sat, 13 Oct 2018) | 4 lines

tests: support Linux kernels with CONFIG_IPV6=n

Detecting the presence of constants in C headers is insufficient,
as a Linux kernel can be built with CONFIG_IPV6=n
------------------------------------------------------------------------
r65054 | svn | 2018-10-13 12:18:44 +0900 (Sat, 13 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65053 | suke | 2018-10-13 12:18:42 +0900 (Sat, 13 Oct 2018) | 7 lines

use ADODB.Connection instead of Microsoft Internet Controls.

  * test/win32ole/test_win32ole_type.rb: remove test using Microsoft
    Internet Controls.

  * test/win32ole/test_win32ole_type_event.rb: some test uses
    ADODB.Connection.
------------------------------------------------------------------------
r65052 | k0kubun | 2018-10-13 10:47:55 +0900 (Sat, 13 Oct 2018) | 6 lines

appveyor.yml: reorder jobs

to reduce time to get all green. As we have 3 parallelism on AppVeyor,
running the slow msys2 job first doesn't have significant impact on
job priorities, but at the same time this would reduce the time that
only msys2 is running alone at last.
------------------------------------------------------------------------
r65051 | k0kubun | 2018-10-13 10:32:20 +0900 (Sat, 13 Oct 2018) | 1 line

win32/win32.c: fix typo in comment [ci skip]
------------------------------------------------------------------------
r65050 | k0kubun | 2018-10-13 09:38:15 +0900 (Sat, 13 Oct 2018) | 7 lines

kill_spec.rb: exclude spec unstable on MinGW

like r64991, until we get helpful error logs on worker death or the
unstability is fixed.

Since mspec worker randomly dies on MinGW, maybe it should have an
option to retry worker death.
------------------------------------------------------------------------
r65049 | k0kubun | 2018-10-13 09:25:58 +0900 (Sat, 13 Oct 2018) | 3 lines

win32/win32.c: I meant FindFreeChildSlot [ci skip]

which was formerly used in CreateChild.
------------------------------------------------------------------------
r65048 | k0kubun | 2018-10-13 09:22:18 +0900 (Sat, 13 Oct 2018) | 4 lines

win32/win32.c: don't call FindChildSlot in MJIT

worker. It's very likely to be thread-unsafe and so it's better to avoid
using in MJIT worker to prevent surprises by race condition.
------------------------------------------------------------------------
r65047 | svn | 2018-10-13 09:22:00 +0900 (Sat, 13 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65046 | suke | 2018-10-13 09:21:59 +0900 (Sat, 13 Oct 2018) | 5 lines

remove Microsoft Internet Control

* test/win32ole/test_win32ole_param: remove Microsoft Internet Control.
* test/win32ole/test_win32ole_param_event: use ADODB instead of
  Microsoft Internet Control for test_input?, test_output?
------------------------------------------------------------------------
r65045 | svn | 2018-10-13 08:57:44 +0900 (Sat, 13 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65044 | k0kubun | 2018-10-13 08:57:42 +0900 (Sat, 13 Oct 2018) | 7 lines

win32/win32.c: drop always-NULL psa parameter

I'm simplifying the interface of ChildRecord as I'm going to complicate
it a little next.

I didn't drop hInput since leaving it would be more natural as its
interface.
------------------------------------------------------------------------
r65043 | suke | 2018-10-13 08:07:48 +0900 (Sat, 13 Oct 2018) | 4 lines

use assert_equal instead of assert

* test/win32ole/test_win32ole_param.rb (test_input?, test_output,
  test_optional, test_retval?): use assert_equal instead of assert.
------------------------------------------------------------------------
r65042 | stomar | 2018-10-13 06:55:49 +0900 (Sat, 13 Oct 2018) | 1 line

enumerator.c: [DOC] small fix
------------------------------------------------------------------------
r65041 | stomar | 2018-10-13 06:11:54 +0900 (Sat, 13 Oct 2018) | 1 line

range.c: [DOC] improve docs for Range#cover?
------------------------------------------------------------------------
r65040 | stomar | 2018-10-13 05:37:30 +0900 (Sat, 13 Oct 2018) | 4 lines

readline.c: improve docs

* ext/readline/readline.c: [DOC] fix typo in docs for
  Readline.completion_quote_character; enable link to method.
------------------------------------------------------------------------
r65039 | stomar | 2018-10-13 05:01:52 +0900 (Sat, 13 Oct 2018) | 1 line

process.c: [DOC] improve docs for Process.groups
------------------------------------------------------------------------
r65038 | stomar | 2018-10-13 05:00:13 +0900 (Sat, 13 Oct 2018) | 1 line

vm.c: [DOC] small improvements
------------------------------------------------------------------------
r65037 | stomar | 2018-10-13 04:58:11 +0900 (Sat, 13 Oct 2018) | 10 lines

default gems: add missing comment in gemspec

* lib/csv/csv.gemspec: [DOC] add comment for require fallback
  in Ruby repository.

* lib/logger.gemspec: ditto.
* lib/prime.gemspec: ditto.
* lib/rexml/rexml.gemspec: ditto.
* lib/rss/rss.gemspec: ditto.
* lib/webrick/webrick.gemspec: ditto.
------------------------------------------------------------------------
r65036 | stomar | 2018-10-13 04:56:53 +0900 (Sat, 13 Oct 2018) | 4 lines

hash.c: improve docs for Hash#{size,length}

* hash.c: [DOC] shorten example code for Hash#{size,length}
  and mention aliases at the end; also enable links.
------------------------------------------------------------------------
r65035 | nobu | 2018-10-13 00:48:06 +0900 (Sat, 13 Oct 2018) | 8 lines

Fix overwritten zone string

* time.c (zone_str): while rb_fstring_usascii and the family
  require that the argument string is never modified, tzname may
  point areas which will be discarded by calling tzset().
  make a String then call rb_fstring to copy the zone name.
  when an ID equals TZ environment variable, its name string also
  has modified by changing tzname.
------------------------------------------------------------------------
r65034 | svn | 2018-10-13 00:14:55 +0900 (Sat, 13 Oct 2018) | 1 line

* 2018-10-13
------------------------------------------------------------------------
r65033 | k0kubun | 2018-10-13 00:14:51 +0900 (Sat, 13 Oct 2018) | 15 lines

mjit_worker.c: suppress child process's output properly

Prior to this commit, some of parent process's output was unintentionally
suppressed. We couldn't suppress only child process's output with spawnvp.

Instead of that, this commit uses CreateProcess directly to redirect stdout
and stderr only for child process.

As it's dealing with HANDLE returned from CreateProcess, now waitpid macro
needs to CloseHandle it.

win32/win32.c: Introduce rb_w32_start_process which is designed for MJIT
worker. Other similar functions can't be used since they are using ALLOCV
that may trigger GC, which should be avoided on MJIT worker.

------------------------------------------------------------------------
r65032 | suke | 2018-10-12 22:51:21 +0900 (Fri, 12 Oct 2018) | 1 line

remove duplicate assertion
------------------------------------------------------------------------
r65031 | nobu | 2018-10-12 21:54:21 +0900 (Fri, 12 Oct 2018) | 4 lines

Removed unreachable code

* node.c (rb_ast_dispose): since `ast->node_buffer` is freed in
  `rb_ast_free()`, it should be always NULL.
------------------------------------------------------------------------
r65030 | k0kubun | 2018-10-12 18:19:49 +0900 (Fri, 12 Oct 2018) | 10 lines

test/win32ole/test_win32ole_event.rb: wait longer

for unstable spec. I added r64963 but it couldn't rescue:
https://ci.appveyor.com/project/ruby/ruby/builds/19451743/job/hg0tyoxbacrrlnsr

Since #test_on_event is especially unstable,
https://ci.appveyor.com/project/ruby/ruby/builds/19337514/job/0wp2oe9dkr9gt1bi
https://ci.appveyor.com/project/ruby/ruby/builds/19451743/job/hg0tyoxbacrrlnsr
this commit lets it sleep longer as needed.

------------------------------------------------------------------------
r65029 | naruse | 2018-10-12 17:45:05 +0900 (Fri, 12 Oct 2018) | 1 line

Disable fast_finish
------------------------------------------------------------------------
r65028 | svn | 2018-10-12 12:55:22 +0900 (Fri, 12 Oct 2018) | 1 line

* properties.
------------------------------------------------------------------------
r65027 | suke | 2018-10-12 12:55:21 +0900 (Fri, 12 Oct 2018) | 7 lines

use ADODB.connection instead of Microsoft Internet Controls

  * test/win32ole/test_win32ole_method.rb: remove test using Microsoft
    Internet Controls.

  * test/win32ole/test_win32ole_method_event.rb: add test using
    ADODB.connection.
------------------------------------------------------------------------
r65026 | nobu | 2018-10-12 11:49:39 +0900 (Fri, 12 Oct 2018) | 1 line

Initialize zone
------------------------------------------------------------------------
r65025 | nobu | 2018-10-12 11:25:38 +0900 (Fri, 12 Oct 2018) | 1 line

Load as FIXOFF mode if zone is present
------------------------------------------------------------------------
r65024 | nobu | 2018-10-12 11:25:37 +0900 (Fri, 12 Oct 2018) | 1 line

Just copy tzmode
------------------------------------------------------------------------
r65023 | nobu | 2018-10-12 11:22:55 +0900 (Fri, 12 Oct 2018) | 3 lines

Missing write-barrier

Fix up r64507.
------------------------------------------------------------------------
r65022 | naruse | 2018-10-12 10:21:45 +0900 (Fri, 12 Oct 2018) | 1 line

Remove debug print
------------------------------------------------------------------------
r65021 | naruse | 2018-10-12 09:45:07 +0900 (Fri, 12 Oct 2018) | 1 line

use APPVEYOR_BUILD_WORKER_IMAGE
------------------------------------------------------------------------
r65020 | naruse | 2018-10-12 09:31:24 +0900 (Fri, 12 Oct 2018) | 1 line

escape
------------------------------------------------------------------------
r65019 | naruse | 2018-10-12 09:25:41 +0900 (Fri, 12 Oct 2018) | 1 line

Quote path
------------------------------------------------------------------------
r65018 | naruse | 2018-10-12 09:20:14 +0900 (Fri, 12 Oct 2018) | 1 line

debug print
------------------------------------------------------------------------
r65017 | naruse | 2018-10-12 09:09:19 +0900 (Fri, 12 Oct 2018) | 1 line

Define VS140COMNTOOLS by itself
------------------------------------------------------------------------
r65016 | naruse | 2018-10-12 08:59:09 +0900 (Fri, 12 Oct 2018) | 1 line

Specify vm image on appveyor.yml
------------------------------------------------------------------------
r65015 | svn | 2018-10-12 08:58:21 +0900 (Fri, 12 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r65014 | naruse | 2018-10-12 08:58:20 +0900 (Fri, 12 Oct 2018) | 1 line

Revert wrongly commit debug_info feature
------------------------------------------------------------------------
r65013 | naruse | 2018-10-12 08:55:47 +0900 (Fri, 12 Oct 2018) | 1 line

Support FreeBSD
------------------------------------------------------------------------
r65012 | naruse | 2018-10-12 08:55:47 +0900 (Fri, 12 Oct 2018) | 1 line

Support compressed debug_info
------------------------------------------------------------------------
r65011 | naruse | 2018-10-12 08:55:46 +0900 (Fri, 12 Oct 2018) | 1 line

free line info leaves
------------------------------------------------------------------------
r65010 | naruse | 2018-10-12 08:55:45 +0900 (Fri, 12 Oct 2018) | 1 line

close dlopen-ed handle
------------------------------------------------------------------------
r65009 | naruse | 2018-10-12 08:55:45 +0900 (Fri, 12 Oct 2018) | 1 line

fix
------------------------------------------------------------------------
r65008 | naruse | 2018-10-12 08:55:44 +0900 (Fri, 12 Oct 2018) | 1 line

Support additional forms
------------------------------------------------------------------------
r65007 | naruse | 2018-10-12 08:55:44 +0900 (Fri, 12 Oct 2018) | 1 line

Show backtrace with .debug_info
------------------------------------------------------------------------
r65006 | naruse | 2018-10-12 08:55:43 +0900 (Fri, 12 Oct 2018) | 1 line

Read .debug_info
------------------------------------------------------------------------
r65005 | naruse | 2018-10-12 08:23:16 +0900 (Fri, 12 Oct 2018) | 1 line

show envvars before use it
------------------------------------------------------------------------
r65004 | naruse | 2018-10-12 08:21:11 +0900 (Fri, 12 Oct 2018) | 1 line

Show VS*COMNTOOLS environment variable on appveyor
------------------------------------------------------------------------
r65003 | k0kubun | 2018-10-12 01:28:04 +0900 (Fri, 12 Oct 2018) | 8 lines

win32/Makefile.sub: generate MJIT header pdb

in the MJIT-header-specific path, not default path like vc140.pdb.

mjit_worker.c: specify the MJIT-header-specific pdb path.

tool/rbinstall.rb: install MJIT header pdb as well.

------------------------------------------------------------------------
r65001 | svn | 2018-10-12 00:02:00 +0900 (Fri, 12 Oct 2018) | 1 line

* 2018-10-12
------------------------------------------------------------------------
r65000 | k0kubun | 2018-10-12 00:01:56 +0900 (Fri, 12 Oct 2018) | 8 lines

win32/Makefile.sub: install MJIT header and object

to prefix. This is a retry of r64947. So this doesn't still make mswin MJIT
on install directory succeed. One more step required.

tool/rbinstall.rb: This change is needed to install headers correctly since
the extensions are .obj and .pch, not .h

------------------------------------------------------------------------
r64995 | svn | 2018-10-11 10:03:07 +0900 (Thu, 11 Oct 2018) | 1 line

* 2018-10-11
------------------------------------------------------------------------
r64994 | mame | 2018-10-11 10:03:05 +0900 (Thu, 11 Oct 2018) | 3 lines

prelude.rb (Kernel#pp): make it private

It was a bug.
------------------------------------------------------------------------
r64993 | k0kubun | 2018-10-10 20:58:40 +0900 (Wed, 10 Oct 2018) | 6 lines

spec/.../ole_method.rb: retry WIN32OLERuntimeError

This part sometimes causes random failure like:
https://ci.appveyor.com/project/ruby/ruby/builds/19382723/job/bedc33p4nolcqkp6

Let me retry this to make CI stable.
------------------------------------------------------------------------
r64992 | k0kubun | 2018-10-10 20:39:46 +0900 (Wed, 10 Oct 2018) | 3 lines

spec: add comments to re-enable specs for MinGW [ci skip]

r64918 and r64988 should not be kept forever.
------------------------------------------------------------------------
r64991 | k0kubun | 2018-10-10 20:35:58 +0900 (Wed, 10 Oct 2018) | 7 lines

terminate_spec.rb: exclude unstable spec for MinGW

This spec seems to randomly kill mspec worker.
https://ci.appveyor.com/project/ruby/ruby/builds/19390874/job/wv1bsm8skd4e1pxl

To make CI stable, let me exclude this for MinGW until we get some logs
that help debugging or resolve that.
------------------------------------------------------------------------
r64990 | svn | 2018-10-10 13:24:11 +0900 (Wed, 10 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64989 | ko1 | 2018-10-10 13:24:10 +0900 (Wed, 10 Oct 2018) | 5 lines

revisit `RARRAY_PTR()`.

* ext/fiddle/function.c (initialize): use RARRAY_AREF() instead of
  using RARRAY_PTR().

------------------------------------------------------------------------
r64988 | svn | 2018-10-10 13:20:21 +0900 (Wed, 10 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64987 | ko1 | 2018-10-10 13:20:17 +0900 (Wed, 10 Oct 2018) | 5 lines

revisit `RARRAY_PTR()`.

* process.c (check_exec_redirect): use RARRAY_AREF() instead of
  using RARRAY_PTR().

------------------------------------------------------------------------
r64986 | ko1 | 2018-10-10 13:17:01 +0900 (Wed, 10 Oct 2018) | 12 lines

revisit `RARRAY_PTR()`.

* array.c (yield_indexed_values): use RARRAY_AREF/ASET instead of
  using RARRAY_PTR().

* enum.c (nmin_filter): ditto.

* proc.c (rb_sym_to_proc): ditto.

* enum.c (rb_nmin_run): use RARRAY_PTR_USE() instead of RARRAY_PTR().
  It is safe because they don't make new referecen from an array.

------------------------------------------------------------------------
r64985 | ko1 | 2018-10-10 12:52:20 +0900 (Wed, 10 Oct 2018) | 10 lines

revisit `RARRAY_PTR()`.

* array.c (ary_memcpy0): remove traditional `RARRAY_PTR()` code.
  It's enough stable.

* array.c (rb_ary_splice): add comment about wb-unprotect.

* array.c (rotate_count): use `RARRAY_PTR_USE()` instead of
  `RARRAY_PTR()` to avoid wb-unprotect.

------------------------------------------------------------------------
r64984 | svn | 2018-10-10 05:06:42 +0900 (Wed, 10 Oct 2018) | 1 line

* 2018-10-10
------------------------------------------------------------------------
r64983 | odaira | 2018-10-10 05:06:36 +0900 (Wed, 10 Oct 2018) | 2 lines

* configure.ac: do not use __builtin_longjmp on ppc64* Linux
  because it causes a segmentation fault with MJIT
------------------------------------------------------------------------
r64977 | nobu | 2018-10-09 15:56:38 +0900 (Tue, 09 Oct 2018) | 1 line

Add tests for another timezone
------------------------------------------------------------------------
r64976 | ko1 | 2018-10-09 15:18:28 +0900 (Tue, 09 Oct 2018) | 2 lines

use `should include`.

------------------------------------------------------------------------
r64975 | nobu | 2018-10-09 14:55:29 +0900 (Tue, 09 Oct 2018) | 9 lines

Time.parse based from non-Time object

* lib/time.rb (Time.make_time): as the document states, the second
  argument of `Time.parse` may be a non-`Time` object which does not
  have `getlocal` method, assume it is in the local time in the case.
  based on the patch by nkmrya (Yasuhiro Nakamura) at
  [ruby-core:68775].  [ruby-core:68775] [Bug #11037]

Co-authored-by: nkmrya (Yasuhiro Nakamura) <yasuhiro6194@gmail.com>
------------------------------------------------------------------------
r64974 | nobu | 2018-10-09 12:21:57 +0900 (Tue, 09 Oct 2018) | 10 lines

ext/objspace/objspace_dump.c: print addresses consistently

The format addresses are printed in are different if you use
`ObjectSpace.dump_all(output: :stdout)` vs.
`ObjectSpace.dump_all(output: :string)` (or `ObjectSpace.dump`) due to
differences in the underlying `vfprintf` implementation.

Use `"%#"PRIxVALUE` to format `VALUE`.

Co-authored-by: Ashe Connor <ashe@kivikakk.ee>
------------------------------------------------------------------------
r64973 | svn | 2018-10-09 11:01:56 +0900 (Tue, 09 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64972 | naruse | 2018-10-09 11:01:54 +0900 (Tue, 09 Oct 2018) | 8 lines

Revert "ext/objspace/objspace_dump.c: print addresses consistently"

This reverts commit r64970.

Visual C++ 12.0 doesn't have PRIxPTR.
Anyway we have our own vfprintf implementation BSD_vfprintf().
If you want to have portable vfprintf, replace it with BSD_vfprintf like
vsnprintf or just use BSD_vfprintf.
------------------------------------------------------------------------
r64971 | svn | 2018-10-09 08:43:48 +0900 (Tue, 09 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64970 | tenderlove | 2018-10-09 08:43:45 +0900 (Tue, 09 Oct 2018) | 10 lines

ext/objspace/objspace_dump.c: print addresses consistently

The format addresses are printed in are different if you use
`ObjectSpace.dump_all(output: :stdout)` vs.
`ObjectSpace.dump_all(output: :string)` (or `ObjectSpace.dump`) due to
differences in the underlying `vfprintf` implementation.

Use %"PRIxPTR" instead to be consistent across both.

Co-authored-by: Ashe Connor <ashe@kivikakk.ee>
------------------------------------------------------------------------
r64969 | kazu | 2018-10-09 00:47:21 +0900 (Tue, 09 Oct 2018) | 5 lines

Revert "NEWS: Fix indent [ci skip]"

This reverts commit a43d71159fdf208f5ad29fe8f4169e193056caaa.

already fixed at r64958
------------------------------------------------------------------------
r64968 | svn | 2018-10-09 00:12:57 +0900 (Tue, 09 Oct 2018) | 1 line

* 2018-10-09
------------------------------------------------------------------------
r64967 | kazu | 2018-10-09 00:12:56 +0900 (Tue, 09 Oct 2018) | 1 line

NEWS: Fix indent [ci skip]
------------------------------------------------------------------------
r64966 | svn | 2018-10-08 22:57:38 +0900 (Mon, 08 Oct 2018) | 1 line

* remove trailing space. [ci skip]
------------------------------------------------------------------------
r64965 | k0kubun | 2018-10-08 22:57:36 +0900 (Mon, 08 Oct 2018) | 2 lines

include/ruby/ruby.h: comment about mswin RUBY_EXTERN [ci skip]

------------------------------------------------------------------------
r64964 | k0kubun | 2018-10-08 22:46:42 +0900 (Mon, 08 Oct 2018) | 6 lines

include/ruby/ruby.h: import external symbols

properly on MinGW MJIT.

test_jit.rb: all MJIT tests are now passing on MinGW.

------------------------------------------------------------------------
r64963 | k0kubun | 2018-10-08 20:59:22 +0900 (Mon, 08 Oct 2018) | 5 lines

test_win32ole_event.rb: sleep longer

to increase the possibility of TestWIN32OLE_EVENT_SWbemSink#test_on_event success.
It seems to randomly fail
https://ci.appveyor.com/project/ruby/ruby/builds/19337514/job/0wp2oe9dkr9gt1bi
------------------------------------------------------------------------
r64962 | k0kubun | 2018-10-08 19:46:36 +0900 (Mon, 08 Oct 2018) | 7 lines

appveyor.yml: execute test_syntax separately

because NoMemoryError tends to be caused by
TestSyntax#assert_syntax_files.
https://ci.appveyor.com/project/ruby/ruby/build/1.0.8525
https://ci.appveyor.com/project/ruby/ruby/build/1.0.8795
https://ci.appveyor.com/project/ruby/ruby/builds/19334828/job/s1960qssxnk1lpoi
------------------------------------------------------------------------
r64961 | nobu | 2018-10-08 17:54:35 +0900 (Mon, 08 Oct 2018) | 1 line

Add test for marshal
------------------------------------------------------------------------
r64960 | nobu | 2018-10-08 17:46:50 +0900 (Mon, 08 Oct 2018) | 1 line

Removed redundant suffix `_with_timezone`
------------------------------------------------------------------------
r64959 | k0kubun | 2018-10-08 13:30:07 +0900 (Mon, 08 Oct 2018) | 10 lines

revert r64957 [ci skip]

r64956 didn't work either...
This means that svn.ruby-lang.org/ruby is not executing the latest git
hook on git.ruby-lang.org/ruby-commit-hook.

Tentatively I backported the changes of auto-style.rb in
git.ruby-lang.org/ruby-commit-hook to git.ruby-lang.org/scripts.

I hope this commit won't be rolled back by svn bot...
------------------------------------------------------------------------
r64958 | nobu | 2018-10-08 13:03:32 +0900 (Mon, 08 Oct 2018) | 3 lines

Timezone at Time#+ and Time#-

* time.c (time_add): support for Timezone.
------------------------------------------------------------------------
r64957 | svn | 2018-10-08 12:11:37 +0900 (Mon, 08 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64956 | k0kubun | 2018-10-08 12:11:36 +0900 (Mon, 08 Oct 2018) | 8 lines

revert r64955

r64954 didn't work...

In this commit, I'm experimenting
https://git.ruby-lang.org/ruby-commit-hook.git/commit/svn-utils/bin/auto-style.rb?id=2a1a17da1c163e8fc4321759d95057441ddf2c0a

We can distinguish possible 2 issues by this commit.
------------------------------------------------------------------------
r64955 | svn | 2018-10-08 11:55:07 +0900 (Mon, 08 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64954 | k0kubun | 2018-10-08 11:55:06 +0900 (Mon, 08 Oct 2018) | 11 lines

partially revert r64953

"expand tabs" is not intended to be applied to strftime.c, because its
c-file-style is "linux", not "ruby".

It's explicitly excluded to expand tabs
https://git.ruby-lang.org/ruby-commit-hook.git/tree/svn-utils/bin/auto-style.rb#n195
but it didn't work.
I fixed the issue in
https://git.ruby-lang.org/ruby-commit-hook.git/commit/svn-utils/bin/auto-style.rb?id=844e0d42de11ad4c549bfbdd752a21df2823c18c
so let me try to revert the strftime.c change to keep the tabs.
------------------------------------------------------------------------
r64953 | svn | 2018-10-08 11:35:33 +0900 (Mon, 08 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64952 | nobu | 2018-10-08 11:35:31 +0900 (Mon, 08 Oct 2018) | 6 lines

Timezone support by Time [Feature #14850]

* strftime.c (rb_strftime): support timezone object by `%z`.

* time.c (time_init_1, time_new_timew, time_getlocaltime): accept
  timezone object as `off`.
------------------------------------------------------------------------
r64951 | k0kubun | 2018-10-08 10:08:37 +0900 (Mon, 08 Oct 2018) | 7 lines

test_jit.rb: skip to test tempdir emptiness

on AppVeyor mswin. It's somehow failing and not reproductive on my
environment.

We're suspecting maybe somebody is still holding module handle, even
while FreeLibrary is finished successfully.
------------------------------------------------------------------------
r64950 | k0kubun | 2018-10-08 09:12:21 +0900 (Mon, 08 Oct 2018) | 9 lines

revert r64947 and r64949

Both didn't work well on mswin. Reverting.
https://ci.appveyor.com/project/ruby/ruby/builds/19322867/job/28fgwiq8j7hdmeu6
https://ci.appveyor.com/project/ruby/ruby/builds/19323721/job/1s73mrgu8n8wpa5f

We need to revisit this to have MJIT header in a correct place, but
having both in the place didn't make JIT on install directory functional
either anyway...
------------------------------------------------------------------------
r64949 | k0kubun | 2018-10-08 01:52:21 +0900 (Mon, 08 Oct 2018) | 1 line

win32/Makefile.sub: create header install dir first
------------------------------------------------------------------------
r64948 | k0kubun | 2018-10-08 01:45:16 +0900 (Mon, 08 Oct 2018) | 7 lines

appveyor.yml: completely separate win32ole tests

because r64938 was not enough and another win32ole test file
(`test_win32ole_type.rb`) crashed worker.
https://ci.appveyor.com/project/ruby/ruby/builds/19321161/job/ue1qrphi5j1xxgu6

Let's run whole win32ole test suite separately.
------------------------------------------------------------------------
r64947 | k0kubun | 2018-10-08 00:38:06 +0900 (Mon, 08 Oct 2018) | 13 lines

win32/Makefile.sub: install precompiled header to prefix

This is needed to run JIT from the installed ruby binary.

Even after this, we're hitting another error though.

start compilation: a@-e:1 -> C:\Users\k0kubun\AppData\Local\Temp/_ruby_mjit_p9712u0.c
Starting process: cl cl -nologo -LD -DMJIT_HEADER -MD -Zi -W2 -wd4100 -wd4127 -wd4210 -wd4214 -wd4255 -wd4574 -wd4668 -wd4710 -wd4711 -wd4820 -wd4996 -we4028 -we4142 -O2sy- -Zm600 -DRUBY_EXPORT -I. -I.ext/include/x64-mswin64_140 -I../ruby/include -I../ruby -I../ruby/enc/unicode/10.0.0 -DRUBY_DEVEL=1 -DCANONICALIZATION_FOR_MATHN -D_WIN32_WINNT=0x0600 -FeC:\Users\k0kubun\AppData\Local\Temp/_ruby_mjit_p9712u0.so -FoC:\Users\k0kubun\AppData\Local\Temp/_ruby_mjit_p9712u0.obj -YuC:/usr/include/ruby-2.6.0/x64-mswin64_140/rb_mjit_header-2.6.0.pch C:/usr/include/ruby-2.6.0/x64-mswin64_140/rb_mjit_header-2.6.0.obj -TcC:\Users\k0kubun\AppData\Local\Temp/_ruby_mjit_p9712u0.c -link -LIBPATH:C:/usr/lib x64-vcruntime140-ruby260.lib -incremental:no -debug -opt:ref -opt:icf -dll
_ruby_mjit_p9712u0.c
C:\Users\k0kubun\AppData\Local\Temp/_ruby_mjit_p9712u0.c(1): error C2859: C:\usr\bin\vc140.pdb is not the pdb file that was used when this precompiled header was created, recreate the precompiled header.
compile_c_to_so: compile error: 2
Failed to generate so: C:\Users\k0kubun\AppData\Local\Temp/_ruby_mjit_p9712u0.so

------------------------------------------------------------------------
r64946 | svn | 2018-10-08 00:10:00 +0900 (Mon, 08 Oct 2018) | 1 line

* 2018-10-08
------------------------------------------------------------------------
r64945 | k0kubun | 2018-10-08 00:09:58 +0900 (Mon, 08 Oct 2018) | 4 lines

mjit_worker.c: clean up all unnecessary files on mswin

test_jit.rb: passed all MJIT tests.

------------------------------------------------------------------------
r64944 | k0kubun | 2018-10-07 23:51:53 +0900 (Sun, 07 Oct 2018) | 4 lines

mjit_worker.c: don't suppress cl.exe logs

on --jit-verbose=2+.

------------------------------------------------------------------------
r64943 | k0kubun | 2018-10-07 23:05:56 +0900 (Sun, 07 Oct 2018) | 5 lines

appveyor.yml: give up running TestThreadQueue#test_queue_with_trap

for mswin. We tried to increase timeout and execute separately but both
didn't work. Let me skip this until somebody starts to work on fixing
this behavior, since this makes AppVeyor almost impossible to be used as CI.
------------------------------------------------------------------------
r64942 | k0kubun | 2018-10-07 23:00:04 +0900 (Sun, 07 Oct 2018) | 13 lines

include/ruby/intern.h: don't modify MJIT_FUNC_EXPORTED

on most of platforms except mswin.

Changing it to static was needed for mswin because it doesn't use
transform_mjit_header, but for platforms that use it, it causes link
error like:

/usr/bin/ld: /tmp/_ruby_mjit_p21652u0.o: relocation R_X86_64_PC32 against undefined symbol `rb_vm_search_method_slowpath' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

include/ruby/defines.h: MJIT_FUNC_EXPORTED moved to intern.h
------------------------------------------------------------------------
r64941 | k0kubun | 2018-10-07 22:34:59 +0900 (Sun, 07 Oct 2018) | 12 lines

vm_core.h: fix inconsistent prototype declarations

like "error: static declaration of 'xxx' follows non-static declaration".
r64940 is successfully built on mswin but not built on almost all other environments.

internal.h: ditto

include/ruby/intern.h: MJIT_STATIC is moved to this file since this file
also needs to use this.

mjit.h: MJIT_STATIC is moved from this.

------------------------------------------------------------------------
r64940 | k0kubun | 2018-10-07 22:11:27 +0900 (Sun, 07 Oct 2018) | 14 lines

mjit.h: introduce MJIT_STATIC for full mswin JIT support

This change resolves most of major remaining MJIT bugs on mswin.
Since Visual Studio doesn't support generating pre-processed code
preserving macros, we can't use transform_mjit_header approach for mswin.
So we need to transform MJIT header using macro like this.

vm.c: use MJIT_STATIC for non-static functions that exist on MJIT header
and cause conflict on link.
vm_insnhelper.c: ditto

test_jit.rb: remove many skips for mswin.


------------------------------------------------------------------------
r64939 | k0kubun | 2018-10-07 21:28:46 +0900 (Sun, 07 Oct 2018) | 4 lines

mjit_worker.c: print warning if FreeLibrary fails

because somehow AppVeyor fails to remove so file by Permission Deined.

------------------------------------------------------------------------
r64938 | k0kubun | 2018-10-07 21:03:49 +0900 (Sun, 07 Oct 2018) | 11 lines

appveyor.yml: separately execute unstable tests

without -j option. Those 2 tests are too unstable on AppVeyor.

test/excludes/TestThreadQueue.rb: The most unstable test ever. That even fails on my
machine too. This may be possibly because recent SIGCHLD-related changes.
https://ci.appveyor.com/project/ruby/ruby/build/9795/job/l9t4w9ks7arsldb1

test/excludes/TestWin32OLE.rb: I saw that win32ole crashes test-all several times.
https://ci.appveyor.com/project/ruby/ruby/build/9811/job/ra5uxf2cg6v7ohag

------------------------------------------------------------------------
r64937 | k0kubun | 2018-10-07 20:46:26 +0900 (Sun, 07 Oct 2018) | 3 lines

revert r64935

that didn't work at all. So the so file should be open at the time.
------------------------------------------------------------------------
r64936 | nobu | 2018-10-07 18:17:59 +0900 (Sun, 07 Oct 2018) | 1 line

Added missing declarations in readline.h bundled with macOS 10.14
------------------------------------------------------------------------
r64935 | k0kubun | 2018-10-07 17:15:48 +0900 (Sun, 07 Oct 2018) | 12 lines

appveyor.yml: use ./tmp as TMPDIR for test-all

on VS.

On AppVeyor, we seem to fail to remove so file due to permission error.
C:/projects/ruby/test/ruby/test_jit.rb:419: warning: MJIT warning: failed to remove
"C:\Users\appveyor\AppData\Local\Temp\1/_ruby_mjit_p3580u0.so": Permission denied
https://ci.appveyor.com/project/ruby/ruby/builds/19317520/job/sh8s6tw6ayxvtl33

But this is not reproductive on my local mswin environment at all.
To identify the cause, let me try changing the TMPDIR.

------------------------------------------------------------------------
r64934 | k0kubun | 2018-10-07 17:03:36 +0900 (Sun, 07 Oct 2018) | 6 lines

mjit_worker.c: clean up .obj file on mswin

prior to this commit, .obj file is generated on current directory and nobody deletes that.
This changes it to make sure it's generated to temporary directory and removes that.


------------------------------------------------------------------------
r64933 | k0kubun | 2018-10-07 15:08:54 +0900 (Sun, 07 Oct 2018) | 8 lines

add_spec.rb: skip unstable spec on mingw

This sometimes crashes mspec worker like
https://ci.appveyor.com/project/ruby/ruby/build/9806/job/37tx2atojy96227m

and it doesn't generate helpful output and it seems hard to fix it soon.
As AppVeyor is too unstable by too many factors, let me skip this
at least for a short term. until AppVeyor gets stable.
------------------------------------------------------------------------
r64932 | k0kubun | 2018-10-07 14:54:04 +0900 (Sun, 07 Oct 2018) | 3 lines

test_jit.rb: skip some tests

that don't succeed on MinGW after r64929
------------------------------------------------------------------------
r64931 | k0kubun | 2018-10-07 13:29:00 +0900 (Sun, 07 Oct 2018) | 1 line

mjit.c: fix obsoleted comment [ci skip]
------------------------------------------------------------------------
r64930 | kazu | 2018-10-07 13:21:32 +0900 (Sun, 07 Oct 2018) | 1 line

Fix indent of output in doc [ci skip]
------------------------------------------------------------------------
r64929 | k0kubun | 2018-10-07 13:17:59 +0900 (Sun, 07 Oct 2018) | 16 lines

mjit.h: call compiled code immediately

after the first compilation on --jit-wait.

Previously the assignment to `func` didn't have meaning for the behavior,
and the compiled code wasn't called immediately after the synchronous
compilation. It wasn't intentional.

Fixing this issue without impacting performance without --jit-wait is
not so obvious. Adding branch or goto to call func in mjit_exec spoiled
the performance without --jit-wait. Instead of that, I called the func
inside mjit_wait_call() (former mjit_get_iseq_func()) which is never
inlined to mjit_exec(). Thanks to that, this commit has no impact for
normal performance.

mjit.c: ditto
------------------------------------------------------------------------
r64928 | svn | 2018-10-07 00:14:20 +0900 (Sun, 07 Oct 2018) | 1 line

* 2018-10-07
------------------------------------------------------------------------
r64927 | nobu | 2018-10-07 00:14:19 +0900 (Sun, 07 Oct 2018) | 1 line

revert r64925
------------------------------------------------------------------------
r64926 | svn | 2018-10-06 12:11:49 +0900 (Sat, 06 Oct 2018) | 1 line

* 2018-10-06
------------------------------------------------------------------------
r64925 | nobu | 2018-10-06 12:11:46 +0900 (Sat, 06 Oct 2018) | 5 lines

order-only-prerequisites

* defs/gmake.mk: use order-only-prerequisites to run build and test
  targets sequentially.
  https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html
------------------------------------------------------------------------
r64924 | naruse | 2018-10-05 19:36:24 +0900 (Fri, 05 Oct 2018) | 3 lines

Use binread because webrick also uses binread

Reported-by: MSP-Greg [Bug #15203]
------------------------------------------------------------------------
r64923 | hsbt | 2018-10-05 19:28:38 +0900 (Fri, 05 Oct 2018) | 1 line

Added news entry of r64741.
------------------------------------------------------------------------
r64922 | svn | 2018-10-05 15:23:37 +0900 (Fri, 05 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64921 | nobu | 2018-10-05 15:23:34 +0900 (Fri, 05 Oct 2018) | 13 lines

Add difference method to Array

I introduce a `difference` method equivalent to the `-` operator, but
which accept more than array as argument. This improved readability, and
it is also coherent with the `+` operator, which has a similar `concat`
method. The method doesn't modify the original object and return a new
object instead. I plan to introduce a `difference!` method as well.

Tests and documentation are included.

It solves partially https://bugs.ruby-lang.org/issues/14097

From: Ana Maria Martinez Gomez <ammartinez@suse.de>
------------------------------------------------------------------------
r64920 | nobu | 2018-10-05 12:25:33 +0900 (Fri, 05 Oct 2018) | 1 line

Update aclocal to 1.16.1 [ci skip]
------------------------------------------------------------------------
r64919 | nobu | 2018-10-05 09:37:40 +0900 (Fri, 05 Oct 2018) | 4 lines

Remove wrong conversion

* rational.c (nurat_to_double): should return `double`, not `Float`.
  fix r64897.  [Bug #15189]
------------------------------------------------------------------------
r64918 | svn | 2018-10-05 08:33:05 +0900 (Fri, 05 Oct 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64917 | ko1 | 2018-10-05 08:33:03 +0900 (Fri, 05 Oct 2018) | 4 lines

use RARRAY_AREF().

* struct.c (setup_struct): no need to use Array raw ptr here.

------------------------------------------------------------------------
r64916 | svn | 2018-10-05 00:22:55 +0900 (Fri, 05 Oct 2018) | 1 line

* 2018-10-05
------------------------------------------------------------------------
r64915 | ko1 | 2018-10-05 00:22:53 +0900 (Fri, 05 Oct 2018) | 5 lines

check argument type.

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

------------------------------------------------------------------------
r64914 | nobu | 2018-10-04 23:00:39 +0900 (Thu, 04 Oct 2018) | 1 line

lldb_rp: support Symbol [ci skip]
------------------------------------------------------------------------
r64913 | usa | 2018-10-04 15:29:31 +0900 (Thu, 04 Oct 2018) | 4 lines

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



------------------------------------------------------------------------
r64912 | svn | 2018-10-04 04:19:36 +0900 (Thu, 04 Oct 2018) | 1 line

* 2018-10-04
------------------------------------------------------------------------
r64911 | stomar | 2018-10-04 04:19:33 +0900 (Thu, 04 Oct 2018) | 4 lines

fileutils.rb: restore documentation for FileUtils

* lib/fileutils.rb: [DOC] restore documentation for FileUtils module
  which became undocumented with r63430.
------------------------------------------------------------------------
r64910 | stomar | 2018-10-03 21:57:45 +0900 (Wed, 03 Oct 2018) | 5 lines

Improve docs for RubyVM::AST and RubyVM::AST::Node

* ast.c: [DOC] fix error in code example for RubyVM::AST::Node#type
  (r63604 changed the return value of RubyVM::AST::Node#children);
  enable link to RubyVM::AST.parse method; other minor improvements.
------------------------------------------------------------------------
r64909 | nobu | 2018-10-03 18:54:25 +0900 (Wed, 03 Oct 2018) | 1 line

lldb_rp: support T_CLASS,T_MODULE,T_ICLASS [ci skip]
------------------------------------------------------------------------
r64908 | nobu | 2018-10-03 18:54:21 +0900 (Wed, 03 Oct 2018) | 1 line

lldb_rp: use append_command_output [ci skip]
------------------------------------------------------------------------
r64907 | kazu | 2018-10-03 16:43:13 +0900 (Wed, 03 Oct 2018) | 1 line

Set indent_size of reg*.[ch] to 2 [ci skip]
------------------------------------------------------------------------
r64906 | nobu | 2018-10-03 15:48:35 +0900 (Wed, 03 Oct 2018) | 4 lines

Use cd -P

Setting PWD in the process does not let `cd` traverse symlinks in
/bin/sh on macOS.
------------------------------------------------------------------------
r64905 | shyouhei | 2018-10-03 13:49:34 +0900 (Wed, 03 Oct 2018) | 10 lines

support --with-arch=x86_64h

Recent apple machines describe themselves being x86_64h.  That
architecture is somehow supported by their C compiler and at least
by recent clang.  However config.sub does not know that fact so
making universal binary targeting it is rejected by the program.

Why not skip the check by config.sub.  [fix GH-1971]


------------------------------------------------------------------------
r64904 | nobu | 2018-10-03 13:37:43 +0900 (Wed, 03 Oct 2018) | 6 lines

Fix wrong use of BIGNUM_EMBED_LEN_NUMBITS

* internal.h (BIGNUM_EMBED_LEN_SHIFT): BIGNUM_EMBED_LEN_NUMBITS is the
  bit width of embedded bignum length, and BIGNUM_EMBED_LEN_SHIFT is
  the bit offset of it.  These two values happened to equal by chance,
  however they are different things.
------------------------------------------------------------------------
r64903 | nobu | 2018-10-03 13:27:19 +0900 (Wed, 03 Oct 2018) | 1 line

lldb_rp: support more types [ci skip]
------------------------------------------------------------------------
r64902 | nobu | 2018-10-03 13:07:16 +0900 (Wed, 03 Oct 2018) | 4 lines

lldb_rp: fix the order of results [ci skip]

The outputs from HandleCommand are printed immediately before print
statements.  Fix the order in `result` by capturing the outputs.
------------------------------------------------------------------------
r64901 | nobu | 2018-10-03 04:14:24 +0900 (Wed, 03 Oct 2018) | 4 lines

lldb_rp: reload debug info if not loaded yet [ci skip]

As debug infos in shared libraries are not accessible until loaded,
retry loading the infos when needed.
------------------------------------------------------------------------
r64900 | nobu | 2018-10-03 03:51:21 +0900 (Wed, 03 Oct 2018) | 3 lines

Just a shebang is valid code

[ruby-core:89240] [Bug #15190]
------------------------------------------------------------------------
r64899 | nobu | 2018-10-03 03:03:43 +0900 (Wed, 03 Oct 2018) | 3 lines

Get rid of calling to_f in rat2dbl_without_to_f

[Bug #15189]
------------------------------------------------------------------------
r64898 | svn | 2018-10-03 01:42:29 +0900 (Wed, 03 Oct 2018) | 1 line

* 2018-10-03
------------------------------------------------------------------------
r64897 | nobu | 2018-10-03 01:42:21 +0900 (Wed, 03 Oct 2018) | 3 lines

Fix Rational of Float

[ruby-core:89239] [Bug #15189]
------------------------------------------------------------------------
r64896 | svn | 2018-10-02 10:56:44 +0900 (Tue, 02 Oct 2018) | 1 line

* 2018-10-02
------------------------------------------------------------------------
r64895 | nobu | 2018-10-02 10:56:43 +0900 (Tue, 02 Oct 2018) | 1 line

Install HTML docs if produced
------------------------------------------------------------------------
r64894 | nobu | 2018-10-01 23:48:54 +0900 (Mon, 01 Oct 2018) | 1 line

lldb_cruby.py: T_DATA support [ci skip]
------------------------------------------------------------------------
r64892 | nobu | 2018-10-01 16:50:08 +0900 (Mon, 01 Oct 2018) | 3 lines

Removed Windows version condition

Seems all MSVC runtimes fails with EINVAL, regardless Windows version.
------------------------------------------------------------------------
r64891 | svn | 2018-10-01 15:22:27 +0900 (Mon, 01 Oct 2018) | 1 line

* 2018-10-01
------------------------------------------------------------------------
r64890 | ko1 | 2018-10-01 15:22:20 +0900 (Mon, 01 Oct 2018) | 5 lines

remove old VM profile counters.

* vm_insnhelper.c: remove `vm_profile_counter` because
  it is replaced with debug_counters.

------------------------------------------------------------------------
r64889 | svn | 2018-09-30 11:22:01 +0900 (Sun, 30 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64888 | k0kubun | 2018-09-30 11:22:00 +0900 (Sun, 30 Sep 2018) | 6 lines

mjit_compile.c: improve assertion message

intentionally inserting tab to this line to test svn bot.

Also expanding the all tabs in this file, since this file does not exist
in old versions and so there's no risk of conflict on backport.
------------------------------------------------------------------------
r64887 | naruse | 2018-09-30 02:49:33 +0900 (Sun, 30 Sep 2018) | 1 line

no-op if it is T_STRING
------------------------------------------------------------------------
r64886 | svn | 2018-09-30 02:49:07 +0900 (Sun, 30 Sep 2018) | 1 line

* 2018-09-30
------------------------------------------------------------------------
r64885 | svn | 2018-09-30 02:49:06 +0900 (Sun, 30 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64884 | naruse | 2018-09-30 02:49:03 +0900 (Sun, 30 Sep 2018) | 1 line

Remove unnecessary use of function pointer
------------------------------------------------------------------------
r64883 | k0kubun | 2018-09-29 16:21:30 +0900 (Sat, 29 Sep 2018) | 4 lines

common.mk: upgrade benchmark_driver

since maybe r64870 implicitly depends on
https://github.com/benchmark-driver/benchmark-driver/pull/47 too.
------------------------------------------------------------------------
r64882 | nobu | 2018-09-29 16:04:29 +0900 (Sat, 29 Sep 2018) | 4 lines

Expand gemspec path to the real path

`make install` has loaded forwardable.rb twice, from
forwardable.gemspec and prime.gemspec.
------------------------------------------------------------------------
r64881 | svn | 2018-09-29 15:47:34 +0900 (Sat, 29 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64880 | shirosaki | 2018-09-29 15:47:32 +0900 (Sat, 29 Sep 2018) | 4 lines

Revert search_convpath spec

Remove .name since SEGV on MinGW is fixed.
[ruby-core:89200]
------------------------------------------------------------------------
r64879 | shirosaki | 2018-09-29 15:47:30 +0900 (Sat, 29 Sep 2018) | 5 lines

transcode.c: add GC guard on raise

* transcode.c (econv_s_search_convpath): add GC guard to fix SEGV
  on raise.
  [Bug #15162] [ruby-core:89172]
------------------------------------------------------------------------
r64878 | svn | 2018-09-29 09:45:44 +0900 (Sat, 29 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64877 | nobu | 2018-09-29 09:45:41 +0900 (Sat, 29 Sep 2018) | 4 lines

rational.c: may be float

* rational.c (f_muldiv): Integer#** can return Rational with Float
  right now.  [ruby-core:89212] [Bug #15175]
------------------------------------------------------------------------
r64876 | svn | 2018-09-29 09:43:32 +0900 (Sat, 29 Sep 2018) | 1 line

* 2018-09-29
------------------------------------------------------------------------
r64875 | nobu | 2018-09-29 09:43:29 +0900 (Sat, 29 Sep 2018) | 1 line

Split assertion expressions
------------------------------------------------------------------------
r64874 | nobu | 2018-09-28 18:23:35 +0900 (Fri, 28 Sep 2018) | 1 line

Adjust indent [ci skip]
------------------------------------------------------------------------
r64873 | kazu | 2018-09-28 15:25:24 +0900 (Fri, 28 Sep 2018) | 1 line

Add Range#% to call-seq [ci skip]
------------------------------------------------------------------------
r64872 | ko1 | 2018-09-28 14:28:12 +0900 (Fri, 28 Sep 2018) | 5 lines

don't use GC::Profiler on default.

* benchmark/gc/gcbench.rb: disable GC::Profiler on default.
  add -p option instead.

------------------------------------------------------------------------
r64871 | ko1 | 2018-09-28 12:35:15 +0900 (Fri, 28 Sep 2018) | 10 lines

add debug counters more.

* debug_counter.h: add debug counters to count frame state transitions:
  * frame_R2R: Ruby frame to Ruby frame
  * frame_R2C: Ruby frame to C frame
  * frame_C2C: C frame to C frame
  * frame_C2R: C frame to Ruby frame

* vm_insnhelper.c (vm_push_frame): ditto.

------------------------------------------------------------------------
r64870 | ko1 | 2018-09-28 12:32:49 +0900 (Fri, 28 Sep 2018) | 7 lines

add small utility for benchmarking.

* benchmark/lib/load.rb: add small utility which requires
  benchmark-driver.rb. You can load this file and can
  use benchmark-driver.


------------------------------------------------------------------------
r64869 | mrkn | 2018-09-28 11:18:58 +0900 (Fri, 28 Sep 2018) | 3 lines

range.c: Add Range#%

[Feature #14697] [ruby-core:86588]
------------------------------------------------------------------------
r64868 | svn | 2018-09-28 10:10:53 +0900 (Fri, 28 Sep 2018) | 1 line

* 2018-09-28
------------------------------------------------------------------------
r64867 | ko1 | 2018-09-28 10:10:43 +0900 (Fri, 28 Sep 2018) | 14 lines

add debug counters more.

* debug_counter.h: add the following counters.
  * frame_push: control frame counts (total counts).
  * frame_push_*: control frame counts per every frame type.
  * obj_*: add free'ed counts for each type.

* gc.c: ditto.

* vm_insnhelper.c (vm_push_frame): ditto.

* debug_counter.c (rb_debug_counter_show_results): widen counts field
  to show >10G numbers.

------------------------------------------------------------------------
r64866 | nobu | 2018-09-27 19:22:08 +0900 (Thu, 27 Sep 2018) | 1 line

Fix messages for too small year
------------------------------------------------------------------------
r64865 | nobu | 2018-09-27 19:22:07 +0900 (Thu, 27 Sep 2018) | 1 line

Sort in alphabetical order [ci skip]
------------------------------------------------------------------------
r64864 | kazu | 2018-09-27 19:15:05 +0900 (Thu, 27 Sep 2018) | 3 lines

NEWS: Replace tab with spaces

[ci skip]
------------------------------------------------------------------------
r64863 | mrkn | 2018-09-27 18:29:51 +0900 (Thu, 27 Sep 2018) | 3 lines

NEWS: Add ArithmeticSequence related things

[ci skip]
------------------------------------------------------------------------
r64862 | shyouhei | 2018-09-27 13:33:11 +0900 (Thu, 27 Sep 2018) | 4 lines

move GCC version check from marshal.c to configure.ac

I think it should be done in configure

------------------------------------------------------------------------
r64861 | svn | 2018-09-27 02:24:02 +0900 (Thu, 27 Sep 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64860 | nobu | 2018-09-27 02:24:00 +0900 (Thu, 27 Sep 2018) | 6 lines

fallback env encoding to ASCII-8BIT

* hash.c (env_enc_str_new): as no locale/filesystem encoding is
  available in miniruby on Windows, fallback the encoding to
  ASCII-8BIT so it is valid encoding when the conversion failed.
  [ruby-core:89177] [Bug #15164]
------------------------------------------------------------------------
r64859 | svn | 2018-09-27 01:51:14 +0900 (Thu, 27 Sep 2018) | 1 line

* 2018-09-27
------------------------------------------------------------------------
r64858 | svn | 2018-09-27 01:51:13 +0900 (Thu, 27 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64857 | ko1 | 2018-09-27 01:51:09 +0900 (Thu, 27 Sep 2018) | 9 lines

fix use-after-free in obj_free.

* gc.c (obj_free): a table can be accessed for debug counters.
  [Bug #15165] [Fix GH-1964]

  A patch from Joe Truba <jtruba@meraki.com>

  Also check USE_DEBUG_COUNTER macro.

------------------------------------------------------------------------
r64856 | suke | 2018-09-26 18:33:46 +0900 (Wed, 26 Sep 2018) | 4 lines

* ext/win32ole/lib/win32ole.rb (methods): COM method elements should be
  symbol in return value of methods.

* test/win32ole/test_win32ole.rb ditto.
------------------------------------------------------------------------
r64855 | eregon | 2018-09-26 18:32:09 +0900 (Wed, 26 Sep 2018) | 4 lines

Use String arguments for #search_convpath

* Otherwise it seems to SEGV on Windows, see
  https://github.com/ruby/ruby/commit/f00bf242724d40d59a242c6bf9e567d18c9e1872#commitcomment-30650955
------------------------------------------------------------------------
r64854 | ko1 | 2018-09-26 17:11:05 +0900 (Wed, 26 Sep 2018) | 9 lines

fix OPT_CALL_THREADED_CODE issue.

* insns.def (opt_send_without_block): reorder insn position because
  `opt_str_freeze` insn refer this insn (function) when
  OPT_CALL_THREADED_CODE is true.

* vm_opts.h (OPT_THREADED_CODE): introduce new macro to select
  threaded code implementation with a compile option (-D...).

------------------------------------------------------------------------
r64853 | ko1 | 2018-09-26 16:28:04 +0900 (Wed, 26 Sep 2018) | 7 lines

add some debug counters.

* debug_counter.h: new debug counters obj_promote, obj_wb_unprotect
  and obj_struct_(ptr|embed) are added.

* gc.c: ditto.

------------------------------------------------------------------------
r64852 | shyouhei | 2018-09-26 15:16:32 +0900 (Wed, 26 Sep 2018) | 2 lines

use configure-defined macro instead of __GNUC__

------------------------------------------------------------------------
r64851 | svn | 2018-09-26 11:38:51 +0900 (Wed, 26 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64850 | k0kubun | 2018-09-26 11:38:45 +0900 (Wed, 26 Sep 2018) | 3 lines

revert r64847, r64846 and r64839

because r64849 seems to fix issues which we were confused about.
------------------------------------------------------------------------
r64849 | ko1 | 2018-09-26 11:23:21 +0900 (Wed, 26 Sep 2018) | 5 lines

fix "initialize miss".

* dir.c (glob_helper): initialize `args.pathtype`.
  missed at r64810.

------------------------------------------------------------------------
r64848 | shyouhei | 2018-09-26 11:02:09 +0900 (Wed, 26 Sep 2018) | 2 lines

yet another -Wparentheses tweak

------------------------------------------------------------------------
r64847 | svn | 2018-09-26 10:11:26 +0900 (Wed, 26 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64846 | k0kubun | 2018-09-26 10:11:20 +0900 (Wed, 26 Sep 2018) | 3 lines

revert r64838 and r64839

because some build failures persisted
------------------------------------------------------------------------
r64845 | nobu | 2018-09-26 08:31:22 +0900 (Wed, 26 Sep 2018) | 7 lines

Expand spec files to realpaths

* spec/mspec/lib/mspec/utils/script.rb (MSpecScript#entries): expand
  the given spec path to the realpath, not to require a library by
  realpath and symbolic link path from the spec file.

  reapply r64749 and r64751 overridden by r64830.
------------------------------------------------------------------------
r64844 | svn | 2018-09-26 03:47:18 +0900 (Wed, 26 Sep 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64843 | eregon | 2018-09-26 03:47:17 +0900 (Wed, 26 Sep 2018) | 1 line

Update to ruby/mspec@2bca8cb
------------------------------------------------------------------------
r64842 | svn | 2018-09-26 03:13:35 +0900 (Wed, 26 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64841 | ko1 | 2018-09-26 03:13:29 +0900 (Wed, 26 Sep 2018) | 25 lines

refactoring debug_counter.

* debug_counter.h: add comments for each counters.

* debug_counter.h: add some counters (see added comments for details).
  * obj_newobj
  * obj_newobj_slowpath
  * obj_newobj_wb_unprotected
  * obj_hash_empty
  * obj_hash_under4
  * obj_hash_ge4
  * obj_hash_ge8
  * heap_xmalloc
  * heap_xrealloc
  * heap_xfree

* gc.c: add some debug counters (see the above list).

* debug_counter.c (rb_debug_counter_show_results): accept
  a header message.

* signal.c (ruby_default_signal): show debug counter results
  and malloc info (rb_malloc_info_show_results()) before
  SIGNAL exit.

------------------------------------------------------------------------
r64840 | k0kubun | 2018-09-26 02:26:34 +0900 (Wed, 26 Sep 2018) | 8 lines

appveyor.yml: increase timeout for vs

because `TestThreadQueue#test_queue_with_trap` is too unstable
especially on vs140.
https://ci.appveyor.com/project/ruby/ruby/build/9731/job/sevjm9lrmssg4dub

Increasing timeout may not fix the issue, but let me test this first to
check if it's true or not.
------------------------------------------------------------------------
r64839 | k0kubun | 2018-09-26 02:20:02 +0900 (Wed, 26 Sep 2018) | 34 lines

insns.def: drop bitblt insn

as a workaround to fix the build pipeline broken by r64824,
because optimizing Ruby should be prioritized higher than supporting unused jokes.

In the current build system, exceeding 200 insns somehow crashes C
extension build on some of MinGW environments like "mingw32-make[1]:
*** No rule to make target 'note'.  Stop."
https://ci.appveyor.com/project/ruby/ruby/build/9725/job/co4nu9jugm8qwdrp
and on some of Linux environments like "cannot load such file -- stringio (LoadError)"

```
build_install        /home/ko1/ruby/src/trunk_gcc5/lib/rubygems/specification.rb:18:in `require': cannot load such file -- stringio (LoadError)
	from /home/ko1/ruby/src/trunk_gcc5/lib/rubygems/specification.rb:18:in `<top (required)>'
	from /home/ko1/ruby/src/trunk_gcc5/lib/rubygems.rb:1365:in `require'
	from /home/ko1/ruby/src/trunk_gcc5/lib/rubygems.rb:1365:in `<module:Gem>'
	from /home/ko1/ruby/src/trunk_gcc5/lib/rubygems.rb:116:in `<top (required)>'
	from /home/ko1/ruby/src/trunk_gcc5/tool/rbinstall.rb:24:in `require'
	from /home/ko1/ruby/src/trunk_gcc5/tool/rbinstall.rb:24:in `<main>'
make: *** [do-install-nodoc] Error 1
```

http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/1353447

This commit removes "bitblt" and "trace_bitblt" insns, which reduces the
number of insns from 202 to 200 and fixes at least the latter build
failure. I hope this fixes the MinGW build failure as well. Let me
confirm the situation on AppVeyor CI.

Note that this is hard to fix because some MinGW environments (MSP-Greg's
MinGW CI on AppVeyor) don't reproduce this and some Linux environments
(including my local machine) don't reproduce it either. Make sure you
have the reproductive environment and confirm it's fixed when reverting
this commit.
------------------------------------------------------------------------
r64838 | k0kubun | 2018-09-26 02:19:51 +0900 (Wed, 26 Sep 2018) | 4 lines

Revert "Revert r64824 to fix build failure on AppVeyor"

This reverts commit r64829. I'll prepare another temporary fix, but I'll
separately commit that to make it easier to revert that later.
------------------------------------------------------------------------
r64837 | svn | 2018-09-26 00:31:03 +0900 (Wed, 26 Sep 2018) | 1 line

* 2018-09-26
------------------------------------------------------------------------
r64836 | shirosaki | 2018-09-26 00:31:02 +0900 (Wed, 26 Sep 2018) | 5 lines

dir.c: fix glob with recursive and brace

Fixed bug that glob with recursive and braces (**/{a,b}) pattern
fails.
[Feature #13167]
------------------------------------------------------------------------
r64835 | shirosaki | 2018-09-26 00:31:01 +0900 (Wed, 26 Sep 2018) | 4 lines

dir.c: fix memory leak of glob with braces

join_path uses malloc. So free is required.
[Feature #13167]
------------------------------------------------------------------------
r64834 | svn | 2018-09-25 22:42:05 +0900 (Tue, 25 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64833 | nobu | 2018-09-25 22:42:02 +0900 (Tue, 25 Sep 2018) | 1 line

Moved `struct vtm` stuff from internal.h to timev.h
------------------------------------------------------------------------
r64832 | svn | 2018-09-25 19:41:19 +0900 (Tue, 25 Sep 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64831 | eregon | 2018-09-25 19:41:16 +0900 (Tue, 25 Sep 2018) | 1 line

Update to ruby/spec@241f9e7
------------------------------------------------------------------------
r64830 | eregon | 2018-09-25 19:40:39 +0900 (Tue, 25 Sep 2018) | 1 line

Update to ruby/mspec@3fb5112
------------------------------------------------------------------------
r64829 | k0kubun | 2018-09-25 13:03:35 +0900 (Tue, 25 Sep 2018) | 6 lines

Revert r64824 to fix build failure on AppVeyor

AppVeyor msys2/MinGW build started to fail like:
https://ci.appveyor.com/project/ruby/ruby/build/9722/job/b94kixi004klmye3

Until I can investigate that, I revert this for now.
------------------------------------------------------------------------
r64828 | svn | 2018-09-25 08:23:16 +0900 (Tue, 25 Sep 2018) | 1 line

* 2018-09-25
------------------------------------------------------------------------
r64827 | nobu | 2018-09-25 08:23:14 +0900 (Tue, 25 Sep 2018) | 5 lines

test/unit.rb: fix --subprocess-timeout-scale

* test/lib/test/unit.rb (Test::Unit::SubprocessOption#non_options):
  set timeout scale after parsing options.  the option value will be
  set after returning from setup_options.
------------------------------------------------------------------------
r64826 | nobu | 2018-09-24 23:26:00 +0900 (Mon, 24 Sep 2018) | 1 line

Check whether to skip every frame
------------------------------------------------------------------------
r64825 | nobu | 2018-09-24 22:04:40 +0900 (Mon, 24 Sep 2018) | 1 line

Kernel#warn accepts multiple messages
------------------------------------------------------------------------
r64824 | k0kubun | 2018-09-24 21:40:28 +0900 (Mon, 24 Sep 2018) | 45 lines

insns.def: optimize & and | of Integer [experimental]

not optimizing Array#& and Array#| because vm_insnhelper.c can't easily
inline it (large amount of array.c code would be needed in vm_insnhelper.c)
and the method body is a little complicated compared to Integer's ones.
So I thought only Integer#& and Integer#| have a significant impact,
and eliminating unnecessary branches would contribute to JIT's performance.

vm_insnhelper.c: ditto

tool/transform_mjit_header.rb: make sure these instructions are inlined
on JIT.

compile.c: compile vm_opt_and and vm_opt_or.
id.def: define id for them to be used in compile.c and vm*.c
vm.c: track redefinition of Integer#& and Integer#|
vm_core.h: allow detecting redefinition of & and |

test/ruby/test_jit.rb: test new insns
test/ruby/test_optimization.rb: ditto

* Optcarrot benchmark

This is a kind of experimental thing but I'm committing this since the
performance impact is significant especially on Optcarrot with JIT.

$ benchmark-driver benchmark.yml --rbenv 'before::before --disable-gems;before+JIT::before --disable-gems --jit;after::after --disable-gems;after+JIT::after --disable-gems --jit' -v --repeat-count 24
before: ruby 2.6.0dev (2018-09-24 trunk 64821) [x86_64-linux]
before+JIT: ruby 2.6.0dev (2018-09-24 trunk 64821) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-09-24 opt_and 64821) [x86_64-linux]
last_commit=opt_or
after+JIT: ruby 2.6.0dev (2018-09-24 opt_and 64821) +JIT [x86_64-linux]
last_commit=opt_or
Calculating -------------------------------------
                             before  before+JIT       after   after+JIT
Optcarrot Lan_Master.nes     51.460      66.315      53.023      71.173 fps

Comparison:
             Optcarrot Lan_Master.nes
               after+JIT:        71.2 fps
              before+JIT:        66.3 fps - 1.07x  slower
                   after:        53.0 fps - 1.34x  slower
                  before:        51.5 fps - 1.38x  slower

[close https://github.com/ruby/ruby/pull/1963]
------------------------------------------------------------------------
r64823 | normal | 2018-09-24 16:48:33 +0900 (Mon, 24 Sep 2018) | 5 lines

webrick: raise EOFError in parse when read line is nil

[Bug #15146]

From: Justin Li <git@justinli.net>
------------------------------------------------------------------------
r64822 | nobu | 2018-09-24 16:46:07 +0900 (Mon, 24 Sep 2018) | 1 line

revert r64817: kernel_warn.rb: skip kernel_require.rb
------------------------------------------------------------------------
r64821 | k0kubun | 2018-09-24 15:21:19 +0900 (Mon, 24 Sep 2018) | 3 lines

_mjit_compile_send.erb: remove TODO comment solved [ci skip]

which was solved by r64820
------------------------------------------------------------------------
r64820 | k0kubun | 2018-09-24 15:09:55 +0900 (Mon, 24 Sep 2018) | 10 lines

_mjit_compile_send.erb: refactor code to setup iseq

by sharing vm_call_iseq_setup_normal. This is a retry of r64280.

vm_insnhelper.c: Remove unused argument `ci` and pass `me` instead of
`cc` to share this with JIT. Declare this with ALWAYS_INLINE to make
sure this function is inlined in JIT.

tool/mk_call_iseq_optimized.rb: deal with the interface change of
vm_call_iseq_setup_normal.
------------------------------------------------------------------------
r64819 | svn | 2018-09-24 12:14:46 +0900 (Mon, 24 Sep 2018) | 1 line

* 2018-09-24
------------------------------------------------------------------------
r64818 | svn | 2018-09-24 12:14:46 +0900 (Mon, 24 Sep 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64817 | nobu | 2018-09-24 12:14:43 +0900 (Mon, 24 Sep 2018) | 4 lines

kernel_warn.rb: skip kernel_require.rb

* lib/rubygems/core_ext/kernel_warn.rb (Kernel#warn): skip
  kernel_require.rb's frames when `uplevel` option is given.
------------------------------------------------------------------------
r64816 | nobu | 2018-09-23 21:40:46 +0900 (Sun, 23 Sep 2018) | 4 lines

test_win32api.rb: suppress a warning

* test/test_win32api.rb: suppress a warning, which we know already
  well.
------------------------------------------------------------------------
r64815 | nobu | 2018-09-23 08:52:58 +0900 (Sun, 23 Sep 2018) | 4 lines

Skip a cleanup if new_ole failed

On Appveyor, WIN32OLE sometimes fails due to a system shutdown, and
`@ie` is not assigned.
------------------------------------------------------------------------
r64814 | nobu | 2018-09-23 05:39:35 +0900 (Sun, 23 Sep 2018) | 1 line

tool/enc-unicode.rb: rewrote without flip-flop
------------------------------------------------------------------------
r64813 | svn | 2018-09-23 05:13:09 +0900 (Sun, 23 Sep 2018) | 1 line

* 2018-09-23
------------------------------------------------------------------------
r64812 | nobu | 2018-09-23 05:13:08 +0900 (Sun, 23 Sep 2018) | 3 lines

Fix for old names of mcontext registers

c.f. https://github.com/mistydemeo/tigerbrew/issues/473
------------------------------------------------------------------------
r64811 | svn | 2018-09-22 10:11:41 +0900 (Sat, 22 Sep 2018) | 1 line

* 2018-09-22
------------------------------------------------------------------------
r64810 | shirosaki | 2018-09-22 10:11:40 +0900 (Sat, 22 Sep 2018) | 8 lines

dir.c: performance fix with braces

Braces were expended before ruby_glob0(). This caused to call
replace_real_basename() for same plain patterns repeatedly.
Move blace expansion into glob_helper() in ruby_glob0() to reduce
replace_real_basename() call.
This fix changes the order of glob results.
[Feature #13167] [Fix GH-1864]
------------------------------------------------------------------------
r64809 | nobu | 2018-09-21 22:52:03 +0900 (Fri, 21 Sep 2018) | 1 line

configure.ac: prepend the wrapper after CPP is set
------------------------------------------------------------------------
r64808 | nobu | 2018-09-21 19:31:11 +0900 (Fri, 21 Sep 2018) | 3 lines

Suppress more -Wparentheses warnings

[Fix GH-1958]
------------------------------------------------------------------------
r64807 | svn | 2018-09-21 19:19:14 +0900 (Fri, 21 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64806 | nobu | 2018-09-21 19:19:10 +0900 (Fri, 21 Sep 2018) | 5 lines

Remove -Wno-parentheses flag.

[Fix GH-1958]

From: Jun Aruga <jaruga@redhat.com>
------------------------------------------------------------------------
r64805 | kazu | 2018-09-21 17:53:11 +0900 (Fri, 21 Sep 2018) | 1 line

Fix sample code [ci skip]
------------------------------------------------------------------------
r64804 | kazu | 2018-09-21 17:34:25 +0900 (Fri, 21 Sep 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r64803 | svn | 2018-09-21 16:19:14 +0900 (Fri, 21 Sep 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64802 | nobu | 2018-09-21 16:19:13 +0900 (Fri, 21 Sep 2018) | 6 lines

darwin-cc: hide ld warnings

* tool/darwin-cc: ld in Apple's recent Xcode warns text-based stub
  files, which are probably caused by Apple's broken package.
  hide such (and architecture deprecation) warnings during
  configuration to pass TRY_LDFLAGS.
------------------------------------------------------------------------
r64801 | svn | 2018-09-21 15:41:09 +0900 (Fri, 21 Sep 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r64800 | ko1 | 2018-09-21 15:41:07 +0900 (Fri, 21 Sep 2018) | 15 lines

escape all env properly.

* vm_backtrace.c (rb_debug_inspector_open): escape all env using
  `rb_vm_stack_to_heap()` before making bindings.
  [Bug #15105]

  There is a complicated story of this issue:
  Without this patch, IFUNC frame does not escaped. A IFUNC frame
  points to CFUNC ep as previous ep. However, CFUNC ep can be escaped
  because of making bindings of Ruby level frames.
  IFUNC's ep can points to invalidated ep and `rb_iter_break()` will
  fail. This is why `any?` fails.

* test/-ext-/debug/test_debug.rb: add a test.

------------------------------------------------------------------------
r64799 | ko1 | 2018-09-21 15:30:54 +0900 (Fri, 21 Sep 2018) | 5 lines

fix typo.

* vm_exec.h (DEBUG_END_INSN()): use `ec` instead of `th`.
  This macro is used when `VMDEBUG > 0`.

------------------------------------------------------------------------
r64798 | kazu | 2018-09-21 11:14:33 +0900 (Fri, 21 Sep 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r64797 | svn | 2018-09-21 03:24:17 +0900 (Fri, 21 Sep 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64796 | marcandre | 2018-09-21 03:24:16 +0900 (Fri, 21 Sep 2018) | 3 lines

Matrix: Add #reflexive? method. [Fix GH-1730]

Adapted from a patch by Yilo
------------------------------------------------------------------------
r64795 | svn | 2018-09-21 00:06:57 +0900 (Fri, 21 Sep 2018) | 1 line

* 2018-09-21
------------------------------------------------------------------------
r64794 | nobu | 2018-09-21 00:06:56 +0900 (Fri, 21 Sep 2018) | 3 lines

Enumerable#to_h with block and so on

[Feature #15143]
------------------------------------------------------------------------
r64793 | nobu | 2018-09-20 23:30:21 +0900 (Thu, 20 Sep 2018) | 1 line

Ignore Xcode linker warnings
------------------------------------------------------------------------
r64792 | mame | 2018-09-20 16:36:10 +0900 (Thu, 20 Sep 2018) | 1 line

* compile.c (compile_case): emit opt_case_dispatch only on optimized mode
------------------------------------------------------------------------
r64791 | shyouhei | 2018-09-20 14:31:51 +0900 (Thu, 20 Sep 2018) | 5 lines

fix typo [ci skip]

This error does not happen right now so this typo is
not serious, unless you locally edit insns.def.

------------------------------------------------------------------------
r64790 | nobu | 2018-09-20 12:18:54 +0900 (Thu, 20 Sep 2018) | 8 lines

Introduce rb_ary_union_hash method in Array

Avoid repeating code and improve readability in `rb_ary_or` and
`rb_ary_union_multi`. Similaty as done with `rb_ary_union`.

[Fix GH-1747] [Feature #14097]

From: Ana Maria Martinez Gomez <ammartinez@suse.de>
------------------------------------------------------------------------
r64789 | nobu | 2018-09-20 12:18:54 +0900 (Thu, 20 Sep 2018) | 8 lines

Link Array#union from | method

`Array#uniq` is not really related with `Array#|`, so I replaced it by
`Array#union`.

[Fix GH-1747] [Feature #14097]

From: Ana Maria Martinez Gomez <ammartinez@suse.de>
------------------------------------------------------------------------
r64788 | nobu | 2018-09-20 12:18:53 +0900 (Thu, 20 Sep 2018) | 8 lines

Introduce rb_ary_union method in Array

Avoid repeating code and improve readability in `rb_ary_or` and
`rb_ary_union_multi`.

[Fix GH-1747] [Feature #14097]

From: Ana Maria Martinez Gomez <ammartinez@suse.de>
------------------------------------------------------------------------
r64787 | nobu | 2018-09-20 12:18:52 +0900 (Thu, 20 Sep 2018) | 15 lines

Add union method to Array

I introduce a `union` method equivalent to the `|` operator, but which
accept more than array as argument. This improved readability, and it
is also coherent with the `+` operator, which has a similar `concat`
method. The method doesn't modify the original object and return a new
object instead. It is plan to introduce a `union!` method as well.

Tests and documentation are included.

It solves partially https://bugs.ruby-lang.org/issues/14097

[Fix GH-1747] [Feature #14097]

From: Ana Maria Martinez Gomez <ammartinez@suse.de>
------------------------------------------------------------------------
r64786 | nobu | 2018-09-20 10:43:35 +0900 (Thu, 20 Sep 2018) | 5 lines

parse.y: fix block passing with empty kwargs

* parse.y (arg_blk_pass): preceeding arguments node may be NULL when
  an empty keyword argument hash splat is optimized away.
  [ruby-core:88890] [Bug #15087]
------------------------------------------------------------------------
r64785 | svn | 2018-09-20 02:12:05 +0900 (Thu, 20 Sep 2018) | 1 line

* 2018-09-20
------------------------------------------------------------------------
r64784 | marcandre | 2018-09-20 02:12:04 +0900 (Thu, 20 Sep 2018) | 3 lines

net/http: Improve net/http header error message.

Patch by Matt Larraz. [Fix GH-1849].
------------------------------------------------------------------------
r64783 | kazu | 2018-09-19 21:39:44 +0900 (Wed, 19 Sep 2018) | 4 lines

ruby_2_2 branch has ended

https://www.ruby-lang.org/en/news/2018/06/20/support-of-ruby-2-2-has-ended/
[ci skip]
------------------------------------------------------------------------
r64782 | normal | 2018-09-19 17:23:19 +0900 (Wed, 19 Sep 2018) | 6 lines

process.c (waitpid_cleanup): unconditionally remove from waiters

This is the safer option, as there seems to be cases where checking
waitpid_state.ret is insufficient in ensure.  I'm not 100% sure
why this is, but this change was required for my work-in-progress
Thread::Light patch series, too...
------------------------------------------------------------------------
r64781 | mame | 2018-09-19 11:10:58 +0900 (Wed, 19 Sep 2018) | 1 line

* hash.c (rb_hash_update): fix indent
------------------------------------------------------------------------
r64780 | marcandre | 2018-09-19 11:10:05 +0900 (Wed, 19 Sep 2018) | 1 line

[DOC] Add changes to Hash#merge in NEWS [#15111]
------------------------------------------------------------------------
r64779 | mame | 2018-09-19 11:07:33 +0900 (Wed, 19 Sep 2018) | 3 lines

* hash.c (rb_hash_update): remove a meticulous explanation

As per Marc-Andre's comment.  [Refs GH-1951]
------------------------------------------------------------------------
r64778 | svn | 2018-09-19 10:59:27 +0900 (Wed, 19 Sep 2018) | 1 line

* 2018-09-19
------------------------------------------------------------------------
r64777 | mame | 2018-09-19 10:59:26 +0900 (Wed, 19 Sep 2018) | 9 lines

* hash.c (rb_hash_merge): Accepts zero or more hashes as arguments

Hash#merge, merge!, and update could merge exactly two hashes.
Now, they accepts zero or more hashes as arguments so that it can merge
hashes more than two.

This patch was created by Koki Ryu <liukoki@gmail.com> at Ruby Hack
Challenge #5.  Thank you!
[ruby-core:88970] [Feature #15111] [Fix GH-1951]
------------------------------------------------------------------------
r64776 | svn | 2018-09-18 22:52:08 +0900 (Tue, 18 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64775 | k0kubun | 2018-09-18 22:52:06 +0900 (Tue, 18 Sep 2018) | 4 lines

vm_insnhelper.c: always use bool-ish value

for CC_SET_FASTPATH condition. Just a cosmetic change to unify the
styling with other lines.
------------------------------------------------------------------------
r64774 | nobu | 2018-09-18 21:55:05 +0900 (Tue, 18 Sep 2018) | 1 line

Skip EHOSTUNREACH by host issues
------------------------------------------------------------------------
r64773 | svn | 2018-09-18 21:48:31 +0900 (Tue, 18 Sep 2018) | 1 line

* expand tabs.
------------------------------------------------------------------------
r64772 | k0kubun | 2018-09-18 21:48:28 +0900 (Tue, 18 Sep 2018) | 7 lines

vm_insnhelper.h: rename CI_SET_FASTPATH to CC_SET_FASTPATH

because it's actually setting fastpath to cc instead of ci since r51903.

vm_insnhelper.c: ditto
mjit_compile.c: ditto
tool/ruby_vm/views/_mjit_compile_send.erb: ditto
------------------------------------------------------------------------
r64771 | nobu | 2018-09-18 18:15:46 +0900 (Tue, 18 Sep 2018) | 4 lines

pty.c: typo

* ext/pty/pty.c (chfunc): fix a typo of an operator.  pointed out by
  jaruga (Jun Aruga) at [ruby-core:89058].  [Bug #15116]
------------------------------------------------------------------------
r64770 | nobu | 2018-09-18 17:49:40 +0900 (Tue, 18 Sep 2018) | 5 lines

Lazy Enumerator reduce intermediate array creation

[ruby-core:87907] [Bug #14908] [Fix GH-1912]

From: Anmol Chopra <chopraanmol1@gmail.com>
------------------------------------------------------------------------
r64769 | hsbt | 2018-09-18 17:37:18 +0900 (Tue, 18 Sep 2018) | 5 lines

Merge upstream revision of rubygems/rubygems.

  This commits includes tiny bugfix and new features listed here:
    * Add --re-sign flag to cert command by bronzdoc: https://github.com/rubygems/rubygems/pull/2391
    * Download gems with threads. by indirect: https://github.com/rubygems/rubygems/pull/1898
------------------------------------------------------------------------
r64768 | nobu | 2018-09-18 17:30:24 +0900 (Tue, 18 Sep 2018) | 1 line

Tests of Enumerator::Yielder#yield with multiple arguments
------------------------------------------------------------------------
r64767 | svn | 2018-09-18 09:22:06 +0900 (Tue, 18 Sep 2018) | 1 line

* 2018-09-18
------------------------------------------------------------------------
r64766 | nobu | 2018-09-18 09:22:04 +0900 (Tue, 18 Sep 2018) | 4 lines

pty.c: more difensive

* ext/pty/pty.c (chfunc): should not close the slave fd if it is 0..2.
  [ruby-core:89043] [Bug #15116]
------------------------------------------------------------------------
r64765 | svn | 2018-09-17 10:31:08 +0900 (Mon, 17 Sep 2018) | 1 line

* 2018-09-17
------------------------------------------------------------------------
r64764 | k0kubun | 2018-09-17 10:31:06 +0900 (Mon, 17 Sep 2018) | 5 lines

common.mk: ruby tool/update-deps --fix

tool/update-deps: tweak the comment to make sure it should be built in
the source directory, because building ruby outside source directory
failed on my trial.
------------------------------------------------------------------------
r64763 | nobu | 2018-09-16 23:32:30 +0900 (Sun, 16 Sep 2018) | 1 line

Propagate subprocess timeout scale option to worker processes
------------------------------------------------------------------------
r64762 | k0kubun | 2018-09-16 22:22:00 +0900 (Sun, 16 Sep 2018) | 9 lines

addr2line.c: fix -Wmaybe-uninitialized

../addr2line.c: In function 'fill_lines':
../addr2line.c:709:8: warning: 'file' may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (file != NULL) {
        ^
../addr2line.c:535:11: warning: 'filesize' may be used uninitialized in this function [-Wmaybe-uninitialized]
     off_t filesize;
           ^~~~~~~~
------------------------------------------------------------------------
r64761 | marcandre | 2018-09-16 13:18:50 +0900 (Sun, 16 Sep 2018) | 4 lines

lib/matrix: Fix potential bug of Vector#angle_with

Could happen for some linearly dependent vectors.
Patch by Vasiliy Petrov. [Fix GH-1803]
------------------------------------------------------------------------
r64760 | svn | 2018-09-16 13:00:16 +0900 (Sun, 16 Sep 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64759 | marcandre | 2018-09-16 13:00:14 +0900 (Sun, 16 Sep 2018) | 3 lines

Alias Struct#select as Struct#filter. Patch by Kenichi Kamiya.

[Fix GH-#1862] [#1784]
------------------------------------------------------------------------
r64758 | marcandre | 2018-09-16 12:24:15 +0900 (Sun, 16 Sep 2018) | 1 line

node.c: Typo fix. Patch by Shuichi Tamayose. [ci skip] [Fix GH-1880]
------------------------------------------------------------------------
r64757 | marcandre | 2018-09-16 11:49:44 +0900 (Sun, 16 Sep 2018) | 3 lines

[DOC] Improve String#strip documentation.

Patch by Josh Goldberg. [Fix GH-1933] [ci skip]
------------------------------------------------------------------------
r64756 | marcandre | 2018-09-16 11:45:16 +0900 (Sun, 16 Sep 2018) | 5 lines

Add some missing documentation to Queue#{close|deq} [ci skip]

Patch by Lars Kanis. [Fix GH-1949]

*  Describe the impact of Queue#close to Queue#deq .
------------------------------------------------------------------------
r64755 | marcandre | 2018-09-16 11:42:26 +0900 (Sun, 16 Sep 2018) | 1 line

array.c: Optimize rb_ary_and. Patch by Stefan Schu{U+00DF}ler. [Fix GH-1938]
------------------------------------------------------------------------
r64754 | svn | 2018-09-16 01:27:07 +0900 (Sun, 16 Sep 2018) | 1 line

* 2018-09-16
------------------------------------------------------------------------
r64753 | nobu | 2018-09-16 01:27:06 +0900 (Sun, 16 Sep 2018) | 4 lines

encoding.c: check external encoding

* encoding.c (rb_enc_get_index): external encoding may not be Data
  object.  [ruby-core:89016] [Bug #15122]
------------------------------------------------------------------------
r64752 | nobu | 2018-09-15 21:45:46 +0900 (Sat, 15 Sep 2018) | 5 lines

Work on Benchmark::Tms documentation [ci skip]

[ruby-core:88874] [Bug #15080]

From: Richard Wardin <shalmezad@gmail.com>
------------------------------------------------------------------------
r64751 | nobu | 2018-09-15 20:45:31 +0900 (Sat, 15 Sep 2018) | 1 line

get rid of newer syntax for old versions
------------------------------------------------------------------------
r64750 | nobu | 2018-09-15 18:59:14 +0900 (Sat, 15 Sep 2018) | 8 lines

Fix issues detected by code analysis tool (mainly Coverity).

* Fix leaked storage in addr2line.c.
* Fix for "top_root" leaking the resource.

[Fix GH-1956]

From: Jun Aruga <jaruga@redhat.com>
------------------------------------------------------------------------
r64749 | nobu | 2018-09-15 18:48:42 +0900 (Sat, 15 Sep 2018) | 5 lines

Expand spec files to realpaths

* spec/mspec/lib/mspec/utils/script.rb (MSpecScript#entries): expand
  the given spec path to the realpath, not to require a library by
  realpath and symbolic link path from the spec file.
------------------------------------------------------------------------
r64748 | nobu | 2018-09-15 18:25:31 +0900 (Sat, 15 Sep 2018) | 1 line

rid of warnings [Fix GH-1953]
------------------------------------------------------------------------
r64747 | nobu | 2018-09-15 17:39:07 +0900 (Sat, 15 Sep 2018) | 1 line

test_sprintf.rb: test for %p
------------------------------------------------------------------------
r64746 | svn | 2018-09-15 11:20:48 +0900 (Sat, 15 Sep 2018) | 1 line

* 2018-09-15
------------------------------------------------------------------------
r64745 | nobu | 2018-09-15 11:20:47 +0900 (Sat, 15 Sep 2018) | 9 lines

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>
------------------------------------------------------------------------
r64744 | svn | 2018-09-14 22:19:46 +0900 (Fri, 14 Sep 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64743 | hsbt | 2018-09-14 22:19:45 +0900 (Fri, 14 Sep 2018) | 5 lines

Partly reverted for ruby-style.el.

  Revert "Removed old elisp files. New upstream repository was moved https://github.com/ruby/elisp."

  This reverts commit 7eedd308b841e7b8eb4bc36211d28faf3521ee92.
------------------------------------------------------------------------
r64742 | hsbt | 2018-09-14 21:37:51 +0900 (Fri, 14 Sep 2018) | 1 line

Added entries for lldb files in misc directory.
------------------------------------------------------------------------
r64741 | hsbt | 2018-09-14 21:34:50 +0900 (Fri, 14 Sep 2018) | 1 line

Removed old elisp files. New upstream repository was moved https://github.com/ruby/elisp.
------------------------------------------------------------------------
r64740 | shyouhei | 2018-09-14 17:27:44 +0900 (Fri, 14 Sep 2018) | 6 lines

PRI_64_PREFIX "u" is called PRIu64

See also ISO9899:1999 section 7.8.1 paragraph 3.

The #ifndef is for C compilers older than C99.

------------------------------------------------------------------------
r64739 | shyouhei | 2018-09-14 16:57:19 +0900 (Fri, 14 Sep 2018) | 2 lines

forgot to expand tabs [ci skip]

------------------------------------------------------------------------
r64738 | svn | 2018-09-14 16:44:45 +0900 (Fri, 14 Sep 2018) | 1 line

* 2018-09-14
------------------------------------------------------------------------
r64737 | shyouhei | 2018-09-14 16:44:44 +0900 (Fri, 14 Sep 2018) | 43 lines

move ADD_PC around (take 2)

Now that we can say for sure if an instruction calls a method or
not internally, it is now possible to reroute the bugs that
forced us to revert the "move PC around" optimization.

First try: r62051
Reverted:  r63763
See also:  r63999

----

trunk: ruby 2.6.0dev (2018-09-13 trunk 64736) [x86_64-darwin15]
ours: ruby 2.6.0dev (2018-09-13 trunk 64736) [x86_64-darwin15]
last_commit=move ADD_PC around (take 2)
Calculating -------------------------------------
                           trunk        ours
         so_ackermann      1.884       2.278 i/s -       1.000 times in 0.530926s 0.438935s
             so_array      1.178       1.157 i/s -       1.000 times in 0.848786s 0.864467s
      so_binary_trees      0.176       0.177 i/s -       1.000 times in 5.683895s 5.657707s
       so_concatenate      0.220       0.221 i/s -       1.000 times in 4.546896s 4.518949s
       so_count_words      6.729       6.470 i/s -       1.000 times in 0.148602s 0.154561s
         so_exception      3.324       3.688 i/s -       1.000 times in 0.300872s 0.271147s
          so_fannkuch      0.546       0.968 i/s -       1.000 times in 1.831328s 1.033376s
             so_fasta      0.541       0.547 i/s -       1.000 times in 1.849923s 1.827091s
      so_k_nucleotide      0.800       0.777 i/s -       1.000 times in 1.250635s 1.286295s
             so_lists      2.101       1.848 i/s -       1.000 times in 0.475954s 0.541095s
        so_mandelbrot      0.435       0.408 i/s -       1.000 times in 2.299328s 2.450535s
            so_matrix      1.946       1.912 i/s -       1.000 times in 0.513872s 0.523076s
    so_meteor_contest      0.311       0.317 i/s -       1.000 times in 3.219297s 3.152052s
             so_nbody      0.746       0.703 i/s -       1.000 times in 1.339815s 1.423441s
       so_nested_loop      0.899       0.901 i/s -       1.000 times in 1.111767s 1.109555s
            so_nsieve      0.559       0.579 i/s -       1.000 times in 1.787763s 1.726552s
       so_nsieve_bits      0.435       0.428 i/s -       1.000 times in 2.296282s 2.333852s
            so_object      1.368       1.442 i/s -       1.000 times in 0.731237s 0.693684s
      so_partial_sums      0.616       0.546 i/s -       1.000 times in 1.623592s 1.833097s
          so_pidigits      0.831       0.832 i/s -       1.000 times in 1.203117s 1.202334s
            so_random      2.934       2.724 i/s -       1.000 times in 0.340791s 0.367150s
so_reverse_complement      0.583       0.866 i/s -       1.000 times in 1.714144s 1.154615s
             so_sieve      1.829       2.081 i/s -       1.000 times in 0.546607s 0.480562s
      so_spectralnorm      0.524       0.558 i/s -       1.000 times in 1.908716s 1.792382s


------------------------------------------------------------------------
r64736 | k0kubun | 2018-09-13 22:59:25 +0900 (Thu, 13 Sep 2018) | 7 lines

iseq.c: prefix rb_ to non-static iseq functions

I assume we always prefix rb_ to non-static functions to avoid conflict.
These functions are not exported and safe to be renamed.

iseq.h: ditto
compile.c: ditto
------------------------------------------------------------------------
r64735 | k0kubun | 2018-09-13 21:29:57 +0900 (Thu, 13 Sep 2018) | 8 lines

vm_insnhelper.h: drop OPT_CALL_FASTPATH macro support

because cc->call is NULL by default and it is not overridden by
vm_search_super_method if OPT_CALL_FASTPATH is 0. So this macro is not
just a switch for optimization but now it's mandatory.

vm_insnhelper.c: cosmetic change. Use boolean-ish `TRUE` instead of 1 to
specify `enabled` flag.
------------------------------------------------------------------------
r64734 | kazu | 2018-09-13 21:06:18 +0900 (Thu, 13 Sep 2018) | 5 lines

Remove old ruby-mode.el

Use emacs bundled ruby-mode.el instead.
[Feature #6823] [ci skip]

------------------------------------------------------------------------
r64733 | nobu | 2018-09-13 20:10:24 +0900 (Thu, 13 Sep 2018) | 5 lines

warn unused blocks with Enumerable#all? any? one? none?

[Fix GH-1953]

From: Koji Onishi <fursich0@gmail.com>
------------------------------------------------------------------------
r64732 | nobu | 2018-09-13 20:00:55 +0900 (Thu, 13 Sep 2018) | 15 lines

Make qsort_r() flavor detecting work if qsort_r() is a macro

On FreeBSD we're going to switch to the GNU-ish version of qsort_r().
POSIX is also considering standardizing that one. To prevent faulty
calls, we have a macro in place to throw a compiler error if a BSD-style
qsort_r() call is performed on a patched system. Such an approach tends
to be permitted by POSIX.

The configure check we have in Ruby would fail if qsort_r() is a
function macro. Add parentheses around it to prevent macro expansion and
force the declaration of a prototype.

[Fix GH-1954]

From: Ed Schouten <ed@nuxi.nl>
------------------------------------------------------------------------
r64731 | nobu | 2018-09-13 19:59:12 +0900 (Thu, 13 Sep 2018) | 1 line

thread.c: fix -Wformat warning where uint64_t is not unsigned long
------------------------------------------------------------------------
r64730 | k0kubun | 2018-09-13 16:12:07 +0900 (Thu, 13 Sep 2018) | 4 lines

Revert "vm_insnhelper.h: simplify EXEC_EC_CFP implementation"

This reverts commit r64711, because EXEC_EC_CFP on JIT-ed code does not
call jit_func with the patch when catch_except_p is true. It wasn't intentional.
------------------------------------------------------------------------
r64712 | k0kubun | 2018-09-13 15:49:49 +0900 (Thu, 13 Sep 2018) | 10 lines

thread.c: fix -Wformat warning

../thread.c:1219:18: warning: format specifies type 'unsigned long' but the argument has type 'rb_hrtime_t'
      (aka 'unsigned long long') [-Wformat]
                 end, now);
                 ^~~
../thread.c:1219:23: warning: format specifies type 'unsigned long' but the argument has type 'rb_hrtime_t'
      (aka 'unsigned long long') [-Wformat]
                 end, now);
                      ^~~
------------------------------------------------------------------------
r64711 | k0kubun | 2018-09-13 15:39:40 +0900 (Thu, 13 Sep 2018) | 31 lines

vm_insnhelper.h: simplify EXEC_EC_CFP implementation

and possibly memory access for iseq->body may be reduced.

No significant impact for performance on Optcarrot.

* before
fps: 55.03865935187656
fps: 57.16854675983188
fps: 57.672458407661765
fps: 58.28989837869383
fps: 58.80503815099268
fps: 59.068054176528534
fps: 59.55736806358244
fps: 61.01018920533034
fps: 63.34167049232186
fps: 65.20575018321766
fps: 65.46758316561318

* after
fps: 55.21860411005677
fps: 55.34840351179166
fps: 58.23666596747484
fps: 59.71987124578901
fps: 61.131485120234935
fps: 61.279905164649485
fps: 61.66060774175459
fps: 64.11215576508765
fps: 64.63699742853154
fps: 65.28260058920769
fps: 65.85447796482678
------------------------------------------------------------------------
r64710 | nobu | 2018-09-13 13:53:52 +0900 (Thu, 13 Sep 2018) | 4 lines

node.h: removed unused macros

* node.h (enum node_type): removed unused macros which redefine the
  same name enum values, and probably had ended the historical role.
------------------------------------------------------------------------
r64709 | shyouhei | 2018-09-13 12:46:46 +0900 (Thu, 13 Sep 2018) | 5 lines

move canary-related statements into macros

This is mostly cosmetic.  Should generate a slightly readable
vm.inc output.

------------------------------------------------------------------------
r64708 | k0kubun | 2018-09-13 10:45:38 +0900 (Thu, 13 Sep 2018) | 5 lines

appveyor.yml: increase timeout for vs

vs140 tends to die with 10s timeout on TestThreadQueue#test_queue_with_trap
https://ci.appveyor.com/project/ruby/ruby/build/9610/job/di9durc5rv0dwhor
https://ci.appveyor.com/project/ruby/ruby/build/9598/job/t7wugyn1sm57lbw3
------------------------------------------------------------------------
r64707 | normal | 2018-09-13 10:43:03 +0900 (Thu, 13 Sep 2018) | 9 lines

thread.c (rb_thread_atfork): reinitialize current th->interrupt_lock

Another thread may be holding th->interrupt_lock while our
current thread calls fork.  Therefore we must reinitialize our
own th->interrupt_lock in the child process because the owner
of the lock is only in the parent.  The original parent process
is unaffected.  We cannot destroy the lock while it has an unknown
state, either, so some implementations can leak a small amount
of memory, here (NPTL won't).
------------------------------------------------------------------------
r64706 | normal | 2018-09-13 05:49:24 +0900 (Thu, 13 Sep 2018) | 15 lines

fiber: fix crash on GC after forking

Remove the remainder of ROOT_FIBER_CONTEXT use and unnecessary
differences between the root and non-root fiber.  This makes
it easier to follow new root fiber at fork time.

Multiple sources of truth often leads to bugs, as in this case.
We can determinte root fiber by checking a fiber against the root_fiber
of its owner thread.  The new `fiber_is_root_p' function
supports that.

Now, we can care only about free-ing/recycling/munmap-ing stacks
as appropriate.

[Bug #15050]
------------------------------------------------------------------------
r64705 | normal | 2018-09-13 05:49:19 +0900 (Thu, 13 Sep 2018) | 11 lines

cont.c (fiber_memsize): do not rely on ROOT_FIBER_CONTEXT

We can check if the fiber we're interested in is the
th->root_fiber for the owner thread, so there is no need to use
ROOT_FIBER_CONTEXT.

Note: there is no guarantee th->ec points to
&th->root_fiber->cont.saved_ec, thus vm::thread_memsize may not
account for root fiber correctly (pre-existing bug).

[Bug #15050]
------------------------------------------------------------------------
r64704 | normal | 2018-09-13 05:49:14 +0900 (Thu, 13 Sep 2018) | 6 lines

cont.c (ec_set_vm_stack): avoid needless casting

Am I missing something, here?  Casting was totally unnecessary
and ugly...

[ruby-core:88929]
------------------------------------------------------------------------
r64703 | normal | 2018-09-13 05:49:10 +0900 (Thu, 13 Sep 2018) | 10 lines

share VM stack between threads and fibers if identical in size

ec->vm_stack is always allocated with malloc, so stack cache for
root fiber (thread stack) and non-root fibers can be shared as
long as the size is the same.  The purpose of this change is to
reduce dependencies on ROOT_FIBER_CONTEXT.

[Feature #15095] [Bug #15050]

v2: vm.c: fix build with USE_THREAD_DATA_RECYCLE==0
------------------------------------------------------------------------
r64702 | svn | 2018-09-13 01:05:08 +0900 (Thu, 13 Sep 2018) | 1 line

* 2018-09-13
------------------------------------------------------------------------
r64701 | kazu | 2018-09-13 01:05:07 +0900 (Thu, 13 Sep 2018) | 1 line

[DOC] aseq.each always return self [ci skip]
------------------------------------------------------------------------
r64700 | nobu | 2018-09-12 23:37:51 +0900 (Wed, 12 Sep 2018) | 4 lines

time.c split time_utc_or_local

* time.c (time_utc_or_local): split into time_s_mkutc and
  time_s_mktime without utc flag.
------------------------------------------------------------------------
r64699 | k0kubun | 2018-09-12 22:32:11 +0900 (Wed, 12 Sep 2018) | 32 lines

_mjit_compile_pc_and_sp.erb: forget about memcpy [ci skip]

because using memcpy here actually made performance worse.
In Optcarrot,

* for loop
fps: 55.90428960597268
fps: 57.21690379342434
fps: 58.41751168279789
fps: 58.7317470613203
fps: 62.81371000202459
fps: 63.02541045417479
fps: 63.77324026366317
fps: 65.48067818347447
fps: 66.02324323831398
fps: 66.3816048847424
fps: 66.54526488660156

* memcpy
fps: 54.98389812126847
fps: 57.96524857391357
fps: 57.974918725327946
fps: 58.285987089087364
fps: 58.639003211333225
fps: 59.03244214601948
fps: 59.89964772199603
fps: 60.809490242786175
fps: 62.462070790624146
fps: 62.534599002918306
fps: 63.787312566163756

That's probably because the copied size is very small.
------------------------------------------------------------------------
r64698 | nobu | 2018-09-12 21:14:45 +0900 (Wed, 12 Sep 2018) | 1 line

.travis.yml: run ruby/spec version guards check in parallel
------------------------------------------------------------------------
r64697 | mrkn | 2018-09-12 17:51:34 +0900 (Wed, 12 Sep 2018) | 3 lines

[DOC] Modify descriptions for ArithmeticSequence

[ci-skip]
------------------------------------------------------------------------
r64696 | mrkn | 2018-09-12 17:36:48 +0900 (Wed, 12 Sep 2018) | 3 lines

[DOC] Add the documentation of ArithmeticSequence

[ci-skip]
------------------------------------------------------------------------
r64695 | mrkn | 2018-09-12 16:35:42 +0900 (Wed, 12 Sep 2018) | 6 lines

enumerator.c: Fix ArithmeticSequence for complex step

Make sure Enumerator::ArithmeticSequence#each to work well
for a complex step value.

This reverts commit ca47fb329a1d48af3e1009620bdb18e931c9f188.
------------------------------------------------------------------------
r64694 | nobu | 2018-09-12 16:01:59 +0900 (Wed, 12 Sep 2018) | 1 line

deduce versioned tools from CC
------------------------------------------------------------------------
r64693 | mrkn | 2018-09-12 14:52:27 +0900 (Wed, 12 Sep 2018) | 3 lines

Revert "enumerator.c: Fix ArithmeticSequence for complex step"

This reverts commit 0a0f8238d02a2dfff4cd2892408e14cb826cec7e.
------------------------------------------------------------------------
r64692 | mrkn | 2018-09-12 14:35:46 +0900 (Wed, 12 Sep 2018) | 4 lines

enumerator.c: Fix ArithmeticSequence for complex step

Make sure Enumerator::ArithmeticSequence#each to work well
for a complex step value.
------------------------------------------------------------------------
r64691 | shyouhei | 2018-09-12 13:04:31 +0900 (Wed, 12 Sep 2018) | 6 lines

resurrect the string to expect modifications

String#freeze can be redefined to be destructive.  While such
redefinition is definitely weird, it should be possible.  Resurrect
the string to prepare for that sort of things.

------------------------------------------------------------------------
r64690 | shyouhei | 2018-09-12 12:39:36 +0900 (Wed, 12 Sep 2018) | 21 lines

make opt_str_freeze leaf

Simply use DISPATCH_ORIGINAL_INSN instead of rb_funcall.  This is,
when possible, overall performant because method dispatch results are
cached inside of CALL_CACHE.  Should also be good for JIT.

----

trunk: ruby 2.6.0dev (2018-09-12 trunk 64689) [x86_64-darwin15]
ours: ruby 2.6.0dev (2018-09-12 leaf-insn 64688) [x86_64-darwin15]
last_commit=make opt_str_freeze leaf
Calculating -------------------------------------
                          trunk        ours
    vm2_freezestring     5.440M     31.411M i/s -      6.000M times in 1.102968s 0.191017s

Comparison:
                 vm2_freezestring
                ours:  31410864.5 i/s
               trunk:   5439865.4 i/s - 5.77x  slower


------------------------------------------------------------------------
r64689 | shyouhei | 2018-09-12 10:55:00 +0900 (Wed, 12 Sep 2018) | 22 lines

make opt_case_dispatch leaf

This instruction can be written without rb_funcall. It not only boosts
performance of case statements, but also makes room of future JIT
improvements.  Because opt_case_dispatch is about optimization this
should not be a bad thing to have.

----

trunk: ruby 2.6.0dev (2018-09-05 trunk 64634) [x86_64-darwin15]
ours: ruby 2.6.0dev (2018-09-12 leaf-insn 64688) [x86_64-darwin15]
last_commit=make opt_case_dispatch leaf
Calculating -------------------------------------
                          trunk        ours
        vm2_case_lit      1.366       2.012 i/s -       1.000 times in 0.731839s 0.497008s

Comparison:
                     vm2_case_lit
                ours:         2.0 i/s
               trunk:         1.4 i/s - 1.47x  slower


------------------------------------------------------------------------
r64688 | svn | 2018-09-12 00:14:57 +0900 (Wed, 12 Sep 2018) | 1 line

* 2018-09-12
------------------------------------------------------------------------
r64687 | k0kubun | 2018-09-12 00:14:56 +0900 (Wed, 12 Sep 2018) | 5 lines

_mjit_compile_insn.erb: move pc on JIT cancel

if and only if it's not moved yet, to avoid potential bugs in the future.

_mjit_compile_send.erb: ditto
------------------------------------------------------------------------
r64686 | k0kubun | 2018-09-11 23:38:05 +0900 (Tue, 11 Sep 2018) | 11 lines

mjit_worker.c: atomically print main message and \n

To attempt to fix CI failure on rubyci freebsd:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20180911T123001Z.fail.html.gz

```
JIT success (68.7ms): mjit9@(eval):1 -> /usr/home/hsbt/chkbuild/tmp/build/20180911T123001Z/tmp/jit_test_unload_units_20180911-96427-13cagj9/_ruby_mjit_p99188u9.c
JIT compaction (25.1ms): Compacted 10 methods -> /usr/home/hsbt/chkbuild/tmp/build/20180911T123001Z/tmp/jit_test_unload_units_20180911-96427-13cagj9/_ruby_mjit_p99188u10.soToo many JIT code -- 1 units unloaded

JIT success (68.2ms): mjit10@(eval):1 -> /usr/home/hsbt/chkbuild/tmp/build/20180911T123001Z/tmp/jit_test_unload_units_20180911-96427-13cagj9/_ruby_mjit_p99188u11.c
```
------------------------------------------------------------------------
r64685 | k0kubun | 2018-09-11 23:10:00 +0900 (Tue, 11 Sep 2018) | 4 lines

bare_instructions.rb: use Hash#fetch to read attr

to raise descriptive KeyError instead of NoMethodError in case these
attrs are accidentally removed.
------------------------------------------------------------------------
r64684 | k0kubun | 2018-09-11 22:48:00 +0900 (Tue, 11 Sep 2018) | 32 lines

_mjit_compile_insn.erb: prefer insn.always_leaf?

rather than `trace_enablable_insns` which is hard to maintain.

This would make performance bad because new branches for tracepoint will
be added.

Optcarrot before:
fps: 56.885371547337655
fps: 60.02493636060194
fps: 63.051028327122076
fps: 63.78463316242535
fps: 64.20391937940403
fps: 64.55990344731123
fps: 64.56771099162921
fps: 64.95991277629723
fps: 65.15120708973232
fps: 65.90558702393933
fps: 66.29579283026303

Optcarrot after:
fps: 52.7647027470875
fps: 53.67404855529564
fps: 58.40514319229468
fps: 60.90736996487708
fps: 62.83487236283472
fps: 63.01386139447994
fps: 63.42395443471596
fps: 63.78328559878602
fps: 64.58432081229746
fps: 64.78720429848532
fps: 65.48720618907552
------------------------------------------------------------------------
r64683 | k0kubun | 2018-09-11 21:53:52 +0900 (Tue, 11 Sep 2018) | 12 lines

_mjit_compile_pc_and_sp.erb: skip moving pc

when catch_except_p is false and insn.always_leaf? is true (never makes
arbitrary method call in the insn).

On Optcarrot, unfortunately this didn't have measureable performance impact.
But still this is a good direction since it becomes much faster when
marking all insns as always leaf.

bare_instructions.rb: add `#always_leaf?` that indicates the insn can
always be considered as leaf. Using dynamic leaf for JIT would be hard
since it requires to discard outdated code somehow.
------------------------------------------------------------------------
r64682 | k0kubun | 2018-09-11 20:26:15 +0900 (Tue, 11 Sep 2018) | 8 lines

transform_mjit_header.rb: add static to Init_*

as well, to make CI succeed with VM_CHECK_MODE > 1.

vm_insnhelper.c: drop unnecessary MJIT_HEADER ifdef. This is intended to
be ignored by having `static inline`. Removing that by macro would be
helpful for minimizing compilation time, but the impact is not so big
and having many MJIT_HEADER check would be bad for maintainability.
------------------------------------------------------------------------
r64681 | k0kubun | 2018-09-11 20:09:59 +0900 (Tue, 11 Sep 2018) | 3 lines

test_jit.rb: show extra debug info for #test_unload_units

failure
------------------------------------------------------------------------
r64680 | nobu | 2018-09-11 20:05:20 +0900 (Tue, 11 Sep 2018) | 1 line

random.c: prefixed fill_random_bytes
------------------------------------------------------------------------
r64679 | k0kubun | 2018-09-11 20:01:18 +0900 (Tue, 11 Sep 2018) | 1 line

vm_insnhelper.c: stop unnecessarily using rb_sprintf
------------------------------------------------------------------------
r64678 | k0kubun | 2018-09-11 19:58:33 +0900 (Tue, 11 Sep 2018) | 1 line

vm_insnhelper.c: fix -Wformat-security on rb_bug
------------------------------------------------------------------------
r64677 | shyouhei | 2018-09-11 18:48:58 +0900 (Tue, 11 Sep 2018) | 8 lines

add new instruction attribute called leaf

An instruction is leaf if it has no rb_funcall inside.  In order to
check this property, we introduce stack canary which is a random
number collected at runtime.  Stack top is always filled with this
number and checked for stack smashing operations, when VM_CHECK_MODE.
[GH-1947]

------------------------------------------------------------------------
r64676 | svn | 2018-09-11 18:46:50 +0900 (Tue, 11 Sep 2018) | 1 line

* 2018-09-11
------------------------------------------------------------------------
r64675 | kazu | 2018-09-11 18:46:49 +0900 (Tue, 11 Sep 2018) | 1 line

Use https instead of http
------------------------------------------------------------------------
r64674 | nobu | 2018-09-10 22:05:34 +0900 (Mon, 10 Sep 2018) | 1 line

appveyor.yml: try VS140
------------------------------------------------------------------------
r64673 | nobu | 2018-09-10 18:35:03 +0900 (Mon, 10 Sep 2018) | 1 line

signal.c: consider non-sigaltstack platforms
------------------------------------------------------------------------
r64672 | nobu | 2018-09-10 13:23:24 +0900 (Mon, 10 Sep 2018) | 1 line

util.c: removed extra #endif [Bug #15091]
------------------------------------------------------------------------
r64671 | nobu | 2018-09-10 13:21:39 +0900 (Mon, 10 Sep 2018) | 5 lines

util.c: fix ruby_qsort with qsort_s

* util.c (ruby_qsort): __STDC_VERSION__ may not be defined even if it
  is available.  fixed duplicate definitions when qsort_s is available
  on non-Windows platforms.  [ruby-core:88921] [Bug #15091]
------------------------------------------------------------------------
r64670 | usa | 2018-09-10 10:43:10 +0900 (Mon, 10 Sep 2018) | 2 lines

there is no such predefined macro.  check build before commit!

------------------------------------------------------------------------
r64669 | svn | 2018-09-10 00:46:53 +0900 (Mon, 10 Sep 2018) | 1 line

* 2018-09-10
------------------------------------------------------------------------
r64668 | nobu | 2018-09-10 00:46:51 +0900 (Mon, 10 Sep 2018) | 1 line

.travis.yml: separate ruby/spec on old version
------------------------------------------------------------------------
r64667 | nobu | 2018-09-09 21:48:33 +0900 (Sun, 09 Sep 2018) | 5 lines

Add latest version gcc-8 case to Travis CI

[Fix GH-1937]

Co-authored-by: Jun Aruga <jaruga@redhat.com>
------------------------------------------------------------------------
r64666 | nobu | 2018-09-09 21:48:32 +0900 (Sun, 09 Sep 2018) | 1 line

.travis.yml: branches only for travis-ci
------------------------------------------------------------------------
r64665 | nobu | 2018-09-09 21:42:48 +0900 (Sun, 09 Sep 2018) | 1 line

thread.c: get rid of false warnings by gcc-8
------------------------------------------------------------------------
r64664 | kazu | 2018-09-09 19:51:48 +0900 (Sun, 09 Sep 2018) | 1 line

Fix a typo
------------------------------------------------------------------------
r64663 | normal | 2018-09-09 17:50:53 +0900 (Sun, 09 Sep 2018) | 4 lines

spec/ruby/library/socket/addrinfo: require for SocketSpecs

Otherwise, I get NameError when running these IPv6 tests individually
or in parallel.
------------------------------------------------------------------------
r64662 | svn | 2018-09-09 16:49:05 +0900 (Sun, 09 Sep 2018) | 1 line

* 2018-09-09
------------------------------------------------------------------------
r64661 | nobu | 2018-09-09 16:49:04 +0900 (Sun, 09 Sep 2018) | 10 lines

util.c: qsort_s in C11

* configure.ac: macro for C11 to use qsort_s.

* util.c (ruby_qsort): fix for C11 qsort_s.  the comparison function
  for MSVCRT qsort_s is compatible with BSD qsort_r, but not with C11
  qsort_s, in spite of its name.
  note that mingw defines __STDC_VERSION__ but uses qsort_s in MSVCRT,
  so the MSVCRT block needs to preced the C11 block.
  [ruby-core:88899] [Bug #15091]
------------------------------------------------------------------------
r64660 | kazu | 2018-09-08 11:44:24 +0900 (Sat, 08 Sep 2018) | 1 line

Use `&.` after `&.`
------------------------------------------------------------------------
r64659 | svn | 2018-09-08 10:09:45 +0900 (Sat, 08 Sep 2018) | 1 line

* 2018-09-08
------------------------------------------------------------------------
r64658 | normal | 2018-09-08 10:09:44 +0900 (Sat, 08 Sep 2018) | 3 lines

test/ruby/test_thread.rb: join threads in each test

Leaky thread detection doesn't happen frequently, enough
------------------------------------------------------------------------
r64657 | nobu | 2018-09-07 23:37:19 +0900 (Fri, 07 Sep 2018) | 1 line

ext/objspace/object_tracing.c (freeobj_i): fix missing assignment
------------------------------------------------------------------------
r64656 | nobu | 2018-09-07 22:43:01 +0900 (Fri, 07 Sep 2018) | 1 line

tool/node_name.rb: rewrote without flip-flop
------------------------------------------------------------------------
r64655 | nobu | 2018-09-07 17:28:57 +0900 (Fri, 07 Sep 2018) | 9 lines

object_tracing.c: register TracePoint objects

* ext/objspace/object_tracing.c (trace_object_allocations_start): to
  prevent TracePoint objects from GC, register them in the VM, since
  they are unique per VM.
  http://ci.rvm.jp/results/trunk-test@ruby-sky3/1291901

* ext/objspace/object_tracing.c (trace_object_allocations_stop): reuse
  TracePoint objects.
------------------------------------------------------------------------
r64654 | nobu | 2018-09-07 12:42:51 +0900 (Fri, 07 Sep 2018) | 1 line

test/ruby/test_ast.rb: assert error messages too
------------------------------------------------------------------------
r64653 | nobu | 2018-09-07 12:39:30 +0900 (Fri, 07 Sep 2018) | 5 lines

Refactor test

[Fix GH-1946]

From: Josh Cheek <josh.cheek@gmail.com>
------------------------------------------------------------------------
r64652 | nobu | 2018-09-07 12:23:25 +0900 (Fri, 07 Sep 2018) | 1 line

ext/objspace/object_tracing.c (freeobj_i): no lookup before delete
------------------------------------------------------------------------
r64651 | svn | 2018-09-07 12:16:13 +0900 (Fri, 07 Sep 2018) | 1 line

* 2018-09-07
------------------------------------------------------------------------
r64650 | nobu | 2018-09-07 12:16:12 +0900 (Fri, 07 Sep 2018) | 1 line

ext/objspace/object_tracing.c: get rid of aliasing pointers
------------------------------------------------------------------------
r64648 | hsbt | 2018-09-06 12:02:06 +0900 (Thu, 06 Sep 2018) | 1 line

Extracted file list for csv.gemspec.
------------------------------------------------------------------------
r64647 | kazu | 2018-09-06 08:15:02 +0900 (Thu, 06 Sep 2018) | 3 lines

[DOC] Remove link to dead project

[Bug #14885] [ci skip]
------------------------------------------------------------------------
r64646 | nobu | 2018-09-06 06:34:44 +0900 (Thu, 06 Sep 2018) | 1 line

fix a typo [ci skip]
------------------------------------------------------------------------
r64645 | nobu | 2018-09-06 05:40:49 +0900 (Thu, 06 Sep 2018) | 4 lines

enumerator.c: [DOC] Enumerator::Lazy#force [ci skip]

added documentation of Enumerator::Lazy#force, just to clarify that it
is an alias of an inherited method.  [ruby-core:88872] [Bug #15079]
------------------------------------------------------------------------
r64644 | eregon | 2018-09-06 05:39:19 +0900 (Thu, 06 Sep 2018) | 4 lines

Add platform guards for AIX

* Most of these seem OS bugs.
* See https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180905T103302Z.fail.html.gz
------------------------------------------------------------------------
r64643 | eregon | 2018-09-06 05:39:02 +0900 (Thu, 06 Sep 2018) | 1 line

Guard a few specs which ipv6_available?
------------------------------------------------------------------------
r64642 | nobu | 2018-09-06 05:02:32 +0900 (Thu, 06 Sep 2018) | 5 lines

backward.h: removed stale declarations

* include/ruby/backward.h (rb_complex_set_real, rb_complex_set_imag):
  removed useless declarations which have been deprecated from the
  beginning.
------------------------------------------------------------------------
r64641 | svn | 2018-09-06 04:06:09 +0900 (Thu, 06 Sep 2018) | 1 line

* 2018-09-06
------------------------------------------------------------------------
r64640 | tarui | 2018-09-06 04:06:08 +0900 (Thu, 06 Sep 2018) | 11 lines

range.c: Range#cover? accepts Range object. [Feature #14473]

	* range.c (range_cover): add code for range argument.
          If the argument is a Range, check it is or is not 
	  covered by the reciver. If it can be treated as a
	  sequence, this method treats it that way. 
	* test/ruby/test_range.rb (class TestRange): add tests
	  for this feature.
	  
	  This patch is written by Owen Stephens. thank you!

------------------------------------------------------------------------
r64639 | svn | 2018-09-05 22:33:22 +0900 (Wed, 05 Sep 2018) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r64638 | hsbt | 2018-09-05 22:33:21 +0900 (Wed, 05 Sep 2018) | 1 line

Merge csv-3.0.0 from ruby/csv repository.
------------------------------------------------------------------------
r64637 | naruse | 2018-09-05 22:16:03 +0900 (Wed, 05 Sep 2018) | 1 line

fix typo
------------------------------------------------------------------------
r64636 | naruse | 2018-09-05 22:15:41 +0900 (Wed, 05 Sep 2018) | 4 lines

AIX doesn't set OptionLength for boolean options

https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180904T103302Z.fail.html.gz
https://www.ibm.com/support/knowledgecenter/ja/ssw_aix_72/com.ibm.aix.commtrf2/getsockopt.htm
------------------------------------------------------------------------
r64635 | duerst | 2018-09-05 15:04:02 +0900 (Wed, 05 Sep 2018) | 1 line

define ubf_list_atfork() as empty on cygwin
------------------------------------------------------------------------
r64634 | svn | 2018-09-05 08:10:18 +0900 (Wed, 05 Sep 2018) | 1 line

* 2018-09-05
------------------------------------------------------------------------
r64633 | nobu | 2018-09-05 08:10:17 +0900 (Wed, 05 Sep 2018) | 4 lines

random.c: fix up r64596

* random.c (fill_random_bytes_syscall): check if the version macro is
  defined, for very old Mac OS X development tools.
------------------------------------------------------------------------
r64632 | nobu | 2018-09-04 21:41:14 +0900 (Tue, 04 Sep 2018) | 4 lines

rational.c: remove duplicate macros

* rational.c (RRATIONAL_SET_{NUM,DEN}): also defined in internal.h
  since r53887.
------------------------------------------------------------------------
r64631 | nobu | 2018-09-04 21:30:34 +0900 (Tue, 04 Sep 2018) | 4 lines

ruby.h: removed internal macros

* include/ruby/ruby.h (RCOMPLEX_SET_REAL, RCOMPLEX_SET_IMAG): removed
  macros for internal use, which have been exposed by accident.
------------------------------------------------------------------------
r64630 | nobu | 2018-09-04 17:39:14 +0900 (Tue, 04 Sep 2018) | 3 lines

use mingw ANSI stdio

[Bug #13496]
------------------------------------------------------------------------
r64629 | nobu | 2018-09-04 14:28:38 +0900 (Tue, 04 Sep 2018) | 3 lines

bootstraptest update test_io.rb [Bug #15060] [Fix GH-1495]

From: MSP-Greg <greg.mpls@gmail.com>
------------------------------------------------------------------------
r64628 | nobu | 2018-09-04 12:41:44 +0900 (Tue, 04 Sep 2018) | 3 lines

Spec updates [Bug #15060] [Fix GH-1495]

From: MSP-Greg <greg.mpls@gmail.com>
------------------------------------------------------------------------
r64627 | nobu | 2018-09-04 11:19:39 +0900 (Tue, 04 Sep 2018) | 5 lines

appveyor.yml: fix PATH and env for msys2

based on the patch by MSP-Greg at #1945.

Co-authored-by: MSP-Greg <greg.mpls@gmail.com>
------------------------------------------------------------------------
r64626 | nobu | 2018-09-04 11:18:51 +0900 (Tue, 04 Sep 2018) | 6 lines

appveyor.yml: reduce matrix factors

* appveyor.yml (environment): separate matrix factors by `build` (`vs`
  or `msys2`), and `build` (and `vs` version if VS build).
  now `MSYS2_ARCH` and `MSYSTEM` are derived from `Platform` if msys2
  build.
------------------------------------------------------------------------
r64625 | shyouhei | 2018-09-04 10:42:37 +0900 (Tue, 04 Sep 2018) | 8 lines

avoid fork-unsafe arc4random implementations

Some old implementaions of arc4random_buf(3) were ARC4 based, or
unsafe when forked, or both.  Resort to /dev/urandom for those
known problematic cases.  Fix [Bug #15039]

Patch from Thomas Hurst <tom@hur.st>

------------------------------------------------------------------------
r64624 | svn | 2018-09-04 09:12:50 +0900 (Tue, 04 Sep 2018) | 1 line

* 2018-09-04
------------------------------------------------------------------------
r64623 | nobu | 2018-09-04 09:12:49 +0900 (Tue, 04 Sep 2018) | 3 lines

RubyGems installer.rb - fix up my mistakes in r64582

From: MSP-Greg <greg.mpls@gmail.com>
------------------------------------------------------------------------
r64622 | kazu | 2018-09-03 22:52:09 +0900 (Mon, 03 Sep 2018) | 1 line

Use unpack1 instead of unpack and `[0]`
------------------------------------------------------------------------
r64620 | nobu | 2018-09-03 17:20:41 +0900 (Mon, 03 Sep 2018) | 5 lines

Declare as gnu_printf on mingw

[Bug #13496]

From: MSP-Greg <MSP-Greg@users.noreply.github.com>
------------------------------------------------------------------------
r64619 | svn | 2018-09-03 08:27:09 +0900 (Mon, 03 Sep 2018) | 1 line

* 2018-09-03
------------------------------------------------------------------------
r64618 | nobu | 2018-09-03 08:27:08 +0900 (Mon, 03 Sep 2018) | 5 lines

Readline: expose rl_completion_quote_character variable

[Feature #13050]

From: georgebrock (George Brocklehurst) <ruby@georgebrock.com>
------------------------------------------------------------------------
r64615 | svn | 2018-09-02 12:49:32 +0900 (Sun, 02 Sep 2018) | 1 line

* 2018-09-02
------------------------------------------------------------------------
r64614 | nobu | 2018-09-02 12:49:31 +0900 (Sun, 02 Sep 2018) | 4 lines

configure.ac: -fstack-protector-strong

* configure.ac: use -fstack-protector-strong if available instead of
  -fstack-protector conditionally.  [ruby-core:88788] [Misc #15053]
------------------------------------------------------------------------
r64610 | nobu | 2018-09-01 16:34:31 +0900 (Sat, 01 Sep 2018) | 4 lines

complex.c: simplify division result

* complex.c (f_divide): canonicalize rationals to simplify integer
  complex results.
------------------------------------------------------------------------
r64609 | kazu | 2018-09-01 15:59:36 +0900 (Sat, 01 Sep 2018) | 6 lines

Re-try to add workaround for warnings

```
.../ext/psych/lib/psych/versions.rb:4: warning: already initialized constant Psych::VERSION
.../.ext/common/psych/versions.rb:4: warning: previous definition of VERSION was here
```
------------------------------------------------------------------------
r64608 | nobu | 2018-09-01 15:19:05 +0900 (Sat, 01 Sep 2018) | 1 line

RSTRING_PTR may not be terminated in the future
------------------------------------------------------------------------
r64607 | nobu | 2018-09-01 15:14:07 +0900 (Sat, 01 Sep 2018) | 1 line

10**3 is always 1000
------------------------------------------------------------------------
r64606 | nobu | 2018-09-01 15:14:06 +0900 (Sat, 01 Sep 2018) | 1 line

adjust indent
------------------------------------------------------------------------
r64604 | nobu | 2018-09-01 13:09:02 +0900 (Sat, 01 Sep 2018) | 1 line

surround macro block with do/while
------------------------------------------------------------------------
r64601 | kazu | 2018-09-01 10:37:12 +0900 (Sat, 01 Sep 2018) | 1 line

[DOC] Add %Q and %+ to strptime [ci skip]
------------------------------------------------------------------------
r64600 | kazu | 2018-09-01 00:29:06 +0900 (Sat, 01 Sep 2018) | 3 lines

Revert "Try to add workaround for warnings"

This reverts commit a5e5cfa3f650d4e78fb50e2df15c102ab56fca3c.
------------------------------------------------------------------------
r64599 | kazu | 2018-09-01 00:25:52 +0900 (Sat, 01 Sep 2018) | 6 lines

Try to add workaround for warnings

```
.../ext/psych/lib/psych/versions.rb:4: warning: already initialized constant Psych::VERSION
.../.ext/common/psych/versions.rb:4: warning: previous definition of VERSION was here
```
------------------------------------------------------------------------
r64598 | svn | 2018-09-01 00:05:32 +0900 (Sat, 01 Sep 2018) | 1 line

* 2018-09-01
------------------------------------------------------------------------
r64597 | kazu | 2018-09-01 00:05:29 +0900 (Sat, 01 Sep 2018) | 1 line

[DOC] leap seconds [ci skip]
------------------------------------------------------------------------
r64596 | nobu | 2018-08-31 18:56:24 +0900 (Fri, 31 Aug 2018) | 4 lines

random.c: SecRandomCopyBytes

* random.c (fill_random_bytes_syscall): use SecRandomCopyBytes in
  Security framework on macOS 10.7 or later.
------------------------------------------------------------------------
r64595 | mame | 2018-08-31 13:31:45 +0900 (Fri, 31 Aug 2018) | 1 line

test/lib/test/unit/assertions.rb: explicit delegation of keyword arguments
------------------------------------------------------------------------
r64594 | svn | 2018-08-31 04:14:38 +0900 (Fri, 31 Aug 2018) | 1 line

* 2018-08-31
------------------------------------------------------------------------
r64593 | normal | 2018-08-31 04:14:37 +0900 (Fri, 31 Aug 2018) | 7 lines

cont.c (rb_fiber_atfork): th->root_fiber may not exist

Otherwise, bootstraptest/test_fork.rb fails with -DVM_CHECK_MODE=2

[Bug #15041]

Fixes: r64589 "cont.c: set th->root_fiber to current fiber at fork"
------------------------------------------------------------------------
r64592 | normal | 2018-08-30 12:24:55 +0900 (Thu, 30 Aug 2018) | 1 line

hrtime.h: fix typo in non-builtin overflow check
------------------------------------------------------------------------
r64591 | svn | 2018-08-30 04:47:15 +0900 (Thu, 30 Aug 2018) | 1 line

* 2018-08-30
------------------------------------------------------------------------
r64590 | normal | 2018-08-30 04:47:14 +0900 (Thu, 30 Aug 2018) | 6 lines

test/ruby/test_io.rb (test_select_leak): use handle_interrupt

Interrupt timing is tricky and it's possible the target
thread is still stopped from the previous loop iteration.

[ruby-core:88732] [Bug #15043]
------------------------------------------------------------------------
r64589 | normal | 2018-08-29 17:04:09 +0900 (Wed, 29 Aug 2018) | 7 lines

cont.c: set th->root_fiber to current fiber at fork

Otherwise, th->root_fiber can point to an invalid Fiber,
because Fibers do not live across fork.  So consider
whatever Fiber is running the root fiber.

[ruby-core:88723] [Bug #15041]
------------------------------------------------------------------------
r64588 | svn | 2018-08-29 11:23:15 +0900 (Wed, 29 Aug 2018) | 1 line

* 2018-08-29
------------------------------------------------------------------------
r64587 | normal | 2018-08-29 11:23:14 +0900 (Wed, 29 Aug 2018) | 3 lines

cont.c (rb_context_t): remove ensure_list

It is unused (we use rb_execution_context_t.ensure_list instead)
------------------------------------------------------------------------
r64586 | eregon | 2018-08-28 23:55:33 +0900 (Tue, 28 Aug 2018) | 4 lines

Tag a couple specs failing on AIX

* The rest seems OS bugs, MRI bugs or incomplete IPv6 implementation:
  https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180828T103302Z.fail.html.gz
------------------------------------------------------------------------
r64585 | hsbt | 2018-08-28 22:42:39 +0900 (Tue, 28 Aug 2018) | 4 lines

Fixed installation failure with mswin environment.

  [ruby-core:88699][Bug #15035]
  This patch was provided by MSP-Greg.
------------------------------------------------------------------------
r64584 | eregon | 2018-08-28 18:41:26 +0900 (Tue, 28 Aug 2018) | 1 line

Update to ruby/spec@6fd9472
------------------------------------------------------------------------
r64583 | ko1 | 2018-08-28 16:06:06 +0900 (Tue, 28 Aug 2018) | 8 lines

rest parameter optimization [Feature #15010]

* vm_args.c: rb_ary_dup(args->rest) to be used at most once during
  parameter setup. [Feature #15010]
  A patch by chopraanmol1 (Anmol Chopra) <chopraanmol1@gmail.com>.

* array.c (rb_ary_behead): added to remove first n elements.

------------------------------------------------------------------------
r64582 | hsbt | 2018-08-28 11:39:22 +0900 (Tue, 28 Aug 2018) | 4 lines

Fixed test failures in mswin environment at r64555.

  [ruby-core:88699][Bug #15035]
  This patch was provided by MSP-Greg.
------------------------------------------------------------------------
r64581 | normal | 2018-08-28 09:24:08 +0900 (Tue, 28 Aug 2018) | 6 lines

thread_pthread.h: rename `gvl.acquired' to `gvl.owner' and document

`acquired' was an old boolean variable, but nowadays it is a
rb_thread_t pointer;  "gvl.owner" seems like a more appropriate
name.  And document the contended path including waitq, timer,
and timer_err.
------------------------------------------------------------------------
r64580 | normal | 2018-08-28 08:39:58 +0900 (Tue, 28 Aug 2018) | 3 lines

thread_pthread.c: document sigwait_th and sigwait_fd [ci skip]

This is an important concept to document, I think.
------------------------------------------------------------------------
r64579 | normal | 2018-08-28 08:29:44 +0900 (Tue, 28 Aug 2018) | 3 lines

thread_pthread.c: fix deadlock on test_thread.rb::test_signal_at_join

Fixes: r64575 ("avoid lock ping-pong in do_gvl_timer & ubf_select")
------------------------------------------------------------------------
r64578 | eregon | 2018-08-28 04:08:38 +0900 (Tue, 28 Aug 2018) | 1 line

Rewrite Etc.sysconf spec to allow nil or Integer for all variables
------------------------------------------------------------------------
r64577 | normal | 2018-08-28 03:37:04 +0900 (Tue, 28 Aug 2018) | 7 lines

process.c: fix potential missed wakeups in r64576

Oddly, all existing test cases passed multiple times
before this patch (even with --jit-wait), so this seems
like a difficult failure to prove.

Fixes: r64576 ("process.c: simplify SIGCHLD-based waitpid")
------------------------------------------------------------------------
r64576 | normal | 2018-08-28 02:17:13 +0900 (Tue, 28 Aug 2018) | 11 lines

process.c: simplify SIGCHLD-based waitpid

Introduce a new rb_thread_sleep_interruptible that does not
execute interrupts before sleeping.  Skipping the interrupt
check before sleep is required for out-of-GVL ruby_waitpid_all
to function properly when setting waitpid_state.ret

Now that ubf_select can be called by the gvl.timer thread
without recursive locking gvl.lock, we can safely use
rb_threadptr_interrupt to deal with waking up sleeping
processes,
------------------------------------------------------------------------
r64575 | normal | 2018-08-28 02:17:08 +0900 (Tue, 28 Aug 2018) | 10 lines

thread_pthread.c: avoid lock ping-pong in do_gvl_timer & ubf_select

This simplifies the locking logic somewhat.

While we're at it, designate_timer_thread is worthless in
ubf_select because gvl_acquire_common already guarantees there
is a gvl.timer if gvl->waitq is populated.

In the future (for auto-fiber), this will allow using
th->unblock.func for rb_waitpid callers (via rb_sigchld_handler).
------------------------------------------------------------------------
r64574 | svn | 2018-08-28 01:38:38 +0900 (Tue, 28 Aug 2018) | 1 line

* 2018-08-28
------------------------------------------------------------------------
r64573 | eregon | 2018-08-28 01:38:37 +0900 (Tue, 28 Aug 2018) | 1 line

SC_TZNAME_MAX can also be infinite
------------------------------------------------------------------------
r64572 | svn | 2018-08-28 01:22:22 +0900 (Tue, 28 Aug 2018) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r64571 | eregon | 2018-08-28 01:22:21 +0900 (Tue, 28 Aug 2018) | 1 line

Update to ruby/spec@007e908
------------------------------------------------------------------------
r64570 | svn | 2018-08-27 23:49:57 +0900 (Mon, 27 Aug 2018) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r64569 | eregon | 2018-08-27 23:49:56 +0900 (Mon, 27 Aug 2018) | 1 line

Update to ruby/spec@a89819d
------------------------------------------------------------------------
r64568 | eregon | 2018-08-27 23:33:10 +0900 (Mon, 27 Aug 2018) | 1 line

Fix template/fake.rb.in if ENV["RUBYOPT"] is nil
------------------------------------------------------------------------
r64567 | eregon | 2018-08-27 23:25:14 +0900 (Mon, 27 Aug 2018) | 4 lines

Fix template/fake.rb.in when external and internal encodings are set

* To be able to run spec/ruby/command_line/dash_encoding_spec.rb
  with the in-repo build.
------------------------------------------------------------------------
r64566 | svn | 2018-08-27 23:25:02 +0900 (Mon, 27 Aug 2018) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r64565 | eregon | 2018-08-27 23:25:00 +0900 (Mon, 27 Aug 2018) | 1 line

Update to ruby/spec@09fa86c
------------------------------------------------------------------------
r64557 | eregon | 2018-08-27 19:12:41 +0900 (Mon, 27 Aug 2018) | 1 line

Simplify guards, the behavior seems Linux-specific
------------------------------------------------------------------------
r64556 | svn | 2018-08-27 19:05:06 +0900 (Mon, 27 Aug 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r64555 | hsbt | 2018-08-27 19:05:04 +0900 (Mon, 27 Aug 2018) | 5 lines

Merge master branch from rubygems upstream.

  * It's preparation to release RubyGems 3.0.0.beta2 and Ruby 2.6.0
    preview 3.
  * https://github.com/rubygems/rubygems/compare/v3.0.0.beta1...fad2eb15a282b19dfcb4b48bc95b8b39ebb4511f
------------------------------------------------------------------------
r64554 | normal | 2018-08-27 17:48:49 +0900 (Mon, 27 Aug 2018) | 3 lines

hrtime.h: add note explaining current use of uint64_t [ci skip]

[ruby-core:88678]
------------------------------------------------------------------------
r64553 | nobu | 2018-08-27 14:49:41 +0900 (Mon, 27 Aug 2018) | 1 line

hrtime.h: missing paren
------------------------------------------------------------------------
r64552 | nobu | 2018-08-27 14:48:41 +0900 (Mon, 27 Aug 2018) | 1 line

hrtime.h: explicit casts to time_t
------------------------------------------------------------------------
r64551 | nobu | 2018-08-27 14:39:09 +0900 (Mon, 27 Aug 2018) | 1 line

configure.ac: printf prifix for int64_t
------------------------------------------------------------------------
r64550 | normal | 2018-08-27 14:32:18 +0900 (Mon, 27 Aug 2018) | 9 lines

thread.c: check interrupts explicitly in select/ppoll blocking regions

The logic around blocking_region_begin is confusing to me,
but the goal of this patch is to ensure rb_sigwait_fd_get
and rb_sigwait_fd_put are matched.

In other words, we don't want a thread to hold sigwait_fd
forever if an exception is raised while calling select()
or ppoll().
------------------------------------------------------------------------
r64549 | svn | 2018-08-27 10:30:21 +0900 (Mon, 27 Aug 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64548 | svn | 2018-08-27 10:30:20 +0900 (Mon, 27 Aug 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r64547 | hsbt | 2018-08-27 10:30:18 +0900 (Mon, 27 Aug 2018) | 3 lines

Merge rdoc-6.1.0.beta1.

  * https://github.com/ruby/rdoc/compare/v6.0.4...v6.1.0.beta1
------------------------------------------------------------------------
r64546 | svn | 2018-08-27 09:44:06 +0900 (Mon, 27 Aug 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64545 | svn | 2018-08-27 09:44:05 +0900 (Mon, 27 Aug 2018) | 1 line

* 2018-08-27
------------------------------------------------------------------------
r64544 | hsbt | 2018-08-27 09:44:04 +0900 (Mon, 27 Aug 2018) | 6 lines

Merge psych-3.1.0.pre1.

  * Update bundled libyaml-0.2.1 from 0.1.7.
    https://github.com/ruby/psych/pull/368
  * Unify Psych's API: To use keyword arguments with method call.
    https://github.com/ruby/psych/pull/358
------------------------------------------------------------------------
r64543 | normal | 2018-08-26 21:41:21 +0900 (Sun, 26 Aug 2018) | 10 lines

test/ruby/test_io.rb (test_recycled_fd_close): Linux workaround

Arch Linux CI still seems to timeout on this test...

Note, I can't reproduce the failures in these tests on a
FreeBSD 11.1 VM while infinite-looping, even without the
"th.join(0.001)".  It doesn't seem related to the use of
rb_wait_for_single_fd (r64529).

cf. https://rubyci.org/logs/rubyci.s3.amazonaws.com/arch/ruby-trunk/log/20180826T090003Z.fail.html.gz
------------------------------------------------------------------------
r64542 | normal | 2018-08-26 21:41:16 +0900 (Sun, 26 Aug 2018) | 12 lines

thread_sync.c: common wakeup_{one,all} implementation

This let us avoid looping in rb_szqueue_max_set, saves us
some lines of code and reduces binary size slightly
(numbers from 32-bit x86):

         text      data     bss     dec     hex filename
before: 91272       392     156   91820   166ac thread.o
 after: 91200       392     156   91748   16664 thread.o

Inspiration from this taken from the FUTEX_WAKE op
of the Linux futex(2) syscall.
------------------------------------------------------------------------
r64541 | normal | 2018-08-26 13:29:11 +0900 (Sun, 26 Aug 2018) | 5 lines

process.c: remove worthless waitpid_sys macro

It is identical to do_waitpid, and the win32 version will not
be needed for MJIT (since win32 does not suffer from the
waitpid(-1, ...) conflict where waits can get stolen.
------------------------------------------------------------------------
r64540 | normal | 2018-08-26 07:32:35 +0900 (Sun, 26 Aug 2018) | 7 lines

test/io/wait/test_io_wait_uncommon.rb: relax /dev/random check

Too many machines lack entropy to have a usable /dev/random.  I
had similar problems on my system until I started using
haveged(8), but we can't require that for CI.

cf. https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-trunk/log/20180825T213003Z.fail.html.gz
------------------------------------------------------------------------
r64539 | normal | 2018-08-26 07:14:14 +0900 (Sun, 26 Aug 2018) | 1 line

thread_pthread.c (ubf_wakeup_thread): `th' is never NULL
------------------------------------------------------------------------
r64538 | normal | 2018-08-26 06:59:30 +0900 (Sun, 26 Aug 2018) | 28 lines

thread_pthread.c: main thread always gets hit by signals

We need to ensure Signal.trap handlers can function if the main
thread is sleeping after a subthread has grabbed sigwait_fd,
but later exited.

Consider the following timeline:

main_thread             sub-thread
-----------------------------------------
Signal.trap() { ... }
                        get sigwait_fd
                        ppoll on sigwait_fd
native_cond_sleep
(via pthread_cond_wait)
                        ppoll times-out
			put sigwait_fd
                        sub-thread exits

only thread alive
SIGNAL HITS

The problem is pthread_cond_wait cannot return EINTR,
so we can never run the Signal.trap handler.  So we
will avoid using native_cond_sleep in the main thread
and always use ppoll to sleep when in the main thread.
This can guarantee the main thread remains aware of
signals; even if it cannot safely read off sigwait_fd
------------------------------------------------------------------------
r64537 | svn | 2018-08-26 06:33:55 +0900 (Sun, 26 Aug 2018) | 1 line

* 2018-08-26
------------------------------------------------------------------------
r64536 | normal | 2018-08-26 06:33:55 +0900 (Sun, 26 Aug 2018) | 3 lines

thread.c: quiet down -Wmaybe-uninitialized on gcc 7.[2-3]

Haven't tested gcc 8, yet; but gcc 6 seems fine....
------------------------------------------------------------------------
r64535 | normal | 2018-08-25 18:02:50 +0900 (Sat, 25 Aug 2018) | 6 lines

hrtime.h: add documentation

I updated the patch with documentation but forgot about it,
earlier :x

[ruby-core:88616] [Misc #15014]
------------------------------------------------------------------------
r64534 | svn | 2018-08-25 15:58:36 +0900 (Sat, 25 Aug 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64533 | normal | 2018-08-25 15:58:35 +0900 (Sat, 25 Aug 2018) | 18 lines

thread.c: use rb_hrtime_t scalar for high-resolution time operations

Relying on "struct timespec" was too annoying API-wise and
used more stack space.  "double" was a bit wacky w.r.t rounding
in the past, so now we'll switch to using a 64-bit type.

Unsigned 64-bit integer is able to give us over nearly 585
years of range with nanoseconds.  This range is good enough
for the Linux kernel internal time representation, so it
ought to be good enough for us.

This reduces the stack usage of functions while GVL is held
(and thus subject to marking) on x86-64 Linux (with ppoll):

	rb_wait_for_single_fd    120 => 104
	do_select                120 => 88

[ruby-core:88582] [Misc #15014]
------------------------------------------------------------------------
r64532 | normal | 2018-08-25 11:32:15 +0900 (Sat, 25 Aug 2018) | 6 lines

drb: close graceful shutdown pipe before socket

Closing a listen socket while entering select(2) may
trigger IOError or even deadlock because another thread
may give the file descriptor to another file description;
meaning the kernel can wait on the wrong description.
------------------------------------------------------------------------
r64531 | normal | 2018-08-25 11:32:10 +0900 (Sat, 25 Aug 2018) | 4 lines

drb: simplify shutdown pipe close logic

IO#close is idempotent, so we don't need to waste bytecode
to check or nil it at shutdown time.
------------------------------------------------------------------------
r64530 | naruse | 2018-08-25 07:32:07 +0900 (Sat, 25 Aug 2018) | 1 line

Add AIX guards
------------------------------------------------------------------------
r64529 | normal | 2018-08-25 05:28:08 +0900 (Sat, 25 Aug 2018) | 5 lines

test/ruby/test_io.rb (test_recycled_fd_close): use IO#read to avoid ppoll call

IO#sysread calls rb_wait_for_single_fd for compatibility, and
perhaps something is amiss with that (unrelated to timer-thread
elimination)
------------------------------------------------------------------------
r64528 | svn | 2018-08-25 04:19:02 +0900 (Sat, 25 Aug 2018) | 1 line

* 2018-08-25
------------------------------------------------------------------------
r64527 | normal | 2018-08-25 04:19:01 +0900 (Sat, 25 Aug 2018) | 8 lines

thread_pthread.c: use eventfd instead of pipe on Linux

Based on r64478, any regular user creating more than 1024 pipes
on Linux will end up with tiny pipes with only a single page
capacity.  So avoid wasting user resources and use lighter
eventfd on Linux.

[ruby-core:88563] [Misc #15011]
------------------------------------------------------------------------
r64526 | k0kubun | 2018-08-24 19:25:51 +0900 (Fri, 24 Aug 2018) | 7 lines

ext/readline/extconf.rb: try using more readline APIs

on MinGW.

[Bug #15020]

From: MSP-Greg <Greg.mpls@gmail.com>
------------------------------------------------------------------------
r64525 | k0kubun | 2018-08-24 08:50:48 +0900 (Fri, 24 Aug 2018) | 10 lines

test/readline/test_readline.rb: fix readline test

for mingw.

test/lib/minitest/unit.rb: Add 'guards' for mingw.
Removed still-unused method `mswin?` from original patch.

[Fix GH-1941]

From: MSP-Greg <MSP-Greg@users.noreply.github.com>
------------------------------------------------------------------------
r64524 | normal | 2018-08-24 04:49:35 +0900 (Fri, 24 Aug 2018) | 4 lines

thread_pthread.c (ubf_timer_destroy): remove redundant getpid check

TIMER_THREAD_CREATED_P already checks that pid, and glibc 2.25+
no longer caches getpid(2).
------------------------------------------------------------------------
r64523 | svn | 2018-08-24 04:13:02 +0900 (Fri, 24 Aug 2018) | 1 line

* 2018-08-24
------------------------------------------------------------------------
r64522 | normal | 2018-08-24 04:13:01 +0900 (Fri, 24 Aug 2018) | 5 lines

NEWS: add entries for rb_waitpid and timer-thread [ci skip]

Some of these changes may affect debugging and tracing tools

[Bug #14867] [ruby-core:88199] [Misc #14937]
------------------------------------------------------------------------
r64521 | mame | 2018-08-23 17:49:23 +0900 (Thu, 23 Aug 2018) | 1 line

iseq.c (rb_vm_encoded_insn_data_table_init): add a cast to build on clang
------------------------------------------------------------------------
r64520 | kazu | 2018-08-23 17:33:54 +0900 (Thu, 23 Aug 2018) | 4 lines

Mention `--enable=jit` instead of `--jit`

"--jit" flag usage may be deprecated at r63995 [Feature #14878]
[ci skip]
------------------------------------------------------------------------
r64519 | mame | 2018-08-23 17:32:31 +0900 (Thu, 23 Aug 2018) | 3 lines

iseq.c (rb_iseq_trace_set): refactoring by using encoded_insn_data

Now it uses encoded_insn_data to identify and replace each encoded insn.
------------------------------------------------------------------------
r64518 | mame | 2018-08-23 17:32:30 +0900 (Thu, 23 Aug 2018) | 7 lines

iseq.c: add a map from encoded insn to insn data

This enhances rb_vm_insn_addr2insn which retrieves a decoded insn number
from encoded insn.
The insn data table include not only decoded insn number, but also its
len, trace and non-trace version of encoded insn.
This table can be used to simplify trace instrumentation.
------------------------------------------------------------------------
r64517 | nobu | 2018-08-23 16:45:39 +0900 (Thu, 23 Aug 2018) | 4 lines

compile.c: drop unused array

* compile.c (iseq_peephole_optimize): drop unused dynamic array
  literal, without concatenation.
------------------------------------------------------------------------
r64516 | nobu | 2018-08-23 16:22:27 +0900 (Thu, 23 Aug 2018) | 4 lines

compile.c: drop unused string

* compile.c (iseq_peephole_optimize): drop unused dynamic string
  literal, without concatenation.
------------------------------------------------------------------------
r64515 | ko1 | 2018-08-23 14:54:38 +0900 (Thu, 23 Aug 2018) | 5 lines

remove `const` warning.

* compile.c (iseq_ibf_load): remove `const` to pass iseq as no `const`
  parameter.

------------------------------------------------------------------------
r64514 | ko1 | 2018-08-23 13:12:14 +0900 (Thu, 23 Aug 2018) | 9 lines

check trace flags at loading [Bug #14702]

* iseq.c (iseq_init_trace): at ISeq loading time, we need to check
  `ruby_vm_event_enabled_flags` to turn on trace instructions.
  Seprate this checking code from `finish_iseq_build()` and make
  new function. `iseq_ibf_load()` calls this funcation after loading.

* test/ruby/test_iseq.rb: add a test for this fix.

------------------------------------------------------------------------
r64513 | naruse | 2018-08-23 04:18:22 +0900 (Thu, 23 Aug 2018) | 1 line

Also skip on AIX
------------------------------------------------------------------------
r64512 | nobu | 2018-08-23 01:02:03 +0900 (Thu, 23 Aug 2018) | 4 lines

compile.c: pop literal object in condition

* compile.c (compile_branch_condition): pop dynamic literal
  object, which is never nil/false, as the branch condition.
------------------------------------------------------------------------
r64511 | svn | 2018-08-23 00:04:06 +0900 (Thu, 23 Aug 2018) | 1 line

* 2018-08-23
------------------------------------------------------------------------
r64510 | mame | 2018-08-23 00:04:05 +0900 (Thu, 23 Aug 2018) | 7 lines

parse.y (arg_append): support NODE_ARGSCAT case

Because of the lack of this case, `[*ary,1,2,3,4,5,6]` was parsed into
an inefficient AST like `ary + [1,2] + [3,4] + [5,6]`.

A patch from Anmol Chopra <anmolchopra@rocketbox.in>.
Fixes [Bug #15018].
------------------------------------------------------------------------
r64509 | mame | 2018-08-22 20:09:47 +0900 (Wed, 22 Aug 2018) | 4 lines

compile.c: remove tracecoverage instruction for line coverage

Line coverage was based on special instruction "tracecoverage".
Now, instead, it uses the mechanism of trace hook [Feature #14104].
------------------------------------------------------------------------
r64508 | mame | 2018-08-22 19:38:56 +0900 (Wed, 22 Aug 2018) | 10 lines

parse.y: remove coverage-related code fragments

The code fragments that initializes coverage data were scattered into
both parse.y and compile.c.  parse.y allocated a coverage data, and
compile.c initialize the data.

To remove this cross-cutting concern, this change moves the allocation
from "coverage" function of parse.y to "rb_iseq_new_top" of iseq.c.
For the sake, parse.y just counts the line number of the original source
code, and the number is passed via rb_ast_body_t.
------------------------------------------------------------------------
r64507 | mame | 2018-08-22 19:38:55 +0900 (Wed, 22 Aug 2018) | 4 lines

node.h (rb_ast_t): move its field mark_ary to node_buffer_t

I want to add a new field to rb_ast_t whose size is restricted because
it is an imemo.  This change makes one room in rb_ast_t.
------------------------------------------------------------------------
r64506 | nobu | 2018-08-22 19:22:02 +0900 (Wed, 22 Aug 2018) | 1 line

prototized
------------------------------------------------------------------------
r64505 | mame | 2018-08-22 14:24:51 +0900 (Wed, 22 Aug 2018) | 1 line

common.mk: update "make help" so that "make check" now runs test-spec
------------------------------------------------------------------------
r64504 | mame | 2018-08-22 14:24:50 +0900 (Wed, 22 Aug 2018) | 10 lines

thread.c (rb_reset_coverages): remove coverage counters from all ISeqs

When coverage measurement is enabled, the compiler makes each iseq have
a reference to the counter array of coverage.
Even after coverage measurement is disabled, the reference is kept.
And, if coverage measurement is restarted, a coverage hook will increase
the counter.  This is completely meaningless; it brings just overhead.

To remove this meaninglessness, this change removes all the reference
when coverage measuement is stopped.
------------------------------------------------------------------------
r64503 | kazu | 2018-08-22 13:04:06 +0900 (Wed, 22 Aug 2018) | 3 lines

Avoid compiler depend error

ref r64492
------------------------------------------------------------------------
r64502 | eregon | 2018-08-22 07:17:37 +0900 (Wed, 22 Aug 2018) | 3 lines

Run specs against 2.3.7 to ensure version guards are correctly added

* See [Feature #15004].
------------------------------------------------------------------------
r64501 | eregon | 2018-08-22 07:01:34 +0900 (Wed, 22 Aug 2018) | 1 line

Update to ruby/spec@dd828d6
------------------------------------------------------------------------
r64500 | eregon | 2018-08-22 07:01:18 +0900 (Wed, 22 Aug 2018) | 1 line

Update to ruby/mspec@269f9cd
------------------------------------------------------------------------
r64499 | eregon | 2018-08-22 05:28:45 +0900 (Wed, 22 Aug 2018) | 3 lines

Only run the spec on Linux

* Other platforms seem to behave differently.
------------------------------------------------------------------------
r64498 | eregon | 2018-08-22 05:28:29 +0900 (Wed, 22 Aug 2018) | 5 lines

Revert r64483

* This reverts commit 12f624b673fd1bd1782f4c52e3b6c78d033e7b84:
 "Try 4 times for WIN32OLE specs"
* It was a machine problem, it needed to be rebooted.
------------------------------------------------------------------------
r64497 | svn | 2018-08-22 00:57:24 +0900 (Wed, 22 Aug 2018) | 1 line

* 2018-08-22
------------------------------------------------------------------------
r64496 | naruse | 2018-08-22 00:57:23 +0900 (Wed, 22 Aug 2018) | 1 line

AIX also timeouts the spec
------------------------------------------------------------------------
r64495 | kazu | 2018-08-21 23:57:56 +0900 (Tue, 21 Aug 2018) | 1 line

Add more assertions for NotImplementedError of instance method
------------------------------------------------------------------------
r64494 | akr | 2018-08-21 23:40:18 +0900 (Tue, 21 Aug 2018) | 2 lines

rename an argument of calc_wday.

------------------------------------------------------------------------
r64493 | naruse | 2018-08-21 22:39:24 +0900 (Tue, 21 Aug 2018) | 4 lines

Re-Revert "Temporary revert "process.c: dead code when no SIGCHLD""

This re-reverts commit r64447.
The issue was machine side problem.
------------------------------------------------------------------------
r64492 | nobu | 2018-08-21 11:11:39 +0900 (Tue, 21 Aug 2018) | 4 lines

cont.c: fix syntax error

* cont.c (struct rb_fiber_struct): fix wrong usage of BITFIELD in
  r64487, which caused syntax error on pre-C99 compilers.
------------------------------------------------------------------------
r64491 | nobu | 2018-08-21 11:02:54 +0900 (Tue, 21 Aug 2018) | 4 lines

common.mk: timestamp directory

* common.mk: timestamp files need the timestamp directory.
  [Bug #15015] [ruby-core:88584]
------------------------------------------------------------------------
r64490 | normal | 2018-08-21 10:01:42 +0900 (Tue, 21 Aug 2018) | 4 lines

thread*.c: replace GetMutexPtr with mutex_ptr

Following ko1's lead in r59192, this gets rid of non-obvious
assignments which happen inside macros.
------------------------------------------------------------------------
r64489 | normal | 2018-08-21 10:01:37 +0900 (Tue, 21 Aug 2018) | 4 lines

cont.c: replace "GetFooPtr" macros with "foo_ptr" functions

Following ko1's lead in r59192, this gets rid of non-obvious
assignments which happen inside macros.
------------------------------------------------------------------------
r64488 | normal | 2018-08-21 09:16:45 +0900 (Tue, 21 Aug 2018) | 3 lines

internal.h: remove prototype for non-existent rb_divert_reserved_fd

I forgot to remove it 3 years ago in r51576
------------------------------------------------------------------------
r64487 | normal | 2018-08-21 08:48:03 +0900 (Tue, 21 Aug 2018) | 4 lines

cont.c (struct rb_fiber_struct): bitfields for trasnferred and status

On 32-bit x86, this reduces the struct from 836 to 832 bytes and
brings us down to 13 (64-byte) cachelines (from 14).
------------------------------------------------------------------------
r64486 | normal | 2018-08-21 06:34:44 +0900 (Tue, 21 Aug 2018) | 4 lines

thread*.c: avoid unnecessary initialization for list_for_each_safe

According to r52446, it is only necessary for the current item (@i),
not the `@nxt` parameter for list_for_each_safe.
------------------------------------------------------------------------
r64485 | normal | 2018-08-21 06:34:39 +0900 (Tue, 21 Aug 2018) | 10 lines

thread_pthread.c: reinitialize ubf_list at fork

It's possible for the ubf_list_head to be populated with dead
threads at fork or the ubf_list_lock to be held, so reinitialize
both at startup.

And while we're at it, use a static initializer at startup
to save a library call and kill some ifdef.

[ruby-core:88578] [Bug #15013]
------------------------------------------------------------------------
r64484 | normal | 2018-08-21 05:45:40 +0900 (Tue, 21 Aug 2018) | 6 lines

test/socket/test_socket.rb (timestamp_retry_rw): IO.select before recvmsg

CI failures are still happening from these tests, but try
to break out of it earlier instead of holding up the job.

[Bug #14898]
------------------------------------------------------------------------
r64483 | eregon | 2018-08-21 00:48:27 +0900 (Tue, 21 Aug 2018) | 4 lines

Try 4 times for WIN32OLE specs

* They seem to fail a lot on:
  http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/recent.html
------------------------------------------------------------------------
r64482 | eregon | 2018-08-21 00:41:00 +0900 (Tue, 21 Aug 2018) | 6 lines

Revert r64471

* This reverts commit 9ab04897bd06767f773b35c6958a0551981093aa:
  "don't run specs add at r64409 on Windows"
* It doesn't seem to help:
  http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/recent.html
------------------------------------------------------------------------
r64481 | svn | 2018-08-21 00:34:00 +0900 (Tue, 21 Aug 2018) | 1 line

* 2018-08-21
------------------------------------------------------------------------
r64480 | kazu | 2018-08-21 00:33:59 +0900 (Tue, 21 Aug 2018) | 1 line

Remove extra semicolon
------------------------------------------------------------------------
r64479 | kazu | 2018-08-20 17:24:55 +0900 (Mon, 20 Aug 2018) | 6 lines

Update link to Email address specification

The current link leads to 404, I updated to the actual one.

[Fix GH-1929] [ci skip]
Author:    Nikolay Belov <travelerspb@gmail.com>
------------------------------------------------------------------------
r64478 | normal | 2018-08-20 10:43:10 +0900 (Mon, 20 Aug 2018) | 27 lines

spec/ruby/core/io/select_spec.rb: workaround stuck IO.select

Under pipe page memory pressure on Linux, a pipe may only be
created with a single buffer[1].  And as of Linux v4.18, the
fs/pipe.c::pipe_poll callback does not account for merging
done in fs/pipe::pipe_write; only the number of usable buffers
in the pipe.  Thus it is possible for a pipe to be writable
(if only by a small amount) despite IO.select saying it is not.

With the default 16384 /proc/sys/fs/pipe-user-pages-soft value
and the pipe having 16 pages of buffers, this issue is trivially
reproducible by creating 1024 pipes in a background process
before running the spec:

  $ ulimit -n 2053 # or something higher
  $ ./miniruby -e '1024.times.map { IO.pipe }; sleep' &
  $ make test-spec MSPECOPT=spec/ruby/core/io/select_spec.rb

So, we create a new pipe we never write to for testing
writability of IO.select.  This may cause the test to fail with
ENFILE on an overloaded system, but at least that's an obvious
failure (unlike having a test get stuck).  This should reduce
failures on our overloaded CI machines:

   http://ci.rvm.jp/results/trunk-nopara@silicon-docker/1239426

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/pipe.c?h=v4.18#n642
------------------------------------------------------------------------
r64477 | normal | 2018-08-20 08:36:23 +0900 (Mon, 20 Aug 2018) | 3 lines

thread_sync.c (rb_condvar_initialize): remove extra semicolon

Oops :x
------------------------------------------------------------------------
r64476 | normal | 2018-08-20 07:20:22 +0900 (Mon, 20 Aug 2018) | 13 lines

thread_sync.c (rb_mutex_sleep): disable interrupt checking in ensure

This is needed to reliably fix ConditionVariable#wait on Thread#kill
[Bug #14999] because there is still a chance an interrupt could fire
and prevent lock acquisition after an ensure statement.

Arguably, rb_mutex_lock itself should be uninterruptible, but that
already prevents bootstraptest/test_thread.rb from completing and
probably breaks existing use cases.

For reference, POSIX expressly forbids EINTR from pthread_mutex_lock.

[ruby-core:88556] [Bug #14999]
------------------------------------------------------------------------
r64475 | normal | 2018-08-20 05:40:42 +0900 (Mon, 20 Aug 2018) | 4 lines

thread.c (rb_thread_fd_select): fix off-by-one with sigwait_fd

select(2) needs the nfds argument to be one higher than the
largest FD in the sets :x
------------------------------------------------------------------------
r64474 | normal | 2018-08-20 05:16:15 +0900 (Mon, 20 Aug 2018) | 4 lines

thread_sync.rb (rb_condvar_wait): golf out unnecessary variables

GCC is smart enough to optimize these away, but my attention
span is too short :{
------------------------------------------------------------------------
r64473 | svn | 2018-08-20 05:16:10 +0900 (Mon, 20 Aug 2018) | 1 line

* 2018-08-20
------------------------------------------------------------------------
r64472 | normal | 2018-08-20 05:16:09 +0900 (Mon, 20 Aug 2018) | 1 line

test/ruby/test_io.rb (test_select_leak): quiet unused variable warning
------------------------------------------------------------------------
r64471 | naruse | 2018-08-19 22:25:11 +0900 (Sun, 19 Aug 2018) | 3 lines

don't run specs add at r64409 on Windows

Maybe it breaks http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20180817T095734Z.fail.html.gz
------------------------------------------------------------------------
r64470 | eregon | 2018-08-19 22:23:49 +0900 (Sun, 19 Aug 2018) | 4 lines

select() on all platforms for Socket#recvmsg_nonblock spec

* The specs above already do that, and Solaris needs it too:
  https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20180819T111806Z.fail.html.gz
------------------------------------------------------------------------
r64469 | nobu | 2018-08-19 10:55:27 +0900 (Sun, 19 Aug 2018) | 1 line

NEWS: categorized new entries all
------------------------------------------------------------------------
r64468 | kazu | 2018-08-19 10:33:33 +0900 (Sun, 19 Aug 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r64467 | normal | 2018-08-19 09:01:08 +0900 (Sun, 19 Aug 2018) | 13 lines

thread_pthread.c: reset timeslice delay when uncontended

This matches the behavior of old timer thread more closely
and seems to fix [Bug #14999] when limited to a single CPU.
I cannot reproduce the error on a multi-core system unless
I use schedtool to force affinity to a single CPU:

schedtool -a 0x01 -e make test-spec \
	MSPECOPT='-R1000 spec/ruby/library/conditionvariable/wait_spec.rb'

While it may be good enough to pass the spec, I don't have
huge degree of confidence in the interrupt handling robustness
under extremely heavy load (these may be ancient bugs, though).
------------------------------------------------------------------------
r64466 | normal | 2018-08-19 09:01:03 +0900 (Sun, 19 Aug 2018) | 3 lines

Revert "thread_sync.c (rb_mutex_sleep): skip interrupt check before sleep"

This reverts commit 2e420b8b99db4a5b81e2deda1ca386d59ad6bcba (r64464)
------------------------------------------------------------------------
r64465 | eregon | 2018-08-19 08:49:34 +0900 (Sun, 19 Aug 2018) | 1 line

Guard spec which only works on Linux
------------------------------------------------------------------------
r64464 | normal | 2018-08-19 05:04:07 +0900 (Sun, 19 Aug 2018) | 5 lines

thread_sync.c (rb_mutex_sleep): skip interrupt check before sleep

We do not want to risk switching threads before going to sleep
because it can cause unexpected wakeups and put us in an
unexpected state when used with ConditionVariable.
------------------------------------------------------------------------
r64463 | eregon | 2018-08-19 04:37:46 +0900 (Sun, 19 Aug 2018) | 3 lines

Special case for Solaris 11x on RubyCI

* Where localhost is an alias but not the primary name of 127.0.0.1.
------------------------------------------------------------------------
r64462 | eregon | 2018-08-19 04:37:29 +0900 (Sun, 19 Aug 2018) | 4 lines

Be more flexible in the protocol value returned by getaddrinfo()

* Only Solaris 2.10 i386 and Windows seem to return 0 it and other
  Solaris seem to fill the value.
------------------------------------------------------------------------
r64461 | eregon | 2018-08-19 04:37:12 +0900 (Sun, 19 Aug 2018) | 1 line

Adapt pack_sockaddr_in specs for Solaris
------------------------------------------------------------------------
r64460 | eregon | 2018-08-19 04:36:57 +0900 (Sun, 19 Aug 2018) | 3 lines

Use ftp for the service in getaddrinfo/getnameinfo/getservbyname specs

* Solaris cannot resolve 'http' but can resolve 'ftp'.
------------------------------------------------------------------------
r64459 | eregon | 2018-08-19 04:36:41 +0900 (Sun, 19 Aug 2018) | 1 line

Simplify to a more standardized Socket SCM constant in specs
------------------------------------------------------------------------
r64458 | eregon | 2018-08-19 04:36:26 +0900 (Sun, 19 Aug 2018) | 1 line

Add guards for Solaris for socket specs
------------------------------------------------------------------------
r64457 | eregon | 2018-08-19 04:36:10 +0900 (Sun, 19 Aug 2018) | 1 line

Adapt spec to consider Solaris
------------------------------------------------------------------------
r64456 | eregon | 2018-08-19 04:35:54 +0900 (Sun, 19 Aug 2018) | 4 lines

Use 127.0.0.1 instead of localhost in Addrinfo specs

* Solaries doesn't support Addrinfo.getaddrinfo('localhost', 80),
  but supports Addrinfo.getaddrinfo('127.0.0.1', 80).
------------------------------------------------------------------------
r64455 | eregon | 2018-08-19 04:35:37 +0900 (Sun, 19 Aug 2018) | 4 lines

Accept TypeError for Socket#getnameinfo

* Happens when VALIDATE_SOCKLEN() actually checks the length such as on
  FreeBSD.
------------------------------------------------------------------------
r64454 | eregon | 2018-08-19 04:35:20 +0900 (Sun, 19 Aug 2018) | 4 lines

Always set autoclose=false for IO.for_fd fds

* I believe this should be default behavior, see [Feature #2250].
* Now make test-spec MSPECOPT='-R100 spec/ruby/library/socket' works fine.
------------------------------------------------------------------------
r64453 | svn | 2018-08-19 04:35:03 +0900 (Sun, 19 Aug 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64452 | eregon | 2018-08-19 04:35:02 +0900 (Sun, 19 Aug 2018) | 5 lines

Re-add socket specs

* This reverts commit df9521fd043df1fb862e46f9b1af83223f16eb2d:
  "Remove failing spec files"
* Platform guards follow in the next commits.
------------------------------------------------------------------------
r64451 | normal | 2018-08-19 04:03:44 +0900 (Sun, 19 Aug 2018) | 6 lines

Revert "thread.c (sleep_*): check interrupt before changing th->status"

This reverts commit 9e59487a38d914275bedcde723923f22b3779e59 (r64449)

More (but different) CI failures I can't reproduce locally...
http://ci.rvm.jp/results/trunk-test@ruby-sky3/1235951
------------------------------------------------------------------------
r64450 | svn | 2018-08-19 03:29:29 +0900 (Sun, 19 Aug 2018) | 1 line

* 2018-08-19
------------------------------------------------------------------------
r64449 | normal | 2018-08-19 03:29:28 +0900 (Sun, 19 Aug 2018) | 8 lines

thread.c (sleep_*): check interrupt before changing th->status

Having threads switch before we sleep can cause applications
to misread the state of the thread.  Now, we are consistent
with blocking_region_begin behavior and change th->status
AFTER checking interrupts.

Maybe this can fix [Bug #15002]
------------------------------------------------------------------------
r64448 | eregon | 2018-08-18 22:52:53 +0900 (Sat, 18 Aug 2018) | 7 lines

Revert r64441

* This reverts commit 647fc1227a4146ecbfeb0d59358abc8d99cd8ae6:
  "thread_sync.c (rb_mutex_synchronize): only unlock if we own the mutex"
* Let's try to preserve the semantics of always being locked inside
  Mutex#synchronize, even if an exception interrupts ConditionVariable#wait.
* As discussed on [Bug #14999].
------------------------------------------------------------------------
r64447 | naruse | 2018-08-18 21:35:28 +0900 (Sat, 18 Aug 2018) | 4 lines

Temporary revert "process.c: dead code when no SIGCHLD"

This reverts commit r64407.
Maybe it breaks http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20180817T095734Z.fail.html.gz
------------------------------------------------------------------------
r64446 | nobu | 2018-08-18 18:56:43 +0900 (Sat, 18 Aug 2018) | 1 line

NEWS: quote false [ci skip]
------------------------------------------------------------------------
r64445 | nobu | 2018-08-18 18:53:11 +0900 (Sat, 18 Aug 2018) | 4 lines

NEWS: converted to Markdown [ci skip]

* NEWS: Converted to Markdown format, from (wrongly) Markdown-mixed
  RDoc format.
------------------------------------------------------------------------
r64444 | normal | 2018-08-18 18:07:36 +0900 (Sat, 18 Aug 2018) | 10 lines

thread.c (sleep_*): reduce the effect of spurious interrupts

Spurious interrupts from SIGCHLD cause Mutex#sleep (via
ConditionVariable#wait) to return early and breaks some use
cases.  Since these are outside the programs's control with
MJIT, we will only consider pending interrupts (e.g. those
from Thread#run) and signals which cause a Ruby-level Signal.trap
handler to fire as "spurious" wakeups.

[ruby-core:88537] [Feature #15002]
------------------------------------------------------------------------
r64442 | kazu | 2018-08-18 16:26:23 +0900 (Sat, 18 Aug 2018) | 1 line

[DOC] Fix indent [ci skip]
------------------------------------------------------------------------
r64441 | normal | 2018-08-18 15:33:49 +0900 (Sat, 18 Aug 2018) | 14 lines

thread_sync.c (rb_mutex_synchronize): only unlock if we own the mutex

If an exception is raised inside Mutex#sleep (via ConditionVariable#wait),
we cannot guarantee we can own the mutex in the ensure callback.

However, who owns the mutex at that point does not matter.  What
matters is the Mutex is usable after an exception occurs.

* thread_sync.c (rb_mutex_synchronize): only unlock if we own the mutex

* spec/ruby/library/conditionvariable/wait_spec.rb: only test lock
  usability after thread kill.  Who owns the lock at any
  particular moment is an implementation detail which we cannot
  easily guarantee.
------------------------------------------------------------------------
r64440 | normal | 2018-08-18 15:05:17 +0900 (Sat, 18 Aug 2018) | 5 lines

Revert "thread_sync.c (do_sleep): avoid thread-switch/interrupt check"

This reverts commit d7ddbff2954ba22b71bdfeba4b94e1c4fb91efb0 (r64436)

Seems worthless at preventing CI failures
------------------------------------------------------------------------
r64436 | normal | 2018-08-18 13:24:31 +0900 (Sat, 18 Aug 2018) | 13 lines

thread_sync.c (do_sleep): avoid thread-switch/interrupt check

Calling rb_mutex_sleep directly should avoid
thread-switching/interrupt checking which can lead to occasional
failures.

Unfortunately, this means overriding Mutex#sleep is no longer
supported.  Will let this commit run for a bit see if CI failures
from ConditionVariable specs continue...

cf. https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu/ruby-trunk/log/20180817T213003Z.fail.html.gz

[ruby-core:88524] [Bug #14999]
------------------------------------------------------------------------
r64433 | kazu | 2018-08-18 13:09:48 +0900 (Sat, 18 Aug 2018) | 1 line

Suppress read of ~/.irbrc
------------------------------------------------------------------------
r64429 | nobu | 2018-08-18 11:44:35 +0900 (Sat, 18 Aug 2018) | 1 line

test/ruby/test_system.rb: suppress prompt and echo on Windows
------------------------------------------------------------------------
r64427 | k0kubun | 2018-08-18 11:20:46 +0900 (Sat, 18 Aug 2018) | 3 lines

test/lib/zombie_hunter.rb: enable zombie hunter for MJIT

I think this issue is solved by Eric Wong.
------------------------------------------------------------------------
r64426 | k0kubun | 2018-08-18 11:15:41 +0900 (Sat, 18 Aug 2018) | 6 lines

test_function.rb: try running test_nogvl_poll again

According to some runs in mjit-test (make test-all RUN_OPTS="--jit-wait"),
this test might not be the cause of its failure.

So, let me try running this again.
------------------------------------------------------------------------
r64425 | k0kubun | 2018-08-18 11:04:44 +0900 (Sat, 18 Aug 2018) | 4 lines

tool/downloader.rb: retry 500 from GitHub

Unfortunately, GitHub may return 500 for temporary failure:
https://travis-ci.org/ruby/ruby/builds/417246523
------------------------------------------------------------------------
r64424 | k0kubun | 2018-08-18 10:10:03 +0900 (Sat, 18 Aug 2018) | 9 lines

mjit_worker.c: revert r64322 and r64323

I gave up to introduce the optimization that skips pc motion by checking
C code's line number. The same code can often be shared by multiple
program counters and it's so hard to achieve the optimization in MJIT's
architecture.

Reverting to improve performance by removing -g1 and to remove so file
when it becomes not necessary.
------------------------------------------------------------------------
r64423 | svn | 2018-08-18 08:51:48 +0900 (Sat, 18 Aug 2018) | 1 line

* 2018-08-18
------------------------------------------------------------------------
r64422 | eregon | 2018-08-18 08:51:47 +0900 (Sat, 18 Aug 2018) | 3 lines

Guard spec failing on Solaris

* https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20180817T182406Z.fail.html.gz
------------------------------------------------------------------------
r64417 | eregon | 2018-08-17 23:52:18 +0900 (Fri, 17 Aug 2018) | 1 line

Add guard for Solaris in Socket#connect_nonblock spec
------------------------------------------------------------------------
r64416 | eregon | 2018-08-17 22:07:37 +0900 (Fri, 17 Aug 2018) | 1 line

Guard connect_nonblock spec on FreeBSD
------------------------------------------------------------------------
r64415 | eregon | 2018-08-17 22:07:24 +0900 (Fri, 17 Aug 2018) | 1 line

Guard with a :pktinfo feature specs relying on PKTINFO
------------------------------------------------------------------------
r64414 | eregon | 2018-08-17 22:07:11 +0900 (Fri, 17 Aug 2018) | 4 lines

Re-add specs

* This reverts commit 325fd389018897bd156837639675517ef3b7dea5.
* Platform guards in the next commit.
------------------------------------------------------------------------
r64413 | eregon | 2018-08-17 20:22:55 +0900 (Fri, 17 Aug 2018) | 1 line

Add a note how to run specs under older Ruby versions
------------------------------------------------------------------------
r64412 | eregon | 2018-08-17 20:22:43 +0900 (Fri, 17 Aug 2018) | 1 line

Fix typo in version guard
------------------------------------------------------------------------
r64411 | eregon | 2018-08-17 20:22:30 +0900 (Fri, 17 Aug 2018) | 3 lines

Add version guards for Enumerator::ArithmeticSequence

* And keep specs for older versions.
------------------------------------------------------------------------
r64410 | eregon | 2018-08-17 19:14:01 +0900 (Fri, 17 Aug 2018) | 1 line

spec/README.md: add a note about version guards
------------------------------------------------------------------------
r64409 | eregon | 2018-08-17 18:51:26 +0900 (Fri, 17 Aug 2018) | 3 lines

Integrate new specs for ConditionVariable#wait to prevent regressions

* See [Bug #14999].
------------------------------------------------------------------------
r64408 | normal | 2018-08-17 16:47:26 +0900 (Fri, 17 Aug 2018) | 3 lines

NEWS: clarify that we still use FD_CLOEXEC [ci skip]

[Misc #14907]
------------------------------------------------------------------------
r64407 | nobu | 2018-08-17 14:59:45 +0900 (Fri, 17 Aug 2018) | 6 lines

process.c: dead code when no SIGCHLD

* process.c (ruby_waitpid_all): nothing to do unless SIGCHLD is
  available.

* signal.c (ruby_nocldwait): used only if SIGCHLD is available.
------------------------------------------------------------------------
r64406 | kazu | 2018-08-17 13:01:12 +0900 (Fri, 17 Aug 2018) | 1 line

[DOC] Add ticket number [ci skip]
------------------------------------------------------------------------
r64405 | kazu | 2018-08-17 13:00:09 +0900 (Fri, 17 Aug 2018) | 1 line

[DOC] Update NEWS about close_others [ci skip]
------------------------------------------------------------------------
r64404 | mame | 2018-08-17 12:36:01 +0900 (Fri, 17 Aug 2018) | 1 line

vm.c: add a simple rdoc for RubyVM
------------------------------------------------------------------------
r64403 | normal | 2018-08-17 11:06:54 +0900 (Fri, 17 Aug 2018) | 5 lines

thread_pthread.c (rb_sigwait_fd_get): skip getpid check

This is not called in signal handlers, so there's no reason for
it.  glibc 2.25+ no longer caches getpid(), so it will cost a
syscall for those users.
------------------------------------------------------------------------
r64402 | nobu | 2018-08-17 10:39:49 +0900 (Fri, 17 Aug 2018) | 4 lines

signal.c: no SIGCHLD, no sigchld_hit

* signal.c (sigchld_hit): if SIGCHLD is not available, this variable
  never sets.
------------------------------------------------------------------------
r64401 | nobu | 2018-08-17 10:37:58 +0900 (Fri, 17 Aug 2018) | 1 line

ast.c (rb_ast_node_type): return frozen strings
------------------------------------------------------------------------
r64400 | nobu | 2018-08-17 10:14:37 +0900 (Fri, 17 Aug 2018) | 1 line

passing non-stdio fds is not supported on Windows
------------------------------------------------------------------------
r64399 | normal | 2018-08-17 08:56:08 +0900 (Fri, 17 Aug 2018) | 15 lines

process.c: defaults to close_others false

Arbitrarily closing file descriptors on exec breaks use cases
where a Ruby process sets up a descriptor for non-Ruby children
to use.  For example, the "rake foo" target may spawn any number
of subprocesses (Ruby or not) which depends on parsing the "FOO"
environment variable for out_fd:99 and writing to foo.out

    FOO=out_fd:99 rake foo 99>>foo.out

Unfortunately, this introduced one incompatibility in
test/lib/test/unit.rb and it now requires explicitly setting
IO#close_on_exec=true

[ruby-core:88007] [Misc #14907]
------------------------------------------------------------------------
r64398 | normal | 2018-08-17 04:59:21 +0900 (Fri, 17 Aug 2018) | 15 lines

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]
------------------------------------------------------------------------
r64397 | nobu | 2018-08-17 01:11:55 +0900 (Fri, 17 Aug 2018) | 1 line

Makefile.sub: remove -DRUBY_EXPORT overridden by -U option
------------------------------------------------------------------------
r64396 | svn | 2018-08-17 01:11:55 +0900 (Fri, 17 Aug 2018) | 1 line

* 2018-08-17
------------------------------------------------------------------------
r64395 | nobu | 2018-08-17 01:11:54 +0900 (Fri, 17 Aug 2018) | 1 line

appveyor.yml: run on all branches
------------------------------------------------------------------------
r64394 | kazu | 2018-08-16 21:14:11 +0900 (Thu, 16 Aug 2018) | 1 line

Remove outdated comment [ci skip]
------------------------------------------------------------------------
r64393 | naruse | 2018-08-16 19:50:53 +0900 (Thu, 16 Aug 2018) | 1 line

skip examples failing on solaris
------------------------------------------------------------------------
r64392 | nobu | 2018-08-16 18:46:20 +0900 (Thu, 16 Aug 2018) | 5 lines

configure.ac: LIBPATHENV on macOS

* configure.ac (LIBPATHENV): use DYLD_FALLBACK_LIBRARY_PATH instead of
  DYLD_LIBRARY_PATH on macOS, to honor runtime paths embedded in the
  binaries.  [ruby-core:88487] [Bug #14992]
------------------------------------------------------------------------
r64391 | nobu | 2018-08-16 18:27:53 +0900 (Thu, 16 Aug 2018) | 4 lines

Makefile.in: dependencies to config.status

* Makefile.in (ruby.pc, ruby-runner.h): fix missing dependencies.
  config.status is needed to be up to date, to run it.
------------------------------------------------------------------------
r64390 | normal | 2018-08-16 18:16:11 +0900 (Thu, 16 Aug 2018) | 5 lines

thread.c (consume_communication_pipe): disarm UBF_TIMER before consume

Same reasoning as the disarm in rb_sigwait_fd_get, the current
thread is already processing signals, so we do not need
UBF_TIMER to continually kick the process, anymore.
------------------------------------------------------------------------
r64389 | normal | 2018-08-16 17:26:56 +0900 (Thu, 16 Aug 2018) | 5 lines

thread_pthread.c: reduce ubf_timer arming for non-signal wakeups

We do not need to rely on SIGVTALRM for non-sighandler wakeups.
This will reduce spurious wakeups in cases where sigwait_fd
is not grabbed again, soon.
------------------------------------------------------------------------
r64388 | normal | 2018-08-16 17:26:51 +0900 (Thu, 16 Aug 2018) | 8 lines

thread_pthread.c: check signals from gvl.timer

For (rare) blocking functions which are not affected by signals,
we need to call the appropriate unblocking function via
`threadptr_trap_interrupt'

While we're at it, handling waitpid/SIGCHLD from gvl.timer isn't
harmful, here.
------------------------------------------------------------------------
r64387 | normal | 2018-08-16 12:37:14 +0900 (Thu, 16 Aug 2018) | 13 lines

test/net/imap/test_imap.rb (test_exception_during_idle): kill infinite looper

It is possible for Mutex#sleep (via ConditionVariable#wait)
to prematurely wake up under MJIT (because Mutex#sleep can't
handle spurious wakeups).  This affects @idle_done_cond in
Net::IMAP#idle and means the response handler may never
set `in_idle' to `true`.

In any case, ensure the infinite looping `raiser' thread
stops running when the test is done.

Will work on reducing the effect of spurious wakeups from
MJIT...
------------------------------------------------------------------------
r64386 | svn | 2018-08-16 09:58:22 +0900 (Thu, 16 Aug 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64385 | nobu | 2018-08-16 09:58:21 +0900 (Thu, 16 Aug 2018) | 7 lines

Adding Enumerator::Lazy#uniq and Enumerator::Lazy#grep_v to proc chaining

[Feature #14994]

[Fix GH-1930]

From: Anmol Chopra <chopraanmol1@gmail.com>
------------------------------------------------------------------------
r64384 | nobu | 2018-08-16 09:13:47 +0900 (Thu, 16 Aug 2018) | 1 line

enumerator.c: id_lazy is no longer used since r38923
------------------------------------------------------------------------
r64383 | nobu | 2018-08-16 09:05:08 +0900 (Thu, 16 Aug 2018) | 1 line

apply r64239 to macOS too
------------------------------------------------------------------------
r64382 | svn | 2018-08-16 03:56:35 +0900 (Thu, 16 Aug 2018) | 1 line

* 2018-08-16
------------------------------------------------------------------------
r64381 | normal | 2018-08-16 03:56:34 +0900 (Thu, 16 Aug 2018) | 3 lines

test/ripper/test_parser_events.rb (test_block_variables): bump RLIMIT_AS again

I still seem to need more memory for parallel tests with MJIT...
------------------------------------------------------------------------
r64380 | akr | 2018-08-15 23:24:44 +0900 (Wed, 15 Aug 2018) | 2 lines

gmtimew_noleapsecond uses tables for mon and mday.

------------------------------------------------------------------------
r64379 | nobu | 2018-08-15 21:53:45 +0900 (Wed, 15 Aug 2018) | 1 line

spec/ruby/optional/capi/ext/io_spec.c: guard unreachable code
------------------------------------------------------------------------
r64378 | nobu | 2018-08-15 20:01:30 +0900 (Wed, 15 Aug 2018) | 1 line

spec/ruby/optional/capi/ext/io_spec.c: guard unreachable code
------------------------------------------------------------------------
r64377 | normal | 2018-08-15 16:16:55 +0900 (Wed, 15 Aug 2018) | 5 lines

thread_pthread.c: hoist out do_gvl_timer and improve documentation

This hopefully clarifies the roles of UBF_TIMER and vm->gvl.timer

[ruby-core:88475] [Misc #14937]
------------------------------------------------------------------------
r64376 | normal | 2018-08-15 14:54:41 +0900 (Wed, 15 Aug 2018) | 6 lines

vm_core.h (rb_thread_t): pack small fields together

On a 64-bit system, this reduces rb_thread_t from 536 to 520 bytes.
Depending on the allocation, this can reduce cacheline access
for checking the abort_on_exception, report_on_exception and
pending_interrupt_queue_checked flags.
------------------------------------------------------------------------
r64375 | normal | 2018-08-15 14:31:31 +0900 (Wed, 15 Aug 2018) | 6 lines

thread_pthread.h (native_thread_data): split list_node between ubf and gvl

Do not waste extra memory for each thread, but make
thread_pthread.c easier-to-follow as a result.

[ruby-core:88475] [Misc #14937]
------------------------------------------------------------------------
r64374 | k0kubun | 2018-08-15 13:51:10 +0900 (Wed, 15 Aug 2018) | 11 lines

test_function.rb: skip running test

that times out with test-all w/ --jit-wait.

I'm running the following command on Wecker CI everyday:
```
make test-all TESTOPTS="--color=never --job-status=normal" RUN_OPTS="--disable-gems --jit-wait --jit-warnings" RUBY_FORCE_TEST_JIT=1
```

By running yesterday's all commits, r64354 ran successfully but r64355
didn't. So the test should be fixed to run with --jit-wait at first.
------------------------------------------------------------------------
r64373 | normal | 2018-08-15 13:32:46 +0900 (Wed, 15 Aug 2018) | 7 lines

thread_pthread.c: rename rb_timer_* to ubf_timer_*

These functions will not be exported outside of thread_pthread.c
and we need to clarify the timer here is used for ubf and not
timeslice.

[ruby-core:88475] [Misc #14937]
------------------------------------------------------------------------
r64372 | normal | 2018-08-15 13:32:41 +0900 (Wed, 15 Aug 2018) | 5 lines

thread_pthread.c: rename timer_thread_pipe to signal_self_pipe

This data structure has nothing to do with timers or threads.

[ruby-core:88475] [Misc #14937]
------------------------------------------------------------------------
r64371 | normal | 2018-08-15 13:32:36 +0900 (Wed, 15 Aug 2018) | 5 lines

thread_pthread.c: additional UBF_TIMER == UBF_TIMER_PTHREAD guards

Hopefully this makes the code easier-to-follow

[ruby-core:88475] [Misc #14937]
------------------------------------------------------------------------
r64370 | nobu | 2018-08-15 13:10:19 +0900 (Wed, 15 Aug 2018) | 1 line

appveyor.yml: no MSYS path conversion
------------------------------------------------------------------------
r64369 | k0kubun | 2018-08-15 12:03:18 +0900 (Wed, 15 Aug 2018) | 5 lines

test_readline.rb: skip teardown failure

https://ci.appveyor.com/project/ruby/ruby/build/9271/job/e88212s136mr0dgr

I'll take a look at MSP-Greg's patch on readline later.
------------------------------------------------------------------------
r64368 | nobu | 2018-08-15 11:15:13 +0900 (Wed, 15 Aug 2018) | 1 line

appveyor.yml: get rid of msys sh as possible
------------------------------------------------------------------------
r64367 | nobu | 2018-08-15 11:05:20 +0900 (Wed, 15 Aug 2018) | 1 line

-Wsuggest-attribute=noreturn on io_spec_rb_io_wait_readable
------------------------------------------------------------------------
r64366 | k0kubun | 2018-08-15 10:55:09 +0900 (Wed, 15 Aug 2018) | 5 lines

test_env.rb: change mingw branch

https://github.com/MSP-Greg/ruby-loco/blob/e287cb739113da289271a017a1e7fa46cbfe47d9/patches/gte20600/test-ruby-test_env.rb_test_huge_value.patch

From: MSP-Greg (Greg L) <Greg.mpls@gmail.com>
------------------------------------------------------------------------
r64365 | k0kubun | 2018-08-15 10:40:57 +0900 (Wed, 15 Aug 2018) | 3 lines

skip tests failing on AppVeyor MinGW

Let me skip this to make CI green first and take a look later...
------------------------------------------------------------------------
r64364 | k0kubun | 2018-08-15 08:23:44 +0900 (Wed, 15 Aug 2018) | 4 lines

appveyor.yml: remove broken --name option

Currently all tests are skipped by the --name option.
V=1 is for debugging this issue.
------------------------------------------------------------------------
r64363 | normal | 2018-08-15 08:00:02 +0900 (Wed, 15 Aug 2018) | 7 lines

webrick/httpauth/htgroup.rb (flush): avoid unnecessary unlink

Based on patch by akr [ruby-core:88477], use Tempfile.create
to avoid unnecessary unlink call.  Unlike akr's original patch,
this does not change the return value of flush.

Thanks-to: Tanaka Akira <akr@fsij.org>
------------------------------------------------------------------------
r64362 | normal | 2018-08-15 07:59:57 +0900 (Wed, 15 Aug 2018) | 6 lines

Revert "test/lib/leakchecker.rb (find_tempfiles): don't warn for missing files"

This reverts commit 52102f6ff50eebf8c16667c9b49cef579d2057c1 (r64238).

It is no longer necessary if we use Tempfile.create in
WEBrick::HTTPAuth::Htgroup#flush (see next commit)
------------------------------------------------------------------------
r64361 | normal | 2018-08-15 07:06:40 +0900 (Wed, 15 Aug 2018) | 6 lines

Revert "thread_pthread.c: use UBF_TIMER_PTHREAD on Solaris"

This reverts commit 31bfe0fe86433beddfec2b2bdba69dfda1775f8d (r64357)

commit 17ed23bb6dfc942a8c51658b01135c3e2807ccf0 (r64359,
"fix fragile spec from unpredictable errno") is the correct fix
------------------------------------------------------------------------
r64360 | svn | 2018-08-15 02:07:37 +0900 (Wed, 15 Aug 2018) | 1 line

* 2018-08-15
------------------------------------------------------------------------
r64359 | normal | 2018-08-15 02:07:36 +0900 (Wed, 15 Aug 2018) | 12 lines

spec/ruby/optional/capi/io_spec.rb: fix fragile spec from unpredictable errno

rb_io_wait_readable and rb_io_wait_writable depend on the TSD
errno value.  Due to the recent changes in r64352-r64353 to
restructure GVL, errno could be set to EAGAIN from the signal
self-pipe and cause the rb_io_wait_readable spec to block
unexpectedly.  This should fix rubyspec timeouts on Solaris:

  http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180814T042506Z.fail.html.gz

* spec/ruby/optional/capi/ext/io_spec.c: add errno= setter method
* spec/ruby/optional/capi/io_spec.rb: set errno to appropriate values for tests
------------------------------------------------------------------------
r64358 | nobu | 2018-08-14 20:58:17 +0900 (Tue, 14 Aug 2018) | 5 lines

non-symbol keys in kwargs

* class.c (separate_symbol): [EXPERIMENTAL] non-symbol key in keyword
  arguments hash causes an exception now.
  c.f. https://twitter.com/yukihiro_matz/status/1022287578995646464
------------------------------------------------------------------------
r64357 | normal | 2018-08-14 15:49:25 +0900 (Tue, 14 Aug 2018) | 8 lines

thread_pthread.c: use UBF_TIMER_PTHREAD on Solaris

I'm not sure what's causing this failure in Solaris and only
on rubyspec, since rb_io_wait_readable is a well-exercised
code path in other places.  But maybe using a pthread for
timing (similar to old timer-thread) can solve the issue.

cf. http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180814T042506Z.fail.html.gz
------------------------------------------------------------------------
r64356 | normal | 2018-08-14 11:24:37 +0900 (Tue, 14 Aug 2018) | 10 lines

thread_pthread.c: use CLOCK_REALTIME on SunOS (Solaris)

timer_create does not seem to support CLOCK_MONOTONIC on Solaris,
and CLOCK_HIRES seems like it could fail with insufficient permissions:

https://docs.oracle.com/cd/E86824_01/html/E54766/timer-create-3c.html

(Only tested on Linux and FreeBSD)

[ruby-core:88360] [Misc #14937]
------------------------------------------------------------------------
r64355 | normal | 2018-08-14 09:31:31 +0900 (Tue, 14 Aug 2018) | 11 lines

test/fiddle/test_function.rb (test_nogvl_poll): stop timer hack

EINTR seems unavoidable in real programs (or MJIT), so maybe
it's not worth dealing with.  r64353 relies on POSIX timers
to signal.

Switching pipes and sockets to non-blocking by default would let
us get rid of POSIX timers, timer pthread and this hack:
https://bugs.ruby-lang.org/issues/14968

[ruby-core:88360] [Misc #14937]
------------------------------------------------------------------------
r64354 | normal | 2018-08-14 07:19:54 +0900 (Tue, 14 Aug 2018) | 6 lines

thread_pthread (rb_timer_arm): ignore UBF_TIMER_POSIX state 2

It looks like I forgot to account for a situation involving 3
threads.

[ruby-core:88360] [Misc #14937]
------------------------------------------------------------------------
r64353 | normal | 2018-08-14 06:34:24 +0900 (Tue, 14 Aug 2018) | 19 lines

thread_pthread: use POSIX timer or thread to get rid of races

This closes race condition where GVL is uncontended and a thread
receives a signal immediately before calling the blocking
function when releasing GVL:

	1) check interrupts
	2) release GVL
	3) blocking function

If signal fires after 1) but before 3), that thread may never
wake up if GVL is uncontended

We also need to wakeup the ubf_list unconditionally on
gvl_yield; because two threads can be yielding to each other
while waiting on IO#close while waiting on threads in IO#read or
IO#gets.

[ruby-core:88360] [Misc #14937]
------------------------------------------------------------------------
r64352 | normal | 2018-08-14 06:34:20 +0900 (Tue, 14 Aug 2018) | 8 lines

thread_pthread.c: eliminate timer thread by restructuring GVL

This reverts commit 194a6a2c68e9c8a3536b24db18ceac87535a6051 (r64203).

Race conditions which caused the original reversion will be fixed
in the subsequent commit.

[ruby-core:88360] [Misc #14937]
------------------------------------------------------------------------
r64351 | naruse | 2018-08-14 04:12:23 +0900 (Tue, 14 Aug 2018) | 9 lines

FreeBSD 11.0 lacks ELFCOMPRESS_ZLIB

FreeBSD 11.0 unfortunately lacks ELF compression definitions in their
elf.h (sys/elf_common.h), and 11.1 introduced them.
https://github.com/freebsd/freebsd/commit/b9167d33a12b8a6c279be9cd1005874728e808c9

Though we can add workaround, we simply drop support because
FreeBSD 11.0 is already EOL at November 30, 2017.
https://www.freebsd.org/security/unsupported.html
------------------------------------------------------------------------
r64350 | k0kubun | 2018-08-14 01:03:47 +0900 (Tue, 14 Aug 2018) | 5 lines

appveyor.yml: install gdbm

which is missing on AppVeyor environment

https://github.com/ruby/ruby/commit/6a1e323ae88101cfed3fc4591d6e6a3bd8c05f02#commitcomment-30056791
------------------------------------------------------------------------
r64349 | svn | 2018-08-14 00:29:41 +0900 (Tue, 14 Aug 2018) | 1 line

* 2018-08-14
------------------------------------------------------------------------
r64348 | k0kubun | 2018-08-14 00:29:40 +0900 (Tue, 14 Aug 2018) | 1 line

appveyor.yml: add MinGW build
------------------------------------------------------------------------
r64347 | kazu | 2018-08-13 23:54:32 +0900 (Mon, 13 Aug 2018) | 1 line

fix typos [ci skip]
------------------------------------------------------------------------
r64346 | usa | 2018-08-13 23:33:06 +0900 (Mon, 13 Aug 2018) | 2 lines

mention about r64337

------------------------------------------------------------------------
r64345 | usa | 2018-08-13 23:29:21 +0900 (Mon, 13 Aug 2018) | 2 lines

Add some tests for *method_defined?

------------------------------------------------------------------------
r64344 | kazu | 2018-08-13 22:50:48 +0900 (Mon, 13 Aug 2018) | 1 line

Fix test bug
------------------------------------------------------------------------
r64343 | usa | 2018-08-13 22:48:27 +0900 (Mon, 13 Aug 2018) | 4 lines

Fix problem about notimplemented case

Re-revert r64340, and take care about notimplemented case.

------------------------------------------------------------------------
r64342 | k0kubun | 2018-08-13 22:46:06 +0900 (Mon, 13 Aug 2018) | 7 lines

appveyor.yml: drop unnecessary 1.0. prefix

from version.

Also I fixed the wrong way of using `for:`.
Specifying `for` without `matrix.only` was just useless.
This fix is for adding MinGW matrix in the future.
------------------------------------------------------------------------
r64341 | kazu | 2018-08-13 22:27:49 +0900 (Mon, 13 Aug 2018) | 1 line

Add test for method_defined?(notimplement)
------------------------------------------------------------------------
r64340 | kazu | 2018-08-13 22:27:47 +0900 (Mon, 13 Aug 2018) | 1 line

Revert "Support optional inherit argument for Module#method_defined?"
------------------------------------------------------------------------
r64339 | usa | 2018-08-13 21:42:55 +0900 (Mon, 13 Aug 2018) | 2 lines

get rid of an encode noncompatible error

------------------------------------------------------------------------
r64338 | svn | 2018-08-13 21:42:04 +0900 (Mon, 13 Aug 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r64337 | usa | 2018-08-13 21:42:03 +0900 (Mon, 13 Aug 2018) | 51 lines

Support optional inherit argument for Module#method_defined?

Module has many introspection methods for methods and constants that
either return an array or return true or false for whether the method
or constant is defined. Most of these methods support an optional
argument that controls whether to consider inheritance.  Currently,
the following Module methods support such a argument:

* const_defined?
* constants
* instance_methods
* private_instance_methods
* protected_instance_methods
* public_instance_methods

and the following methods do not:

* method_defined?
* private_method_defined?
* protected_method_defined?
* public_method_defined?

This patch supports such an argument for the *method_defined?
methods.

While you can currently work around the lack of support via:

  mod.instance_methods(false).include?(:method_name)

This patch allows the simpler and more efficient:

  mod.method_defined?(:method_name, false)

One case where you want to exclude inheritance when checking
for a method definition is when you want to replace a method
that may already exist.  To avoid a verbose warning, you want
to remove the method only if it is already defined:

  remove_method(:foo) if method_defined?(:foo, false)
  define_method(:foo){}

You can't call remove_method without checking for the method
definition, as that can raise a NameError, and you don't want
to include inheritance because remove_method will still raise
a NameError if the method is defined by an ancestor and not
by the module itself.

[ruby-core:88140] [Feature #14944]

From: Jeremy Evans <code@jeremyevans.net>

------------------------------------------------------------------------
r64336 | kazu | 2018-08-13 21:22:43 +0900 (Mon, 13 Aug 2018) | 3 lines

test/rinda/test_rinda.rb: Start keeper only on used tests

to reduce sleeping threads on unrelated tests
------------------------------------------------------------------------
r64335 | k0kubun | 2018-08-13 20:02:37 +0900 (Mon, 13 Aug 2018) | 3 lines

Makefile.in: drop MJIT_DLDFLAGS_NOCOMPRESS

which is obsoleted by r64331
------------------------------------------------------------------------
r64334 | naruse | 2018-08-13 17:48:30 +0900 (Mon, 13 Aug 2018) | 1 line

Don't free allocated uncompressed_debug_line until backtrace is printed
------------------------------------------------------------------------
r64333 | naruse | 2018-08-13 16:55:43 +0900 (Mon, 13 Aug 2018) | 1 line

Re-apply wrongly reverted r64330
------------------------------------------------------------------------
r64332 | naruse | 2018-08-13 15:31:37 +0900 (Mon, 13 Aug 2018) | 1 line

Define parse_compressed_debug_line() only ifdef SUPPORT_COMPRESSED_DEBUG_LINE
------------------------------------------------------------------------
r64331 | naruse | 2018-08-13 15:20:12 +0900 (Mon, 13 Aug 2018) | 5 lines

support compressed debug_line

re-commit r64328
https://blogs.oracle.com/solaris/elf_section_compression-v2
https://gnu.wildebeest.org/blog/mjw/2016/01/13/elf-libelf-compressed-sections-and-elfutils/
------------------------------------------------------------------------
r64330 | nobu | 2018-08-13 15:09:57 +0900 (Mon, 13 Aug 2018) | 7 lines

configure.ac: use linker_flag to LIBRUBY_DLDFLAGS

* configure.ac: use a feature flag `linker_flag`, than checking if the
  compiler is `GCC`.

* configure.ac: append to LIBRUBY_DLDFLAGS once after initialized with
  DLDFLAGS.
------------------------------------------------------------------------
r64329 | naruse | 2018-08-13 15:05:39 +0900 (Mon, 13 Aug 2018) | 3 lines

Revert "support compressed debug_line"

This reverts commit r64328
------------------------------------------------------------------------
r64328 | naruse | 2018-08-13 11:56:06 +0900 (Mon, 13 Aug 2018) | 4 lines

support compressed debug_line

https://blogs.oracle.com/solaris/elf_section_compression-v2
https://gnu.wildebeest.org/blog/mjw/2016/01/13/elf-libelf-compressed-sections-and-elfutils/
------------------------------------------------------------------------
r64327 | akr | 2018-08-13 01:45:02 +0900 (Mon, 13 Aug 2018) | 2 lines

timegm_noleapsecond uses calc_tm_yday.

------------------------------------------------------------------------
r64326 | k0kubun | 2018-08-13 00:16:00 +0900 (Mon, 13 Aug 2018) | 9 lines

configure.ac: use the correct argument

for --compress-debug-sections. I thought "no" is the correct one because
configure.ac has `AS_IF([test "x$compress_debug_sections" != xno]`, but
it wasn't the case.

This commit is needed to resolve errors like:
/usr/bin/x86_64-linux-gnu-ld: invalid --compress-debug-sections option: `no'
collect2: error: ld returned 1 exit status
------------------------------------------------------------------------
r64325 | k0kubun | 2018-08-13 00:13:06 +0900 (Mon, 13 Aug 2018) | 11 lines

configure.ac: MJIT_DLDFLAGS_NOCOMPRESS

is configured now, to force -Wl,--compress-debug-sections=no
for MJIT only when the option is used in MJIT_DLDFLAGS.

This needs to be done in configure.ac to resolve build failure like
https://travis-ci.org/ruby/ruby/builds/415120662.

Makefile.in: define it in mjit_config.h

mjit_worker.c: replace hard-coded flag to MJIT_DLDFLAGS_NOCOMPRESS
------------------------------------------------------------------------
r64324 | svn | 2018-08-13 00:00:05 +0900 (Mon, 13 Aug 2018) | 1 line

* 2018-08-13
------------------------------------------------------------------------
r64323 | k0kubun | 2018-08-13 00:00:03 +0900 (Mon, 13 Aug 2018) | 6 lines

mjit_worker.c: lazily delete so file

on ELF.

I need symbol name and line number to lazily create program counter for
optimization on ELF binary.
------------------------------------------------------------------------
r64322 | k0kubun | 2018-08-12 23:42:25 +0900 (Sun, 12 Aug 2018) | 6 lines

mjit_worker.c: allow showing line number

on addr2line.c, if --jit-save-temps is specified.

I'm going to use the line number to lazily create program counter to
improve the performance degraded in r64283.
------------------------------------------------------------------------
r64321 | k0kubun | 2018-08-12 21:59:47 +0900 (Sun, 12 Aug 2018) | 3 lines

mjit.c: reduce the number of variables

in mark_ec_units() to simplify code.
------------------------------------------------------------------------
r64318 | nobu | 2018-08-12 17:10:53 +0900 (Sun, 12 Aug 2018) | 5 lines

Optimization for case when with splat operator

[Fix GH-1928] [Feature #14984]

From: chopraanmol1 <chopraanmol1@gmail.com>
------------------------------------------------------------------------
r64317 | k0kubun | 2018-08-12 15:00:31 +0900 (Sun, 12 Aug 2018) | 8 lines

tool/downloader.rb: increase retries

GitHub download failed on 13:50:36
https://ci.appveyor.com/project/ruby/ruby/build/1.0.9221 and it also
failed on 13:51:35 (all builds between them failed too).

It means that we need to expect GitHub 502 that continues 1 minute.
So I configured 6 retries, that will sleep at most 91s in total.
------------------------------------------------------------------------
r64316 | nobu | 2018-08-12 13:50:48 +0900 (Sun, 12 Aug 2018) | 1 line

compile.c: use EXPECT_NODE macro
------------------------------------------------------------------------
r64315 | nobu | 2018-08-12 13:50:14 +0900 (Sun, 12 Aug 2018) | 5 lines

compile.c: check error in when_vals

* compile.c (when_vals): return a negative value on error.

* compile.c (compile_case): check error in when_vals().
------------------------------------------------------------------------
r64314 | k0kubun | 2018-08-12 09:30:04 +0900 (Sun, 12 Aug 2018) | 4 lines

vm_insnhelper.c: revert r64280

This commit caused test-all failure with --jit-wait.
I don't know the reason yet, but let me revert it to normalize CI.
------------------------------------------------------------------------
r64313 | nobu | 2018-08-12 09:28:26 +0900 (Sun, 12 Aug 2018) | 4 lines

skip non-IP interfaces

* spec/ruby/library/socket/socket/getifaddrs_spec.rb: VirtualBox host
  only adapter seems something different than ordinary interfaces.
------------------------------------------------------------------------
r64312 | k0kubun | 2018-08-12 08:40:12 +0900 (Sun, 12 Aug 2018) | 4 lines

vm_insnhelper.c: drop duplicated inline

to resolve warning:
c:\projects\ruby\vm_insnhelper.c(1661) : warning C4141: 'inline' : used more than once
------------------------------------------------------------------------
r64311 | k0kubun | 2018-08-12 08:33:36 +0900 (Sun, 12 Aug 2018) | 4 lines

appveyor.yml: customize icon_url

We're using "x" sign as an icon for incoming webhook, but the success
notification by `on_build_status_changed` should not be an "x" asign.
------------------------------------------------------------------------
r64310 | svn | 2018-08-12 01:25:22 +0900 (Sun, 12 Aug 2018) | 1 line

* 2018-08-12
------------------------------------------------------------------------
r64309 | naruse | 2018-08-12 01:25:21 +0900 (Sun, 12 Aug 2018) | 1 line

fix r64296
------------------------------------------------------------------------
r64308 | k0kubun | 2018-08-11 23:50:21 +0900 (Sat, 11 Aug 2018) | 1 line

test_rubyvm_mjit.rb: skip testing MJIT if not supported
------------------------------------------------------------------------
r64307 | k0kubun | 2018-08-11 23:48:10 +0900 (Sat, 11 Aug 2018) | 1 line

mjit.c: stop defining alias for a very limited use
------------------------------------------------------------------------
r64306 | k0kubun | 2018-08-11 23:44:31 +0900 (Sat, 11 Aug 2018) | 4 lines

mjit.c: drop obsoleted duplicated declaration

of mjit_worker(). It was needed when mjit_worker.c is separated from
mjit.c, but it's now just included.
------------------------------------------------------------------------
r64305 | k0kubun | 2018-08-11 23:36:14 +0900 (Sat, 11 Aug 2018) | 1 line

mjit_worker.c: remove redundant cast for calloc/alloca
------------------------------------------------------------------------
r64304 | k0kubun | 2018-08-11 23:34:05 +0900 (Sat, 11 Aug 2018) | 5 lines

mjit_worker.c: handle calloc failure

Unlike ZALLOC, it's not automatically handled.

mjit.c: ditto
------------------------------------------------------------------------
r64303 | nobu | 2018-08-11 23:32:15 +0900 (Sat, 11 Aug 2018) | 4 lines

test_env.rb: a failure on appveyor

* test/ruby/test_env.rb (test_huge_value): Windows 8 seems having a
  limit on single environment variable.
------------------------------------------------------------------------
r64302 | k0kubun | 2018-08-11 23:27:53 +0900 (Sat, 11 Aug 2018) | 1 line

mjit_worker.c: never trigger GC on MJIT worker
------------------------------------------------------------------------
r64301 | k0kubun | 2018-08-11 23:18:55 +0900 (Sat, 11 Aug 2018) | 5 lines

mjit_worker.c: don't use ruby_strdup

on MJIT worker. That may trigger GC. And handled strdup failure instead.

mjit_compile.c: update comment about GC
------------------------------------------------------------------------
r64300 | nobu | 2018-08-11 23:15:58 +0900 (Sat, 11 Aug 2018) | 1 line

appveyor.yml: show the OS version
------------------------------------------------------------------------
r64299 | k0kubun | 2018-08-11 23:09:26 +0900 (Sat, 11 Aug 2018) | 4 lines

test_rubyvm_mjit.rb: dump output on test_pause

failure. It's failing on mswinci but it's hard to know the cause without
out/err.
------------------------------------------------------------------------
r64298 | k0kubun | 2018-08-11 23:05:34 +0900 (Sat, 11 Aug 2018) | 5 lines

mjit_worker.c: share MJIT warning logic

as mjit_warning().

mjit.c: ditto
------------------------------------------------------------------------
r64297 | naruse | 2018-08-11 22:43:31 +0900 (Sat, 11 Aug 2018) | 1 line

Solaris 10 doesn't have getifaddrs
------------------------------------------------------------------------
r64296 | naruse | 2018-08-11 22:31:43 +0900 (Sat, 11 Aug 2018) | 1 line

Solaris raises EAI_SERVICE if hints.ai_socktype=0
------------------------------------------------------------------------
r64295 | k0kubun | 2018-08-11 22:31:10 +0900 (Sat, 11 Aug 2018) | 4 lines

test_iseq_load.rb: reduce timeout of test_stressful_roundtrip

We should increase RUBY_TEST_SUBPROCESS_TIMEOUT_SCALE for slow
environments, and we configured some CI machines.
------------------------------------------------------------------------
r64294 | nobu | 2018-08-11 22:28:40 +0900 (Sat, 11 Aug 2018) | 5 lines

upgrade the default WINNT version

* configure.ac: set the default target Windows NT version to 0x0600,
  as well as mswin version since r50051.  Windows XP has ended years
  ago.
------------------------------------------------------------------------
r64293 | nobu | 2018-08-11 22:18:55 +0900 (Sat, 11 Aug 2018) | 7 lines

hash.c: env block size limit on Windows

* hash.c (ruby_setenv): do not check environment block size.
  c.f. https://msdn.microsoft.com/en-us/library/windows/desktop/ms682653(v=vs.85).aspx
  Starting with Windows Vista and Windows Server 2008, there is no
  technical limitation on the size of the environment block.
  [ruby-core:88400] [Bug #14979]
------------------------------------------------------------------------
r64292 | k0kubun | 2018-08-11 19:05:56 +0900 (Sat, 11 Aug 2018) | 5 lines

mjit_worker.c: resurrect more static declarations

and remove old mjit_ prefixes again.

mjit.c: ditto
------------------------------------------------------------------------
r64291 | k0kubun | 2018-08-11 18:58:20 +0900 (Sat, 11 Aug 2018) | 5 lines

mjit_worker.c: reorder functions and variables

so that related things are placed closely.

Sorry for mixing them in previous commits...
------------------------------------------------------------------------
r64290 | k0kubun | 2018-08-11 18:48:07 +0900 (Sat, 11 Aug 2018) | 5 lines

mjit.c: make some variables static again

and remove redundant mjit_ prefixes.

mjit_worker.c: ditto
------------------------------------------------------------------------
r64289 | k0kubun | 2018-08-11 18:37:14 +0900 (Sat, 11 Aug 2018) | 12 lines

mjit.c: include mjit_worker.c

instead of linking functions with mjit_worker.o.

In the r64285's structure, we needed to publish some variables with
mjit_ prefix. But ideally those variables should be completely private
in mjit.o (or old mjit_worker.o), and it was hard.

So I chose an approach similar to vm*.c for mjit.c and mjit_worker.c.
I believe mjit_compile.c is still nice to be separated.

After this commit, I'll remove the mjit_ prefix again...
------------------------------------------------------------------------
r64288 | k0kubun | 2018-08-11 17:34:25 +0900 (Sat, 11 Aug 2018) | 5 lines

mjit.c: exclude mjit_valid_class_serial_p

from mjit.c because it's executed only on MJIT worker thread.

Instead of that, `valid_class_serials` is shared with mjit_ prefix.
------------------------------------------------------------------------
r64287 | k0kubun | 2018-08-11 17:07:13 +0900 (Sat, 11 Aug 2018) | 7 lines

mjit_worker.c: prefix mjit_ to pch_status

which was just forgotten.

mjit.c: ditto

mjit_internal.h: moved some macros only used by mjit_worker.c to it.
------------------------------------------------------------------------
r64286 | svn | 2018-08-11 16:57:59 +0900 (Sat, 11 Aug 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64285 | k0kubun | 2018-08-11 16:57:58 +0900 (Sat, 11 Aug 2018) | 11 lines

mjit_worker.c: carve out worker-related code

The motivation of this change is to make sure rb_funcall or GC-related
functions are not called on worker-related code. Currently such
functions are used in some places and I believe it's partly because it's
hard to identify which part is called on MJIT worker thread.

Now, mjit.c is safe to use them but we know we need to safely deal with
mjit_compile.c, mjit_worker.c and mjit_internal.h.

mjit_compile.c: update the comment about it
------------------------------------------------------------------------
r64284 | k0kubun | 2018-08-11 14:37:17 +0900 (Sat, 11 Aug 2018) | 3 lines

_mjit_compile_pc_and_sp.erb: update the comment

about the pc motion reason
------------------------------------------------------------------------
r64283 | k0kubun | 2018-08-11 14:33:15 +0900 (Sat, 11 Aug 2018) | 15 lines

_mjit_compile_pc_and_sp.erb: always move pc

to fix the wrong line number on #caller_locations or rb_profile_frames.

Actually we would be able to move it only when method call (of
caller_locations) or C extension invocation (calling rb_profile_frames)
can happen.

This degrades performance. Optcarrot fps becomes...
before: 71.78976052783555
after: 67.65429356624131

I think I can lazily move it and fix the performance issue, even
improving the performance for the situation catch table exists.
But let me fix this bug first...
------------------------------------------------------------------------
r64282 | k0kubun | 2018-08-11 13:22:14 +0900 (Sat, 11 Aug 2018) | 4 lines

tool/downloader.rb: retry on 502 and 503 error

rubyci was failed by download 503
https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20180811T021706Z.fail.html.gz
------------------------------------------------------------------------
r64281 | k0kubun | 2018-08-11 12:50:42 +0900 (Sat, 11 Aug 2018) | 5 lines

vm_args.c: stop requiring `calling` in vm_caller_setup_arg_block

_mjit_compile_send.erb: simplify code using the change

insns.def: adapt to the interface change
------------------------------------------------------------------------
r64280 | k0kubun | 2018-08-11 12:38:38 +0900 (Sat, 11 Aug 2018) | 8 lines

_mjit_compile_send.erb: refactor to share vm_call_iseq_setup_normal

implementation. This had no major performance impact by effort to keep
them inlined.

vm_insnhelper.c: ditto

mjit_compile.c: just update the comment about opt_pc=0 assumption
------------------------------------------------------------------------
r64279 | svn | 2018-08-11 08:32:33 +0900 (Sat, 11 Aug 2018) | 1 line

* 2018-08-11
------------------------------------------------------------------------
r64278 | k0kubun | 2018-08-11 08:32:32 +0900 (Sat, 11 Aug 2018) | 8 lines

test_iseq_load.rb: increase timeout

It's timed out on CI like this
https://gist.github.com/ko1/33df53d78fbec9e4156c017eeae023bb.

I'm not sure how long it would take (it finishes immediately on my machine),
so I chose 600s because r64271 says it took 635s on mswinci. (probably
it's improved by the commit, though.)
------------------------------------------------------------------------
r64277 | naruse | 2018-08-11 06:31:25 +0900 (Sat, 11 Aug 2018) | 3 lines

Remove failing specs

https://rubyci.org/logs/rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20180810T183001Z.fail.html.gz
------------------------------------------------------------------------
r64276 | k0kubun | 2018-08-10 21:55:18 +0900 (Fri, 10 Aug 2018) | 1 line

appveyor.yml: don't notify PR failure to Slack
------------------------------------------------------------------------
r64275 | kazu | 2018-08-10 21:36:31 +0900 (Fri, 10 Aug 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r64274 | kazu | 2018-08-10 21:36:30 +0900 (Fri, 10 Aug 2018) | 1 line

Remove needless comment [ci skip]
------------------------------------------------------------------------
r64273 | nobu | 2018-08-10 21:04:24 +0900 (Fri, 10 Aug 2018) | 6 lines

Pathname: Simplified Pathname#mountpoint?

Removed unnecessary comparison in mountpoint?
[Fix GH-1927]

From: John Whitson <john.whitson@gmail.com>
------------------------------------------------------------------------
r64272 | nobu | 2018-08-10 20:55:19 +0900 (Fri, 10 Aug 2018) | 1 line

fixup r64270
------------------------------------------------------------------------
r64271 | naruse | 2018-08-10 18:22:13 +0900 (Fri, 10 Aug 2018) | 4 lines

Use assert_separately in TestIseqLoad#test_stressful_roundtrip

It takes 635 seconds on mswinci
http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20180810T061315Z.log.html.gz
------------------------------------------------------------------------
r64270 | mame | 2018-08-10 17:42:45 +0900 (Fri, 10 Aug 2018) | 13 lines

common.mk: "make check" now runs test-spec

Currently there are many "make" targets for testing: test, test-all,
check, exam, etc.
To make it simple, this change makes "make check" run all tests.
"make exam" is just an alias to "make check".
If a new test suite is added in future, "make check" should include it
(unless it takes too much time...)
[Feature #14187]

Also, this introduces "make test-short" as an alias to "make test".
I believe "make test" should equal to "make check", but there is
objection against this.  So now I commit only things that we agreed.
------------------------------------------------------------------------
r64269 | naruse | 2018-08-10 17:31:17 +0900 (Fri, 10 Aug 2018) | 8 lines

Remove failing spec files

Re-commit after specs are fixed.
http://rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20180810T063001Z.log.html.gz
http://rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20180809T191808Z.log.html.gz
http://rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20180809T192406Z.log.html.gz
http://rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20180809T151911Z.log.html.gz
http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180809T192507Z.log.html.gz
------------------------------------------------------------------------
r64268 | mame | 2018-08-10 16:45:16 +0900 (Fri, 10 Aug 2018) | 12 lines

insns.def (invokesuper): remove a dummy receiever flag hack for ZSUPER

This is just a refactoring.

The receiver of "invokesuper" was a boolean to represent if it is ZSUPER
or not.  This was used in vm_search_super_method to prohibit ZSUPER call
in define_method. (It is currently prohibited because of the limitation
of the implementation.)

This change removes the hack by introducing an explicit flag,
VM_CALL_SUPER, to signal the information.  Now, the implementation of
"invokesuper" is consistent with "send" instruction.
------------------------------------------------------------------------
r64267 | hsbt | 2018-08-10 15:06:32 +0900 (Fri, 10 Aug 2018) | 1 line

Move IPAddr to deafult gems category.
------------------------------------------------------------------------
r64266 | nobu | 2018-08-10 14:20:46 +0900 (Fri, 10 Aug 2018) | 4 lines

version.c: MKSTR for fake.rb

* version.c (Init_ruby_description): fake.rb needs MKSTR to extract
  constant names.
------------------------------------------------------------------------
r64265 | mrkn | 2018-08-10 14:18:03 +0900 (Fri, 10 Aug 2018) | 12 lines

process.c: fix rubyspec of Process.groups

getgroups(2) may return a GID list that includes duplicated GIDs.
The behavior is totaly depends on what OS is used.

This commit fixes the example of Process.groups so that the example
is independent of this OS-dependent features.

Additonaly, this commit adds the description of such system-dependent
characteristics of Process.groups.

[ruby-dev:50603] [Bug #14969]
------------------------------------------------------------------------
r64264 | nobu | 2018-08-10 14:02:35 +0900 (Fri, 10 Aug 2018) | 4 lines

version.c: separate Init_ruby_description

* version.c (Init_ruby_description): separate to initialize
  RUBY_DESCRIPTION constant according to mjit.
------------------------------------------------------------------------
r64263 | nobu | 2018-08-10 13:52:24 +0900 (Fri, 10 Aug 2018) | 1 line

common.mk: merge dependencies to wait miniruby to get built
------------------------------------------------------------------------
r64262 | mrkn | 2018-08-10 13:49:44 +0900 (Fri, 10 Aug 2018) | 4 lines

enumerator.c: fix for non-integral argument for ArithmeticSequence#last

This fixes a bug of Enumerator::ArithmeticSequence#last in the case that
a non-integral argument is passed.
------------------------------------------------------------------------
r64261 | nobu | 2018-08-10 13:33:11 +0900 (Fri, 10 Aug 2018) | 1 line

mjit.c: ruby_version is no longer used since r63279
------------------------------------------------------------------------
r64260 | nobu | 2018-08-10 13:26:54 +0900 (Fri, 10 Aug 2018) | 1 line

.gdbinit: startup without shell for macOS Sierra and later
------------------------------------------------------------------------
r64259 | svn | 2018-08-10 09:53:50 +0900 (Fri, 10 Aug 2018) | 1 line

* 2018-08-10
------------------------------------------------------------------------
r64258 | nobu | 2018-08-10 09:53:49 +0900 (Fri, 10 Aug 2018) | 1 line

another test needs IO.select
------------------------------------------------------------------------
r64257 | nobu | 2018-08-09 22:32:49 +0900 (Thu, 09 Aug 2018) | 6 lines

gmake.mk: fix commit dependency

* defs/gmake.mk (commit): pass CONFIGURE and fix dependency of
  `reconfig` target, not to try to make config.status newer than
  the source directory.  and remove configure_args in common.mk,
  which is a garbage argument.
------------------------------------------------------------------------
r64256 | mrkn | 2018-08-09 22:18:08 +0900 (Thu, 09 Aug 2018) | 5 lines

enumerator.c: undef new and allocate of ArithmeticSequence

Undefine new and allocate methods of Enumerator::ArithmeticSequence.

[ruby-core:82816] [Feature #13904]
------------------------------------------------------------------------
r64255 | naruse | 2018-08-09 21:45:02 +0900 (Thu, 09 Aug 2018) | 1 line

Don't run the spec on Solaris
------------------------------------------------------------------------
r64254 | k0kubun | 2018-08-09 20:39:07 +0900 (Thu, 09 Aug 2018) | 3 lines

process.c: don't wait JIT queue flush on rb_f_exec

This wasn't intended in r64253.
------------------------------------------------------------------------
r64253 | k0kubun | 2018-08-09 20:31:41 +0900 (Thu, 09 Aug 2018) | 9 lines

process.c: fix outdated mjit_pause declaration

by sharing it with vm.c in internal.h.

vm.c: ditto
internal.h: ditto
mjit.h: share more.

mjit.c: make sure the third arguemnt is not used
------------------------------------------------------------------------
r64252 | rhe | 2018-08-09 19:00:19 +0900 (Thu, 09 Aug 2018) | 15 lines

net/http, net/ftp: skip SSL/TLS session resumption tests

Due to a bug in OpenSSL 1.1.0h[1] (it's only in this specific version;
it was introduced just before the release and is already fixed in their
stable branch), the callback set by SSLContext#session_new_cb= does not
get called for clients, making net/http and net/ftp not attempt session
resumption.

Let's disable the affected test cases for now. Another option would be
to fallback to using SSLSocket#session as we did before r64234. But
since only a single version is affected and hopefully a new stable
version containing the fix will be released in near future, I chose not
to add such workaround code to lib/.

[1] https://github.com/openssl/openssl/pull/5967
------------------------------------------------------------------------
r64251 | svn | 2018-08-09 18:58:08 +0900 (Thu, 09 Aug 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64250 | k0kubun | 2018-08-09 18:58:07 +0900 (Thu, 09 Aug 2018) | 11 lines

mjit.c: add :wait option to RubyVM::MJIT.pause

and wait until JIT queue is flushed when wait option is not passed or
`wait: true` is passed.

vm.c: ditto

test/ruby/test_rubyvm_mjit.rb: added test for pause/resume

test/lib/jit_support.rb: allow retrying MJIT on JITSupport level
test/ruby/test_jit.rb: ditto
------------------------------------------------------------------------
r64249 | kazu | 2018-08-09 18:36:03 +0900 (Thu, 09 Aug 2018) | 8 lines

Fix error when Encoding.default_external is Encoding::IBM437

https://ci.appveyor.com/project/ruby/ruby/build/1.0.9151#L4601
```
  1) Error:
TestArgf#test_inplace_nonascii:
Encoding::UndefinedConversionError: U+3042 from UTF-8 to IBM437
```
------------------------------------------------------------------------
r64248 | normal | 2018-08-09 18:02:32 +0900 (Thu, 09 Aug 2018) | 5 lines

test/io/console/test_io_console.rb: fix short read failures

Running with TESTS=--no-retry, I sometimes get short reads
leading to failures due to the use of IO#readpartial instead of
IO#gets.
------------------------------------------------------------------------
r64247 | normal | 2018-08-09 17:51:22 +0900 (Thu, 09 Aug 2018) | 4 lines

test/io/wait/test_io_wait_uncommon.rb (test_tty_wait): increase timeout

Apparently my tty can't keep up when I run test-all with
TESTS='-v --no-retry'
------------------------------------------------------------------------
r64246 | kazu | 2018-08-09 17:49:10 +0900 (Thu, 09 Aug 2018) | 1 line

Skip test_inplace_nonascii if external encoding is us-ascii
------------------------------------------------------------------------
r64245 | kazu | 2018-08-09 17:49:09 +0900 (Thu, 09 Aug 2018) | 4 lines

add 'x' mode character for O_EXCL

[Feature #11258]
Patch by cremno (cremno phobia)
------------------------------------------------------------------------
r64244 | knu | 2018-08-09 17:40:54 +0900 (Thu, 09 Aug 2018) | 3 lines

Include the input in the message when raising InvalidAddressError

[Feature #5987]
------------------------------------------------------------------------
r64243 | nobu | 2018-08-09 17:29:38 +0900 (Thu, 09 Aug 2018) | 4 lines

io.c: fix non-ascii filename inplace edit

* io.c (argf_next_argv): convert filename to the OS encoding to be
  dealt with by system calls.  [ruby-dev:50607] [Bug #14970]
------------------------------------------------------------------------
r64242 | nobu | 2018-08-09 16:04:45 +0900 (Thu, 09 Aug 2018) | 1 line

apply r64239 to macOS too
------------------------------------------------------------------------
r64241 | nobu | 2018-08-09 16:01:09 +0900 (Thu, 09 Aug 2018) | 1 line

apply r64239 to macOS too
------------------------------------------------------------------------
r64240 | naruse | 2018-08-09 14:28:33 +0900 (Thu, 09 Aug 2018) | 1 line

Don't run specs on Solaris
------------------------------------------------------------------------
r64239 | normal | 2018-08-09 12:32:51 +0900 (Thu, 09 Aug 2018) | 18 lines

spec/ruby/library/socket/*: more FreeBSD fixes

FreeBSD portability notes:

Loopback connections are not instantaneous (unlike Linux), so
non-blocking read-after-write MUST check for readability via
IO.select or IO#wait_readable before attempting non-blocking
recv/read operations.

IPv6 seems favored, so we'll get "::" instead of "0.0.0.0"

Some constants are different or obsolete, so that should be
self-explanatory.

There are still other failures I or somebody else needs to get
to when we have time and feel like dealing with spec DSL:

      http://rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/recent.html
------------------------------------------------------------------------
r64238 | normal | 2018-08-09 11:14:27 +0900 (Thu, 09 Aug 2018) | 3 lines

test/lib/leakchecker.rb (find_tempfiles): don't warn for missing files

Quiet a false-positive warning from TestHtgroup#test_htgroup
------------------------------------------------------------------------
r64237 | svn | 2018-08-09 00:36:29 +0900 (Thu, 09 Aug 2018) | 1 line

* 2018-08-09
------------------------------------------------------------------------
r64236 | nobu | 2018-08-09 00:36:28 +0900 (Thu, 09 Aug 2018) | 4 lines

needs openssl/opensslv.h

* ext/openssl/extconf.rb: LIBRESSL_VERSION_NUMBER is defined in
  openssl/opensslv.h.  fix up r64101.
------------------------------------------------------------------------
r64235 | nobu | 2018-08-08 23:34:24 +0900 (Wed, 08 Aug 2018) | 4 lines

fix mjit_min_header for universal binary

* common.mk: rules using MJIT_HEADER_SUFFIX, which to be overriden
  in defs/universal.mk, must be in common.mk, not Makefile.in.
------------------------------------------------------------------------
r64234 | rhe | 2018-08-08 23:13:55 +0900 (Wed, 08 Aug 2018) | 8 lines

net/http, net/ftp: fix session resumption with TLS 1.3

When TLS 1.3 is in use, the session ticket may not have been sent yet
even though a handshake has finished. Also, the ticket could change if
multiple session ticket messages are sent by the server. Use
SSLContext#session_new_cb instead of calling SSLSocket#session
immediately after a handshake. This way also works with earlier protocol
versions.
------------------------------------------------------------------------
r64233 | rhe | 2018-08-08 23:13:53 +0900 (Wed, 08 Aug 2018) | 36 lines

openssl: sync with upstream repository

Sync with the current tip of master branch, 62436385306c of
ruby/openssl.git. Changes can be found at:

	https://github.com/ruby/openssl/compare/v2.1.1...62436385306c

----------------------------------------------------------------
Brian Cunnie (1):
      Correctly verify abbreviated IPv6 SANs

Janko Marohnic (1):
      Reduce memory allocation when writing to SSLSocket

Jeremy Evans (1):
      Move rb_global_variable call to directly after assignment

Kazuki Yamaguchi (7):
      pkcs7: allow recipient's certificate to be omitted for PKCS7#decrypt
      pkey: resume key generation after interrupt
      tool/ruby-openssl-docker: update to latest versions
      test/test_ssl: fix test failure with TLS 1.3
      test/test_x509name: change script encoding to ASCII-8BIT
      x509name: refactor OpenSSL::X509::Name#to_s
      x509name: fix handling of X509_NAME_{oneline,print_ex}() return value

ahadc (1):
      Update CONTRIBUTING.md

nobu (6):
      no ID cache in Init functions
      search winsock libraries explicitly
      openssl: search winsock
      openssl_missing.h: constified
      reduce LibreSSL warnings
      openssl/buffering.rb: no RS when output
------------------------------------------------------------------------
r64232 | naruse | 2018-08-08 22:50:25 +0900 (Wed, 08 Aug 2018) | 6 lines

fix MSG_OOB spec

* OOBINLINE should be set for accepted socket
* When OOBINLINE is set, MSG_OOB shouldn't be passed to recv

Merge spec/ruby's commit 5b418374f8006318434ee9a2366382d004f585df
------------------------------------------------------------------------
r64231 | naruse | 2018-08-08 22:44:25 +0900 (Wed, 08 Aug 2018) | 5 lines

Add colon to avoid chkbuild's alert

https://github.com/ruby/chkbuild/blob/c0448670a9a5cb85f283bc639806ba09b294557f/chkbuild/ruby.rb#L847

Merge ruby/spec's commit 5a6ac7dbef3d59fe279303bf3346d92f1e620f12
------------------------------------------------------------------------
r64230 | akr | 2018-08-08 21:48:58 +0900 (Wed, 08 Aug 2018) | 11 lines

rename several internal macros in time.c

TIME_UTC_P -> TZMODE_UTC_P
TIME_SET_UTC -> TZMODE_SET_UTC
TIME_LOCALTIME_P -> TZMODE_LOCALTIME_P
TIME_SET_LOCALTIME -> TZMODE_SET_LOCALTIME
TIME_FIXOFF_P -> TZMODE_FIXOFF_P
TIME_SET_FIXOFF -> TZMODE_SET_FIXOFF
TIME_COPY_GMT -> TZMODE_COPY


------------------------------------------------------------------------
r64229 | kazu | 2018-08-08 20:50:39 +0900 (Wed, 08 Aug 2018) | 1 line

Update comment of tzmode [ci skip]
------------------------------------------------------------------------
r64228 | akr | 2018-08-08 19:39:31 +0900 (Wed, 08 Aug 2018) | 2 lines

Rename gmt field to tzmode in struct time_object.

------------------------------------------------------------------------
r64227 | akr | 2018-08-08 19:00:43 +0900 (Wed, 08 Aug 2018) | 4 lines

Store String as zone in struct vtm.

This removes zone_table and use fstring instead.

------------------------------------------------------------------------
r64226 | kazu | 2018-08-08 17:00:45 +0900 (Wed, 08 Aug 2018) | 1 line

Some environments do not have IPv6 address of localhost in /etc/hosts
------------------------------------------------------------------------
r64225 | normal | 2018-08-08 16:26:14 +0900 (Wed, 08 Aug 2018) | 4 lines

mjit.c: remove old comment about WNOHANG and SIGCHLD [ci skip]

[Bug #14867] implemented exactly what was needed (for POSIX
platforms, at least).
------------------------------------------------------------------------
r64224 | nobu | 2018-08-08 11:56:04 +0900 (Wed, 08 Aug 2018) | 1 line

skip hanging-up tests on macOS
------------------------------------------------------------------------
r64223 | normal | 2018-08-08 10:16:37 +0900 (Wed, 08 Aug 2018) | 6 lines

spec/ruby/library/socket/*: fix hanging on FreeBSD 11.1

There are still other test failures which need fixing on FreeBSD.
Keep an eye on:

  http://rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/recent.html
------------------------------------------------------------------------
r64222 | k0kubun | 2018-08-08 01:49:34 +0900 (Wed, 08 Aug 2018) | 1 line

appveyor.yml: make sure MJIT is tested on AppVeyor
------------------------------------------------------------------------
r64221 | k0kubun | 2018-08-08 01:27:45 +0900 (Wed, 08 Aug 2018) | 13 lines

mjit.c: initial support for mswin MJIT

By this commit's changes in other files, now MJIT started to work on VC++.
Unfortunately some features are still broken and they'll be fixed later.

This also suppresses cl.exe's default output to stdout because there
seems to be no option to do it. Tweaking some log messages as well.

vm_core.h: declare `__declspec(dllimport)` to export them correctly on mswin.
vm_insnhelper.h: ditto
mjit.h: ditto

test_jit.rb: skipped some pending tests.
------------------------------------------------------------------------
r64220 | svn | 2018-08-08 00:14:49 +0900 (Wed, 08 Aug 2018) | 1 line

* 2018-08-08
------------------------------------------------------------------------
r64219 | k0kubun | 2018-08-08 00:14:48 +0900 (Wed, 08 Aug 2018) | 18 lines

win32/Makefile.sub: escape `=` in MJIT cflags

Since `=` is considered as delimiter in `()` of `for`, having
`-DRUBY_DEVEL=1` in CPPFLAGS had resulted in:

 #define MJIT_OPTFLAGS "-DMJIT_HEADER", \
   "-DRUBY_DEVEL", \
   "1", \

Even escaped `for %I in (... -DRUBY_DEVEL^=1)` does not yield an
expected result. This commit is a workaround for this issue.

After this commit, mjit_config.h will have:

 #define MJIT_OPTFLAGS "-DMJIT_HEADER", \
   "-DRUBY_DEVEL" MJIT_CONFIG_ESCAPED_EQ "1", \

And C macro resolves MJIT_CONFIG_ESCAPED_EQ to "=".
------------------------------------------------------------------------
r64218 | hsbt | 2018-08-07 22:08:53 +0900 (Tue, 07 Aug 2018) | 5 lines

Silence Net::HTTP warning in test.

  https://github.com/ruby/webrick/pull/8

  Co-authored-by: Espartaco Palma <>
------------------------------------------------------------------------
r64217 | svn | 2018-08-07 21:56:49 +0900 (Tue, 07 Aug 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64216 | hsbt | 2018-08-07 21:56:48 +0900 (Tue, 07 Aug 2018) | 7 lines

Add missing test for WEBrick::HTTPAuth::Htgroup.

  [Bug #14866][ruby-core:87602]

  https://github.com/ruby/webrick/pull/10

  Co-authored-by: TSUYUSATO Kitsune <make.just.on@gmail.com>
------------------------------------------------------------------------
r64215 | hsbt | 2018-08-07 21:47:11 +0900 (Tue, 07 Aug 2018) | 3 lines

Support old versions of Ruby with FrozenError.

  They should work separatedly from Ruby core repository.
------------------------------------------------------------------------
r64214 | hsbt | 2018-08-07 21:32:29 +0900 (Tue, 07 Aug 2018) | 1 line

Fallback to load version constant for ruby core repository.
------------------------------------------------------------------------
r64213 | hsbt | 2018-08-07 21:02:10 +0900 (Tue, 07 Aug 2018) | 3 lines

Removed needless date attribute from gemspec of default gems.

  They are assigned automatically when pushing gem file to rubygems.org.
------------------------------------------------------------------------
r64212 | kazu | 2018-08-07 21:00:54 +0900 (Tue, 07 Aug 2018) | 1 line

Remove unnecessary assignment
------------------------------------------------------------------------
r64211 | hsbt | 2018-08-07 20:36:09 +0900 (Tue, 07 Aug 2018) | 1 line

Removed needless file from gemspec.
------------------------------------------------------------------------
r64210 | hsbt | 2018-08-07 20:18:40 +0900 (Tue, 07 Aug 2018) | 5 lines

Add support of Berkeley DB 6.x.

  https://github.com/ruby/dbm/pull/3

  Co-authored-by: Yasuhiro KIMURA <>
------------------------------------------------------------------------
r64209 | hsbt | 2018-08-07 18:52:53 +0900 (Tue, 07 Aug 2018) | 5 lines

Add test for coverage.

  https://github.com/ruby/cmath/pull/2

  Co-authored-by: MATSUBARA Nobutada
------------------------------------------------------------------------
r64208 | svn | 2018-08-07 10:17:40 +0900 (Tue, 07 Aug 2018) | 1 line

* 2018-08-07
------------------------------------------------------------------------
r64207 | k0kubun | 2018-08-07 10:17:39 +0900 (Tue, 07 Aug 2018) | 21 lines

win32/Makefile.sub: remove RUBY_EXPORT macro

defined in XCFLAGS.

This change resolves following link errors in MJIT:

```
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cObject
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cFalseClass
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cFloat
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cInteger
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cNilClass
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cProc
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cString
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cSymbol
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cTrueClass
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_eArgError
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_eNoMethodError
rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_eNameError
_ruby_mjit_p41476u0.obj : error LNK2001: unresolved external symbol rb_eFatal
```
------------------------------------------------------------------------
r64206 | svn | 2018-08-06 18:08:30 +0900 (Mon, 06 Aug 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64205 | mrkn | 2018-08-06 18:08:28 +0900 (Mon, 06 Aug 2018) | 16 lines

enumerator.c: Introduce Enumerator::ArithmeticSequence

This commit introduces new core class Enumerator::ArithmeticSequence.
Enumerator::ArithmeticSequence is a subclass of Enumerator, and
represents a number generator of an arithmetic sequence.

After this commit, Numeric#step and Range#step without blocks
returned an ArithmeticSequence object instead of an Enumerator.

This class introduces the following incompatibilities:

- You can create a zero-step ArithmeticSequence,
  and its size is not ArgumentError, but Infinity.
- You can create a negative-step ArithmeticSequence from a range.

[ruby-core:82816] [Feature #13904]
------------------------------------------------------------------------
r64204 | normal | 2018-08-06 17:42:04 +0900 (Mon, 06 Aug 2018) | 4 lines

test/ripper/test_parser_events.rb (test_block_variables): increase RLIMIT_AS

Unfortunately, MJIT goes over the 100M RLIMIT_AS for this test
on x86-64 (Debian 9)
------------------------------------------------------------------------
r64203 | normal | 2018-08-06 14:22:00 +0900 (Mon, 06 Aug 2018) | 87 lines

thread_pthread.c: restore timer-thread for now :<

[ruby-core:88306]

Revert "process.c: ensure th->interrupt lock is held when migrating"

This reverts commit 5ca416bdf6b6785cb20f139c2c514eda005fe42f (r64201)

Revert "process.c (rb_waitpid): reduce sigwait_fd bouncing"

This reverts commit 217bdd776fbeea3bfd0b9324eefbfcec3b1ccb3e (r64200).

Revert "test/ruby/test_thread.rb (test_thread_timer_and_interrupt): add timeouts"

This reverts commit 9f395f11202fc3c7edbd76f5aa6ce1f8a1e752a9 (r64199).

Revert "thread_pthread.c (native_sleep): reduce ppoll sleeps"

This reverts commit b3aa256c4d43d3d7e9975ec18eb127f45f623c9b (r64193).

Revert "thread.c (consume_communication_pipe): do not retry after short read"

This reverts commit 291a82f748de56e65fac10edefc51ec7a54a82d4 (r64185).

Revert "test/ruby/test_io.rb (test_race_gets_and_close): timeout each thread"

This reverts commit 3dbd8d1f66537f968f0461ed8547460b3b1241b3 (r64184).

Revert "thread_pthread.c (gvl_acquire_common): persist timeout across calls"

This reverts commit 8c2ae6e3ed072b06fc3cbc34fa8a14b2acbb49d5 (r64165).

Revert "test/ruby/test_io.rb (test_race_gets_and_close): use SIGABRT on timeout"

This reverts commit 931cda4db8afd6b544a8d85a6815765a9c417213 (r64135).

Revert "thread_pthread.c (gvl_yield): do ubf wakeups when uncontended"

This reverts commit 508f00314f46c08b6e9b0141c01355d24954260c (r64133).

Revert "thread_pthread.h (native_thread_data): split condvars on some platforms"

This reverts commit a038bf238bd9a24bf1e1622f618a27db261fc91b (r64124).

Revert "process.c (waitpid_nogvl): prevent conflicting use of sleep_cond"

This reverts commit 7018acc946882f21d519af7c42ccf84b22a46b27 (r64117).

Revert "thread_pthread.c (rb_sigwait_sleep): th may be 0 from MJIT"

This reverts commit 56491afc7916fb24f5c4dc2c632fb93fa7063992 (r64116).

Revert "thread*.c: waiting on sigwait_fd performs periodic ubf wakeups"

This reverts commit ab47a57a46e70634d049e4da20a5441c7a14cdec (r64115).

Revert "thread_pthread.c (gvl_destroy): make no-op on GVL bits"

This reverts commit 95cae748171f4754b97f4ba54da2ae62a8d484fd (r64114).

Revert "thread_pthread.c (rb_sigwait_sleep): fix uninitialized poll set in UBF case"

This reverts commit 4514362948fdb914c6138b12d961d92e9c0fee6c (r64113).

Revert "thread_pthread.c (rb_sigwait_sleep): re-fix [Bug #5343] harder"

This reverts commit 26b8a70bb309c7a367b9134045508b5b5a580a77 (r64111).

Revert "thread.c: move ppoll wrapper into thread_pthread.c"

This reverts commit 3dc7727d22fecbc355597edda25d2a245bf55ba1 (r64110).

Revert "thread.c: move ppoll wrapper before thread_pthread.c"

This reverts commit 2fa1e2e3c3c5c4b3ce84730dee4bcbe9d81b8e35 (r64109).

Revert "thread_pthread.c (ubf_select): refix [Bug #5343]"

This reverts commit 4c1ab82f0623eca91a95d2a44053be22bbce48ad (r64108).

Revert "thread_win32.c: suppress warnings by -Wsuggest-attribute"

This reverts commit 6a9b63e39075c53870933fbac5c1065f7d22047c (r64159).

Revert "thread_pthread: remove timer-thread by restructuring GVL"

This reverts commit 708bfd21156828526fe72de2cedecfaca6647dc1 (r64107).
------------------------------------------------------------------------
r64202 | hsbt | 2018-08-06 14:01:08 +0900 (Mon, 06 Aug 2018) | 1 line

Ignore native extension of Date library when syncing gemification files.
------------------------------------------------------------------------
r64201 | normal | 2018-08-06 10:06:21 +0900 (Mon, 06 Aug 2018) | 4 lines

process.c: ensure th->interrupt lock is held when migrating

w->cond may be changed without our knowledge in waitpid_nogvl
without th->interrupt_lock
------------------------------------------------------------------------
r64200 | normal | 2018-08-06 06:27:14 +0900 (Mon, 06 Aug 2018) | 5 lines

process.c (rb_waitpid): reduce sigwait_fd bouncing

Once a thread has acquired sigwait_fd, hold onto it until
waitpid is complete.  This prevents unnecessary migration
and atomic operations.
------------------------------------------------------------------------
r64199 | normal | 2018-08-06 05:06:55 +0900 (Mon, 06 Aug 2018) | 9 lines

test/ruby/test_thread.rb (test_thread_timer_and_interrupt): add timeouts

Trying to diagnose CI failures from i686-linux on Debian 7.

This also fixes a potential GC problem with Thread.start or
IO#read potentially closing the write-end of the pipe due
to allocation.

cf. http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20180805T080500Z.fail.html.gz
------------------------------------------------------------------------
r64198 | svn | 2018-08-06 05:06:50 +0900 (Mon, 06 Aug 2018) | 1 line

* 2018-08-06
------------------------------------------------------------------------
r64197 | normal | 2018-08-06 05:06:49 +0900 (Mon, 06 Aug 2018) | 10 lines

thread_pthread: stop trying to deal with cancellation

We don't use pthreads cancellation ourselves and it's painful to
use correctly.  Any cancelled threads would break
vm->living_threads, GVL, thread_sync.c, autoload, etc...

So don't bother caring; because we can't stop rogue extensions
from completely breaking the VM in other ways, either.

[ruby-core:88282] [Misc #14962]
------------------------------------------------------------------------
r64196 | k0kubun | 2018-08-05 23:33:40 +0900 (Sun, 05 Aug 2018) | 5 lines

mjit.c: use -Tc flag explicitly

This option makes sure that the argument is C source file.
Probably this is not needed, but since I'm debugging it, I want to
exclude any failure possibility for now.
------------------------------------------------------------------------
r64194 | normal | 2018-08-05 17:56:57 +0900 (Sun, 05 Aug 2018) | 11 lines

test/ruby/test_process.rb (test_wait_and_sigchld): allow extra SIGCHLD

MJIT way generate an extra SIGCHLD, so we'll have to deal with it.

Any realistic Ruby program may hit unexpected SIGCHLD, too,
since any spawned subprocess could have extra grandchildren
which get reaped by the main Ruby process, and SIGCHLD may
be sent spuriously by an external process using kill(2) syscall
(via kill(1) or Process.kill).

cf. http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1194620
------------------------------------------------------------------------
r64193 | normal | 2018-08-05 17:56:52 +0900 (Sun, 05 Aug 2018) | 12 lines

thread_pthread.c (native_sleep): reduce ppoll sleeps

By holding into sigwait_fd until after we acquire GVL, we can
hit the faster native_cond_sleep path instead of ppoll when
another thread wants to start sleeping.  ppoll-ing on sigwait_fd
isn't really useful in program where GVL is contended

This also allows reducing vm->gvl.lock mutex contention on
waitpid sleep migrations.

                         r64170        this patch
vm_thread_condvar1        0.921        1.356
------------------------------------------------------------------------
r64192 | k0kubun | 2018-08-05 14:34:37 +0900 (Sun, 05 Aug 2018) | 9 lines

mjit.c: link precompiled object

This is needed to resolve:
"error LNK2011: precompiled object not linked in; image may not run"

win32/Makefile.sub: Use the same flags as ones for precompiled header.

This is needed to resolve:
"error C2855: command-line option '/Z7' inconsistent with precompiled header"
------------------------------------------------------------------------
r64191 | k0kubun | 2018-08-05 13:48:18 +0900 (Sun, 05 Aug 2018) | 3 lines

mjit.c: reorder functions to reduce #ifdef branches

Just moved make_pch into `#else` of `#ifdef _MSC_VER`.
------------------------------------------------------------------------
r64190 | k0kubun | 2018-08-05 13:37:59 +0900 (Sun, 05 Aug 2018) | 5 lines

mjit.c: include prebuilt precompiled header

on mswin properly.

Deleted code to attempt make_pch for mswin, since it won't be needed.
------------------------------------------------------------------------
r64189 | k0kubun | 2018-08-05 12:12:09 +0900 (Sun, 05 Aug 2018) | 6 lines

mjit.c: initialize prebuilt precompiled header

file name correctly. This allows to use the header installed by r64188.

win32/Makefile.sub: define prebuilt precompiled header path instead of
unused min header path
------------------------------------------------------------------------
r64188 | k0kubun | 2018-08-05 08:53:41 +0900 (Sun, 05 Aug 2018) | 6 lines

win32/Makefile.sub: build precompiled header

See the comment in win32/Makefile.sub.
Not only .pch, but also .obj needs to be installed and used on runtime.

.gitignore: ignore .pch that will be built by this.
------------------------------------------------------------------------
r64187 | normal | 2018-08-05 08:33:38 +0900 (Sun, 05 Aug 2018) | 9 lines

test/ruby/test_io.rb (test_select_leak): speedup and reduce memory use

We can reuse the sub-thread and exception with Thread#raise to
reproduce the old memory leak with less overhead.  This allows
us to to run more iterations and improve reliability of the
actual test, particularly on platforms without USE_THREAD_CACHE.

For glibc and jemalloc, also limit arena count to avoid
inadvertant growth.
------------------------------------------------------------------------
r64186 | normal | 2018-08-05 07:58:08 +0900 (Sun, 05 Aug 2018) | 21 lines

test/ruby/test_thread.rb (test_thread_interrupt_for_killed_thread): conserve resources

Use Thread.pass to let the sub-thread finish.  This should avoid
running out of memory on resource-constrained systems.
(We don't want to use Thread#join to hit the exception)

This results in a significant memory usage reduction in this test:

  make test-all TESTS='../test/ruby/test_thread.rb -v -n test_thread_interrupt_for_killed_thread'

Before:

  3.46user 2.02system 0:05.29elapsed 103%CPU (0avgtext+0avgdata 88672maxresident)k
  0inputs+0outputs (0major+143071minor)pagefaults 0swaps

After:

  3.40user 1.83system 0:05.20elapsed 100%CPU (0avgtext+0avgdata 9368maxresident)k
  0inputs+0outputs (0major+3059minor)pagefaults 0swaps

cf. https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20180803T231706Z.fail.html.gz
------------------------------------------------------------------------
r64185 | normal | 2018-08-05 05:38:48 +0900 (Sun, 05 Aug 2018) | 7 lines

thread.c (consume_communication_pipe): do not retry after short read

Saves a syscall and slightly improves vm_thread_condvar1
benchmark slightly (more improvements on the way):

                         r64170        this patch
vm_thread_condvar1        0.917        1.065
------------------------------------------------------------------------
r64184 | normal | 2018-08-05 05:34:19 +0900 (Sun, 05 Aug 2018) | 7 lines

test/ruby/test_io.rb (test_race_gets_and_close): timeout each thread

Still looking into CI failures on P895 (and seemingly no other boxes):

   http://ci.rvm.jp/results/trunk@P895/1190369

:<
------------------------------------------------------------------------
r64183 | svn | 2018-08-05 00:12:31 +0900 (Sun, 05 Aug 2018) | 1 line

* 2018-08-05
------------------------------------------------------------------------
r64182 | k0kubun | 2018-08-05 00:12:30 +0900 (Sun, 05 Aug 2018) | 16 lines

common.mk: stop building MJIT min header for mswin

Since it's impossible to leave macro when preprocessing C source file
with cl.exe, I decided to create precompiled header on Ruby's build time
instead.

We're not doing it for non-mswin environment for 2 reasons:
1) Precompiled header may not be able to be used when CC is upgraded.
2) We need to create as many precompiled headers as the patterns of
   compile options. (Probably only 2, for with and without --jit-debug)

I'll ignore them for mswin for now, and solve it later by including CC
version and --jit-debug information in precompiled header filename.
After that, non-mswin environment may follow it to simplify build system.

Makefile.in: ditto
------------------------------------------------------------------------
r64181 | normal | 2018-08-04 06:53:21 +0900 (Sat, 04 Aug 2018) | 8 lines

spec/ruby/library/socket/socket/getaddrinfo_spec.rb: avoid nonsensical lookup

"http" is a TCP service, so /etc/services on typical GNU/Linux systems
only specify a TCP port for it.  Use "discard" since it seems
used for other specs and is specified as both TCP and UDP.

This caused many CI failures like the following:
  git clone https://gist.github.com/812a9b747e4c4cb2e844d4be7991cd2d
------------------------------------------------------------------------
r64180 | eregon | 2018-08-04 01:19:40 +0900 (Sat, 04 Aug 2018) | 1 line

Update to ruby/spec@9be7c7e
------------------------------------------------------------------------
r64179 | eregon | 2018-08-04 01:19:10 +0900 (Sat, 04 Aug 2018) | 1 line

Update to ruby/mspec@072849e
------------------------------------------------------------------------
r64178 | eregon | 2018-08-04 00:11:49 +0900 (Sat, 04 Aug 2018) | 4 lines

encoding.c (rb_enc_get_index): return -1 for non-encoding capable objects

* Clarify logic and add spec.
* Now passes test-all with the JSON fix.
------------------------------------------------------------------------
r64177 | eregon | 2018-08-04 00:11:36 +0900 (Sat, 04 Aug 2018) | 3 lines

ext/json/parser/parser.c: do not call rb_str_resize() on Time object

* See https://github.com/flori/json/issues/342
------------------------------------------------------------------------
r64176 | svn | 2018-08-04 00:11:23 +0900 (Sat, 04 Aug 2018) | 1 line

* 2018-08-04
------------------------------------------------------------------------
r64175 | eregon | 2018-08-04 00:11:22 +0900 (Sat, 04 Aug 2018) | 1 line

Fix missed update of parser source in r62429
------------------------------------------------------------------------
r64174 | eregon | 2018-08-03 23:31:39 +0900 (Fri, 03 Aug 2018) | 4 lines

Revert "encoding.c (rb_enc_get_index): return -1 for non-encoding capable objects"

* This reverts commit fb253d2032e51f333e6577aa4fcf0c03f9c6fc02.
* The CI is failing, this seems a bug in the JSON C extension.
------------------------------------------------------------------------
r64173 | eregon | 2018-08-03 22:52:26 +0900 (Fri, 03 Aug 2018) | 3 lines

encoding.c (rb_enc_get_index): return -1 for non-encoding capable objects

* Clarify logic and add spec.
------------------------------------------------------------------------
r64172 | eregon | 2018-08-03 22:52:13 +0900 (Fri, 03 Aug 2018) | 3 lines

encoding.c (enc_set_index): raise instead of rb_bug() for non-encoding capable objects

* Add spec.
------------------------------------------------------------------------
r64171 | nobu | 2018-08-03 20:13:15 +0900 (Fri, 03 Aug 2018) | 1 line

random.c: fix fallback value
------------------------------------------------------------------------
r64170 | nobu | 2018-08-03 16:24:33 +0900 (Fri, 03 Aug 2018) | 1 line

random.c: use rb_check_funcall
------------------------------------------------------------------------
r64169 | nobu | 2018-08-03 16:17:20 +0900 (Fri, 03 Aug 2018) | 4 lines

random.c: moved domain error

* random.c (rand_range): moved call of domain_error(), not to
  raise an exception in range_values().
------------------------------------------------------------------------
r64168 | nobu | 2018-08-03 15:53:14 +0900 (Fri, 03 Aug 2018) | 4 lines

ast.c: allocator of Node

* ast.c (Init_ast): undefine allocator of Node, as a method call
  on an uninitialized Node causes segfault.
------------------------------------------------------------------------
r64167 | nobu | 2018-08-03 15:31:22 +0900 (Fri, 03 Aug 2018) | 4 lines

random.c: endless range random

* random.c (range_values): cannot determine the domain of an endless
  range.  [ruby-core:88261] [Bug #14958]
------------------------------------------------------------------------
r64166 | mame | 2018-08-03 14:11:20 +0900 (Fri, 03 Aug 2018) | 3 lines

thread_pthread.c: add a macro guard for PTHREAD_CANCEL_ENABLE

It seems to be unavailable on some platforms including my Android phone.
------------------------------------------------------------------------
r64165 | normal | 2018-08-03 06:13:50 +0900 (Fri, 03 Aug 2018) | 9 lines

thread_pthread.c (gvl_acquire_common): persist timeout across calls

Reuse old expiration time if the previous native_cond_timedwait
did not return ETIMEDOUT.  This should improve timeslice
accuracy for Timeout.timeout rubyspec without causing excessive
wakeups on uncontended GVL acquisition.

cf. http://ci.rvm.jp/results/trunk-gc-asserts@silicon-docker/1180486
    http://ci.rvm.jp/results/trunk-gc-asserts@silicon-docker/1184623
------------------------------------------------------------------------
r64164 | svn | 2018-08-03 00:35:06 +0900 (Fri, 03 Aug 2018) | 1 line

* 2018-08-03
------------------------------------------------------------------------
r64163 | k0kubun | 2018-08-03 00:35:05 +0900 (Fri, 03 Aug 2018) | 4 lines

test_jit.rb: split the test concern

Actually unload_units is working on MinGW, but putiseq is behaving
badly.
------------------------------------------------------------------------
r64162 | k0kubun | 2018-08-02 23:40:36 +0900 (Thu, 02 Aug 2018) | 4 lines

mjit.c: skip compaction on MinGW

because linking multiple .o files is problematic without having `static`
to the same function definitions.
------------------------------------------------------------------------
r64161 | k0kubun | 2018-08-02 22:41:27 +0900 (Thu, 02 Aug 2018) | 9 lines

mjit.c: don't apply workaround if --enable-load-relative

is specified.

This is needed for MinGW because MJIT_BUILD_DIR doesn't prefix path
like "C:\msys64", so it can't be read without msys2's conversion.

The workaround is not needed for Windows (LOAD_RELATIVE looks defined by
default) anyway. So removed it for such environment.
------------------------------------------------------------------------
r64160 | k0kubun | 2018-08-02 22:03:34 +0900 (Thu, 02 Aug 2018) | 9 lines

mjit.c: suppress warnings by -Wunused-value

on MinGW with __atomic_exchange_n(). It returns the previous pointer value but
obviously it's not needed in MJIT's usage.

mjit.c: In function 'compact_all_jit_code':
ruby_atomic.h:11:36: warning: value computed is not used [-Wunused-value]
 # define ATOMIC_EXCHANGE(var, val) __atomic_exchange_n(&(var), (val), __ATOMIC_SEQ_CST)
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------------------------------------------------
r64159 | k0kubun | 2018-08-02 20:39:11 +0900 (Thu, 02 Aug 2018) | 1 line

thread_win32.c: suppress warnings by -Wsuggest-attribute
------------------------------------------------------------------------
r64158 | svn | 2018-08-02 15:09:39 +0900 (Thu, 02 Aug 2018) | 1 line

* 2018-08-02
------------------------------------------------------------------------
r64157 | normal | 2018-08-02 15:09:38 +0900 (Thu, 02 Aug 2018) | 7 lines

test/socket/test_socket.rb (test_timestampns): retry send

It looks like we need to retry test_timestampns in addition
to test_timestamp; so share some code while we're at it.

cf. http://ci.rvm.jp/results/trunk-test@frontier/1153126
[ruby-core:88104] [Bug #14898]
------------------------------------------------------------------------
r64156 | shyouhei | 2018-08-01 12:40:37 +0900 (Wed, 01 Aug 2018) | 4 lines

move atomic logic from mjit.c from ruby_atomic.h

This macro shall be shared among other files, not just for mjit.c.

------------------------------------------------------------------------
r64155 | shyouhei | 2018-08-01 11:55:11 +0900 (Wed, 01 Aug 2018) | 2 lines

(cosmetic) add blank lines for better readability

------------------------------------------------------------------------
r64154 | nobu | 2018-08-01 02:11:00 +0900 (Wed, 01 Aug 2018) | 5 lines

[DOC] Added CI build status for Japanese docs

[Fix GH-1923]

From: Andrea Gomez <crypto.andrea@protonmail.ch>
------------------------------------------------------------------------
r64153 | kazu | 2018-08-01 00:20:55 +0900 (Wed, 01 Aug 2018) | 3 lines

Add same comment to thwait.gemspec like other gemspec at r64145

[ci skip]
------------------------------------------------------------------------
r64152 | kazu | 2018-08-01 00:20:54 +0900 (Wed, 01 Aug 2018) | 1 line

Add PRINTF_ARGS to kprintf
------------------------------------------------------------------------
r64151 | svn | 2018-08-01 00:02:32 +0900 (Wed, 01 Aug 2018) | 1 line

* 2018-08-01
------------------------------------------------------------------------
r64150 | nobu | 2018-08-01 00:02:31 +0900 (Wed, 01 Aug 2018) | 1 line

Makefile.in: remove GNU-make dependency
------------------------------------------------------------------------
r64145 | hsbt | 2018-07-31 21:56:17 +0900 (Tue, 31 Jul 2018) | 1 line

Try to load version file of github repository at first.
------------------------------------------------------------------------
r64144 | k0kubun | 2018-07-31 21:55:28 +0900 (Tue, 31 Jul 2018) | 3 lines

transform_mjit_header.rb: more strict FUNC_HEADER_REGEXP

to reduce "SKIPPED" logs on MJIT header build.
------------------------------------------------------------------------
r64143 | k0kubun | 2018-07-31 21:43:06 +0900 (Tue, 31 Jul 2018) | 13 lines

mjit.c: allow using MJIT header in build directory

when $MJIT_SEARCH_BUILD_DIR is set.

If prefix path is owned by root, `make install` needs to be run by root.
But in general we don't want to run `make test-all`, and also running
`make test-all` currently fails due to permission tests of rdoc and rubygems.
Thus, prior to this commit, specifying a prefix like "/usr/local" could
mean there was no way to pass test-all.

So we should not depend on `make install` for `make test-all`. Thus I
reverted r64104 and r64103, and applied this workaround to pass `make
test-all` without `make install`.
------------------------------------------------------------------------
r64142 | hsbt | 2018-07-31 21:25:24 +0900 (Tue, 31 Jul 2018) | 1 line

Follow up r64141 with sync tool.
------------------------------------------------------------------------
r64141 | hsbt | 2018-07-31 21:12:33 +0900 (Tue, 31 Jul 2018) | 1 line

Fixed inconsistency gemspec location.
------------------------------------------------------------------------
r64140 | hsbt | 2018-07-31 21:05:24 +0900 (Tue, 31 Jul 2018) | 1 line

Fixed unexpected direction deletion with irb sync.
------------------------------------------------------------------------
r64139 | hsbt | 2018-07-31 20:48:09 +0900 (Tue, 31 Jul 2018) | 1 line

Support Sync module same as other default gems.
------------------------------------------------------------------------
r64138 | k0kubun | 2018-07-31 20:18:59 +0900 (Tue, 31 Jul 2018) | 13 lines

transform_mjit_header.rb: accept having attribute

between a type of return value and function identifier. Like:

```
rb_control_frame_t *
__attribute__ ((__fastcall__)) rb_vm_opt_struct_aref(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)
{
    ...
}
```

[Bug #14949]
------------------------------------------------------------------------
r64137 | hsbt | 2018-07-31 12:49:38 +0900 (Tue, 31 Jul 2018) | 6 lines

Move obsoleted test/thread/test_*.rb with the current implementation.

  * test/ruby/test_thread_{cv,queue}.rb: Move under the test/ruby directory.
    and rename TestThread* from Test*.
  * test/test_sync.rb: Move toplevel of test diretory because sync is still
    standard library.
------------------------------------------------------------------------
r64136 | hsbt | 2018-07-31 10:35:16 +0900 (Tue, 31 Jul 2018) | 1 line

Fixed inconsistency file structure for gemspec.
------------------------------------------------------------------------
r64135 | normal | 2018-07-31 10:33:39 +0900 (Tue, 31 Jul 2018) | 5 lines

test/ruby/test_io.rb (test_race_gets_and_close): use SIGABRT on timeout

I can't reproduce the test failure and I'm still not sure what's
wrong, but maybe we can get a core dump from P895:
http://ci.rvm.jp/results/trunk@P895/1174672
------------------------------------------------------------------------
r64134 | normal | 2018-07-31 06:48:32 +0900 (Tue, 31 Jul 2018) | 6 lines

thread_pthread.c (unregister_ubf_list): assert unblock.func is unset

We must not allow reentry into ubf_list_head once we delete
ourselves, otherwise we could hang in there forever.

[ruby-core:88218] [Bug #14945]
------------------------------------------------------------------------
r64133 | normal | 2018-07-31 03:53:46 +0900 (Tue, 31 Jul 2018) | 8 lines

thread_pthread.c (gvl_yield): do ubf wakeups when uncontended

Not having contention for GVL could mean everybody else is stuck
in blocking region without GVL, so we kick the ubf list in that
case.

I expect this to fix test_thread_fd_close timeout:
http://ci.rvm.jp/results/trunk-test@ruby-sky3/1173398
------------------------------------------------------------------------
r64132 | svn | 2018-07-31 00:21:02 +0900 (Tue, 31 Jul 2018) | 1 line

* 2018-07-31
------------------------------------------------------------------------
r64131 | nobu | 2018-07-31 00:21:01 +0900 (Tue, 31 Jul 2018) | 4 lines

thread_pthread.c: revert r64123

* thread_pthread.c (USE_NATIVE_SLEEP_COND): revised wrongly removed
  line with the ifndef guard.
------------------------------------------------------------------------
r64124 | normal | 2018-07-30 18:54:41 +0900 (Mon, 30 Jul 2018) | 7 lines

thread_pthread.h (native_thread_data): split condvars on some platforms

Maybe some platforms have strange condition variable implementations
which have a "memory" of which mutexes they're associated with.

In any case, it makes documentation easier even on GNU/Linux and
FreeBSD.
------------------------------------------------------------------------
r64123 | nobu | 2018-07-30 17:45:19 +0900 (Mon, 30 Jul 2018) | 1 line

thread_pthread.c: remove duplicate define
------------------------------------------------------------------------
r64122 | shyouhei | 2018-07-30 17:22:50 +0900 (Mon, 30 Jul 2018) | 2 lines

fix typo(#2), sorry!

------------------------------------------------------------------------
r64121 | shyouhei | 2018-07-30 17:21:01 +0900 (Mon, 30 Jul 2018) | 2 lines

fix typo; sorry!

------------------------------------------------------------------------
r64120 | normal | 2018-07-30 17:05:22 +0900 (Mon, 30 Jul 2018) | 4 lines

bootstraptest/runner.rb: speed up assert_finish with IO.select (take #2)

Resurrect r63754 in a 1.8-compatible way.  While we're at it,
add a note to maintain 1.8 compatibility (cf. r63757).
------------------------------------------------------------------------
r64119 | shyouhei | 2018-07-30 16:53:24 +0900 (Mon, 30 Jul 2018) | 5 lines

move #pragma out of functions

gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18) reportedly fails to compile
cf: https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos6/ruby-trunk/log/20180726T093003Z.fail.html.gz

------------------------------------------------------------------------
r64118 | shyouhei | 2018-07-30 16:07:48 +0900 (Mon, 30 Jul 2018) | 8 lines

reduce copy & paste

We see several occurrence of "diagnostic push/pop" so why not
make them macros.  Tested on GCC8 / Clang 6.

Note that ruby.h is intentionally left untouched because we don't
want to introduce new public macros.

------------------------------------------------------------------------
r64117 | normal | 2018-07-30 15:35:08 +0900 (Mon, 30 Jul 2018) | 7 lines

process.c (waitpid_nogvl): prevent conflicting use of sleep_cond

We reuse sleep_cond for waitpid notifications as well as GVL
waiting.  So we must take care to not hold onto sleep_cond
when we try to reacquire GVL.

[ruby-core:88183]
------------------------------------------------------------------------
r64116 | normal | 2018-07-30 15:02:22 +0900 (Mon, 30 Jul 2018) | 1 line

thread_pthread.c (rb_sigwait_sleep): th may be 0 from MJIT
------------------------------------------------------------------------
r64115 | normal | 2018-07-30 14:51:06 +0900 (Mon, 30 Jul 2018) | 6 lines

thread*.c: waiting on sigwait_fd performs periodic ubf wakeups

We need to be able to perform periodic ubf_list wakeups when a
thread is sleeping and waiting on signals.

[ruby-core:88088] [Misc #14937] [Bug #5343]
------------------------------------------------------------------------
r64114 | normal | 2018-07-30 14:51:01 +0900 (Mon, 30 Jul 2018) | 5 lines

thread_pthread.c (gvl_destroy): make no-op on GVL bits

It's possible for another thread to take vm->gvl.lock
during gvl_release at the end of thread_start_func_2
during VM shutdown, at least.
------------------------------------------------------------------------
r64113 | normal | 2018-07-30 13:28:28 +0900 (Mon, 30 Jul 2018) | 3 lines

thread_pthread.c (rb_sigwait_sleep): fix uninitialized poll set in UBF case

[ruby-core:88088] [Misc #14937] [Bug #5343]
------------------------------------------------------------------------
r64112 | shyouhei | 2018-07-30 12:23:32 +0900 (Mon, 30 Jul 2018) | 2 lines

non-constant aggregate initializer is a C99ism

------------------------------------------------------------------------
r64111 | normal | 2018-07-30 11:28:00 +0900 (Mon, 30 Jul 2018) | 7 lines

thread_pthread.c (rb_sigwait_sleep): re-fix [Bug #5343] harder

We can't always designate a timer thread, so any sleepers must
also perform ubf wakeups.  Note: a similar change needs to be
made for rb_thread_fd_select and rb_wait_for_single_fd.

[ruby-core:88088] [Misc #14937] [Bug #5343]
------------------------------------------------------------------------
r64110 | normal | 2018-07-30 09:31:08 +0900 (Mon, 30 Jul 2018) | 9 lines

thread.c: move ppoll wrapper into thread_pthread.c

thread_pthread.c relies on ppoll for rb_sigwait_sleep, so ensure
the compatibility wrapper is available for it.

[Bug #14950]

Reported-by: SHIBATA Hiroshi <hsbt@ruby-lang.org>
Reported-by: Greg L <Greg.mpls@gmail.com>
------------------------------------------------------------------------
r64109 | normal | 2018-07-30 07:54:44 +0900 (Mon, 30 Jul 2018) | 6 lines

thread.c: move ppoll wrapper before thread_pthread.c

thread_pthread.c relies on ppoll for rb_sigwait_sleep, so ensure
the compatibility wrapper is available for it.

Reported-by: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r64108 | normal | 2018-07-30 07:19:15 +0900 (Mon, 30 Jul 2018) | 12 lines

thread_pthread.c (ubf_select): refix [Bug #5343]

We still need to to designate a timer thread after registering target
thread for the ubf list.

Oops :x

Note: I was never able to reproduce
test/thread/test_queue.rb::test_thr_kill failures on my on
Debian machines.

[ruby-core:88088] [Misc #14937] [Bug #5343]
------------------------------------------------------------------------
r64107 | normal | 2018-07-30 05:47:33 +0900 (Mon, 30 Jul 2018) | 57 lines

thread_pthread: remove timer-thread by restructuring GVL

To reduce resource use and reduce CI failure; remove
timer-thread.  Single-threaded Ruby processes (including forked
children) will never see extra thread overhead.  This prevents
glibc and jemalloc from going into multi-threaded mode and
initializing locks or causing fragmentation via arena explosion.

The GVL is implements its own wait-queue as a ccan/list to
permit controlling wakeup order.  Timeslice under contention is
handled by a designated timer thread (similar to choosing a
"patrol_thread" for current deadlock checking).

There is only one self-pipe, now, as wakeups for timeslice are
done independently using condition variables.  This reduces FD
pressure slightly.

Signal handling is handled directly by a Ruby Thread (instead
of timer-thread) by exposing signal self-pipe to callers of
rb_thread_fd_select, native_sleep, rb_wait_for_single_fd, etc...
Acquiring, using, and releasing the self-pipe is exposed via 4
new internal functions:

1) rb_sigwait_fd_get - exclusively acquire timer_thread_pipe.normal[0]

2) rb_sigwait_fd_sleep - sleep and wait for signal (and no other FDs)

3) rb_sigwait_fd_put - release acquired result from rb_sigwait_fd_get

4) rb_sigwait_fd_migrate - migrate signal handling to another thread
                           after calling rb_sigwait_fd_put.

rb_sigwait_fd_migrate is necessary for waitpid callers because
only one thread can wait on self-pipe at a time, otherwise a
deadlock will occur if threads fight over the self-pipe.

TRAP_INTERRUPT_MASK is now set for the main thread directly in
signal handler via rb_thread_wakeup_timer_thread.

Originally, I wanted to use POSIX timers
(timer_create/timer_settime) for this.  Unfortunately, this
proved unfeasible as Mutex#sleep resumes on spurious wakeups and
test/thread/test_cv.rb::test_condvar_timed_wait failed.  Using
pthread_sigmask to mask out SIGVTALRM fixed that test,  but
test/fiddle/test_function.rb::test_nogvl_poll proved there'd be
some unavoidable (and frequent) incompatibilities from that
approach.

Finally, this allows us to drop thread_destruct_lock and
interrupt current ec directly.

We don't need to rely on vm->thread_destruct_lock or a coherent
vm->running_thread on any platform.  Separate timer-thread for
time slice and signal handling is relegated to thread_win32.c,
now.

[ruby-core:88088] [Misc #14937]
------------------------------------------------------------------------
r64106 | svn | 2018-07-30 05:28:57 +0900 (Mon, 30 Jul 2018) | 1 line

* 2018-07-30
------------------------------------------------------------------------
r64105 | normal | 2018-07-30 05:28:56 +0900 (Mon, 30 Jul 2018) | 5 lines

test/ruby/test_process.rb (test_wait_and_sigchld): improve reliability

This should fix CI failure under MJIT, 100ms wait may not be
enough for signal handler to fire:
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1169472
------------------------------------------------------------------------
r64104 | nobu | 2018-07-29 20:00:02 +0900 (Sun, 29 Jul 2018) | 1 line

common.mk: install for test-all iff load-relative is disabled
------------------------------------------------------------------------
r64103 | k0kubun | 2018-07-29 19:31:57 +0900 (Sun, 29 Jul 2018) | 1 line

common.mk: test-all requires install for now
------------------------------------------------------------------------
r64102 | normal | 2018-07-29 19:15:11 +0900 (Sun, 29 Jul 2018) | 6 lines

thread_pthread.c: clear altstacks in thread cache at GVL destruction

Otherwise, an altstack may live past ObjectSpace destruction
and xfree-ing the altstack will segfault.

[ruby-core:85621] [Feature #14487]
------------------------------------------------------------------------
r64101 | nobu | 2018-07-29 17:13:05 +0900 (Sun, 29 Jul 2018) | 6 lines

reduce LibreSSL warnings

* ext/openssl/extconf.rb: LibreSSL headers emit "overriding WinCrypt
  defines" warnings if wincrypt.h has been included (except for
  x509.h) on Windows.  get rid of including the header by defining
  NOCRYPT macro.
------------------------------------------------------------------------
r64100 | k0kubun | 2018-07-29 17:04:45 +0900 (Sun, 29 Jul 2018) | 6 lines

mjit.c: keep unit->o_file on --jit-save-temps

to use compaction with --jit-save-temps.

Prior to this commit, JIT compaction didn't work with --jit-save-temps
but it wasn't intentional.
------------------------------------------------------------------------
r64099 | k0kubun | 2018-07-29 12:22:07 +0900 (Sun, 29 Jul 2018) | 4 lines

test_jit.rb: skip known test failure on MinGW

for the ease of MSP-Greg's CI. I'll track this failure as Bug#14948 and
fix it later.
------------------------------------------------------------------------
r64098 | k0kubun | 2018-07-29 11:36:35 +0900 (Sun, 29 Jul 2018) | 3 lines

test_jit.rb: use the appropiate name

for better C-level backtrace
------------------------------------------------------------------------
r64097 | k0kubun | 2018-07-29 11:05:08 +0900 (Sun, 29 Jul 2018) | 4 lines

mjit.c: disable compaction on empty queue w/ --jit-wait

When --jit-wait is specified, `unit_queue.length` is always 0 and it's
not a good metric.
------------------------------------------------------------------------
r64096 | nobu | 2018-07-29 10:32:37 +0900 (Sun, 29 Jul 2018) | 13 lines

repack structs

Repack rb_thread_struct, rb_execution_context_struct, args_info and
iseq_compile_data to save 1 word per struct.

re_pattern_buffer remains unpacked due to the possible binary
compatibility.

[Fix GH-1907]

Based on the patch

From: Lourens Naude <lourens@bearmetal.eu>
------------------------------------------------------------------------
r64095 | nobu | 2018-07-29 09:09:08 +0900 (Sun, 29 Jul 2018) | 4 lines

mkexports.rb: flip-flop

* win32/mkexports.rb (Exports::Mswin#each_export): get rid of
  flip-flop warning.  [ruby-core:88147] [Bug #14946]
------------------------------------------------------------------------
r64094 | k0kubun | 2018-07-29 01:14:56 +0900 (Sun, 29 Jul 2018) | 100 lines

mjit.c: introduce JIT compaction [experimental]

When all compilation finishes or the number of JIT-ed code reaches
--jit-max-cache, this compacts all generated code to a single .so file
and re-loads all methods from it.

In the future, it may trigger compaction more frequently and/or limit
the maximum times of compaction to prevent unlimited memory usage.
So the current behavior is experimental, but at least the performance
improvement in this commit won't be removed.

=== Benchmark ===
In this benchmark, I'll compare following four conditions:

* trunk: r64082
* trunk JIT: r64082 w/ --jit
* single-so JIT: This commit w/ --jit
* objfcn JIT: This branch https://github.com/k0kubun/ruby/tree/objfcn w/ --jit,
  which is shinh's objfcn https://github.com/shinh/ruby/tree/objfcn rebased from this commit

```
$ uname -a
Linux bionic 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
```

* Micro benchmark
Using this script https://gist.github.com/k0kubun/10e6d3387c9ab1b134622b2c9d76ef51,
calls some amount of different methods that just return `nil`. The following tables
are its average duration seconds of 3 measurements.

Smaller is better.

** 1 method (seconds)
|       | trunk             | trunk JIT         | single-so JIT     | objfcn JIT        |
|:------|:------------------|:------------------|:------------------|:------------------|
| Time  | 5.576067774333296 | 5.915551971666446 | 5.833641665666619 | 5.845915191666639 |
| Ratio | 1.00x             | 1.06x             | 1.05x             | 1.05x             |

** 50 methods (seconds)
|       | trunk             | trunk JIT         | single-so JIT     | objfcn JIT        |
|:------|:------------------|:------------------|:------------------|:------------------|
| Time  | 3.1661167996666677| 6.125825928333342 | 4.135432743666665 | 3.750358728333348 |
| Ratio | 1.00x             | 1.93x             | 1.31x             | 1.18x             |

** 1500 methods (seconds)
|       | trunk             | trunk JIT         | single-so JIT     | objfcn JIT        |
|:------|:------------------|:------------------|:------------------|:------------------|
| Time  | 5.971650823666664 | 19.579182102999994| 10.511108153999961| 10.854653588999932|
| Ratio | 1.00x             | 3.28x             | 1.76x             | 1.82x             |

* Discourse
Using the same benchmark strategy as https://bugs.ruby-lang.org/issues/14490 with
this branch https://github.com/k0kubun/discourse/commits/benchmark2 forked from discourse
v1.8.11 to support running trunk.

1. Run ruby script/bench.rb to warm up profiling database
2. Run RUBYOPT='--jit-verbose=1 --jit-max-cache=10000' RAILS_ENV=profile bin/puma -e production
3. WAIT 5-15 or so minutes for all jitting to stop so we have no cross talk
4. Run ab -n 100 http://localhost:9292/
5. Wait for all new jitting to finish
6. Run ab -n 100 http://localhost:9292/

** Response time (ms)
Here is the response time milliseconds for each percentile.
Skipping 99%ile because it's the same as 100%ile in 100 calls.

|     | trunk| trunk|single|objfcn|
|     |      |   JIT|so JIT|   JIT|
|:----|:-----|:-----|:-----|:-----|
| 50% |   38 |   45 |   41 |   43 |
| 66% |   39 |   50 |   44 |   44 |
| 75% |   47 |   51 |   46 |   45 |
| 80% |   49 |   52 |   47 |   47 |
| 90% |   50 |   63 |   50 |   52 |
| 95% |   60 |   79 |   52 |   55 |
| 98% |   91 |  114 |   91 |   91 |
|100% |   97 |  133 |   96 |   99 |

** Ratio (smaller is better)
Here is the response time increase ratio against no-JIT trunk's one.

|     | trunk| trunk|single|objfcn|
|     |      |   JIT|so JIT|   JIT|
|:----|:-----|:-----|:-----|:-----|
| 50% | 1.00x| 1.18x| 1.08x| 1.13x|
| 66% | 1.00x| 1.28x| 1.13x| 1.13x|
| 75% | 1.00x| 1.09x| 0.98x| 0.96x|
| 80% | 1.00x| 1.06x| 0.96x| 0.96x|
| 90% | 1.00x| 1.26x| 1.00x| 1.04x|
| 95% | 1.00x| 1.32x| 0.87x| 0.92x|
| 98% | 1.00x| 1.25x| 1.00x| 1.00x|
|100% | 1.00x| 1.37x| 0.99x| 1.02x|

While 50 and 60 %ile are still worse than no-JIT trunk, 75, 80, 90, 95,
98 and 100% are not slower than that.

So now it's a little harder to say "MJIT slows down Rails applications".
Probably I can close [Bug #14490] now. Let's start improving it.

Close https://github.com/ruby/ruby/pull/1921
------------------------------------------------------------------------
r64093 | svn | 2018-07-29 00:29:15 +0900 (Sun, 29 Jul 2018) | 1 line

* 2018-07-29
------------------------------------------------------------------------
r64092 | nobu | 2018-07-29 00:29:14 +0900 (Sun, 29 Jul 2018) | 5 lines

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]
------------------------------------------------------------------------
r64091 | nobu | 2018-07-28 22:06:43 +0900 (Sat, 28 Jul 2018) | 4 lines

test_function.rb: fix messages

* test/fiddle/test_function.rb (test_nogvl_poll): fix messages as
  failed conditions, with errno description.
------------------------------------------------------------------------
r64090 | nobu | 2018-07-28 21:47:36 +0900 (Sat, 28 Jul 2018) | 1 line

make-snapshot: fetch from the official git site
------------------------------------------------------------------------
r64089 | kazu | 2018-07-28 19:00:29 +0900 (Sat, 28 Jul 2018) | 1 line

Fix filename in comment [ci skip]
------------------------------------------------------------------------
r64088 | kazu | 2018-07-28 19:00:27 +0900 (Sat, 28 Jul 2018) | 3 lines

use https:// instead of http://

[ci skip]
------------------------------------------------------------------------
r64087 | duerst | 2018-07-28 18:44:33 +0900 (Sat, 28 Jul 2018) | 16 lines

fix range check for Hangul jamo trailers in Unicode normalization

* lib/unicode_normalize/normalize.rb: Fix the range check for trailing
  Hangul jamo characters in Unicode normalization. Different from
  leading or vowel jamos, where LBASE and VBASE are actual characters,
  a value equal to TBASE expresses the absence of a trailing jamo.
  This fix is technically correct, but there was no bug because
  the regular expressions in lib/unicode_normalize/tables.rb
  eliminate jamos equal to TBASE from normalization processing.

* test/test_unicode_normalize.rb: Add preventive test
  test_no_trailing_jamo based on
  https://github.com/python/cpython/commit/d134809cd3764c6a634eab7bb8995e3e2eff14d5
  just for the case we ever get a regression.

This closes issue #14934, thanks to MaLin (Lin Ma) for reporting.
------------------------------------------------------------------------
r64086 | duerst | 2018-07-28 18:11:13 +0900 (Sat, 28 Jul 2018) | 6 lines

always run unicode normalization that do not depend on data file

* test/test_unicode_normalize.rb: extract tests that do not depend
  on NormalizationTest.txt data file from conditionally constructed
  part of TestUnicodeNormalize class, to always run them even if
  the data file isn't found.
------------------------------------------------------------------------
r64085 | duerst | 2018-07-28 17:56:59 +0900 (Sat, 28 Jul 2018) | 4 lines

update unicode data files directory for normalization tests

* test/test_unicode_normalize.rb: search ucd directory
  first if it exists. This change follows r61415.
------------------------------------------------------------------------
r64084 | normal | 2018-07-28 12:34:30 +0900 (Sat, 28 Jul 2018) | 3 lines

use https:// instead of git:// when possible

Avoid MitM when downloading from insecure networks.
------------------------------------------------------------------------
r64083 | normal | 2018-07-28 12:10:10 +0900 (Sat, 28 Jul 2018) | 13 lines

thread.c (blocking_region_end): clear ubf before unregister_ubf_list

If we keep ubf set after unregistering, there is a window for
other threads (including timer thread) to put this thread back
on the ubf_list right away.  Entering ubf_list unexpectedly
after GVL acquisition may cause spurious wakeup and trigger
unexpected behavior.

Finally, clear ubf before acquiring GVL, to since ubf is useless
during GVL acquisition anyways and we don't want to waste cycles
in other threads calling ubf for useless work.

[ruby-core:88141] [Bug #14945]
------------------------------------------------------------------------
r64082 | k0kubun | 2018-07-28 07:27:04 +0900 (Sat, 28 Jul 2018) | 1 line

mjit.c: clean up unit link from iseq
------------------------------------------------------------------------
r64081 | tenderlove | 2018-07-28 02:28:41 +0900 (Sat, 28 Jul 2018) | 9 lines

Include Hash#size in the examples

Both methods Hash#length and Hash#size share the same source code in
Ruby, but they also share the same documentation. Now when you look at
the documentation of Hash#size you only see examples for Hash#length,
which is confusing. This commit includes Hash#size in the examples and
also remarks that both methods are equivalent to each other.

Co-authored-by: Alberto Almagro <alberto.almagro@rakuten.com>
------------------------------------------------------------------------
r64080 | svn | 2018-07-28 02:19:44 +0900 (Sat, 28 Jul 2018) | 1 line

* 2018-07-28
------------------------------------------------------------------------
r64079 | tenderlove | 2018-07-28 02:19:43 +0900 (Sat, 28 Jul 2018) | 3 lines

Escape debug output in InvalidURIError exceptions.

Co-authored-by: Brad Landers <brad@bradlanders.com>
------------------------------------------------------------------------
r64078 | mame | 2018-07-27 22:57:14 +0900 (Fri, 27 Jul 2018) | 7 lines

eval.c: rename "rb_frozen_class_p" to "rb_class_modify_check"

Just refactoring.  Despite its name, the function does NOT return a
boolean but raises an exception when the class given is frozen.
I don't think the new name "rb_class_modify_check" is the best, but
it follows the precedeint "rb_ary_modify_check", and is definitely
better than "*_p".
------------------------------------------------------------------------
r64077 | k0kubun | 2018-07-27 18:27:58 +0900 (Fri, 27 Jul 2018) | 7 lines

mjit.c: keep all .o files

and lazily delete them on termination.

This will be needed to create a large so file later.
The large number of .o files will be probably compacted before the large so
file is created.
------------------------------------------------------------------------
r64076 | k0kubun | 2018-07-27 17:51:56 +0900 (Fri, 27 Jul 2018) | 10 lines

mjit.c: use NOT_COMPILED_JIT_ISEQ_FUNC for unloaded

units, renaming it from NOT_COMPILABLE_JIT_ISEQ_FUNC.

NOT_READY_JIT_ISEQ_FUNC is for ones being compiled, so
mjit_get_iseq_func treats it specially and it shouldn't be used for the
purpose.

I renamed it instead of adding a new one because I'm not sure about the
impact for the performance by increasing the switch branches in mjit_exec.
------------------------------------------------------------------------
r64075 | k0kubun | 2018-07-27 17:24:10 +0900 (Fri, 27 Jul 2018) | 3 lines

mjit.c: release memory for unloaded unit

`xfree(unit)` was missing.
------------------------------------------------------------------------
r64074 | mame | 2018-07-27 15:28:14 +0900 (Fri, 27 Jul 2018) | 1 line

insns.def: remove old wrong explanation for get/setconstant
------------------------------------------------------------------------
r64073 | k0kubun | 2018-07-27 15:01:46 +0900 (Fri, 27 Jul 2018) | 3 lines

mjit.c: clarify the intention of setting 0

which was originally NULL before r62221
------------------------------------------------------------------------
r64072 | k0kubun | 2018-07-27 14:52:01 +0900 (Fri, 27 Jul 2018) | 1 line

test_jit.rb: test unload_units
------------------------------------------------------------------------
r64071 | nobu | 2018-07-27 14:42:56 +0900 (Fri, 27 Jul 2018) | 4 lines

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]
------------------------------------------------------------------------
r64070 | svn | 2018-07-27 03:46:11 +0900 (Fri, 27 Jul 2018) | 1 line

* 2018-07-27
------------------------------------------------------------------------
r64069 | marcandre | 2018-07-27 03:46:10 +0900 (Fri, 27 Jul 2018) | 6 lines

lib/ostruct: Remove unnecessary `__send__`

Patch by yuuji.yaginuma [Fix GH-1890]

Since `remove_method` is public.
Ref: https://bugs.ruby-lang.org/issues/14133
------------------------------------------------------------------------
r64068 | k0kubun | 2018-07-26 22:05:47 +0900 (Thu, 26 Jul 2018) | 1 line

mjit.c: o -> so is not compilation
------------------------------------------------------------------------
r64067 | nobu | 2018-07-26 21:48:02 +0900 (Thu, 26 Jul 2018) | 7 lines

dir.c: fix glob with base when no DT_UNKNOWN

* dir.c (do_stat, do_lstat, do_opendir): need the length of the base
  path for fstatat() when fd is valid.

* dir.c (glob_helper): fix for platforms where DT_UNKNOWN is not
  available, e.g. Solaris.
------------------------------------------------------------------------
r64066 | kazu | 2018-07-26 21:47:01 +0900 (Thu, 26 Jul 2018) | 1 line

Add missing escape
------------------------------------------------------------------------
r64065 | nobu | 2018-07-26 21:04:32 +0900 (Thu, 26 Jul 2018) | 4 lines

process.c: conditionally used functions

* process.c (before_fork_ruby, after_fork_ruby): used only if fork()
  or daemon() is available.
------------------------------------------------------------------------
r64064 | nobu | 2018-07-26 18:34:30 +0900 (Thu, 26 Jul 2018) | 1 line

dladdr() is declared with non-const pointer on Solaris
------------------------------------------------------------------------
r64063 | nobu | 2018-07-26 18:32:42 +0900 (Thu, 26 Jul 2018) | 1 line

fork() is deprecated on Solaris
------------------------------------------------------------------------
r64062 | normal | 2018-07-26 17:30:10 +0900 (Thu, 26 Jul 2018) | 18 lines

cont.c (ec_switch): prevent delayed/missed trap interrupt race

timer-thread may set trap interrupt with rb_threadptr_check_signal
at any time independent of GVL.  This means timer-thread may set
the trap interrupt flag on the previous execution context; causing
the flag to be unnoticed until a future ec switch (or lost
completely if the ec is done).

Note: I avoid relying on th->interrupt_lock here and use
atomics because we won't be able to rely on it for proposed lazy
timer-thread [Misc #14937].

This regression affects Ruby 2.5 as it was introduced by moving
interrupt_flag to `ec' which is an unstable pointer.  Ruby <= 2.4
was unaffected because vm->main_thread->interrupt_flag never
changed.

[ruby-core:88119] [Bug #14939]
------------------------------------------------------------------------
r64061 | nobu | 2018-07-26 16:23:14 +0900 (Thu, 26 Jul 2018) | 1 line

ignore built files
------------------------------------------------------------------------
r64060 | normal | 2018-07-26 12:21:52 +0900 (Thu, 26 Jul 2018) | 34 lines

webrick: Support bcrypt password hashing

This adds a password_hash keyword argument to
WEBrick::HTTPAuth::Htpasswd#initialize.  If set to :bcrypt, it
will create bcrypt hashes instead of crypt hashes, and will
raise an exception if the .htpasswd file uses crypt hashes.

If :bcrypt is used, then instead of calling
BasicAuth.make_passwd (which uses crypt),
WEBrick::HTTPAuth::Htpasswd#set_passwd will set the bcrypt
password directly.  It isn't possible to change the
make_passwd API to accept the password hash format, as that
would break configurations who use Htpasswd#auth_type= to set
a custom auth_type.

This modifies WEBrick::HTTPAuth::BasicAuth to handle checking
both crypt and bcrypt hashes.

There are commented out requires for 'string/crypt', to handle
when String#crypt is deprecated and the undeprecated version is
moved to a gem.

There is also a commented out warning for the case when
the password_hash keyword is not specified and 'string/crypt'
cannot be required.  I think the warning makes sense to nudge
users to using bcrypt.

I've updated the tests to test nil, :crypt, and :bcrypt values
for the password_hash keyword, skipping the bcrypt tests if the
bcrypt library cannot be required.

[ruby-core:88111] [Feature #14940]

From: Jeremy Evans <code@jeremyevans.net>
------------------------------------------------------------------------
r64059 | normal | 2018-07-26 07:32:54 +0900 (Thu, 26 Jul 2018) | 3 lines

test/ruby/test_io.rb (test_select_leak): skip with MJIT

We need better ways to test for leaks :<
------------------------------------------------------------------------
r64058 | tenderlove | 2018-07-26 03:09:02 +0900 (Thu, 26 Jul 2018) | 68 lines

[Doc] Recover example about Queue

`trunk@42862` dropped example's last line.

https://github.com/ruby/ruby/commit/e334bb2ce5d8876b020ab681f21595e2e1c9d601#diff-8783a9b452e430bcf0d7b0c6e34f1db0L144
https://github.com/ruby/ruby/commit/e334bb2ce5d8876b020ab681f21595e2e1c9d601#diff-38e7b9d781319cfbc49445f8f6625b8aR195

This brings no output.

```queue_example1.rb
queue = Queue.new

producer = Thread.new do
  5.times do |i|
    sleep rand(i) # simulate expense
    queue << i
    puts "#{i} produced"
  end
end

consumer = Thread.new do
  5.times do |i|
    value = queue.pop
    sleep rand(i/2) # simulate expense
    puts "consumed #{value}"
  end
end
```

```queue_example2.rb
queue = Queue.new

producer = Thread.new do
  5.times do |i|
    sleep rand(i) # simulate expense
    queue << i
    puts "#{i} produced"
  end
end

consumer = Thread.new do
  5.times do |i|
    value = queue.pop
    sleep rand(i/2) # simulate expense
    puts "consumed #{value}"
  end
end

consumer.join
```

$ ruby queue_example1.rb
$

$ ruby queue_example2.rb
0 produced
1 produced
consumed 0
consumed 1
2 produced
consumed 2
3 produced
consumed 3
4 produced
consumed 4
$

Co-Authored-By: Sanemat <o.gata.ken@gmail.com>
------------------------------------------------------------------------
r64057 | tenderlove | 2018-07-26 03:06:29 +0900 (Thu, 26 Jul 2018) | 5 lines

Remove obsolete comment from Module#define_method documentation

Since 2.5, Module#define_method is public. (feature #14133)

Co-Authored-By: Miguel Landaeta <miguel@miguel.cc>
------------------------------------------------------------------------
r64056 | tenderlove | 2018-07-26 03:04:16 +0900 (Thu, 26 Jul 2018) | 3 lines

Fixes the File::CREAT logger documentation

Co-Authored-By: Matias Korhonen <matias@kiskolabs.com>
------------------------------------------------------------------------
r64055 | svn | 2018-07-26 03:00:12 +0900 (Thu, 26 Jul 2018) | 1 line

* 2018-07-26
------------------------------------------------------------------------
r64054 | tenderlove | 2018-07-26 03:00:09 +0900 (Thu, 26 Jul 2018) | 3 lines

Add docs to RubyVM::AST

Co-Authored-By: Robert Mosolgo <rdmosolgo@gmail.com>
------------------------------------------------------------------------
r64053 | k0kubun | 2018-07-25 23:55:43 +0900 (Wed, 25 Jul 2018) | 8 lines

insns.def: s/handles_frame/handles_sp/

because it's more suitable to describe the current behavior now.

tool/ruby_vm/models/bare_instructions.rb: ditto.
tool/ruby_vm/views/_insn_entry.erb: ditto.
tool/ruby_vm/views/_mjit_compile_insn_body.erb: ditto.
tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb: ditto.
------------------------------------------------------------------------
r64052 | k0kubun | 2018-07-25 23:36:08 +0900 (Wed, 25 Jul 2018) | 56 lines

mjit.c: split build stages for unix

I'm going to build a large .so file that combines multiple .o files.
For that change, I want to confirm the impact to performance by this
change. So far, I haven't seen the significant change on the max
performance.

* before
$ for i in 1 2 3 4 5 6 7 8 9 1 2; do ruby --jit ../../mame/optcarrot/bin/optcarrot --benchmark ../../mame/optcarrot/examples/Lan_Master.nes; done
fps: 67.66058054621772
checksum: 59662
fps: 67.53138656233348
checksum: 59662
fps: 67.44109425628592
checksum: 59662
fps: 70.29423063961576
checksum: 59662
fps: 72.0147653358158
checksum: 59662
fps: 69.40157398157892
checksum: 59662
fps: 72.3984212467565
checksum: 59662
fps: 67.15473484463604
checksum: 59662
fps: 70.14142014098444
checksum: 59662
fps: 72.51761974327023
checksum: 59662
fps: 72.41086970333218
checksum: 59662

* after
$ for i in 1 2 3 4 5 6 7 8 9 1 2; do ruby --jit ../../mame/optcarrot/bin/optcarrot --benchmark ../../mame/optcarrot/examples/Lan_Master.nes; done
fps: 69.53134628999938
checksum: 59662
fps: 66.13157649232654
checksum: 59662
fps: 70.17474368971281
checksum: 59662
fps: 61.88316323809907
checksum: 59662
fps: 72.48731307319704
checksum: 59662
fps: 65.1180687907147
checksum: 59662
fps: 68.89553415996615
checksum: 59662
fps: 65.77342314036225
checksum: 59662
fps: 64.33337015048106
checksum: 59662
fps: 64.98152672793444
checksum: 59662
fps: 72.225729092625
checksum: 59662
------------------------------------------------------------------------
r64051 | k0kubun | 2018-07-25 22:54:00 +0900 (Wed, 25 Jul 2018) | 8 lines

mjit.c: completely separate compile_c_to_so

by whether on mswin or not.

This is needed because I'm going to renew the compilation process for
unix, keeping mswin builds as it is, at first.

This commit is not changing the behavior at all.
------------------------------------------------------------------------
r64050 | k0kubun | 2018-07-25 21:33:38 +0900 (Wed, 25 Jul 2018) | 1 line

mjit.c: prevent memory leak on realloc failure
------------------------------------------------------------------------
r64049 | hsbt | 2018-07-25 21:31:58 +0900 (Wed, 25 Jul 2018) | 1 line

Update latest default gems on maintainers.rdoc and standard_library.rdoc.
------------------------------------------------------------------------
r64048 | hsbt | 2018-07-25 21:28:17 +0900 (Wed, 25 Jul 2018) | 5 lines

Promote Mutex_m to Default gems.

  * lib/mutex_m.gemspec: Added initial gemspec.
  * lib/mutex_m.rb: Added Mutex_m::VERSION for gemspec.
  * tool/sync_default_gems.rb: Support Mutex_m.
------------------------------------------------------------------------
r64047 | svn | 2018-07-25 21:26:42 +0900 (Wed, 25 Jul 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64046 | hsbt | 2018-07-25 21:26:41 +0900 (Wed, 25 Jul 2018) | 5 lines

Promote Exception2MessageMapper to Default gems.

  * lib/e2mmap.gemspec: Added initial gemspec.
  * lib/e2mmap/version.rb: Added Exception2MessageMapper::VERSION for gemspec.
  * tool/sync_default_gems.rb: Support Exception2MessageMapper.
------------------------------------------------------------------------
r64045 | svn | 2018-07-25 21:15:46 +0900 (Wed, 25 Jul 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64044 | hsbt | 2018-07-25 21:15:45 +0900 (Wed, 25 Jul 2018) | 5 lines

Promote ThWait to Default gems.

  * lib/thwait.gemspec: Added initial gemspec.
  * lib/thwait/version.rb: Added ThWait::VERSION for gemspec.
  * tool/sync_default_gems.rb: Support ThWait.
------------------------------------------------------------------------
r64043 | hsbt | 2018-07-25 20:59:21 +0900 (Wed, 25 Jul 2018) | 1 line

Removed duplicate task in default gems that used single test file
------------------------------------------------------------------------
r64042 | hsbt | 2018-07-25 20:53:57 +0900 (Wed, 25 Jul 2018) | 5 lines

Promote Forwardable to default gems.

  * lib/forwardable.rb: Added Forwardable::VERSION and re-use it.
  * lib/forwardable/forwardable.gemspec: Added initial gemspec.
  * tool/sync_default_gems.rb: Support forwaradable repository.
------------------------------------------------------------------------
r64041 | hsbt | 2018-07-25 20:51:43 +0900 (Wed, 25 Jul 2018) | 1 line

Removed duplicate task in default gems
------------------------------------------------------------------------
r64040 | hsbt | 2018-07-25 20:47:04 +0900 (Wed, 25 Jul 2018) | 1 line

Support logger.gemspec
------------------------------------------------------------------------
r64039 | hsbt | 2018-07-25 20:34:35 +0900 (Wed, 25 Jul 2018) | 4 lines

Update latest versions of bundled gems.

  * net-telnet-0.2.0
  * power_assert-1.1.3
------------------------------------------------------------------------
r64038 | naruse | 2018-07-25 05:24:27 +0900 (Wed, 25 Jul 2018) | 4 lines

Revert "dir.c: fix glob with base when no DT_UNKNOWN"

This reverts commit r63982.
It breaks build on Solaris 11.
------------------------------------------------------------------------
r64037 | k0kubun | 2018-07-25 00:40:05 +0900 (Wed, 25 Jul 2018) | 10 lines

mjit.c: handle memory allocation failure

which was missing in r64033.

Prior to r64033, memory allocation failure had been checked by
TRY_WITH_GC and handled by rb_memerror. But calling rb_memerror on MJIT
worker is problematic since it does EC_JUMP_TAG in the end. Threads
except Ruby's main thread must not use it.

mjit_compile.c: ditto
------------------------------------------------------------------------
r64036 | svn | 2018-07-25 00:17:09 +0900 (Wed, 25 Jul 2018) | 1 line

* 2018-07-25
------------------------------------------------------------------------
r64035 | k0kubun | 2018-07-25 00:17:08 +0900 (Wed, 25 Jul 2018) | 10 lines

vm.c: simplify the implementation of r64031

because such inconsistency may result in the regression fixed in r64034.

vm_exec is not touched since renaming it may be controversial...

vm_args.c: ditto.
vm_eval.c: ditto.
vm_insnhelper.c: ditto.
vm_method.c: ditto.
------------------------------------------------------------------------
r64034 | k0kubun | 2018-07-24 23:43:40 +0900 (Tue, 24 Jul 2018) | 3 lines

transform_mjit_header.rb: fix performance regression

on r64031. Compiling vm_search_method_slowpath is very slow.
------------------------------------------------------------------------
r64033 | k0kubun | 2018-07-24 23:36:10 +0900 (Tue, 24 Jul 2018) | 7 lines

mjit.c: prevent GC on MJIT worker

mjit_compile.c: ditto.

REALLOC_N, ALLOC_N and xmalloc trigger GC but it's not expected.
Other allocation calls in mjit.c are executed on Ruby's main thread and
thus fine.
------------------------------------------------------------------------
r64032 | k0kubun | 2018-07-24 21:19:47 +0900 (Tue, 24 Jul 2018) | 5 lines

test_jit.rb: give up debugging cc1 issue

in a short term, and add retries to prevent random CI failures by it.

I remember this and will address it later for sure.
------------------------------------------------------------------------
r64031 | nobu | 2018-07-24 21:12:59 +0900 (Tue, 24 Jul 2018) | 1 line

prefix symbols exported for mjit
------------------------------------------------------------------------
r64030 | k0kubun | 2018-07-24 20:54:15 +0900 (Tue, 24 Jul 2018) | 1 line

test_jit.rb: suppress unused variable warning
------------------------------------------------------------------------
r64029 | kazu | 2018-07-24 18:15:58 +0900 (Tue, 24 Jul 2018) | 11 lines

Try to suppress warning on some CI

http://ci.rvm.jp/results/trunk-asserts-nopara@silicon-docker/1149270
```
/home/ko1/ruby/src/trunk-asserts-nopara/process.c: In function 'assert_close_on_exec':
/home/ko1/ruby/src/trunk-asserts-nopara/process.c:298:9: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
         (void)write(2, m, sizeof(m) - 1);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

workaround from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425#c34
------------------------------------------------------------------------
r64028 | nobu | 2018-07-24 16:47:01 +0900 (Tue, 24 Jul 2018) | 4 lines

time.rb: yday support

* lib/time.rb (Time.make_time): added yday support.
  [ruby-core:87545] [Bug #14860]
------------------------------------------------------------------------
r64027 | nobu | 2018-07-24 15:03:02 +0900 (Tue, 24 Jul 2018) | 1 line

dsymutil needs the object files
------------------------------------------------------------------------
r64026 | svn | 2018-07-24 14:38:09 +0900 (Tue, 24 Jul 2018) | 1 line

* 2018-07-24
------------------------------------------------------------------------
r64025 | nobu | 2018-07-24 14:38:07 +0900 (Tue, 24 Jul 2018) | 4 lines

UNREACHABLE_RETURN

* include/ruby/ruby.h (UNREACHABLE_RETURN): UNREACHABLE at the end
  of non-void functions.
------------------------------------------------------------------------
r64024 | svn | 2018-07-23 18:56:50 +0900 (Mon, 23 Jul 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64023 | kazu | 2018-07-23 18:56:49 +0900 (Mon, 23 Jul 2018) | 1 line

Revert previous commit and split lib/tracer/version.rb
------------------------------------------------------------------------
r64022 | kazu | 2018-07-23 18:49:46 +0900 (Mon, 23 Jul 2018) | 1 line

Revert partially to avoid test error temporarily
------------------------------------------------------------------------
r64021 | kazu | 2018-07-23 18:49:45 +0900 (Mon, 23 Jul 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r64020 | usa | 2018-07-23 15:22:25 +0900 (Mon, 23 Jul 2018) | 2 lines

60 sec is not enough at all

------------------------------------------------------------------------
r64019 | ko1 | 2018-07-23 15:08:02 +0900 (Mon, 23 Jul 2018) | 4 lines

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

------------------------------------------------------------------------
r64018 | normal | 2018-07-23 10:07:41 +0900 (Mon, 23 Jul 2018) | 6 lines

Revert "thread.c (rb_thread_fd_select): remove unnecessary rb_fd_resize calls"

This reverts commit r64017
(git commit 2ff85621690f4f5b0dff9226ac68418a950a6919).

Nevermind, haven't had enough coffee, yet :x
------------------------------------------------------------------------
r64017 | normal | 2018-07-23 09:51:51 +0900 (Mon, 23 Jul 2018) | 5 lines

thread.c (rb_thread_fd_select): remove unnecessary rb_fd_resize calls

There's no need to resize each rb_fdset_t to match the size of
the biggest one.  This can allow some small memory savings if
watching several sets of FDs simultaneously.
------------------------------------------------------------------------
r64016 | svn | 2018-07-23 01:03:59 +0900 (Mon, 23 Jul 2018) | 1 line

* 2018-07-23
------------------------------------------------------------------------
r64015 | nobu | 2018-07-23 01:03:58 +0900 (Mon, 23 Jul 2018) | 5 lines

object.c: prefer base optarg

* object.c (rb_f_integer): prefer `base` optional argument over
  keyword arguments.  this issue should be resolved more generally
  by separating keyword arguments from hashes in the future.
------------------------------------------------------------------------
r64014 | nobu | 2018-07-22 19:47:33 +0900 (Sun, 22 Jul 2018) | 6 lines

fix sum on infinity

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

* enum.c (sum_iter): ditto.
------------------------------------------------------------------------
r64013 | kazu | 2018-07-22 19:02:54 +0900 (Sun, 22 Jul 2018) | 7 lines

Remove needless `nacl` check

`nacl` support already removed by https://github.com/ruby/ruby/pull/1726.

[Fix GH-1920]

From: yuuji.yaginuma <yuuji.yaginuma@gmail.com>
------------------------------------------------------------------------
r64012 | svn | 2018-07-22 11:53:39 +0900 (Sun, 22 Jul 2018) | 1 line

* 2018-07-22
------------------------------------------------------------------------
r64011 | k0kubun | 2018-07-22 11:53:38 +0900 (Sun, 22 Jul 2018) | 13 lines

test_rubyoptions.rb: allow passing test_verbose

with --jit.

`./ruby --jit -Itest/lib test/ruby/test_rubyoptions.rb -n "TestRubyOptions#test_verbose"`
has failed without -DMJIT_FORCE_ENABLE like:

  1) Failure:
TestRubyOptions#test_verbose [/home/travis/build/k0kubun/mjit-test/test/ruby/test_rubyoptions.rb:118]:
<"ruby 2.6.0dev (2018-07-21 trunk 64010) +JIT [x86_64-linux]"> expected but was
<"ruby 2.6.0dev (2018-07-21 trunk 64010) [x86_64-linux]">.

but the test should pass even without -DMJIT_FORCE_ENABLE.
------------------------------------------------------------------------
r64010 | svn | 2018-07-21 22:07:52 +0900 (Sat, 21 Jul 2018) | 1 line

* properties.
------------------------------------------------------------------------
r64009 | svn | 2018-07-21 22:07:52 +0900 (Sat, 21 Jul 2018) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r64008 | mame | 2018-07-21 22:07:50 +0900 (Sat, 21 Jul 2018) | 4 lines

sample/trick2018/: adds the top-five entries of TRICK 2018

See https://github.com/tric/trick2018 for TRICK 2018.
Fixes #14930.
------------------------------------------------------------------------
r64007 | normal | 2018-07-21 12:26:38 +0900 (Sat, 21 Jul 2018) | 11 lines

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]
------------------------------------------------------------------------
r64006 | svn | 2018-07-21 07:30:40 +0900 (Sat, 21 Jul 2018) | 1 line

* 2018-07-21
------------------------------------------------------------------------
r64005 | normal | 2018-07-21 07:30:39 +0900 (Sat, 21 Jul 2018) | 6 lines

test/-ext-/gvl/test_last_thread.rb: skip under MJIT

Spurious wakeup is unavoidable with MJIT; and any real
code must be able to deal with spurious wakeup anyways.

[ruby-core:87882] https://bugs.ruby-lang.org/issues/14901
------------------------------------------------------------------------
r64004 | hsbt | 2018-07-20 11:24:59 +0900 (Fri, 20 Jul 2018) | 7 lines

Promote Shell library to default gems.

  * doc/*: Move entry to default gems category from standard library.
  * lib/shell/*: Added `Shell::VERSION` and re-used it with @RELEASE_VERSION.
  * test/shell/test_command_processor.rb: added missing require for test library.
  * tool/sync_default_gems.rb: Support shell library. We need to ignore shellwords.rb when
    syncing shell* files.
------------------------------------------------------------------------
r64003 | hsbt | 2018-07-20 10:48:11 +0900 (Fri, 20 Jul 2018) | 1 line

Fixed wrong library patFixed wrong library pathh
------------------------------------------------------------------------
r64002 | kazu | 2018-07-20 10:40:36 +0900 (Fri, 20 Jul 2018) | 1 line

Do not use `git ls-files` for file listing.
------------------------------------------------------------------------
r64001 | svn | 2018-07-20 10:26:00 +0900 (Fri, 20 Jul 2018) | 1 line

* 2018-07-20
------------------------------------------------------------------------
r64000 | hsbt | 2018-07-20 10:25:59 +0900 (Fri, 20 Jul 2018) | 1 line

Promote Tracer to default gems.
------------------------------------------------------------------------
r63999 | k0kubun | 2018-07-19 22:25:22 +0900 (Thu, 19 Jul 2018) | 38 lines

mjit_compile.c: reduce sp motion on JIT

This retries r62655, which was reverted at r63863 for r63763.

tool/ruby_vm/views/_mjit_compile_insn.erb: revert the revert.
tool/ruby_vm/views/_mjit_compile_insn_body.erb: ditto.
tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb: ditto.
tool/ruby_vm/views/_mjit_compile_send.erb: ditto.
tool/ruby_vm/views/mjit_compile.inc.erb: ditto.

tool/ruby_vm/views/_insn_entry.erb: revert half of r63763. The commit
  was originally reverted since changing pc motion was bad for tracing,
  but changing sp motion was totally fine. For JIT, I wanna resurrect
  the sp motion change in r62051.
tool/ruby_vm/models/bare_instructions.rb: ditto.
insns.def: ditto.
vm_insnhelper.c: ditto.
vm_insnhelper.h: ditto.

* benchmark

$ benchmark-driver benchmark.yml --rbenv 'before;after;before --jit;after --jit' --repeat-count 12 -v
before: ruby 2.6.0dev (2018-07-19 trunk 63998) [x86_64-linux]
after: ruby 2.6.0dev (2018-07-19 add-sp 63998) [x86_64-linux]
last_commit=mjit_compile.c: reduce sp motion on JIT
before --jit: ruby 2.6.0dev (2018-07-19 trunk 63998) +JIT [x86_64-linux]
after --jit: ruby 2.6.0dev (2018-07-19 add-sp 63998) +JIT [x86_64-linux]
last_commit=mjit_compile.c: reduce sp motion on JIT
Calculating -------------------------------------
                             before       after  before --jit  after --jit
Optcarrot Lan_Master.nes     51.354      50.238        70.010       72.139 fps

Comparison:
             Optcarrot Lan_Master.nes
             after --jit:        72.1 fps
            before --jit:        70.0 fps - 1.03x  slower
                  before:        51.4 fps - 1.40x  slower
                   after:        50.2 fps - 1.44x  slower
------------------------------------------------------------------------
r63998 | svn | 2018-07-19 20:22:05 +0900 (Thu, 19 Jul 2018) | 1 line

* 2018-07-19
------------------------------------------------------------------------
r63997 | nobu | 2018-07-19 20:22:03 +0900 (Thu, 19 Jul 2018) | 1 line

renamed ruby_tz_update as ruby_tz_uptodate_p
------------------------------------------------------------------------
r63996 | k0kubun | 2018-07-18 22:11:03 +0900 (Wed, 18 Jul 2018) | 1 line

test_rubyoptions.rb: skip testing JIT on mswin
------------------------------------------------------------------------
r63995 | k0kubun | 2018-07-18 21:45:54 +0900 (Wed, 18 Jul 2018) | 11 lines

ruby.c: accept --disable-jit option

by promoting jit to feature flag.

mjit.h: update comment about mjit_opts.on

test_rubyoptions.rb: add test for switching JIT enablement

"--jit" flag usage may be deprecated later, but not discussed yet.

[Feature #14878]
------------------------------------------------------------------------
r63994 | nobu | 2018-07-18 19:30:41 +0900 (Wed, 18 Jul 2018) | 4 lines

reduce tzset

* time.c (rb_localtime_r): call tzset() only after TZ environment
  variable is changed.
------------------------------------------------------------------------
r63993 | normal | 2018-07-18 17:16:18 +0900 (Wed, 18 Jul 2018) | 9 lines

zlib (rb_gzreader_getc): localize and return cbuf directly

No point in having a long-lived cbuf in "struct gzfile"
since GZFILE_CBUF_CAPA is smaller than RSTRING_EMBED_LEN_MAX
(even on 32-bit).  We can also have rb_econv_convert write
directly to the return value instead of an intermediate buffer.

This brings "struct gzfile" from 264 to 256 bytes on 64-bit
systems to avoid taking an additional cache line.
------------------------------------------------------------------------
r63992 | tenderlove | 2018-07-18 07:27:52 +0900 (Wed, 18 Jul 2018) | 22 lines

Include the alternative malloc header instead of malloc.h

This commit fixes a build error on systems that have
`malloc_usable_size` but also enable jemalloc via `--with-jemalloc`.
For example, Ubuntu Precise defines `malloc_usable_size` in malloc.h, so
gc.c will include malloc.h.  This definition conflicts with jemalloc's
definition, so the following error occurs:

```
compiling gc.c
compiling hash.c
In file included from gc.c:50:0:
/usr/include/malloc.h:152:15: error: conflicting types for 'malloc_usable_size'
/usr/include/jemalloc/jemalloc.h:45:8: note: previous declaration of 'malloc_usable_size' was here
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
```

Since jemalloc always defines `malloc_usable_size`, this patch just
includes the jemalloc header instead of malloc.h if it's available.
------------------------------------------------------------------------
r63991 | k0kubun | 2018-07-18 01:20:15 +0900 (Wed, 18 Jul 2018) | 5 lines

revert r63988

Due to trunk-mjit CI failures:
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1130097
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1130196
------------------------------------------------------------------------
r63990 | k0kubun | 2018-07-18 00:15:31 +0900 (Wed, 18 Jul 2018) | 6 lines

insns.def: remove redundant ifndef in r63988

By the way, the original patch of r63988 was provided by wanabe:
https://github.com/wanabe/ruby/tree/local-stack

but I forgot to add his credit in the previous commit message.
------------------------------------------------------------------------
r63989 | svn | 2018-07-18 00:09:42 +0900 (Wed, 18 Jul 2018) | 1 line

* 2018-07-18
------------------------------------------------------------------------
r63988 | k0kubun | 2018-07-18 00:09:41 +0900 (Wed, 18 Jul 2018) | 29 lines

mjit_compile.c: resurrect local variable stack

This optimization was reverted on r63863, but this commit resurrects the
optimization to skip some sp motions on JIT execution.

tool/ruby_vm/views/_mjit_compile_insn_body.erb: ditto
tool/ruby_vm/views/_mjit_compile_insn.erb: ditto

insns.def: resurrect handles_frame as handles_stack, which was deleted
on r63763.
tool/ruby_vm/models/bare_instructions.rb: ditto

vm_insnhelper.c: prevent moving sp outside insns.def to allow modifying
it by JIT.

* Optcarrot benchmark

$ benchmark-driver benchmark.yml --rbenv 'before --jit;after --jit' --repeat-count 12 -v
before --jit: ruby 2.6.0dev (2018-07-17 trunk 63987) +JIT [x86_64-linux]
after --jit: ruby 2.6.0dev (2018-07-17 local-stack 63987) +JIT [x86_64-linux]
last_commit=mjit_compile.c: resurrect local variable stack
Calculating -------------------------------------
                         before --jit  after --jit
Optcarrot Lan_Master.nes       70.518       72.144 fps

Comparison:
             Optcarrot Lan_Master.nes
             after --jit:        72.1 fps
            before --jit:        70.5 fps - 1.02x  slower
------------------------------------------------------------------------
r63987 | hsbt | 2018-07-17 21:21:29 +0900 (Tue, 17 Jul 2018) | 1 line

Promote Synchronizer to default gems.
------------------------------------------------------------------------
r63986 | hsbt | 2018-07-17 20:39:16 +0900 (Tue, 17 Jul 2018) | 1 line

Unified common workflow for default gems.
------------------------------------------------------------------------
r63985 | nobu | 2018-07-17 10:26:22 +0900 (Tue, 17 Jul 2018) | 1 line

test for wrong order: option
------------------------------------------------------------------------
r63984 | nobu | 2018-07-17 10:22:32 +0900 (Tue, 17 Jul 2018) | 8 lines

Fix message when `order` was an invalid value

The symbol that can be used is `:bottom`, not `:down`.
Ref: https://github.com/ruby/ruby/blob/e39b2cff8ac2dc93b35bd43ffcce3ded8e3b4c25/error.c#L1061

[Fix GH-1916]

From: yuuji.yaginuma <yuuji.yaginuma@gmail.com>
------------------------------------------------------------------------
r63983 | nobu | 2018-07-17 10:00:05 +0900 (Tue, 17 Jul 2018) | 1 line

ruby-runner.c: show the failed path
------------------------------------------------------------------------
r63982 | nobu | 2018-07-17 09:47:19 +0900 (Tue, 17 Jul 2018) | 7 lines

dir.c: fix glob with base when no DT_UNKNOWN

* dir.c (do_stat, do_lstat): need the length of the base path for
  fstatat() when fd is valid.

* dir.c (glob_helper): fix for platforms where DT_UNKNOWN is not
  available, e.g. Solaris.
------------------------------------------------------------------------
r63981 | svn | 2018-07-17 00:06:15 +0900 (Tue, 17 Jul 2018) | 1 line

* 2018-07-17
------------------------------------------------------------------------
r63980 | kazu | 2018-07-17 00:06:14 +0900 (Tue, 17 Jul 2018) | 1 line

[DOC] Update doc of NameError.new [ci skip]
------------------------------------------------------------------------
r63979 | naruse | 2018-07-16 23:43:38 +0900 (Mon, 16 Jul 2018) | 3 lines

No one knows how many leap seconds in year 2100

Just check whether leep seconds are considered or not.
------------------------------------------------------------------------
r63978 | duerst | 2018-07-16 19:20:24 +0900 (Mon, 16 Jul 2018) | 6 lines

tool/downloader.rb:

* remove initial "./" from destdir to make downloading
  ./enc/unicode/data/11.0.0/ucd/auxiliary/GraphemeBreakProperty.txt
  work properly
* tweak a comment
------------------------------------------------------------------------
r63977 | nobu | 2018-07-16 14:05:27 +0900 (Mon, 16 Jul 2018) | 4 lines

ruby.c: disable DidYouMean as gem

* ruby.c (process_options): as DidYouMean requires Rubygems, disable
  the former when the latter is disabled too.
------------------------------------------------------------------------
r63976 | yui-knk | 2018-07-16 11:07:44 +0900 (Mon, 16 Jul 2018) | 1 line

parse.y (heredoc_identifier): Update comment for term_len
------------------------------------------------------------------------
r63975 | svn | 2018-07-16 10:26:26 +0900 (Mon, 16 Jul 2018) | 1 line

* 2018-07-16
------------------------------------------------------------------------
r63974 | yui-knk | 2018-07-16 10:26:25 +0900 (Mon, 16 Jul 2018) | 1 line

parse.y: Add comment for `rb_strterm_heredoc_struct.sourceline`
------------------------------------------------------------------------
r63973 | ktsj | 2018-07-15 20:45:59 +0900 (Sun, 15 Jul 2018) | 3 lines

node.h: remove unused macro nd_compile_option

Follow up of r61610
------------------------------------------------------------------------
r63972 | ktsj | 2018-07-15 20:42:15 +0900 (Sun, 15 Jul 2018) | 3 lines

vm_core.h, vm_dump.c: fix cast

Revert r63968 and cast at caller side to prevent unintentional casting.
------------------------------------------------------------------------
r63971 | nobu | 2018-07-15 18:57:27 +0900 (Sun, 15 Jul 2018) | 1 line

process.c: adjust indent [ci skip]
------------------------------------------------------------------------
r63970 | ktsj | 2018-07-15 18:48:09 +0900 (Sun, 15 Jul 2018) | 1 line

insns.def: fix typo in comment
------------------------------------------------------------------------
r63969 | ktsj | 2018-07-15 18:47:12 +0900 (Sun, 15 Jul 2018) | 1 line

vm_dump.c: fix warning about constness
------------------------------------------------------------------------
r63968 | ktsj | 2018-07-15 18:45:31 +0900 (Sun, 15 Jul 2018) | 1 line

vm_core.h: add missing cast
------------------------------------------------------------------------
r63967 | svn | 2018-07-15 02:04:57 +0900 (Sun, 15 Jul 2018) | 1 line

* 2018-07-15
------------------------------------------------------------------------
r63966 | watson1978 | 2018-07-15 02:04:56 +0900 (Sun, 15 Jul 2018) | 3 lines

Fix documentation in Object#remove_instance_variable

It should be described that the string argument will be accept like Object#instance_variable_get.
------------------------------------------------------------------------
r63965 | svn | 2018-07-14 11:59:41 +0900 (Sat, 14 Jul 2018) | 1 line

* 2018-07-14
------------------------------------------------------------------------
r63964 | normal | 2018-07-14 11:59:39 +0900 (Sat, 14 Jul 2018) | 5 lines

webrick/httpresponse: set_redirect requires a valid URI

Prevents response splitting and HTML injection attacks in
poorly-written applications which blindly pass along user input
in redirects.
------------------------------------------------------------------------
r63963 | normal | 2018-07-13 15:05:43 +0900 (Fri, 13 Jul 2018) | 3 lines

process.c (assert_close_on_exec): quiet warning about unused result

Not much we can do if writing to STDERR_FILENO fails.
------------------------------------------------------------------------
r63962 | normal | 2018-07-13 12:15:04 +0900 (Fri, 13 Jul 2018) | 4 lines

test/ruby/test_signal.rb (test_sigchld_ignore): increase timeout

I suspect CI test machine was overloaded at the time,
or swapping at the time due to parallel build with mjit.
------------------------------------------------------------------------
r63961 | svn | 2018-07-13 08:23:26 +0900 (Fri, 13 Jul 2018) | 1 line

* 2018-07-13
------------------------------------------------------------------------
r63960 | normal | 2018-07-13 08:23:25 +0900 (Fri, 13 Jul 2018) | 16 lines

timer_thread: do not close pipes around fork

There's actually no need to close the pipes used by the
sleepy timer thread before forking, only to stop the timer
thread itself.

Instead, we only close the parent pipes in the child process,
either via close-on-exec flag or when reinitializing the timer
thread.

This change will be necessary when we allow
rb_wait_for_single_fd and rb_thread_fd_select to wait on the
timer_thread_pipe.normal[0] directly and eliminate timer thread.

I don't anticipate compatibility problems with this change
alone.
------------------------------------------------------------------------
r63959 | nobu | 2018-07-12 14:01:04 +0900 (Thu, 12 Jul 2018) | 8 lines

Improve branch misses

Improve branch misses on frozen object predicate checks negatively
affecting performance of most setters as most objects are not frozen.

[Fix GH-1913]

From: Lourens Naude <lourens@bearmetal.eu>
------------------------------------------------------------------------
r63958 | kazu | 2018-07-12 12:59:13 +0900 (Thu, 12 Jul 2018) | 9 lines

Fix compile error on debian8 and gentoo

https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian8/ruby-trunk/log/20180711T213004Z.log.html.gz#miniruby
https://rubyci.org/logs/rubyci.s3.amazonaws.com/gentoo/ruby-trunk/log/20180711T213003Z.log.html.gz#miniruby
```
./include/ruby/ruby.h:2213:49: error: missing binary operator before token "("
 # if defined(__has_attribute) && __has_attribute(diagnose_if)
                                                 ^
```
------------------------------------------------------------------------
r63957 | nobu | 2018-07-12 11:29:57 +0900 (Thu, 12 Jul 2018) | 7 lines

removed unusecd constants

* ruby-runner.c (ruby_libm_func): removed as the following test
  actually doesn't need the path of libm.

* test/fiddle/test_pointer.rb (Fiddle::TestPointer#test_free=):
  removed never used constants and instance variables.
------------------------------------------------------------------------
r63956 | nobu | 2018-07-12 11:14:00 +0900 (Thu, 12 Jul 2018) | 7 lines

exe/ruby: link libm for fiddle test

* common.mk (exe/ruby): $(LIBS) should come after the source file
  due to the ld spec.

* ruby-runner.c (ruby_libm_func): force to link libm for fiddle
  test.
------------------------------------------------------------------------
r63955 | svn | 2018-07-12 07:49:50 +0900 (Thu, 12 Jul 2018) | 1 line

* 2018-07-12
------------------------------------------------------------------------
r63954 | k0kubun | 2018-07-12 07:49:48 +0900 (Thu, 12 Jul 2018) | 4 lines

benchmark/README.md: skip showing --timeout option [ci skip]

because it's only available for limited platforms for now.
I'll make it portable and show it later.
------------------------------------------------------------------------
r63953 | kazu | 2018-07-11 22:00:56 +0900 (Wed, 11 Jul 2018) | 1 line

Failed to unlink before close on mswin
------------------------------------------------------------------------
r63952 | normal | 2018-07-11 19:28:02 +0900 (Wed, 11 Jul 2018) | 3 lines

test/ruby/test_io.rb (test_copy_stream_to_duplex_io): join thread

Don't leave runaway threads as it could affect other tests.
------------------------------------------------------------------------
r63951 | nobu | 2018-07-11 18:56:49 +0900 (Wed, 11 Jul 2018) | 3 lines

Make block spacing consistent

[Fix GH-1910] [ci skip]
------------------------------------------------------------------------
r63950 | normal | 2018-07-11 18:47:36 +0900 (Wed, 11 Jul 2018) | 6 lines

test/ruby/test_io.rb: skip garbage and CPU tests if multi-threaded

Threads should not be active during these tests, but
maybe they are...

ref: https://bugs.ruby-lang.org/issues/14906
------------------------------------------------------------------------
r63949 | normal | 2018-07-11 17:49:23 +0900 (Wed, 11 Jul 2018) | 3 lines

thread_pthread: avoid redundant error message on pipe2() fail

Seeing one error for pipe creation is enough.
------------------------------------------------------------------------
r63948 | normal | 2018-07-11 17:49:18 +0900 (Wed, 11 Jul 2018) | 4 lines

thread_pthread.c: use mask for timer implementation

timer-thread will continue to be supported, but future
"timer" implementation may not be a thread.
------------------------------------------------------------------------
r63947 | normal | 2018-07-11 17:33:37 +0900 (Wed, 11 Jul 2018) | 3 lines

test/test_{tempfile,tmpdir}: get rid of leftover files

I ran out of inodes in $TMPDIR
------------------------------------------------------------------------
r63946 | normal | 2018-07-11 17:33:32 +0900 (Wed, 11 Jul 2018) | 3 lines

spec/ruby/security/cve_2018_6914_spec.rb: get rid of leftover files

I ran out of inodes in $TMPDIR :<
------------------------------------------------------------------------
r63945 | k0kubun | 2018-07-11 09:34:32 +0900 (Wed, 11 Jul 2018) | 5 lines

common.mk: upgrade benchmark_driver

benchmark/README.md: fix help output, which is changed on v0.14.6.
Especially `e1::path1,arg1,...; e2::path2,arg2` part was wrong since `,`
can't be used to split arguments anymore.
------------------------------------------------------------------------
r63944 | k0kubun | 2018-07-11 08:56:57 +0900 (Wed, 11 Jul 2018) | 1 line

benchmark/README.md: some are defined with YAML [ci skip]
------------------------------------------------------------------------
r63943 | naruse | 2018-07-11 01:10:57 +0900 (Wed, 11 Jul 2018) | 4 lines

Use "diagnose_if" attribute for clang

Before this patch, clang shows many "division by zero is undefined" errors
if a files has syntax error.
------------------------------------------------------------------------
r63942 | k0kubun | 2018-07-11 01:03:51 +0900 (Wed, 11 Jul 2018) | 1 line

benchmark/README.md: fix typo [ci skip]
------------------------------------------------------------------------
r63941 | k0kubun | 2018-07-11 00:58:52 +0900 (Wed, 11 Jul 2018) | 8 lines

benchmark: revise ERB benchmarks using YAML syntax

to improve the accuracy of measurement by stop using block.

benchmark/app_erb.rb -> benchmark/app_erb.yml: renamed and revised
benchmark/erb_render.rb -> benchmark/erb_render.yml: ditto

benchmark/README.md: follow renames
------------------------------------------------------------------------
r63940 | k0kubun | 2018-07-11 00:51:29 +0900 (Wed, 11 Jul 2018) | 1 line

benchmark/README.md: erb_render is no longer yml but rb [ci skip]
------------------------------------------------------------------------
r63939 | k0kubun | 2018-07-11 00:49:42 +0900 (Wed, 11 Jul 2018) | 1 line

benchmark/README.md: wording consistency in one sentence [ci skip]
------------------------------------------------------------------------
r63938 | svn | 2018-07-11 00:44:46 +0900 (Wed, 11 Jul 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63937 | k0kubun | 2018-07-11 00:44:45 +0900 (Wed, 11 Jul 2018) | 7 lines

output/driver.rb: add output plugin to reproduce

the original behavior of benchmark/driver.rb.
Probably I won't use this but this is requested by ko1.

Use this with:
make benchmark OPTS="-o driver"
------------------------------------------------------------------------
r63936 | k0kubun | 2018-07-11 00:06:59 +0900 (Wed, 11 Jul 2018) | 3 lines

revert r63899

this is no longer needed due to r63926
------------------------------------------------------------------------
r63935 | svn | 2018-07-11 00:01:29 +0900 (Wed, 11 Jul 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63934 | svn | 2018-07-11 00:01:28 +0900 (Wed, 11 Jul 2018) | 1 line

* 2018-07-11
------------------------------------------------------------------------
r63933 | k0kubun | 2018-07-11 00:01:27 +0900 (Wed, 11 Jul 2018) | 8 lines

benchmark_driver/runner: add runners for metrics

supported by legacy benchmark/driver.rb.

benchmark/README.md: document them

common.mk: update benchmark_driver to correct 0.0 output and to fix
spacing format of `-o simple` and `-o markdown`.
------------------------------------------------------------------------
r63932 | k0kubun | 2018-07-10 23:16:57 +0900 (Tue, 10 Jul 2018) | 6 lines

runner/size.rb: fix metric passed to output

runner/peak.rb: ditto

This is needed to make commands like `make -C .ruby-svn benchmark
ITEM=erb OPTS="-r size -o simple"` succeed.
------------------------------------------------------------------------
r63931 | k0kubun | 2018-07-10 22:41:13 +0900 (Tue, 10 Jul 2018) | 1 line

benchmark/README.md: add help output [ci skip]
------------------------------------------------------------------------
r63930 | k0kubun | 2018-07-10 22:36:44 +0900 (Tue, 10 Jul 2018) | 4 lines

benchmark/README.md: don't recommend alias installation [ci skip]

benchmark_driver is the official way to install benchmark_driver.
benchmark-driver is just an alias for it.
------------------------------------------------------------------------
r63929 | k0kubun | 2018-07-10 22:16:55 +0900 (Tue, 10 Jul 2018) | 1 line

common.mk: execute benchmark alphabetically
------------------------------------------------------------------------
r63928 | k0kubun | 2018-07-10 22:08:40 +0900 (Tue, 10 Jul 2018) | 3 lines

benchmark: drop all bm_ prefix for legacy driver.rb

benchmark/*.rb is only benchmarks now. We don't need prefixes.
------------------------------------------------------------------------
r63927 | svn | 2018-07-10 22:05:31 +0900 (Tue, 10 Jul 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63926 | k0kubun | 2018-07-10 22:05:29 +0900 (Tue, 10 Jul 2018) | 12 lines

Revert "benchmark/*.yml: convert from benchmark/bm_*.rb"

This reverts r63900.

Having single-execution benchmark as a normal Ruby script is preferred
by ko1. I'm not a big fan of having inconsistent benchmark formats, but
I can understand some benefits of it.

common.mk: remove obsolsted benchmark-each PHONY declaration, support
running Ruby scripts added by this commit.

README.md: follow ARGS change
------------------------------------------------------------------------
r63925 | svn | 2018-07-10 21:14:05 +0900 (Tue, 10 Jul 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63924 | k0kubun | 2018-07-10 21:14:04 +0900 (Tue, 10 Jul 2018) | 11 lines

benchmark: resurrect peak / size metrics

by adding runner plugins for them.

benchmark/lib/benchmark_driver/runner/peak.rb: added peak runner plugin
benchmark/lib/benchmark_driver/runner/size.rb: added size runner plugin
common.mk: allow using them

benchmark/memory_wrapper.rb: deleted in favor of those runner plugins

benchmark/README.md: document them
------------------------------------------------------------------------
r63923 | tenderlove | 2018-07-10 05:01:54 +0900 (Tue, 10 Jul 2018) | 8 lines

Remove redundant code in the compiler.

During instruction translation (linked list -> iseq generation), we can
treat `TS_VALUE` and `TS_ISEQ` the same as they are just embedded in the
generated sequences.  The only difference between `TS_ISE` and `TS_IC`
is that an inline storage entry may contain a markable `VALUE` pointer
at some point, so we need to flag the iseq as containing markable
objects.
------------------------------------------------------------------------
r63922 | tenderlove | 2018-07-10 04:20:27 +0900 (Tue, 10 Jul 2018) | 3 lines

Remove test code.  ISE generation should not impact write barrier

orz!
------------------------------------------------------------------------
r63921 | tenderlove | 2018-07-10 02:49:21 +0900 (Tue, 10 Jul 2018) | 6 lines

Add lldb as a debugger option

This adds support for lldb as a debugger so that tests can be run under
lldb like this:

  $ make test-all TESTS=test/some_test.rb RUNRUBYOPT=--debugger=lldb
------------------------------------------------------------------------
r63920 | tenderlove | 2018-07-10 02:47:37 +0900 (Tue, 10 Jul 2018) | 5 lines

Fix crash when loading iseq from an array

Objects loaded during iseq deserialization using arrays need to be added
to the compile time mark array so that they stay alive until iseqs
finish loading.
------------------------------------------------------------------------
r63919 | k0kubun | 2018-07-10 01:43:42 +0900 (Tue, 10 Jul 2018) | 1 line

benchmark/README.md: fix -e interface for v0.14 [ci skip]
------------------------------------------------------------------------
r63918 | k0kubun | 2018-07-10 01:31:35 +0900 (Tue, 10 Jul 2018) | 9 lines

benchmark/driver.rb: fully obsolete this

in favor of just using benchmark_driver.gem.

common.mk: The new `make benchmark` covers the both usages for old `make
benchmark` and old `make benchmark-each`. So `make benchmark-each` is
dropped now.

benchmark/README.md: Explain its details
------------------------------------------------------------------------
r63917 | svn | 2018-07-10 00:45:03 +0900 (Tue, 10 Jul 2018) | 1 line

* 2018-07-10
------------------------------------------------------------------------
r63916 | k0kubun | 2018-07-10 00:45:02 +0900 (Tue, 10 Jul 2018) | 4 lines

common.mk: upgrade benchmark_driver to v0.14

benchmark/driver.rb: deal with breaking changes which are actually
introduced for this driver.
------------------------------------------------------------------------
r63915 | hsbt | 2018-07-09 23:01:05 +0900 (Mon, 09 Jul 2018) | 6 lines

Promote irb library to default gems.

  * lib/irb/irb.gemspec: init.
  * lib/irb/version.rb: Set @RELEASE_VERSION value to IRB::VERSION for gemspec.
  * doc/*.rdoc: Move IRB entry to default gems category.
  * tool/sync_default_gems.rb: Add irb support.
------------------------------------------------------------------------
r63914 | k0kubun | 2018-07-09 22:20:25 +0900 (Mon, 09 Jul 2018) | 4 lines

file_rename.yml: allow running this on mswin/mingw

Suggested by MSP-Grep:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/87883
------------------------------------------------------------------------
r63913 | k0kubun | 2018-07-09 21:50:50 +0900 (Mon, 09 Jul 2018) | 1 line

app_pentominio.yml: drop unnecessary prelude
------------------------------------------------------------------------
r63912 | ko1 | 2018-07-09 17:07:26 +0900 (Mon, 09 Jul 2018) | 6 lines

Don't copy FL_USER* on Kernel#clone. [Bug #14847]

* object.c (mutable_obj_clone): `Kernel#clone` should not copy
  FL_USER* flags because they are copied unexpectedly.
  Unexpected copy will break internal data consistency.

------------------------------------------------------------------------
r63911 | normal | 2018-07-09 12:07:59 +0900 (Mon, 09 Jul 2018) | 3 lines

addr2line.c (kprintf): static

This function is not used outside of addr2line.c
------------------------------------------------------------------------
r63910 | nobu | 2018-07-09 10:50:12 +0900 (Mon, 09 Jul 2018) | 1 line

common.mk: codesign ruby-runner too
------------------------------------------------------------------------
r63909 | nobu | 2018-07-09 10:20:20 +0900 (Mon, 09 Jul 2018) | 6 lines

dir.c: fix directory glob

* dir.c (glob_helper): fix directory glob which resulted in lacking
  the first byte.  adjust the length of basename to be appended as
  well as removing the heading path, not the length of the joined
  path.  [ruby-dev:50588] [Bug #14899]
------------------------------------------------------------------------
r63908 | normal | 2018-07-09 08:43:14 +0900 (Mon, 09 Jul 2018) | 8 lines

addr2line.c: no need to keep fd around after mmap

POSIX mmap(3) manpage stipulates mmap bumps the reference
count of the file description.  Thus keeping a file descriptor
to maintain the reference is not necessary.

If this didn't work, every extension .so would require a
permanent FD, which is obviously not the case.
------------------------------------------------------------------------
r63907 | stomar | 2018-07-09 04:30:19 +0900 (Mon, 09 Jul 2018) | 1 line

range.c: [DOC] small improvement
------------------------------------------------------------------------
r63906 | k0kubun | 2018-07-09 03:33:43 +0900 (Mon, 09 Jul 2018) | 6 lines

benchmark/driver.rb: make this more similar

to original benchmark-driver command.

I'm going to add some runner plugins to resurrect metrics which were
originally supported by benchmark/driver.rb...
------------------------------------------------------------------------
r63905 | k0kubun | 2018-07-09 03:10:14 +0900 (Mon, 09 Jul 2018) | 1 line

benchmark/README.md: [ci skip] change syntax highlight
------------------------------------------------------------------------
r63904 | svn | 2018-07-09 03:08:27 +0900 (Mon, 09 Jul 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63903 | k0kubun | 2018-07-09 03:08:26 +0900 (Mon, 09 Jul 2018) | 5 lines

benchmark/README.md: [ci skip] write documentation

about this directory

benchmark/driver.rb: ditto
------------------------------------------------------------------------
r63902 | k0kubun | 2018-07-09 02:48:58 +0900 (Mon, 09 Jul 2018) | 5 lines

benchmark/driver.rb: drop legacy Ruby script support

Now all benchmarks are converted to YAMLs.

common.mk: Drop obsoleted bm_* pattern
------------------------------------------------------------------------
r63901 | k0kubun | 2018-07-09 02:47:32 +0900 (Mon, 09 Jul 2018) | 3 lines

benchmark/app_pentomino.yml: remove original scripts after __END__

mistakenly left by conversion script...
------------------------------------------------------------------------
r63900 | k0kubun | 2018-07-09 02:36:26 +0900 (Mon, 09 Jul 2018) | 1 line

benchmark/*.yml: convert from benchmark/bm_*.rb
------------------------------------------------------------------------
r63899 | k0kubun | 2018-07-09 02:31:06 +0900 (Mon, 09 Jul 2018) | 5 lines

benchmark/gc: prevent GC bench from depending on normal benchmark

scripts.

This is needed to finish converting Ruby scripts to YAMLs.
------------------------------------------------------------------------
r63898 | k0kubun | 2018-07-09 02:22:58 +0900 (Mon, 09 Jul 2018) | 3 lines

benchmark/vm2_struct_small_aset.yml: unwrap loop_count

since `i` is involved in this script as well...
------------------------------------------------------------------------
r63897 | k0kubun | 2018-07-09 02:19:57 +0900 (Mon, 09 Jul 2018) | 1 line

benchmark/vm2_*.yml: fix ugly conversion errors
------------------------------------------------------------------------
r63896 | k0kubun | 2018-07-09 02:03:23 +0900 (Mon, 09 Jul 2018) | 1 line

benchmark/vm2_*.yml: abstract away the while loop
------------------------------------------------------------------------
r63895 | k0kubun | 2018-07-09 01:46:49 +0900 (Mon, 09 Jul 2018) | 8 lines

benchmark/vm1_ensure.yml: rollback loop_count abstraction

for now.

When measured script is really too fast, while loop substituion may
return a negative benchmark result.

Probably benchmark_driver.gem has rooms to be improved about this.
------------------------------------------------------------------------
r63894 | k0kubun | 2018-07-09 01:35:44 +0900 (Mon, 09 Jul 2018) | 1 line

benchmark/vm1_*.yml: manual fixes for ugly conversions
------------------------------------------------------------------------
r63893 | k0kubun | 2018-07-09 01:28:34 +0900 (Mon, 09 Jul 2018) | 6 lines

benchmark/vm1_*.yml: abstract away the while loop

benchmark/driver.rb had removed the cost for while loop in benchmark/bm_vm1_*.rb,
and benchmark_driver.gem can achieve the same thing with `loop_count`.

But unfortunately current benchmark_driver.gem can't solve it only for vm1_yield.yml...
------------------------------------------------------------------------
r63892 | k0kubun | 2018-07-09 00:35:22 +0900 (Mon, 09 Jul 2018) | 6 lines

benchmark: convert bm_vm2_*.rb to vm2_*.yml

This YAML transformation is needed to support whileloop2 time substituion
by benchmark_driver.gem later.

This commmit changes no benchmark behavior.
------------------------------------------------------------------------
r63891 | k0kubun | 2018-07-09 00:12:24 +0900 (Mon, 09 Jul 2018) | 6 lines

benchmark: convert bm_vm1_*.rb to vm1_*.yml

This YAML transformation is needed to support whileloop time substituion
by benchmark_driver.gem later.

This commmit changes no benchmark behavior.
------------------------------------------------------------------------
r63890 | svn | 2018-07-09 00:05:19 +0900 (Mon, 09 Jul 2018) | 1 line

* 2018-07-09
------------------------------------------------------------------------
r63889 | k0kubun | 2018-07-09 00:05:18 +0900 (Mon, 09 Jul 2018) | 1 line

benchmark/driver.rb: fix wrong multiline regexp
------------------------------------------------------------------------
r63888 | k0kubun | 2018-07-08 23:38:05 +0900 (Sun, 08 Jul 2018) | 29 lines

benchmark: introduce benchmark_driver.gem

Makefile.in: Clone benchmark-driver repository in benchmark/benchmark-driver
  `make update-benchmark-driver`, like simplecov.
win32/Makefile.sub: Roughly do the same thing.
.gitignore: Ignore the cloned repository.
common.mk: Trigger `make update-benchmark-driver` to run `make benchmark`
  and adjust arguments for benchmark_driver.gem.

benchmark/require.yml: renamed from benchmark/bm_require.rb, benchmark/prepare_require.rb
benchmark/require_thread.yml: renamed from benchmark/bm_require_thread.rb, benchmark/prepare_require_thread.rb
benchmark/so_count_words.yml: renamed from benchmark/bm_so_count_words.rb, benchmark/prepare_so_count_words.rb,
  benchmark/wc.input.base
benchmark/so_k_nucleotide.yml: renamed from benchmark/bm_so_k_nucleotide.rb, benchmark/prepare_so_k_nucleotide.rb,
  benchmark/make_fasta_output.rb
benchmark/so_reverse_complement.yml: renamed from benchmark/bm_so_reverse_complement.rb, benchmark/prepare_so_reverse_complement.rb,
  benchmark/make_fasta_output.rb

I'm sorry but I made some duplications between benchmark/require.yml and benchmark/require_thread.yml,
and between benchmark/so_k_nucleotide.yml and benchmark/so_reverse_complement.yml.

If you're not comfortable with it, please combine these YAMLs to share
the same prelude. One YAML file can have multiple benchmark definitions
sharing prelude.

benchmark/driver.rb: Replace its core feature with benchmark_driver.gem.
  Some old features are gone for now, but I'll add them again later.

[Misc #14902]
------------------------------------------------------------------------
r63887 | k0kubun | 2018-07-08 23:08:25 +0900 (Sun, 08 Jul 2018) | 6 lines

common.mk: load prelude on `make benchmark`

because benchmark/bm_io_nonblock_noex.rb and benchmark/bm_io_nonblock_noex2.rb
are using IO#write_nonblock and it's defined in prelude.

miniruby can't run the benchmark without prelude.
------------------------------------------------------------------------
r63886 | k0kubun | 2018-07-08 22:03:01 +0900 (Sun, 08 Jul 2018) | 10 lines

benchmark: drop legacy benchmark drivers

It seems like they are all benchmark drivers but "benchmark/driver.rb"
is the latest and others are no longer used.

It's confusing to have multiple drivers (and actually I used
benchmark/run.rb since I didn't know I should use benchmark/driver.rb).

As I'm going to support only benchmark/driver.rb features in Misc#14902,
let me delete them.
------------------------------------------------------------------------
r63885 | normal | 2018-07-08 16:27:29 +0900 (Sun, 08 Jul 2018) | 7 lines

test/ruby (*no_hidden_garbage): disable GC and skip if multi-threaded

Any single object allocation can reduce object count, and
object counts are global, so multi-threading leads to unpredictable
results.

See also similar commits: r60699 and r62608
------------------------------------------------------------------------
r63884 | normal | 2018-07-08 16:27:24 +0900 (Sun, 08 Jul 2018) | 15 lines

mjit: get rid of memory leak in pause+resume loop

pthread_atfork is not idempotent and repeatedly calling it
causes it to register the same hook repeatedly; leading to
unbound memory growth.

Ruby already has a (confusing-named) internal API for to call
in the forked child process: rb_thread_atfork
Call the MJIT child_after_fork hook inside that to prevent
unbound growth with the following loop:

    loop do
      RubyVM::MJIT.pause
      RubyVM::MJIT.resume
    end
------------------------------------------------------------------------
r63883 | k0kubun | 2018-07-08 14:52:12 +0900 (Sun, 08 Jul 2018) | 6 lines

tool/git-refresh: skip git fetch and checkout

if the tag is already checked out, to optimize the execution time.

I'm going to prepare a task depending on this tool, and I want that to
finish fast and output nothing when it's already up-to-date.
------------------------------------------------------------------------
r63882 | k0kubun | 2018-07-08 13:12:04 +0900 (Sun, 08 Jul 2018) | 1 line

benchmark/driver.rb: simplify LoadError handling
------------------------------------------------------------------------
r63881 | k0kubun | 2018-07-08 11:25:46 +0900 (Sun, 08 Jul 2018) | 4 lines

common.mk: drop obsoleted `make tbench`

benchmark/bmx_* files haven't existed since r37263 and thus it runs
nothing.
------------------------------------------------------------------------
r63880 | normal | 2018-07-08 10:46:31 +0900 (Sun, 08 Jul 2018) | 3 lines

test/ruby/test_signal.rb: skip ensure if test is skipped

Thanks to Greg for the fix. [ruby-core:87860] [Bug #14867]
------------------------------------------------------------------------
r63879 | normal | 2018-07-08 09:02:27 +0900 (Sun, 08 Jul 2018) | 6 lines

signal.c: preserve trap(:CHLD, "IGNORE") behavior with SIGCHLD

We need to preserve "IGNORE" behavior from Ruby 2.5 and earlier.
We can't rely on SA_NOCLDWAIT any more, since we always need
system() and MJIT to work; so we fake that behavior using
dedicated reaper (currently in timer-thread).
------------------------------------------------------------------------
r63878 | svn | 2018-07-08 08:59:24 +0900 (Sun, 08 Jul 2018) | 1 line

* 2018-07-08
------------------------------------------------------------------------
r63877 | normal | 2018-07-08 08:59:23 +0900 (Sun, 08 Jul 2018) | 9 lines

process.c (rb_f_exec): pause MJIT before replacing process

Non-parallel "make test-spec" caused
spec/ruby/core/process/wait2_spec.rb failures because mspec
uses "exec" in single-process mode, so there's no chance
the post-exec state could know about the MJIT child process
from its pre-exec state.

[ruby-core:87846] [Bug #14867]
------------------------------------------------------------------------
r63876 | k0kubun | 2018-07-07 23:55:22 +0900 (Sat, 07 Jul 2018) | 28 lines

wait2_spec.rb: skip leak checker for now

This is not working with cppflags="-DMJIT_FORCE_ENABLE" on my machine.

```
$ make test-spec
$ /home/k0kubun/src/github.com/ruby/ruby-svn/.ruby-force/miniruby -I/home/k0kubun/src/github.com/ruby/ruby-svn/lib /home/k0kubun/src/github.com/ruby/ruby-svn/tool/runruby.rb --archdir=/home/k0kubun/src/github.com/ruby/ruby-svn/.ruby-force --extout=.ext -- /home/k0kubun/src/github.com/ruby/ruby-svn/spec/mspec/bin/mspec-run -B ../spec/default.mspec
ruby 2.6.0dev (2018-07-07 trunk 63874) +JIT [x86_64-linux]
[| | ================  40%                    | 00:02:03]      0F      0E leaked before wait2 specs: [[31406, #<Process::Status: pid 31406 exit 0>]]

1)
An exception occurred during: before :all FAILED
Expected [[31406, #<Process::Status: pid 31406 exit 0>]] to be empty
/home/k0kubun/src/github.com/ruby/ruby-svn/spec/ruby/core/process/wait2_spec.rb:18:in `block (3 levels) in <top (required)>'
/home/k0kubun/src/github.com/ruby/ruby-svn/spec/ruby/core/process/wait2_spec.rb:16:in `block (2 levels) in <top (required)>'
/home/k0kubun/src/github.com/ruby/ruby-svn/spec/ruby/core/process/wait2_spec.rb:3:in `<top (required)>'
[- | ==================100%================== | 00:00:00]      1F      0E

Finished in 103.288794 seconds

3607 files, 28545 examples, 208272 expectations, 1 failure, 0 errors, 0 tagged
uncommon.mk:777: recipe for target 'yes-test-spec' failed
make: *** [yes-test-spec] Error 1
```

Let me skip this for now and enable MJIT CI again.

Related to Bug#14867
------------------------------------------------------------------------
r63875 | k0kubun | 2018-07-07 23:41:03 +0900 (Sat, 07 Jul 2018) | 3 lines

insns.def: stop pushing unnecessary keys for MJIT

[Bug #14892]
------------------------------------------------------------------------
r63874 | k0kubun | 2018-07-07 23:28:34 +0900 (Sat, 07 Jul 2018) | 5 lines

_mjit_compile_insn_body: rollback pc correctly

for catch_except_p case

Partially solving Bug#14892
------------------------------------------------------------------------
r63873 | svn | 2018-07-07 14:34:04 +0900 (Sat, 07 Jul 2018) | 1 line

* 2018-07-07
------------------------------------------------------------------------
r63872 | normal | 2018-07-07 14:34:03 +0900 (Sat, 07 Jul 2018) | 7 lines

test/socket/test_socket.rb (test_timestamp): retry send

I theorize there can be UDP packet loss even over loopback if
the kernel is under memory pressure.  Retry sending periodically
until recvmsg succeeds.

i[ruby-core:87842] [Bug #14898]
------------------------------------------------------------------------
r63871 | nobu | 2018-07-06 22:56:58 +0900 (Fri, 06 Jul 2018) | 5 lines

const_missing on private constants

* variable.c (rb_const_search): call #const_missing method on
  private constants, as well as uninitialized constants.
  [Feature #14328]
------------------------------------------------------------------------
r63870 | nobu | 2018-07-06 17:01:58 +0900 (Fri, 06 Jul 2018) | 6 lines

compile.c: remove unreachable jump only

* compile.c (iseq_peephole_optimize): remove unreachable jump
  instruction only.  if it is labeled and referred from other
  instructions, it is reachable and must not be removed.
  [ruby-core:87830] [Bug #14897]
------------------------------------------------------------------------
r63869 | normal | 2018-07-06 15:50:04 +0900 (Fri, 06 Jul 2018) | 8 lines

mjit.c: fix waitpid macro return value for win32

We started checking return value of waitpid, so it needs
to be correct for win32 platforms for MJIT to work.

Thanks-to: MSP-Greg (Greg L) <Greg.mpls@gmail.com>

[ruby-core:87832] [Bug #14867]
------------------------------------------------------------------------
r63868 | mame | 2018-07-06 13:52:33 +0900 (Fri, 06 Jul 2018) | 24 lines

Fix a bug of peephole optimization

```
  if   L1
L0:
  jump L2
L1:
  ...
L2:
```

was wrongly optimized to:

```
  unless L2
L0:
L1:
  ...
L2:
```

To make it conservative, this optimization is now disabled when there is
any label between `if` and `jump` instructions.
Fixes [Bug #14897].
------------------------------------------------------------------------
r63867 | normal | 2018-07-06 11:15:05 +0900 (Fri, 06 Jul 2018) | 23 lines

thread.c (ruby_ppoll): improve timespec to msec conversion

Round up non-zero <1ms timeouts to 1ms and use INT_MAX instead
of infinite (-1) for extremely large timeouts.  All of our
ppoll/select callers are able to handle spurious wakeups,
anyways.

This avoids excessive CPU usage and busy waits with short
timeouts to rb_wait_for_single_fd.

CPU usage with the following script is significantly reduced
for systems with "#undef HAVE_PPOLL":

    require 'io/wait'
    r, w = IO.pipe
    Thread.new { loop { r.wait_readable(0.000001) } }.join(5)
    exit!(0)

Low-resolution in poll(2) still sucks, though...

Note: I don't see the value in making a similar change to
time_timeval of a <1us sleep is attempted because of GVL
release and syscall latency.
------------------------------------------------------------------------
r63866 | normal | 2018-07-06 11:15:00 +0900 (Fri, 06 Jul 2018) | 3 lines

thread.c: our fake ppoll implementation is static

Rename it to "ruby_ppoll" so it looks more obvious in debuggers.
------------------------------------------------------------------------
r63865 | kazu | 2018-07-06 10:53:57 +0900 (Fri, 06 Jul 2018) | 1 line

Fixup r63864
------------------------------------------------------------------------
r63864 | nobu | 2018-07-06 10:40:04 +0900 (Fri, 06 Jul 2018) | 1 line

Prefixed reset_leap_second_info
------------------------------------------------------------------------
r63863 | k0kubun | 2018-07-06 00:56:48 +0900 (Fri, 06 Jul 2018) | 10 lines

revert r62655 for r63763

r63655 was tightly coupled to handle_frames and some assumptions seems
to have been broken by r63763.

To partially resolve Bug#14892, this reverts the optimization for now. I
want to make MJIT CI happy first and then I'll probably retry r63655 by
partially reverting r63763 for sp changes.

The skipped test is not fixed yet.
------------------------------------------------------------------------
r63862 | svn | 2018-07-06 00:20:28 +0900 (Fri, 06 Jul 2018) | 1 line

* 2018-07-06
------------------------------------------------------------------------
r63861 | nobu | 2018-07-06 00:20:27 +0900 (Fri, 06 Jul 2018) | 1 line

Make a prototype
------------------------------------------------------------------------
r63860 | naruse | 2018-07-05 21:48:45 +0900 (Thu, 05 Jul 2018) | 1 line

ruby tool/update-deps --fix
------------------------------------------------------------------------
r63859 | naruse | 2018-07-05 21:22:30 +0900 (Thu, 05 Jul 2018) | 1 line

Add missing prototype
------------------------------------------------------------------------
r63858 | naruse | 2018-07-05 20:53:18 +0900 (Thu, 05 Jul 2018) | 1 line

Add missing file
------------------------------------------------------------------------
r63857 | naruse | 2018-07-05 20:43:42 +0900 (Thu, 05 Jul 2018) | 5 lines

Re-apply r63848 (Optimize Time.utc)

* Both timegmw and gmtimew ignores leap second if the timezone doesn't
  have leap seconds on the first call of init_leap_second_info()
* Add Bug::Time.reset_leap_second_info for testing
------------------------------------------------------------------------
r63856 | normal | 2018-07-05 12:20:20 +0900 (Thu, 05 Jul 2018) | 6 lines

Revert "get rid of a compiler warning of VC"

Partially revert r63820.  mjit.c seems to have different idea of
"pid" type/size than the rest of Ruby on win32.

As noted in [ruby-core:87794], this seems to break Greg's build.
------------------------------------------------------------------------
r63855 | normal | 2018-07-05 12:02:33 +0900 (Thu, 05 Jul 2018) | 8 lines

unrevert r63852 but keep SIGCHLD path disabled for win32

Reading win32/win32.c waitpid implementation, maybe waitpid(-1, ...)
on that platform will never conflict with mjit use of waitpid.

In any case, I've added WAITPID_USE_SIGCHLD macro to vm_core.h
so it can be easy for Linux/BSD users to test (hopefully!)
win32-compatible code.
------------------------------------------------------------------------
r63854 | nobu | 2018-07-05 01:10:14 +0900 (Thu, 05 Jul 2018) | 9 lines

signal.c: packed signals

* signal.c (signals): pack signal names instead of references.

* signal.c (signm2signo): also reject too long signal name.
  [ruby-core:87767] [Bug #14893]

reapply r63841 and r63842, which are unrelated to r63758 but had been
wrongly reverted by r63852.
------------------------------------------------------------------------
r63853 | svn | 2018-07-05 00:08:58 +0900 (Thu, 05 Jul 2018) | 1 line

* 2018-07-05
------------------------------------------------------------------------
r63852 | naruse | 2018-07-05 00:08:56 +0900 (Thu, 05 Jul 2018) | 4 lines

Revert r63758 and related commits

The change is unstable on Windows. Please re-commit it when it correctly
supports Windows.
------------------------------------------------------------------------
r63851 | kazu | 2018-07-04 21:45:47 +0900 (Wed, 04 Jul 2018) | 6 lines

Fallback to Digest::SHA512

`Gem::Package::TarWriter#add_file_signed` expects to fallback to
`Digest::SHA512`, and `digest.respond_to? :name` or not.
So lib/rubygems/security.rb should use same logic for
`Gem::Security::DIGEST_ALGORITHM` and `Gem::Security::DIGEST_NAME`.
------------------------------------------------------------------------
r63850 | kazu | 2018-07-04 21:45:46 +0900 (Wed, 04 Jul 2018) | 4 lines

Skip more rubygems tests when openssl is missing

Some tests are already skipped, but some tests are not.
So latter should be skipped too.
------------------------------------------------------------------------
r63849 | naruse | 2018-07-04 19:59:36 +0900 (Wed, 04 Jul 2018) | 4 lines

Revert "Optimize Time.utc"

This reverts commit r63848.
It breaks tests.
------------------------------------------------------------------------
r63848 | naruse | 2018-07-04 19:06:51 +0900 (Wed, 04 Jul 2018) | 15 lines

Optimize Time.utc

Time.utc uses timegmw() and it uses leap second information.
If the given time is larger than known_leap_seconds_limit, it calls
find_time_t, which uses localtime(3) and calls stat(2) in it.

This patch avoid it by setting known_leap_seconds_limit to 0 if the timezone doesn't have leapsecond information (if no leap second is found "now", I assume the timezone doesn't have leapsecond information).

Before:
% time ./miniruby --disable-gem -e'time = Time.now; year = time.year; month = time.month; day = time.day; hour = time.hour; min = time.min; sec = time.sec + time.subsec; i = 0; while i < 100000; ::Time.utc(year, month, day, hour, min, sec); i += 1; end'
./miniruby --disable-gem   0.35s user 0.19s system 99% cpu 0.542 total

After:
% time ./miniruby --disable-gem -e'time = Time.now; year = time.year; month = time.month; day = time.day; hour = time.hour; min = time.min; sec = time.sec + time.subsec; i = 0; while i < 100000; ::Time.utc(year, month, day, hour, min, sec); i += 1; end'
./miniruby --disable-gem   0.23s user 0.00s system 99% cpu 0.233 total
------------------------------------------------------------------------
r63847 | normal | 2018-07-04 10:26:36 +0900 (Wed, 04 Jul 2018) | 3 lines

internal.h (rb_warning_string): use PRINTF_ARGS

Let compilers do a little extra validation for us
------------------------------------------------------------------------
r63846 | normal | 2018-07-04 10:26:31 +0900 (Wed, 04 Jul 2018) | 7 lines

thread_pthread.c: pass rb_vm_t to timer_thread_sleep

I love `container_of' for generic data structures, but
in this case it's unnecessary and slightly harder-to-read.

This will make "Timeout in VM" slightly easier-to-read:
https://bugs.ruby-lang.org/issues/14859
------------------------------------------------------------------------
r63845 | nobu | 2018-07-04 08:56:11 +0900 (Wed, 04 Jul 2018) | 8 lines

vm.c: simplified core#hash_merge_kwd

* vm.c (core_hash_merge_kwd): simplified to merge the second hash
  into the first hash.

* compile.c (compile_array): call core#hash_merge_kwd with 2
  hashes always, by passing an new empty hash to at the first
  iteration.
------------------------------------------------------------------------
r63844 | normal | 2018-07-04 06:29:18 +0900 (Wed, 04 Jul 2018) | 4 lines

mjit.h: avoid signed pointer comparisons (fix for 32-bit)

ptrdiff_t is a signed type, use uintptr_t instead for unsigned
comparisons.
------------------------------------------------------------------------
r63843 | svn | 2018-07-04 00:25:50 +0900 (Wed, 04 Jul 2018) | 1 line

* 2018-07-04
------------------------------------------------------------------------
r63842 | kazu | 2018-07-04 00:25:49 +0900 (Wed, 04 Jul 2018) | 5 lines

Fix compile error

signal.c:69:10: error: variably modified 'signm' at file scope
     char signm[LONGEST_SIGNAME + 1];
          ^
------------------------------------------------------------------------
r63841 | nobu | 2018-07-03 22:34:56 +0900 (Tue, 03 Jul 2018) | 6 lines

signal.c: packed signals

* signal.c (signals): pack signal names instead of references.

* signal.c (signm2signo): also reject too long signal name.
  [ruby-core:87767] [Bug #14893]
------------------------------------------------------------------------
r63840 | nobu | 2018-07-03 22:25:59 +0900 (Tue, 03 Jul 2018) | 1 line

adjust indent [ci skip]
------------------------------------------------------------------------
r63839 | naruse | 2018-07-03 20:10:45 +0900 (Tue, 03 Jul 2018) | 4 lines

skip test_localtime_zone if force_tz_test is false

For example Solaris
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20180703T091803Z.fail.html.gz
------------------------------------------------------------------------
r63838 | kazu | 2018-07-03 20:01:06 +0900 (Tue, 03 Jul 2018) | 3 lines

[DOC] Use https: instead of  git: [ci skip]

ref r63801, r61199
------------------------------------------------------------------------
r63837 | normal | 2018-07-03 18:06:28 +0900 (Tue, 03 Jul 2018) | 5 lines

vm.c (rb_source_location): check for NULL cfp->iseq

rb_vm_get_sourceline returns zero if cfp->iseq is NULL,
so rb_iseq_path should not try to follow NULL cfp->iseq,
either.
------------------------------------------------------------------------
r63836 | normal | 2018-07-03 17:30:16 +0900 (Tue, 03 Jul 2018) | 11 lines

thread_pthread.c (native_thread_destroy): clear native TSD pointer

mwrap <https://80x24.org/mwrap/> interposes malloc functions and
checks for GVL existence to determine Ruby source locations of
malloc calls.  pthread_getattr_np (from get_stack) may call
realloc to get the CPU set size; so when using the thread-cache,
ruby_thread_has_gvl_p() may hit a false positive on reused
threads with lingering rb_thread_t in thread-specific data.

This was causing mwrap to call rb_source_location_cstr() and
crash because it was pointed to a zero ec->cfp->iseq.
------------------------------------------------------------------------
r63835 | nobu | 2018-07-03 14:12:52 +0900 (Tue, 03 Jul 2018) | 12 lines

cont.c: handle errors for getcontext()

It may raise an error in a certain security configuration.
It is very likely to trigger a segmentation fault if `getcontext()` failed silently
and we just let it keep going.

Related to https://bugs.ruby-lang.org/issues/14883
[Fix GH-1903]

Based on the patch from Lion Yang <lion@aosc.io>

From: Lion Yang <lion@aosc.io>
------------------------------------------------------------------------
r63834 | nobu | 2018-07-03 13:43:27 +0900 (Tue, 03 Jul 2018) | 3 lines

fake.rb.in: duplicated RUBYOPT

* template/fake.rb.in: removed duplicated options in RUBYOPT.
------------------------------------------------------------------------
r63833 | nobu | 2018-07-03 13:43:25 +0900 (Tue, 03 Jul 2018) | 6 lines

rubyopt_spec.rb: skip -v in RUBYOPT examples

* spec/ruby/command_line/rubyopt_spec.rb: skip -v in RUBYOPT
  examples when CROSS_COMPILING is set by fake.rb.  the version
  number by -v is printed before loading libraries by -r options,
  so setting RUBY_DESCRIPTION in fake.rb has no effect.
------------------------------------------------------------------------
r63832 | nobu | 2018-07-03 09:49:32 +0900 (Tue, 03 Jul 2018) | 6 lines

configure.ac: [DOC] refine help messages

cflags, cppflags, and cxxflags are additional flags to auto
configured flags, and ignored when the their respective autoconf
default variables are given.
[ci skip]
------------------------------------------------------------------------
r63831 | normal | 2018-07-03 09:29:06 +0900 (Tue, 03 Jul 2018) | 3 lines

test/ruby/test_signal.rb: speedup some test by disabling RubyGems

test_signame_delivered is reduced from 1.0s to 0.1s
------------------------------------------------------------------------
r63830 | svn | 2018-07-03 08:14:53 +0900 (Tue, 03 Jul 2018) | 1 line

* 2018-07-03
------------------------------------------------------------------------
r63829 | normal | 2018-07-03 08:14:52 +0900 (Tue, 03 Jul 2018) | 5 lines

process.c (waitpid_nogvl): start timer thread polling for lossy SIGCHLD

For systems with lossy SIGCHLD, an infinitely sleeping timer
thread needs to be aware of rb_waitpid callers in the first
place before it can check and reset polling status.
------------------------------------------------------------------------
r63828 | ngoto | 2018-07-02 22:50:53 +0900 (Mon, 02 Jul 2018) | 12 lines

Makefile.in: ARCH_FLAG may contain "-m64" etc.

* Makefile.in (mjit_config.h): ARCH_FLAG may contain "-m64", "-m32",
  "-march=i486" and so on, but the change made with r63232 only
  supports "-arch AAA -arch BBB" mainly used on Mac OS X.
  To solve the issue, ARCH_FLAG is parsed and the architectures
  specified in "-arch XXX" are added to $archs and the rest is
  stored to $arch_flag. The $arch_flag is defined as MJIT_ARCHFLAG
  if $archs is empty or the target architecture is not listed in $arch.
  Fix build failure on Solaris 10 with ./configure CFLAGS="-m64".
  [Bug #14876] [ruby-dev:50583]

------------------------------------------------------------------------
r63827 | kazu | 2018-07-02 20:11:39 +0900 (Mon, 02 Jul 2018) | 1 line

Use PRI_PIDT_PREFIX for results of getpid()
------------------------------------------------------------------------
r63823 | nobu | 2018-07-02 16:46:38 +0900 (Mon, 02 Jul 2018) | 4 lines

time.c: [DOC] Time#localtime

* time.c: state that Time#localtime does nothing when nothing
  changes.  [ruby-core:87675] [Bug #14880]
------------------------------------------------------------------------
r63822 | nobu | 2018-07-02 16:42:24 +0900 (Mon, 02 Jul 2018) | 4 lines

set up mjit.on at initialization

* ruby.c (cmdline_options_init): set up mjit.on flag by
  MJIT_FORCE_ENABLE in the initialization function.
------------------------------------------------------------------------
r63821 | svn | 2018-07-02 10:50:24 +0900 (Mon, 02 Jul 2018) | 1 line

* 2018-07-02
------------------------------------------------------------------------
r63820 | usa | 2018-07-02 10:50:23 +0900 (Mon, 02 Jul 2018) | 6 lines

get rid of a compiler warning of VC

* mjit.c (exec_prcess): use PRI_PIDT_PREFIX for pid.

* win32/Makefile.sub (PRI_PIDT_PREFIX): force to "I".

------------------------------------------------------------------------
r63816 | ktsj | 2018-07-01 17:12:14 +0900 (Sun, 01 Jul 2018) | 1 line

NEWS: add NEWS entry about Kernel#then [Feature #14594]
------------------------------------------------------------------------
r63815 | ktsj | 2018-07-01 17:12:13 +0900 (Sun, 01 Jul 2018) | 3 lines

lib/.document: add csv

lib/csv.rb was divided into lib/csv/*.
------------------------------------------------------------------------
r63814 | kazu | 2018-07-01 10:38:18 +0900 (Sun, 01 Jul 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r63813 | kazu | 2018-07-01 10:38:16 +0900 (Sun, 01 Jul 2018) | 1 line

Remove unused variable
------------------------------------------------------------------------
r63812 | svn | 2018-07-01 10:38:14 +0900 (Sun, 01 Jul 2018) | 1 line

* 2018-07-01
------------------------------------------------------------------------
r63811 | kazu | 2018-07-01 10:38:14 +0900 (Sun, 01 Jul 2018) | 4 lines

[DOC] newer codes recommend to use spaces only

[Bug #14246]
[ci skip]
------------------------------------------------------------------------
r63810 | eregon | 2018-06-30 22:53:10 +0900 (Sat, 30 Jun 2018) | 6 lines

Fix spec/ruby/command_line/rubylib_spec.rb for use with make test-spec

* Current code clears ENV['RUBYLIB'], but on Windows it's needed when
  running from build 'src' (or running make test-spec).
* Patch by MSP-Greg, from https://github.com/ruby/spec/pull/607.
* Imported manually to fix CI on Windows, without needing a full sync.
------------------------------------------------------------------------
r63803 | nobu | 2018-06-30 20:56:54 +0900 (Sat, 30 Jun 2018) | 4 lines

use sigsetjmp on macOS

SIGCHLD is used internally since r63758, the signal masks need to
be restored.
------------------------------------------------------------------------
r63802 | normal | 2018-06-30 17:38:36 +0900 (Sat, 30 Jun 2018) | 3 lines

fix r63799 ("test/ruby/test_rubyoptions.rb: improve diagnostics for failures")

CI machines are faster than mine :x
------------------------------------------------------------------------
r63801 | kazu | 2018-06-30 17:11:16 +0900 (Sat, 30 Jun 2018) | 1 line

[DOC] Use https: instead of http:, git: [ci skip]
------------------------------------------------------------------------
r63800 | kazu | 2018-06-30 17:10:58 +0900 (Sat, 30 Jun 2018) | 1 line

[DOC] Update URL of rurema [ci skip]
------------------------------------------------------------------------
r63799 | normal | 2018-06-30 16:53:31 +0900 (Sat, 30 Jun 2018) | 4 lines

test/ruby/test_rubyoptions.rb: improve diagnostics for failures

rubyci.org OSX CI instances seem to hang on this, but I'm not
sure why...
------------------------------------------------------------------------
r63798 | normal | 2018-06-30 16:52:51 +0900 (Sat, 30 Jun 2018) | 3 lines

test/ruby/test_optimization.rb: increase timeout

For slow systems...
------------------------------------------------------------------------
r63797 | normal | 2018-06-30 15:11:33 +0900 (Sat, 30 Jun 2018) | 5 lines

process.c: attempt to reap spawnvp (win32) result from mjit

Basically in win32, mjit.c seems to work directly on spawnvp
result while normal Ruby code wraps process handles to look
like *nix PIDs.  I'm only guessing, here...
------------------------------------------------------------------------
r63796 | normal | 2018-06-30 12:50:52 +0900 (Sat, 30 Jun 2018) | 5 lines

mjit: provide more diagnostics for waitpid failures

Also, enable check for defined(_WIN32) macro for SIGCHLD_LOSSY, too.

[Bug #14867]
------------------------------------------------------------------------
r63795 | normal | 2018-06-30 09:51:57 +0900 (Sat, 30 Jun 2018) | 6 lines

use SIGCHLD_LOSSY to enable waitpid polling mode

Some systems lack SIGCHLD or have incomplete SIGCHLD
implementations.  So enable polling mode for them.

[ruby-core:87705] [Bug #14867]
------------------------------------------------------------------------
r63794 | normal | 2018-06-30 07:20:12 +0900 (Sat, 30 Jun 2018) | 6 lines

test_thread.rb (test_thread_interrupt_for_killed_thread): reprieve for MJIT

With MJIT enabled, the exit (from SIGTERM) may take a long time
to complete.  Prevent EnvUtil.invoke_ruby from falling back to
other signals (SIGABRT) when Process.wait takes longer than the
default 1s reprieve.
------------------------------------------------------------------------
r63793 | normal | 2018-06-30 07:13:02 +0900 (Sat, 30 Jun 2018) | 5 lines

signal.c: use ATOMIC_EXCHANGE for sigchld_hit

sig_atomic_t may not be sufficient for multi-threaded
applications if the sighandler runs on a different CPU
than timer thread.
------------------------------------------------------------------------
r63792 | svn | 2018-06-30 06:01:24 +0900 (Sat, 30 Jun 2018) | 1 line

* 2018-06-30
------------------------------------------------------------------------
r63791 | normal | 2018-06-30 06:01:23 +0900 (Sat, 30 Jun 2018) | 5 lines

test/lib/test/unit/assertions.rb (assert_in_out_err): disable gems

RubyGems loading is still a bottleneck at startup and this speeds up
test/ruby/test_rubyoptions.rb test from 15s => 3.5s on the fastest
machine I have access to.
------------------------------------------------------------------------
r63790 | normal | 2018-06-29 17:51:33 +0900 (Fri, 29 Jun 2018) | 4 lines

process.c: handle errno correctly in non-SIGCHLD path

It's a bit redundant, but we optimize for platforms with
SIGCHLD, not without.
------------------------------------------------------------------------
r63789 | normal | 2018-06-29 16:52:24 +0900 (Fri, 29 Jun 2018) | 7 lines

process.c (waitpid_nogvl): check interrupts before sleeping

We may be interrupted by another thread after setting ubf,
but before we re-acquire interrupt_lock again to sleep on
w->cond.

This should fix test_wait_interrupt in test/ruby/test_process.rb
------------------------------------------------------------------------
r63788 | shyouhei | 2018-06-29 13:56:07 +0900 (Fri, 29 Jun 2018) | 2 lines

improve C0 coverage of insns.def

------------------------------------------------------------------------
r63787 | nobu | 2018-06-29 12:28:26 +0900 (Fri, 29 Jun 2018) | 1 line

rethrow the caught exception as-is
------------------------------------------------------------------------
r63786 | normal | 2018-06-29 11:53:11 +0900 (Fri, 29 Jun 2018) | 7 lines

test_process.rb (test_wait_exception): check assertion sooner

To diagnose f.puts => EPIPE failures in CI(*).  I'm not sure
what's wrong and can't reproduce EPIPE even with my slow laptop
from 2005.

(*) http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/1058203
------------------------------------------------------------------------
r63785 | normal | 2018-06-29 11:21:08 +0900 (Fri, 29 Jun 2018) | 3 lines

process.c: fix typo in non-SIGCHLD waitpid :x

I expect this to fix [Bug #14873]
------------------------------------------------------------------------
r63784 | svn | 2018-06-29 08:47:00 +0900 (Fri, 29 Jun 2018) | 1 line

* 2018-06-29
------------------------------------------------------------------------
r63783 | nobu | 2018-06-29 08:46:59 +0900 (Fri, 29 Jun 2018) | 4 lines

rb_enc_alias

`rb_encdb`-prefixed functions are only for internal use.
use rb_enc_alias instead.
------------------------------------------------------------------------
r63782 | yui-knk | 2018-06-28 23:33:28 +0900 (Thu, 28 Jun 2018) | 3 lines

ast.c: Fix defs

* ast.c (node_children): Add mid to children
------------------------------------------------------------------------
r63781 | mame | 2018-06-28 23:18:56 +0900 (Thu, 28 Jun 2018) | 3 lines

Revert "rb_enc_alias"

This reverts commit r63779 which made test-spec fail.
------------------------------------------------------------------------
r63780 | nobu | 2018-06-28 22:22:13 +0900 (Thu, 28 Jun 2018) | 5 lines

Use nd_X shorthand for annotation

[Fix GH-1901]

From: hkdnet <satoko.itse@gmail.com>
------------------------------------------------------------------------
r63779 | nobu | 2018-06-28 22:18:52 +0900 (Thu, 28 Jun 2018) | 4 lines

rb_enc_alias

`rb_encdb`-prefixed functions are only for internal use.
use rb_enc_alias instead.
------------------------------------------------------------------------
r63778 | nobu | 2018-06-28 18:59:35 +0900 (Thu, 28 Jun 2018) | 1 line

fix feature name and removed a duplicate condition
------------------------------------------------------------------------
r63777 | ko1 | 2018-06-28 17:35:48 +0900 (Thu, 28 Jun 2018) | 20 lines

check enc_capable.

* encoding.c (rb_enc_capable): make it extern to check enc_capable.
  enc_index can be set to limited types such as T_STRING, T_REGEX
  and so on. This function check an object is this kind of types.

* include/ruby/encoding.h: ditto.

* encoding.c (enc_set_index): check a given object is enc_capable.

* include/ruby/encoding.h (PUREFUNC):

* marshal.c (encoding_name): check `rb_enc_capable` first.

* marshal.c (r_ivar): ditto. If it is not enc_capable, it should be
  malformed data.

* spec/ruby/optional/capi/encoding_spec.rb: remove tests depending
  on the wrong feature: all objects can set enc_index.

------------------------------------------------------------------------
r63776 | nobu | 2018-06-28 16:34:36 +0900 (Thu, 28 Jun 2018) | 4 lines

symbol.c: dsymbol initial encoding

* symbol.c (dsymbol_alloc): set encoding directly.  no need to
  check existing encoding in rb_enc_associate.
------------------------------------------------------------------------
r63775 | a_matsuda | 2018-06-28 12:48:52 +0900 (Thu, 28 Jun 2018) | 6 lines

Fix typo of file path [ci skip]

Patch by: yuuji.yaginuma <yuuji.yaginuma@gmail.com>

https://github.com/ruby/ruby/pull/1900
[Fix GH-1900]
------------------------------------------------------------------------
r63774 | normal | 2018-06-28 03:27:58 +0900 (Thu, 28 Jun 2018) | 5 lines

tests: increase timeouts and speedup some slow tests

I'm still using the computer from 2005, so enabling MJIT makes
some tests take longer.  For test_deadlock_by_signal_at_forking
I got it down to 135s to 89s by disabling RubyGems.
------------------------------------------------------------------------
r63773 | svn | 2018-06-28 00:56:56 +0900 (Thu, 28 Jun 2018) | 1 line

* 2018-06-28
------------------------------------------------------------------------
r63772 | hsbt | 2018-06-28 00:56:55 +0900 (Thu, 28 Jun 2018) | 7 lines

Added guard condition for old ruby about RubyVM::MJIT.

  Test libraries under the test/lib is used with default gems in
  their repositories. default gems may support old ruby like
  Ruby 2.5. When default gems invoke test libraries of Ruby core
  with old ruby, they raised
  `uninitialized constant RubyVM::MJIT (NameError)`
------------------------------------------------------------------------
r63771 | nobu | 2018-06-27 23:00:34 +0900 (Wed, 27 Jun 2018) | 1 line

use the prefixed macro
------------------------------------------------------------------------
r63770 | nobu | 2018-06-27 22:42:49 +0900 (Wed, 27 Jun 2018) | 1 line

use rb_pid_t instead of pid_t
------------------------------------------------------------------------
r63769 | eregon | 2018-06-27 22:41:29 +0900 (Wed, 27 Jun 2018) | 1 line

Update to ruby/spec@98c7d74
------------------------------------------------------------------------
r63768 | eregon | 2018-06-27 21:30:05 +0900 (Wed, 27 Jun 2018) | 1 line

Update to ruby/spec@a454137
------------------------------------------------------------------------
r63767 | eregon | 2018-06-27 20:37:31 +0900 (Wed, 27 Jun 2018) | 3 lines

Update to ruby/spec@41068a6

* Only small fixes to specs from CRuby to review the diff more easily.
------------------------------------------------------------------------
r63766 | eregon | 2018-06-27 20:37:19 +0900 (Wed, 27 Jun 2018) | 1 line

Update to ruby/mspec@7074b56
------------------------------------------------------------------------
r63765 | ko1 | 2018-06-27 19:36:49 +0900 (Wed, 27 Jun 2018) | 6 lines

remove assertion for hidden objects.

* vm_insnhelper.h (PUSH): r63763 increase "PUSH()" op and it reveals that
  there are hidden objects (at least T_IMEMO/iseq objects) are located
  on VM stack. Remove this check and I'll revisit it later.

------------------------------------------------------------------------
r63764 | normal | 2018-06-27 19:09:33 +0900 (Wed, 27 Jun 2018) | 9 lines

process.c (waitpid_wait): do not set ECHILD prematurely

It is possible to have both MJIT and normal child processes
alive, so we cannot set ECHILD based on such a guess.  We can
still elide waitpid(PID <= 0) calls if we have callers in
vm->waiting_pids, however.

For specs, ensure Process.waitall does not leak MJIT
PIDs to Rubyspace.
------------------------------------------------------------------------
r63763 | shyouhei | 2018-06-27 18:28:09 +0900 (Wed, 27 Jun 2018) | 11 lines

give up insn attr handles_frame

I introduced this mechanism in r62051 to speed things up. Later it
was reported that the change causes problems.  I searched for
workarounds but nothing seemed appropriate.  I hereby officially
give it up.  The idea to move ADD_PC around was a mistake.

Fixes [Bug #14809] and [Bug #14834].

Signed-off-by: Urabe, Shyouhei <shyouhei@ruby-lang.org>

------------------------------------------------------------------------
r63762 | normal | 2018-06-27 17:24:10 +0900 (Wed, 27 Jun 2018) | 5 lines

signal.c: fix braino in fake_grantfd

[Bug #14871]

Is neon down?  I missed ruby-core notifications on this.
------------------------------------------------------------------------
r63761 | normal | 2018-06-27 15:01:33 +0900 (Wed, 27 Jun 2018) | 3 lines

s/pid_t/rb_pid_t/

Some platforms do not have pid_t :x
------------------------------------------------------------------------
r63760 | normal | 2018-06-27 12:16:59 +0900 (Wed, 27 Jun 2018) | 3 lines

Revert "spec: skip Process wait specs on MJIT"

This reverts r63731 (commit 359dd59db2512d801bb983f98bede4fc598f139a).
------------------------------------------------------------------------
r63759 | normal | 2018-06-27 12:16:54 +0900 (Wed, 27 Jun 2018) | 3 lines

Revert "test_process.rb: skip tests for Bug 14867"

This reverts r63740 (commit 042395a7f7262464265ce70cdffbe1812aa145d3).
------------------------------------------------------------------------
r63758 | normal | 2018-06-27 12:14:30 +0900 (Wed, 27 Jun 2018) | 38 lines

hijack SIGCHLD handler for internal use

Use a global SIGCHLD handler to guard all callers of rb_waitpid.
To work safely with multi-threaded programs, we introduce a
VM-wide waitpid_lock to be acquired BEFORE fork/vfork spawns the
process.  This is to be combined with the new ruby_waitpid_locked
function used by mjit.c in a non-Ruby thread.

Ruby-level SIGCHLD handlers registered with Signal.trap(:CHLD)
continues to work as before and there should be no regressions
in any existing use cases.

Splitting the wait queues for PID > 0 and groups (PID <= 0)
ensures we favor PID > 0 callers.

The disabling of SIGCHLD in rb_f_system is longer necessary,
as we use deferred signal handling and no longer make ANY
blocking waitpid syscalls in other threads which could "beat"
the waitpid call made by rb_f_system.

We prevent SIGCHLD from firing in normal Ruby Threads and only
enable it in the timer-thread, to prevent spurious wakeups
from in test/-ext-/gvl/test_last_thread.rb with MJIT enabled.

I've tried to guard as much of the code for RUBY_SIGCHLD==0
using C "if" statements rather than CPP "#if" so to reduce
the likelyhood of portability problems as the compiler will
see more code.

We also work to suppress false-positives from
Process.wait(-1, Process::WNOHANG) to quiets warnings from
spec/ruby/core/process/wait2_spec.rb with MJIT enabled.

Lastly, we must implement rb_grantpt for ext/pty.  We need a
MJIT-compatible way of supporting grantpt(3) which may spawn
the `pt_chown' binary and call waitpid(2) on it.

[ruby-core:87605] [Ruby trunk Bug#14867]
------------------------------------------------------------------------
r63757 | mame | 2018-06-27 11:37:26 +0900 (Wed, 27 Jun 2018) | 7 lines

Revert "bootstraptest/runner: speed up assert_finish by avoiding sleep"

This reverts commit r63754.
Many CI servers still use old ruby as base ruby which does not support
read_nonblock.

https://rubyci.org/logs/www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20180627T013100Z.fail.html.gz
------------------------------------------------------------------------
r63756 | shyouhei | 2018-06-27 10:10:02 +0900 (Wed, 27 Jun 2018) | 4 lines

refactor move logics out of insns.def

This is a pure refactoring.  I see no difference in this change.

------------------------------------------------------------------------
r63755 | shyouhei | 2018-06-27 09:57:16 +0900 (Wed, 27 Jun 2018) | 4 lines

move function declarations from insns.def to internal.h

Just avoid being loose.

------------------------------------------------------------------------
r63754 | normal | 2018-06-27 08:44:00 +0900 (Wed, 27 Jun 2018) | 4 lines

bootstraptest/runner: speed up assert_finish by avoiding sleep

We may use IO.select to watch for process exit.  This speeds up
"make test" by 2 seconds for me.
------------------------------------------------------------------------
r63753 | svn | 2018-06-27 00:56:09 +0900 (Wed, 27 Jun 2018) | 1 line

* 2018-06-27
------------------------------------------------------------------------
r63752 | k0kubun | 2018-06-27 00:56:08 +0900 (Wed, 27 Jun 2018) | 6 lines

test: skip 2 major unstable tests with MJIT

for CI with cppflags=-DMJIT_FORCE_ENABLE.

Since I have no idea to fix this immediately, let me skip this for now
and take a look later.
------------------------------------------------------------------------
r63751 | k0kubun | 2018-06-25 23:15:26 +0900 (Mon, 25 Jun 2018) | 3 lines

mjit_compile.inc.erb: drop unnecessary variable

It never becomes `dispatched: true` with the current code.
------------------------------------------------------------------------
r63750 | watson1978 | 2018-06-25 22:18:44 +0900 (Mon, 25 Jun 2018) | 4 lines

test_range.rb: add tests to improve coverage

This patch will improve the result of line coverage from 91.3% to 95.0%.
[Fix GH-1899]
------------------------------------------------------------------------
r63749 | naruse | 2018-06-25 21:11:31 +0900 (Mon, 25 Jun 2018) | 3 lines

increase body size

To try to block writing on travis.
------------------------------------------------------------------------
r63748 | normal | 2018-06-25 16:57:39 +0900 (Mon, 25 Jun 2018) | 5 lines

mjit.c: hide path search error behind verbose()

Before r63744, we let execvp(3) fail instead and it was quiet.
The verbosity was causing test_search to fail in
test/ruby/test_rubyoptions.rb when PATH is set to /tmp.
------------------------------------------------------------------------
r63747 | shyouhei | 2018-06-25 12:14:48 +0900 (Mon, 25 Jun 2018) | 2 lines

comma at the end of enum is a C99ism

------------------------------------------------------------------------
r63746 | normal | 2018-06-25 11:52:34 +0900 (Mon, 25 Jun 2018) | 5 lines

mjit.c: avoid signed pointer comparisons (fix for 32-bit)

ptrdiff_t is a signed type, use uintptr_t instead for unsigned
comparisons.  This is needed to allow MJIT tests to pass on
32-bit x86 GNU/Linux.
------------------------------------------------------------------------
r63745 | normal | 2018-06-25 11:52:29 +0900 (Mon, 25 Jun 2018) | 10 lines

mjit.c: set PIC flags on clang for FreeBSD and glibc

This seems required on FreeBSD 11.1 (clang 4.0.0) and
Debian stretch (clang 3.8.1) for shared libraries.

Note: Not checking __linux__ because there are statically-linked
Linux distros (I don't know if they can support MJIT).  But
glibc doesn't support static linking, so we guard on that.

Maybe other platforms will need this, too.
------------------------------------------------------------------------
r63744 | normal | 2018-06-25 10:06:15 +0900 (Mon, 25 Jun 2018) | 8 lines

mjit.c: avoid execvp PATH lookup in vfork-ed child

execvp(3) is not async-signal-safe and may alter libc internal
states (e.g. those used by malloc).  However execv(3) is
async-signal-safe as of POSIX.1-2008.

So perform the PATH lookup in the parent and use execv(3)
in the child.
------------------------------------------------------------------------
r63743 | svn | 2018-06-25 07:08:16 +0900 (Mon, 25 Jun 2018) | 1 line

* 2018-06-25
------------------------------------------------------------------------
r63742 | normal | 2018-06-25 07:08:15 +0900 (Mon, 25 Jun 2018) | 9 lines

UNIXSocket#recv_io: trigger GC when out of FDs

Make this behavior is consistent with our other FD-allocating
methods.

EMFILE and ENFILE are not documented nor can I trigger them when
using UNIXSocket#recv_io.  However, ENOMEM is documented, and
I've triggered EMSGSIZE on FreeBSD and truncated messages when
an EMFILE condition is hit on my system.
------------------------------------------------------------------------
r63741 | normal | 2018-06-24 21:36:44 +0900 (Sun, 24 Jun 2018) | 7 lines

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]
------------------------------------------------------------------------
r63740 | k0kubun | 2018-06-24 20:07:44 +0900 (Sun, 24 Jun 2018) | 1 line

test_process.rb: skip tests for Bug 14867
------------------------------------------------------------------------
r63739 | normal | 2018-06-24 19:30:48 +0900 (Sun, 24 Jun 2018) | 4 lines

process.c (after_fork_ruby): make it a proper function

Improves readability to me, and there's no point in using
macros for this with decent compilers.
------------------------------------------------------------------------
r63738 | mame | 2018-06-24 18:31:09 +0900 (Sun, 24 Jun 2018) | 6 lines

test/net/http/test_httpresponse.rb: add testcases for net/httpresponse

This change adds testcases for Response#inspect and #code_type, and
improves line coverage of lib/net/http/response.rb (91.8 % to 92.94 %).

A patch from @owlworks.  https://github.com/ruby/ruby/pull/1898
------------------------------------------------------------------------
r63737 | mame | 2018-06-24 18:31:07 +0900 (Sun, 24 Jun 2018) | 10 lines

lib/prime.rb: remove unused methods

This change removes TrialDivision#cache, TrialDivision#primes, and
TrialDivision#primes_so_far.

TrialDivision class is undocumented officially, so this class is used
only internally.  Yugui san moved prime library from mathn to prime in
2008, and then she might forget to delete these methods.

A patch from @shio-phys.  https://github.com/ruby/prime/pull/4
------------------------------------------------------------------------
r63736 | svn | 2018-06-24 18:31:07 +0900 (Sun, 24 Jun 2018) | 1 line

* 2018-06-24
------------------------------------------------------------------------
r63735 | mame | 2018-06-24 18:31:06 +0900 (Sun, 24 Jun 2018) | 4 lines

test/test_prime.rb: add testcases of prime library

This change improves line coverage of prime.rb from 86% to 99%.
A patch from @shio-phys.  https://github.com/ruby/prime/pull/3
------------------------------------------------------------------------
r63734 | k0kubun | 2018-06-23 23:11:19 +0900 (Sat, 23 Jun 2018) | 8 lines

mjit.c: disable calling JIT-ed code

when TracePoint is enabled. We're cancelling JIT-ed code execution AFTER
each instruction, but there is no guard before the first insn of method.

To prevent spoiling performance, I don't want to modify the JIT-ed code
to fix this. So this commit replaces `mjit_enabled` check with `mjit_call_p`
check.
------------------------------------------------------------------------
r63733 | tarui | 2018-06-23 22:58:51 +0900 (Sat, 23 Jun 2018) | 4 lines

gc.c (ruby_mimmalloc): add initialize code for USE_GC_MALLOC_OBJ_INFO_DETAILS

We often had SEGV in ruby_xfree when USE_GC_MALLOC_OBJ_INFO_DETAILS is 1

------------------------------------------------------------------------
r63732 | k0kubun | 2018-06-23 22:41:06 +0900 (Sat, 23 Jun 2018) | 9 lines

mjit.c: unify the variable name with method name

`RubyVM::MJIT.enabled?`.

It's set to be TRUE even before initialization is finished.
So it was actually not "mjit initialized predicate".

This flag is also used to check whether JIT-ed code should be called
or not, but I'm going to split the responsibility to another flag.
------------------------------------------------------------------------
r63731 | k0kubun | 2018-06-23 17:29:20 +0900 (Sat, 23 Jun 2018) | 4 lines

spec: skip Process wait specs on MJIT

until [Bug #14867] is fixed. I want to start running CI with MJIT
enabled before fixing the problem.
------------------------------------------------------------------------
r63730 | k0kubun | 2018-06-23 16:21:12 +0900 (Sat, 23 Jun 2018) | 12 lines

mjit.c: initial cygwin support

thread_pthread.c: Drop pthread_attr_setscope usage. It seems that,
at least on Linux and macOS, PTHREAD_SCOPE_PROCESS is not supported
and thus PTHREAD_SCOPE_SYSTEM should be used by default.

Let's just stop calling this until we find some platform that needs
`pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)`.

[Misc #14854]

From: fd0 (Daisuke Fujimura)
------------------------------------------------------------------------
r63729 | ktsj | 2018-06-23 13:57:49 +0900 (Sat, 23 Jun 2018) | 1 line

[DOC] Add call signature for {Array,Hash}#any?
------------------------------------------------------------------------
r63728 | ktsj | 2018-06-23 13:56:49 +0900 (Sat, 23 Jun 2018) | 5 lines

test/ruby/test_settracefunc.rb: fix NoMethodError

* test/ruby/test_settracefunc.rb (test_trace_point_raising_exception_in_bmethod_call):
  this test run in separate process, so #target_thread? is not defined and it doesn't
  need target thread check.
------------------------------------------------------------------------
r63727 | ktsj | 2018-06-23 13:52:58 +0900 (Sat, 23 Jun 2018) | 6 lines

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]
------------------------------------------------------------------------
r63726 | ktsj | 2018-06-23 13:45:57 +0900 (Sat, 23 Jun 2018) | 1 line

vm.c: fix typo in function name
------------------------------------------------------------------------
r63725 | svn | 2018-06-23 12:47:55 +0900 (Sat, 23 Jun 2018) | 1 line

* 2018-06-23
------------------------------------------------------------------------
r63724 | normal | 2018-06-23 12:47:54 +0900 (Sat, 23 Jun 2018) | 5 lines

thread_pthread.c (native_sleep): do not clear unblock.arg

It is unnecessary to clear unblock.arg once unblock.func is
cleared, and unblock_function_clear in thread.c doesn't
touch it, either.
------------------------------------------------------------------------
r63723 | naruse | 2018-06-22 20:57:06 +0900 (Fri, 22 Jun 2018) | 1 line

remove debug print
------------------------------------------------------------------------
r63722 | naruse | 2018-06-22 20:10:56 +0900 (Fri, 22 Jun 2018) | 3 lines

check net.core.wmem_default and max instead of tcp

https://travis-ci.org/ruby/ruby/jobs/395416137
------------------------------------------------------------------------
r63721 | naruse | 2018-06-22 19:53:03 +0900 (Fri, 22 Jun 2018) | 3 lines

show net.ipv4.tcp_wmem to debug failure on travis

https://travis-ci.org/ruby/ruby/builds/395318841
------------------------------------------------------------------------
r63720 | normal | 2018-06-22 17:47:12 +0900 (Fri, 22 Jun 2018) | 7 lines

dir.c: define O_CLOEXEC for older systems

SuSE 10 has openat(), but not O_CLOEXEC

Reported-by: wangpeiwen

[ruby-core:87591] [Bug #14864]
------------------------------------------------------------------------
r63719 | normal | 2018-06-22 15:17:15 +0900 (Fri, 22 Jun 2018) | 4 lines

thread.c (sleep_timespec): avoid needless update w/o spuriuos check

No point in wasting cycles updating the timespec when not
checking on spurious wakeups.
------------------------------------------------------------------------
r63718 | nobu | 2018-06-22 13:13:02 +0900 (Fri, 22 Jun 2018) | 11 lines

remove DISABLE_RUBYGEMS from config files

* configure.ac: removed DISABLE_RUBYGEMS macro from config.h, not
  to rebuild everything when the flag changed.

* configure.ac, win32/configure.bat: make USE_RUBYGEMS lowercase.

* tool/mkconfig.rb: remove RUBYGEMS stuff from rbconfig.rb, not to
  reconfigure and rebuild all extension libraries.

* Makefile.in (CPPFLAGS): enable/disable Rubygems by USE_RUBYGEMS.
------------------------------------------------------------------------
r63717 | mame | 2018-06-22 12:07:24 +0900 (Fri, 22 Jun 2018) | 1 line

test/ruby/test_range.rb: add a test for endless range's min with comparison
------------------------------------------------------------------------
r63716 | mame | 2018-06-22 11:58:40 +0900 (Fri, 22 Jun 2018) | 4 lines

range.c: Range#last and #max raises a RangeError if it is endless

Also, Range#min raises an error if it is endless and a comparison method
is specified.
------------------------------------------------------------------------
r63715 | mame | 2018-06-22 11:58:39 +0900 (Fri, 22 Jun 2018) | 3 lines

range.c: Range#size now returns Float::INFINITY if it is endless

Fixes [Bug #14699]
------------------------------------------------------------------------
r63714 | mame | 2018-06-22 11:58:37 +0900 (Fri, 22 Jun 2018) | 3 lines

range.c: Range#to_a now raises RangeError if it is endless

Fixes [Bug #14845]
------------------------------------------------------------------------
r63713 | normal | 2018-06-22 11:43:51 +0900 (Fri, 22 Jun 2018) | 4 lines

vm_core.h (rb_vm_t): make sleeper non-volatile

vm->sleeper is never modified in signal handlers or without GVL,
so there's no need for volatile hocus-pocus.
------------------------------------------------------------------------
r63712 | svn | 2018-06-22 11:32:32 +0900 (Fri, 22 Jun 2018) | 1 line

* 2018-06-22
------------------------------------------------------------------------
r63711 | normal | 2018-06-22 11:32:30 +0900 (Fri, 22 Jun 2018) | 4 lines

thread_sync.c (rb_mutex_lock): fix deadlock

* thread_sync.c (rb_mutex_lock): fix deadlock
  [ruby-core:87467] [Bug #14841]
------------------------------------------------------------------------
r63710 | k0kubun | 2018-06-21 23:04:05 +0900 (Thu, 21 Jun 2018) | 3 lines

mjit.c: RubyVM::MJIT.pause / RubyVM::MJIT.resume

[Feature #14830]
------------------------------------------------------------------------
r63709 | normal | 2018-06-21 08:38:21 +0900 (Thu, 21 Jun 2018) | 4 lines

thread_pthread.c: fix non-sleepy timer-thread with fork

This fixes bootstraptest/test_fork.rb for systems with
sleepy timer thread disabled.
------------------------------------------------------------------------
r63708 | normal | 2018-06-21 08:38:16 +0900 (Thu, 21 Jun 2018) | 6 lines

test/ruby/test_io.rb: fix timing sensitive test

For systems with sleepy timer thread disabled, the signal
handler does not fire soon enough and we need to ensure the
signal is received before we check its value.  So use a
self-pipe here.
------------------------------------------------------------------------
r63707 | svn | 2018-06-21 03:10:10 +0900 (Thu, 21 Jun 2018) | 1 line

* 2018-06-21
------------------------------------------------------------------------
r63706 | ko1 | 2018-06-21 03:10:09 +0900 (Thu, 21 Jun 2018) | 1 line

add assertion to vm_search_method()
------------------------------------------------------------------------
r63705 | hsbt | 2018-06-20 21:51:38 +0900 (Wed, 20 Jun 2018) | 3 lines

ConditionVariable and Queue is not standard library.

  They are located under the Thread class.
------------------------------------------------------------------------
r63704 | yui-knk | 2018-06-20 21:40:59 +0900 (Wed, 20 Jun 2018) | 4 lines

test_ast.rb: Remove a needless line

`RubyVM::AST.parse_file` was fixed to raise `SyntaxError`
by r63602. So this line is needless.
------------------------------------------------------------------------
r63703 | yui-knk | 2018-06-20 21:11:25 +0900 (Wed, 20 Jun 2018) | 3 lines

test_ast.rb: Fix an argument of `grep`, child is a `RubyVM::AST::Node`

Yusuke Endoh pointed out coverage of ast module is very low. Thanks!
------------------------------------------------------------------------
r63702 | nobu | 2018-06-20 20:14:08 +0900 (Wed, 20 Jun 2018) | 1 line

skip when group name is not found
------------------------------------------------------------------------
r63701 | ko1 | 2018-06-20 16:53:29 +0900 (Wed, 20 Jun 2018) | 8 lines

Introduce `USE_GC_MALLOC_OBJ_INFO_DETAILS`. [Feature #14857]

* include/ruby/defines.h: introduce `USE_GC_MALLOC_OBJ_INFO_DETAILS`
  to show malloc statistics by replace ruby_xmalloc() and so on with
  macros.

* gc.c (struct malloc_obj_info): introduced to save per-malloc information.

------------------------------------------------------------------------
r63700 | hsbt | 2018-06-20 16:16:25 +0900 (Wed, 20 Jun 2018) | 1 line

Thread is always provided at current ruby version.
------------------------------------------------------------------------
r63699 | svn | 2018-06-20 08:20:37 +0900 (Wed, 20 Jun 2018) | 1 line

* 2018-06-20
------------------------------------------------------------------------
r63698 | normal | 2018-06-20 08:20:36 +0900 (Wed, 20 Jun 2018) | 13 lines

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]
------------------------------------------------------------------------
r63697 | nobu | 2018-06-19 17:45:17 +0900 (Tue, 19 Jun 2018) | 1 line

describe about NameError by #private_constant
------------------------------------------------------------------------
r63696 | nobu | 2018-06-19 17:15:52 +0900 (Tue, 19 Jun 2018) | 5 lines

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.
------------------------------------------------------------------------
r63695 | normal | 2018-06-19 16:12:43 +0900 (Tue, 19 Jun 2018) | 3 lines

gc.c (gc_verify_heap_pages): fix no-op on heap_eden->pages

Shouldn't affect production use, but good to fix regardless :>
------------------------------------------------------------------------
r63694 | ko1 | 2018-06-19 11:46:10 +0900 (Tue, 19 Jun 2018) | 8 lines

NULL class Data_Wrap_Struct is not allowed.

* spec/ruby/optional/capi/typed_data_spec.rb: same as r63692.

* spec/ruby/optional/capi/ext/typed_data_spec.c: ditto.

* vm_insnhelper.h (PUSH): re-enable assertion to check hidden objects.

------------------------------------------------------------------------
r63693 | svn | 2018-06-19 08:19:39 +0900 (Tue, 19 Jun 2018) | 1 line

* 2018-06-19
------------------------------------------------------------------------
r63692 | nobu | 2018-06-19 08:19:38 +0900 (Tue, 19 Jun 2018) | 4 lines

Removed unobservable behavior

The klass for Data_Wrap_Struct can be NULL, but it MUST NOT appear
in the Ruby level.  It is only for the C level implementation.
------------------------------------------------------------------------
r63688 | ko1 | 2018-06-18 17:30:03 +0900 (Mon, 18 Jun 2018) | 1 line

remvoe assertion because rubyspec hit this assert
------------------------------------------------------------------------
r63687 | ko1 | 2018-06-18 16:41:22 +0900 (Mon, 18 Jun 2018) | 5 lines

hidden objects should not be pushed.

* vm_insnhelper.h (PUSH): hidden objects (klass == 0) should not be pushed
  to a VM value stack. Add assertion for it.

------------------------------------------------------------------------
r63686 | svn | 2018-06-18 00:42:36 +0900 (Mon, 18 Jun 2018) | 1 line

* 2018-06-18
------------------------------------------------------------------------
r63685 | kazu | 2018-06-18 00:42:35 +0900 (Mon, 18 Jun 2018) | 1 line

Remove needless closed?
------------------------------------------------------------------------
r63684 | nobu | 2018-06-17 19:17:39 +0900 (Sun, 17 Jun 2018) | 4 lines

openssl_missing.h: constified

* ext/openssl/openssl_missing.h (IMPL_KEY_ACCESSOR{2,3}):
  constified obj argument getters.
------------------------------------------------------------------------
r63683 | normal | 2018-06-17 12:27:45 +0900 (Sun, 17 Jun 2018) | 4 lines

thread_pthread.c: microptimize vm->gvl.waiting checks

"gvl.waiting" is volatile, so the compiler won't perform
these optimizations for us.
------------------------------------------------------------------------
r63682 | normal | 2018-06-17 11:56:28 +0900 (Sun, 17 Jun 2018) | 5 lines

thread_pthread.c: fix non-sleepy timer thread build

I guess everybody has poll() and fcntl() nowadays, as
the non-sleepy timer thread build has been broken for
years, now.
------------------------------------------------------------------------
r63681 | nobu | 2018-06-17 11:42:46 +0900 (Sun, 17 Jun 2018) | 1 line

EXTOBJS should be included in DLDOBJS
------------------------------------------------------------------------
r63680 | nobu | 2018-06-17 11:41:26 +0900 (Sun, 17 Jun 2018) | 4 lines

share Float 0

* complex.c (RFLOAT_0): share the 0.0 object on non-flonum
  platforms.
------------------------------------------------------------------------
r63679 | nobu | 2018-06-17 11:40:32 +0900 (Sun, 17 Jun 2018) | 5 lines

Makefile.in: MJIT_DLDFLAGS

* Makefile.in (mjit_config.h): needs -arch flag to link, as well
  as precompiling the header, when compiling for i386 on x86_64
  mac.
------------------------------------------------------------------------
r63678 | nobu | 2018-06-17 11:37:32 +0900 (Sun, 17 Jun 2018) | 9 lines

refine Integer#** and Float#**

* complex.c (rb_dbl_complex_polar): utility function, which
  returns more precise value in right angle cases.

* bignum.c (rb_big_pow): use rb_dbl_complex_polar().

* numeric.c (rb_float_pow, fix_pow): create a Complex by polar
  form.
------------------------------------------------------------------------
r63677 | nobu | 2018-06-17 10:24:25 +0900 (Sun, 17 Jun 2018) | 4 lines

compare with correct values

* spec/ruby/shared/rational/exponent.rb: compare with
  mathematically expected values without errors.
------------------------------------------------------------------------
r63676 | nobu | 2018-06-17 10:07:27 +0900 (Sun, 17 Jun 2018) | 4 lines

refine Integer#**

* numeric.c (fix_pow): calculate the denominator, exponent of
  self.
------------------------------------------------------------------------
r63675 | svn | 2018-06-17 08:22:44 +0900 (Sun, 17 Jun 2018) | 1 line

* 2018-06-17
------------------------------------------------------------------------
r63674 | nobu | 2018-06-17 08:22:42 +0900 (Sun, 17 Jun 2018) | 1 line

mjit.c: measure time more precisely
------------------------------------------------------------------------
r63673 | svn | 2018-06-16 17:27:57 +0900 (Sat, 16 Jun 2018) | 1 line

* 2018-06-16
------------------------------------------------------------------------
r63672 | normal | 2018-06-16 17:27:56 +0900 (Sat, 16 Jun 2018) | 9 lines

thread.c (timeout_prepare): common function

I can't seem to reproduce the maybe-uninitialized warning on
gcc 7 or 8 on Debian sid (7.3.0-16 / 8-20180425-1 r259628),
so the guard from r62305 is dropped.

* thread.c (timeout_prepare): hoist out from do_select
  (do_select): ditto
  (rb_wait_for_single_fd): use timeout_prepare
------------------------------------------------------------------------
r63671 | nobu | 2018-06-15 19:35:13 +0900 (Fri, 15 Jun 2018) | 4 lines

gettimeofday is obsolete

* test/ruby/test_process.rb gettimeofday is obsolete in SUSv4, and
  may not be available in the future.
------------------------------------------------------------------------
r63670 | nobu | 2018-06-15 19:15:40 +0900 (Fri, 15 Jun 2018) | 1 line

win32/Makefile.sub: gettimeofday is defined in win32.c
------------------------------------------------------------------------
r63669 | mame | 2018-06-15 17:53:17 +0900 (Fri, 15 Jun 2018) | 1 line

Remove flip-flop usages from build scripts
------------------------------------------------------------------------
r63668 | mame | 2018-06-15 17:53:16 +0900 (Fri, 15 Jun 2018) | 1 line

Remove warnings of flip-flop deprecation from tests and specs
------------------------------------------------------------------------
r63667 | mame | 2018-06-15 17:53:15 +0900 (Fri, 15 Jun 2018) | 3 lines

parse.y: Deprecate flip-flops

Ref #5400
------------------------------------------------------------------------
r63666 | kazu | 2018-06-15 09:19:05 +0900 (Fri, 15 Jun 2018) | 1 line

Update obsoleted URLs of supported platforms [ci skip]
------------------------------------------------------------------------
r63665 | svn | 2018-06-15 09:06:34 +0900 (Fri, 15 Jun 2018) | 1 line

* 2018-06-15
------------------------------------------------------------------------
r63664 | nobu | 2018-06-15 09:06:33 +0900 (Fri, 15 Jun 2018) | 5 lines

Bootstrapping ruby runtime might not have RubyVM::MJIT defined.

[Fix GH-1891]

From: U-DESKTOP-RLT5UQ8\moriyoshi <mozo@mozo.jp>
------------------------------------------------------------------------
r63663 | nobu | 2018-06-14 22:10:25 +0900 (Thu, 14 Jun 2018) | 8 lines

prefer clock_gettime

* configure.ac: clock_gettime or gettimeofday must exist.

* process.c (rb_clock_gettime): prefer clock_gettime over
  gettimeofday, as the latter is obsolete in SUSv4.

* random.c (fill_random_seed): ditto.
------------------------------------------------------------------------
r63662 | kazu | 2018-06-14 20:12:49 +0900 (Thu, 14 Jun 2018) | 1 line

README.ja.md: Add link to downloads [ci skip]
------------------------------------------------------------------------
r63661 | usa | 2018-06-14 18:01:38 +0900 (Thu, 14 Jun 2018) | 6 lines

Get rid of warnings of test/spec

* lib/net/http/exceptions.rb: revert a part of r63590.  to deprecate
  Net::ProtoServerError seems to be wrong.
  see [ruby-core:87488] [Feature#14688]

------------------------------------------------------------------------
r63660 | nobu | 2018-06-14 16:09:02 +0900 (Thu, 14 Jun 2018) | 6 lines

bignum.c: get rid of redefined method

* bignum.c (int_pow_tmp3): get rid of redefined Integer#> on
  internal calculations, as well as the GMP version.

* bignum.c (rb_int_powm): ditto.
------------------------------------------------------------------------
r63659 | usa | 2018-06-14 15:41:09 +0900 (Thu, 14 Jun 2018) | 6 lines

HTTPServerException is deprecated

* spec/ruby/library/net/http/HTTPClientException_spec.rb: add.
* spec/ruby/library/net/http/HTTPServerException_spec.rb: check deprecated message.
* spec/ruby/library/net/http/httpresponse/*_spec.rb: use HTTPClientException instead of HTTPServerException.

------------------------------------------------------------------------
r63658 | mame | 2018-06-14 15:36:40 +0900 (Thu, 14 Jun 2018) | 4 lines

test/rubygems/test_gem_dependency_installer.rb: Avoid Dir.chdir + block

This caused a warning "conflicting chdir during another chdir block"
during "make test-all".
------------------------------------------------------------------------
r63657 | nobu | 2018-06-14 12:18:10 +0900 (Thu, 14 Jun 2018) | 1 line

.gdbinit: expand RBASIC macro for old gdb on mac
------------------------------------------------------------------------
r63656 | svn | 2018-06-14 06:58:55 +0900 (Thu, 14 Jun 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63655 | svn | 2018-06-14 06:58:55 +0900 (Thu, 14 Jun 2018) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r63654 | eregon | 2018-06-14 06:58:54 +0900 (Thu, 14 Jun 2018) | 3 lines

Update to ruby/spec@4bb0f25

* Specs added by TruffleRuby.
------------------------------------------------------------------------
r63653 | svn | 2018-06-14 06:41:47 +0900 (Thu, 14 Jun 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63652 | eregon | 2018-06-14 06:41:45 +0900 (Thu, 14 Jun 2018) | 1 line

Update to ruby/spec@4bc7a2b
------------------------------------------------------------------------
r63651 | svn | 2018-06-14 06:17:48 +0900 (Thu, 14 Jun 2018) | 1 line

* 2018-06-14
------------------------------------------------------------------------
r63650 | eregon | 2018-06-14 06:17:48 +0900 (Thu, 14 Jun 2018) | 5 lines

Fix condition in Kernel#warn when using uplevel

* It causes SEGV on `warn("foo", uplevel: 100)`.
* Found in a ruby/spec added by @andrykonchin in
  https://github.com/ruby/spec/pull/605
------------------------------------------------------------------------
r63649 | mame | 2018-06-13 20:00:28 +0900 (Wed, 13 Jun 2018) | 4 lines

Revert "range.c: prohibit `(1..nil)`"

This reverts commit a44c010764a16ae09aaed49d76eec055ca0057c8.
Refs #14845.
------------------------------------------------------------------------
r63648 | kazu | 2018-06-13 19:27:17 +0900 (Wed, 13 Jun 2018) | 3 lines

Remove sunsetting FTP site

ref #14842
------------------------------------------------------------------------
r63647 | normal | 2018-06-13 19:00:46 +0900 (Wed, 13 Jun 2018) | 8 lines

thread.c: use flags for sleep_* functions

Same thing as https://bugs.ruby-lang.org/issues/14798
My easily-confused mind gets function call ordering confused
easily:

	sleep_forever(..., TRUE, FALSE);
	sleep_forever(..., FALSE, TRUE);
------------------------------------------------------------------------
r63646 | mame | 2018-06-13 18:04:32 +0900 (Wed, 13 Jun 2018) | 7 lines

range.c: prohibit `(1..nil)`

Now endless range can be created by either a literal `(1..)` or explicit
range creation `Range.new(1, nil)`.  [Bug #14845]

This change is intended for "early failure"; for example,
`(1..var).to_a` causes out of memory if `var` is inadvertently nil.
------------------------------------------------------------------------
r63645 | mame | 2018-06-13 13:51:43 +0900 (Wed, 13 Jun 2018) | 4 lines

Make VM_INSN_INFO_TABLE_IMPL=1 work

rb_iseq_insns_info_decode_positions is used only when
VM_INSN_INFO_TABLE_IMPL=2.
------------------------------------------------------------------------
r63644 | ko1 | 2018-06-13 11:50:21 +0900 (Wed, 13 Jun 2018) | 4 lines

add "print_flags" gdb command.

* .gdbinit (print_flags): added to show raw FLAGS info for objects.

------------------------------------------------------------------------
r63643 | nobu | 2018-06-13 10:21:59 +0900 (Wed, 13 Jun 2018) | 4 lines

bignum.c: call functions directly

* bignum.c (int_pow_tmp{1,2,3}): call dedicated functions directly
  for internal calculations, instead of method calls.
------------------------------------------------------------------------
r63642 | nobu | 2018-06-13 10:04:33 +0900 (Wed, 13 Jun 2018) | 4 lines

bignum.c: refine pow

* bignum.c (rb_big_pow): make Complex and Rational instances from
  calculated results by API functions.
------------------------------------------------------------------------
r63641 | svn | 2018-06-13 05:22:44 +0900 (Wed, 13 Jun 2018) | 1 line

* 2018-06-13
------------------------------------------------------------------------
r63640 | stomar | 2018-06-13 05:22:43 +0900 (Wed, 13 Jun 2018) | 6 lines

lib/securerandom.rb: improve docs

* lib/securerandom.rb: [DOC] add alphanumeric example to module docs.
  [Fix GH-1812]

From: Justin Bull <me@justinbull.ca>
------------------------------------------------------------------------
r63639 | kazu | 2018-06-12 23:36:32 +0900 (Tue, 12 Jun 2018) | 3 lines

Remove needless lines

Because both assert_equal and assert_nil do not pass at the same time.
------------------------------------------------------------------------
r63638 | kazu | 2018-06-12 23:36:30 +0900 (Tue, 12 Jun 2018) | 1 line

Use `&.` instead of modifier if
------------------------------------------------------------------------
r63637 | stomar | 2018-06-12 18:42:39 +0900 (Tue, 12 Jun 2018) | 5 lines

doc/signals.rdoc: fix typo

[Fix GH-1889]

From: yuuji.yaginuma <yuuji.yaginuma@gmail.com>
------------------------------------------------------------------------
r63636 | nobu | 2018-06-12 09:39:14 +0900 (Tue, 12 Jun 2018) | 4 lines

win32.c: precise time

* win32/win32.c (filetime_split, clock_gettime): keep the
  precision as possible as the FILETIME format.
------------------------------------------------------------------------
r63635 | nobu | 2018-06-12 08:34:11 +0900 (Tue, 12 Jun 2018) | 4 lines

intern.h: suppress warnings

* include/ruby/intern.h (rb_fd_select): turned into an inline
  function, to suppress -Waddress warnings.
------------------------------------------------------------------------
r63634 | nobu | 2018-06-12 08:33:35 +0900 (Tue, 12 Jun 2018) | 4 lines

ruby.c: making hidden objects

* ruby.c (add_modules): make hidden objects by particular
  functions.
------------------------------------------------------------------------
r63633 | svn | 2018-06-12 05:16:28 +0900 (Tue, 12 Jun 2018) | 1 line

* 2018-06-12
------------------------------------------------------------------------
r63632 | stomar | 2018-06-12 05:16:27 +0900 (Tue, 12 Jun 2018) | 1 line

string.c: [DOC] grammar fixes
------------------------------------------------------------------------
r63631 | kazu | 2018-06-11 23:13:56 +0900 (Mon, 11 Jun 2018) | 1 line

Use `&.` instead of modifier if and remove needless closed?
------------------------------------------------------------------------
r63630 | hsbt | 2018-06-11 20:32:10 +0900 (Mon, 11 Jun 2018) | 1 line

Copy gemspec from github repository and keep .document file for rdoc.
------------------------------------------------------------------------
r63629 | hsbt | 2018-06-11 20:17:30 +0900 (Mon, 11 Jun 2018) | 1 line

Added webrick.rb to cleanup target.
------------------------------------------------------------------------
r63628 | svn | 2018-06-11 16:42:29 +0900 (Mon, 11 Jun 2018) | 1 line

* 2018-06-11
------------------------------------------------------------------------
r63627 | hsbt | 2018-06-11 16:42:28 +0900 (Mon, 11 Jun 2018) | 1 line

Added entries of recent updates for gemification.
------------------------------------------------------------------------
r63625 | yui-knk | 2018-06-10 16:01:53 +0900 (Sun, 10 Jun 2018) | 1 line

NEWS: Add TracePoint#parameters which was introduced by r63562
------------------------------------------------------------------------
r63624 | nobu | 2018-06-10 15:33:15 +0900 (Sun, 10 Jun 2018) | 8 lines

random.c: fix need_secure flags

* random.c (fill_random_seed): do not need to be secure, to get
  rid of blocking at the start-up time.
  [ruby-core:87462] [Bug #14837]

* random.c (random_raw_seed): expected to be a cryptographically
  secure, as documented.
------------------------------------------------------------------------
r63623 | yui-knk | 2018-06-10 15:22:15 +0900 (Sun, 10 Jun 2018) | 24 lines

parse.y: Fix locations of none and mid-rule actions

When an empty rule or a mid-rule action is reduced,
`YYLLOC_DEFAULT` is called with the third parameter to be zero.
If we use `RUBY_SET_YYLLOC_OF_NONE` to set their locations,
sometimes the end position of NODE indicates a blank.
For example, `a.b ;` generates `NODE_CALL (line: 1, location: (1,0)-(1,4))*`,
whose end position indicates a blank.

This is because of the following reasons:

* `NODE_CALL` is created when `primary_value call_op operation2 opt_paren_args` is
  reduced to `method_call`.
* `opt_paren_args` is `none`.
* `yylex` is called and `lex.pbeg` moves before `none` is reduced, so
  the beginning position of `none` does not match with the end position of `operation2`.

To fix locations, use `YYRHSLOC(Rhs, 0)` in `YYLLOC_DEFAULT`
(0 "refers to the symbol just before the reduction").

By this change, the bottom of the location stack would be referenced,
so initialize the bottom with `RUBY_SET_YYLLOC_OF_NONE` in `%initial-action`.

Ref: https://www.gnu.org/software/bison/manual/html_node/Location-Default-Action.html#Location-Default-Action
------------------------------------------------------------------------
r63622 | nobu | 2018-06-10 15:00:45 +0900 (Sun, 10 Jun 2018) | 4 lines

doc/extension.rdoc: Fix small copy+paste mistake
[Fix GH-1884]

From: Lars Kanis <lars@greiz-reinsdorf.de>
------------------------------------------------------------------------
r63621 | yui-knk | 2018-06-10 14:02:26 +0900 (Sun, 10 Jun 2018) | 30 lines

parse.y: Fix locations of NODE_RESCUE

* parse.y (new_bodystmt): Fix locations of NODE_RESCUE
  to end with nd_else or nd_resq. Before this commit,
  locations of NODE_RESCUE included locations of nd_ensr
  of NODE_ENSURE which is a parent node of NODE_RESCUE.

  e.g. The location of the end of NODE_RESCUE is fixed:

  ```
  def a
    :b
  rescue
    :c
  ensure
    :d
  end
  ```

  * Before

  ```
  NODE_RESCUE (line: 2, location: (2,2)-(6,4))
  ```

  * After

  ```
  NODE_RESCUE (line: 3, location: (2,2)-(5,0))
  ```
------------------------------------------------------------------------
r63620 | kazu | 2018-06-10 12:10:13 +0900 (Sun, 10 Jun 2018) | 1 line

Use `&.` instead of modifier if
------------------------------------------------------------------------
r63619 | ktsj | 2018-06-10 09:30:57 +0900 (Sun, 10 Jun 2018) | 1 line

gems/bundled_gems: update to power_assert 1.1.2
------------------------------------------------------------------------
r63618 | svn | 2018-06-10 01:05:39 +0900 (Sun, 10 Jun 2018) | 1 line

* 2018-06-10
------------------------------------------------------------------------
r63617 | kazu | 2018-06-10 01:05:38 +0900 (Sun, 10 Jun 2018) | 5 lines

Revert "Use `&.` instead of modifier if"

This reverts commit 9d015aa91cc3ec45e41be58fd836fb7f6655a624.

Because tool/extlibs.rb runs with BASERUBY that may be ruby < 2.3
------------------------------------------------------------------------
r63616 | kazu | 2018-06-09 10:55:31 +0900 (Sat, 09 Jun 2018) | 1 line

Use `&.` instead of modifier if
------------------------------------------------------------------------
r63615 | naruse | 2018-06-09 02:20:20 +0900 (Sat, 09 Jun 2018) | 4 lines

write_timeout doc upates [skip ci]

From: MSP-Greg <MSP-Greg@users.noreply.github.com>
fix https://github.com/ruby/ruby/pull/1885
------------------------------------------------------------------------
r63614 | svn | 2018-06-09 01:32:25 +0900 (Sat, 09 Jun 2018) | 1 line

* 2018-06-09
------------------------------------------------------------------------
r63613 | naruse | 2018-06-09 01:32:24 +0900 (Sat, 09 Jun 2018) | 3 lines

assert_raise(Net::ReadTimeout) on Windows [Bug #14829]

From: MSP-Greg <MSP-Greg@users.noreply.github.com>
------------------------------------------------------------------------
r63612 | kazu | 2018-06-08 22:19:02 +0900 (Fri, 08 Jun 2018) | 1 line

Re-add Matrix to doc/standard_library.rdoc [ci skip]
------------------------------------------------------------------------
r63611 | nobu | 2018-06-08 20:03:39 +0900 (Fri, 08 Jun 2018) | 3 lines

ast.c: fix calls

* ast.c (node_children): fix the member for method IDs as nd_mid.
------------------------------------------------------------------------
r63610 | nobu | 2018-06-08 19:45:01 +0900 (Fri, 08 Jun 2018) | 7 lines

[Docs] Improve documentation of String#lines

* Document about optional getline arguments
* Add examples, especially for the demonstration of `chomp: true`
[Fix GH-1886]

From: Koki Takahashi <hakatasiloving@gmail.com>
------------------------------------------------------------------------
r63609 | nobu | 2018-06-08 19:42:48 +0900 (Fri, 08 Jun 2018) | 1 line

common.mk: dependency of node_name.inc
------------------------------------------------------------------------
r63608 | hsbt | 2018-06-08 17:46:52 +0900 (Fri, 08 Jun 2018) | 1 line

Removed needless extension for require.
------------------------------------------------------------------------
r63607 | usa | 2018-06-08 15:15:23 +0900 (Fri, 08 Jun 2018) | 2 lines

th is nil

------------------------------------------------------------------------
r63606 | svn | 2018-06-08 08:18:17 +0900 (Fri, 08 Jun 2018) | 1 line

* 2018-06-08
------------------------------------------------------------------------
r63605 | yui-knk | 2018-06-08 08:18:16 +0900 (Fri, 08 Jun 2018) | 1 line

node.c: Fix format of NODE_OP_ASGN1 and NODE_OP_ASGN2
------------------------------------------------------------------------
r63604 | nobu | 2018-06-07 23:46:25 +0900 (Thu, 07 Jun 2018) | 4 lines

ast.c: refine AST#children

* ast.c (node_children): refined RubyVM::AST#children to include
  symbols (variables, methods, classes, etc).
------------------------------------------------------------------------
r63603 | nobu | 2018-06-07 23:40:39 +0900 (Thu, 07 Jun 2018) | 1 line

ast.c: adjust indent
------------------------------------------------------------------------
r63602 | yui-knk | 2018-06-07 23:04:49 +0900 (Thu, 07 Jun 2018) | 5 lines

ast.c: Fix to raise `SyntaxError`

* ast.c: Fix to raise `SyntaxError` when `RubyVM::AST.parse`
  or `RubyVM::AST.parse_file` fail to parse input.
* test/ruby/test_ast.rb: Add test cases for invalid syntax.
------------------------------------------------------------------------
r63601 | hsbt | 2018-06-07 21:10:24 +0900 (Thu, 07 Jun 2018) | 3 lines

Promote Matrix to default gems.

  The upstream repository is https://github.com/ruby/matrix.
------------------------------------------------------------------------
r63600 | kazu | 2018-06-07 21:06:15 +0900 (Thu, 07 Jun 2018) | 1 line

Fix typos [ci skip]
------------------------------------------------------------------------
r63599 | hsbt | 2018-06-07 19:13:00 +0900 (Thu, 07 Jun 2018) | 3 lines

Promote OpenStruct to default gems.

  Upstream repository is https://github.com/ruby/ostruct.
------------------------------------------------------------------------
r63598 | naruse | 2018-06-07 15:18:23 +0900 (Thu, 07 Jun 2018) | 5 lines

skip write_timeout test on Windows

This test is about write_timeout.
To ensure it really raised Net::WriteTimeout, skip this test on Windows,
whose write returns immediately even for large data.
------------------------------------------------------------------------
r63597 | usa | 2018-06-07 11:37:44 +0900 (Thu, 07 Jun 2018) | 7 lines

Some platforms immediately returns from Socket#write

* test/net/http/test_http.rb (test_timeout_during_HTTP_session_write): on some
  platforms such as Windows immediately returns from Socket#write, and have to
  wait to read its response.  So, we can not handle Net::WriteTimeout and should
  handle Net::ReadTimeout instead.

------------------------------------------------------------------------
r63596 | normal | 2018-06-07 10:14:09 +0900 (Thu, 07 Jun 2018) | 4 lines

iseq.h (struct iseq_compile_data): remove cached_const field

Nobody uses it, and "git log -p -Scached_const" shows it's ever
been used in public history.
------------------------------------------------------------------------
r63595 | svn | 2018-06-07 05:57:49 +0900 (Thu, 07 Jun 2018) | 1 line

* 2018-06-07
------------------------------------------------------------------------
r63594 | normal | 2018-06-07 05:57:48 +0900 (Thu, 07 Jun 2018) | 14 lines

rb_vm_insn_addr2insn: use st to perform addr2insn mapping

The current VM_INSTRUCTION_SIZE is 198, so the linear search
painful during a major GC phase.

I noticed rb_vm_insn_addr2insn2 showing up at the top of some
profiles while working on some malloc-related stuff, so I
decided to attack it.

Most notably, the benchmark/bm_vm3_gc.rb improves by over 40%:

  https://80x24.org/spew/20180602220554.GA9991@whir/raw

[ruby-core:87361] [Feature #14814]
------------------------------------------------------------------------
r63593 | k0kubun | 2018-06-06 23:36:56 +0900 (Wed, 06 Jun 2018) | 6 lines

mjit.c: unify wording between comments and variables

Some comments say "stop", others say "finish".

I'm going to add code which dynamically stops MJIT worker, rather than
finishing it forever. So I'm thinking `stop` is more appropreate for it.
------------------------------------------------------------------------
r63592 | nobu | 2018-06-06 23:01:43 +0900 (Wed, 06 Jun 2018) | 4 lines

math.c: adjust cbrt

* math.c (math_cbrt): refine the approximation result on boundary
  values by an iteration of Newton-Raphson method.
------------------------------------------------------------------------
r63591 | naruse | 2018-06-06 21:13:16 +0900 (Wed, 06 Jun 2018) | 14 lines

Use `Net::HTTPClientException` instead of `Net::HTTPServerException`

`Net::HTTPServerException` has been deprecated since r63590. [Bug #14688]
And `net/http/responses.rb` uses the deprecated constant, so Ruby warns of the deprecation.

Example:

```bash
$ ruby -r net/http -e ''
/home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/net/http/responses.rb:22: warning: constant Net::HTTPServerException is deprecated
```

This change suppresses the warning.
From: Masataka Pocke Kuwabara <kuwabara@pocke.me>
------------------------------------------------------------------------
r63590 | naruse | 2018-06-06 18:01:04 +0900 (Wed, 06 Jun 2018) | 1 line

Add Net::HTTPClientException [Bug #14688]
------------------------------------------------------------------------
r63589 | naruse | 2018-06-06 17:39:36 +0900 (Wed, 06 Jun 2018) | 1 line

fix r63587
------------------------------------------------------------------------
r63588 | ko1 | 2018-06-06 17:34:39 +0900 (Wed, 06 Jun 2018) | 1 line

fix r63587 with temporal patch to pass the tests. please re-fix it.
------------------------------------------------------------------------
r63587 | naruse | 2018-06-06 17:03:47 +0900 (Wed, 06 Jun 2018) | 1 line

Introduce write_timeout to Net::HTTP [Feature #13396]
------------------------------------------------------------------------
r63586 | yui-knk | 2018-06-06 15:14:21 +0900 (Wed, 06 Jun 2018) | 10 lines

ast.c: Change tabs to spaces

* ast.c: I created a new C source code file with tabs and spaces mixed
  format by mistake. Currently we move to spaces only.
  Surely we agreed not to batch update. But ast.c is a new
  source code. So please forgive me to change the format before
  many changes are committed this file.
  I'm sorry about my mistake.

  ref [Bug #14246]
------------------------------------------------------------------------
r63585 | normal | 2018-06-06 10:12:23 +0900 (Wed, 06 Jun 2018) | 4 lines

test/io/console/test_io_console.rb: fix for systems where PTY is not defined

[ruby-core:87420] [Bug #14828]
Thanks-to: MSP-Greg (Greg L)
------------------------------------------------------------------------
r63584 | normal | 2018-06-06 07:32:41 +0900 (Wed, 06 Jun 2018) | 1 line

test/lib/jit_support.rb: spelling: s/skiped/skipped/
------------------------------------------------------------------------
r63583 | normal | 2018-06-06 07:28:49 +0900 (Wed, 06 Jun 2018) | 4 lines

test/io/console/test_io_console.rb: ignore TTOU on FreeBSD

I'm not entirely sure why, but SIGTTOU pauses the test
when running test-all in parallel.
------------------------------------------------------------------------
r63582 | normal | 2018-06-06 07:01:43 +0900 (Wed, 06 Jun 2018) | 5 lines

encoding.c: remove rb_gc_mark_encodings

rb_gc_mark_encodings has been empty for a decade
(since r17875 / 28b216ac45262819f8bc7be0b1417a707974f94b).
Just remove it and its only caller in gc.c
------------------------------------------------------------------------
r63581 | normal | 2018-06-06 06:19:50 +0900 (Wed, 06 Jun 2018) | 6 lines

test/dtrace/helper.rb: support systemtap in dtrace tests

For the current cases, a few string substitions is enough to
make dtrace(1) scripts work with stap(1).  For more complex
scripts (maybe in the future), we may pass a hash with
implementation-specific scripts.
------------------------------------------------------------------------
r63580 | normal | 2018-06-06 06:19:45 +0900 (Wed, 06 Jun 2018) | 7 lines

test/dtrace: enable Tracepoint for function calls

Since [Feature #14104], "trace" instructions are no
longer emitted by default, so we must enable them explicitly
for function tracing to work.

[ruby-core:85965]
------------------------------------------------------------------------
r63579 | normal | 2018-06-06 06:19:40 +0900 (Wed, 06 Jun 2018) | 4 lines

test/dtrace/test_method_cache.rb: avoid spewing too much

Don't output method cache clearing at startup since
it causes dtrace to drop output and break the test.
------------------------------------------------------------------------
r63578 | normal | 2018-06-06 06:19:36 +0900 (Wed, 06 Jun 2018) | 4 lines

test/dtrace/test_array_create.rb: require line number

Nowadays we create empty arrays in the parse/compile
phase which gave us lineno==0.
------------------------------------------------------------------------
r63577 | normal | 2018-06-06 06:19:31 +0900 (Wed, 06 Jun 2018) | 6 lines

test/dtrace/helper: fix check for miniruby

RbConfig::TOPDIR points to my installation prefix on my FreeBSD
and GNU/Linux systems, so there's no way miniruby exists, there.
In case we don't have miniruby, --disable=gems anyways to reduce
dtrace overhead.
------------------------------------------------------------------------
r63576 | normal | 2018-06-06 05:46:56 +0900 (Wed, 06 Jun 2018) | 6 lines

io.c: fix compilation when IOV_MAX is not defined

GNU/Hurd has writev(2) but does not define IOV_MAX
[ruby-core:87417] [Bug #14827]

Reported-by: Paul Sonnenschein
------------------------------------------------------------------------
r63575 | normal | 2018-06-06 05:16:21 +0900 (Wed, 06 Jun 2018) | 14 lines

gc.c: reduce parameters for gc_start and garbage_collect

Every time I look at gc.c, I get confused by argument ordering:

	gc_start(..., TRUE, TRUE, FALSE, ...)
	gc_start(..., FALSE, FALSE, FALSE, ... )

While we do not have kwargs in C, we can use flags to improve readability:

	gc_start(...,
		GPR_FLAG_FULL_MARK | GPR_FLAG_IMMEDIATE_MARK |
		GPR_FLAG_IMMEDIATE_SWEEP | ...)

[ruby-core:87311] [Misc #14798]
------------------------------------------------------------------------
r63574 | svn | 2018-06-06 04:53:10 +0900 (Wed, 06 Jun 2018) | 1 line

* 2018-06-06
------------------------------------------------------------------------
r63573 | normal | 2018-06-06 04:53:09 +0900 (Wed, 06 Jun 2018) | 5 lines

gc.c: reduce #ifdefs around GC_ENABLE_*

We may add gc_*_continue calls in a few more places, and adding
more #ifdefs around those is ugly.  For now, this makes the
heap_prepare function look better.
------------------------------------------------------------------------
r63572 | ngoto | 2018-06-05 23:16:50 +0900 (Tue, 05 Jun 2018) | 6 lines

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]

------------------------------------------------------------------------
r63571 | shyouhei | 2018-06-05 15:50:20 +0900 (Tue, 05 Jun 2018) | 15 lines

`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/

------------------------------------------------------------------------
r63570 | yui-knk | 2018-06-05 09:48:12 +0900 (Tue, 05 Jun 2018) | 1 line

test_ast.rb: Add test cases of heredoc columns
------------------------------------------------------------------------
r63569 | normal | 2018-06-05 09:37:05 +0900 (Tue, 05 Jun 2018) | 8 lines

gc.c: zero check for malloc_limit_max to initialization

Repeatedly checking for malloc_limit_max in gc_reset_malloc_info
is unnecessary, check and set it once during initialization
in ruby_gc_set_params to simplify the hotter path

* gc.c (gc_reset_malloc_info): remove zero check
  (ruby_gc_set_params): treat malloc_limit_max==0 as SIZE_MAX
------------------------------------------------------------------------
r63568 | yui-knk | 2018-06-05 09:18:29 +0900 (Tue, 05 Jun 2018) | 5 lines

Move a test file

* test/-ext-/ast/test_ast.rb: This test file
  has not depended C extension since r63534,
  so move to 'test/ruby/'.
------------------------------------------------------------------------
r63567 | svn | 2018-06-05 08:26:04 +0900 (Tue, 05 Jun 2018) | 1 line

* 2018-06-05
------------------------------------------------------------------------
r63566 | normal | 2018-06-05 08:26:03 +0900 (Tue, 05 Jun 2018) | 5 lines

String#uminus dedupes unconditionally

[Feature #14478] [ruby-core:85669]

Thanks-to: Sam Saffron <sam.saffron@gmail.com>
------------------------------------------------------------------------
r63565 | svn | 2018-06-04 06:06:26 +0900 (Mon, 04 Jun 2018) | 1 line

* 2018-06-04
------------------------------------------------------------------------
r63564 | normal | 2018-06-04 06:06:26 +0900 (Mon, 04 Jun 2018) | 6 lines

benchmark/driver.rb: add CPU time measurement targets

"Real" time is too unstable on my systems, hopefully counting
only CPU time can gain more reliable benchmark results.

[ruby-core:87362] [Feature #14815]
------------------------------------------------------------------------
r63563 | svn | 2018-06-03 14:10:43 +0900 (Sun, 03 Jun 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63562 | mame | 2018-06-03 14:10:41 +0900 (Sun, 03 Jun 2018) | 8 lines

Add TracePoint#parameters

It can be used to get the parameters' information of method and block.
There was no way to get block parameters.
It was possible but ineffective to get method parameters via Method
object: `tp.defined_class.method(tp.method_id).parameters`
TracePoint#parameters allows us to get the information easily.
[Feature #14694]
------------------------------------------------------------------------
r63561 | svn | 2018-06-03 08:05:46 +0900 (Sun, 03 Jun 2018) | 1 line

* 2018-06-03
------------------------------------------------------------------------
r63560 | hsbt | 2018-06-03 08:05:45 +0900 (Sun, 03 Jun 2018) | 3 lines

Promote Prime library to default gems.

  * Its upstream is https://github.com/ruby/prime.
------------------------------------------------------------------------
r63559 | hsbt | 2018-06-02 22:57:48 +0900 (Sat, 02 Jun 2018) | 3 lines

Promote Logger to default gems.

  * Its upstream is https://github.com/ruby/logger.
------------------------------------------------------------------------
r63558 | hsbt | 2018-06-02 22:55:54 +0900 (Sat, 02 Jun 2018) | 1 line

Fixed wrong variable name.
------------------------------------------------------------------------
r63557 | nobu | 2018-06-02 21:17:16 +0900 (Sat, 02 Jun 2018) | 1 line

gmake.mk: update in the source directory properly
------------------------------------------------------------------------
r63556 | svn | 2018-06-02 17:36:01 +0900 (Sat, 02 Jun 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63555 | hsbt | 2018-06-02 17:36:00 +0900 (Sat, 02 Jun 2018) | 1 line

Added test for default gems validation.
------------------------------------------------------------------------
r63554 | nobu | 2018-06-02 16:50:18 +0900 (Sat, 02 Jun 2018) | 4 lines

enum.c: bignum counter

* enum.c (imemo_count_up, imemo_count_value): promote the counter
  value to a bignum on overflow.  [Bug #14805]
------------------------------------------------------------------------
r63553 | hsbt | 2018-06-02 16:04:28 +0900 (Sat, 02 Jun 2018) | 1 line

Fixed wrong require path
------------------------------------------------------------------------
r63552 | hsbt | 2018-06-02 15:02:51 +0900 (Sat, 02 Jun 2018) | 3 lines

Promote REXML to default gems.

  * upstream repostiory is https://github.com/ruby/rexml
------------------------------------------------------------------------
r63551 | nobu | 2018-06-02 11:39:34 +0900 (Sat, 02 Jun 2018) | 12 lines

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.
------------------------------------------------------------------------
r63550 | hsbt | 2018-06-02 10:14:24 +0900 (Sat, 02 Jun 2018) | 3 lines

Promote RSS library to default gems.

  Its upstream was moved to https://github.com/ruby/rss.
------------------------------------------------------------------------
r63549 | naruse | 2018-06-02 09:51:43 +0900 (Sat, 02 Jun 2018) | 1 line

memo->u3.cnt is long not int [Bug #14805]
------------------------------------------------------------------------
r63548 | normal | 2018-06-02 06:56:11 +0900 (Sat, 02 Jun 2018) | 9 lines

Initialize condattr_monotonic via pthread_condattr_init

Some operating systems will work without calling
pthread_condattr_init, but some won't (such as OpenBSD). Prior
to r63238, pthread_condattr_init was always called before
calling pthread_condattr_setclock.

From: Jeremy Evans <code@jeremyevans.net>
[ruby-core:87345] [Ruby trunk Bug#14807]
------------------------------------------------------------------------
r63547 | svn | 2018-06-02 06:23:21 +0900 (Sat, 02 Jun 2018) | 1 line

* 2018-06-02
------------------------------------------------------------------------
r63546 | normal | 2018-06-02 06:23:20 +0900 (Sat, 02 Jun 2018) | 11 lines

gc.c: reduce size slightly by making MEMOP_TYPE_MALLOC zero

Most (if not all) architectures have instructions for comparing
against zero, allowing compilers to generate more compact code.

Other MEMOP_TYPE_* enum values are not compared in hot paths,
but MEMOP_TYPE_MALLOC is checked in objspace_malloc_increase

   text	   data	    bss	    dec	    hex	filename
  84088	    264	   3664	  88016	  157d0	gc-before.o
  83784	    264	   3664	  87712	  156a0	gc.o
------------------------------------------------------------------------
r63545 | hsbt | 2018-06-01 22:10:37 +0900 (Fri, 01 Jun 2018) | 1 line

Added missing dependency for ast.c.
------------------------------------------------------------------------
r63544 | knu | 2018-06-01 16:13:38 +0900 (Fri, 01 Jun 2018) | 12 lines

Skip colliding filenames in LIBRUBY_ALIASES

This allows user to specify any name in `--with-so-name` that might
cause a name clash with LIBRUBY_ALIASES on the platform.

Without this, for example, configuring with `--with-soname=ruby
--enable-shared` on macOS would end up running `ln -sf libruby.dylib
libruby.dylib` only to fail with the following error in installation:

```
make[2]: stat: libruby.dylib: Too many levels of symbolic links
```
------------------------------------------------------------------------
r63543 | nobu | 2018-06-01 15:53:26 +0900 (Fri, 01 Jun 2018) | 7 lines

string.c: trivial optimizations

* string.c (rb_str_aset): prefer BUILTIN_TYPE over TYPE after
  SPECIAL_CONST_P check.

* string.c (rb_str_start_with): prefer RB_TYPE_P over switch by
  TYPE.
------------------------------------------------------------------------
r63542 | svn | 2018-06-01 15:37:15 +0900 (Fri, 01 Jun 2018) | 1 line

* 2018-06-01
------------------------------------------------------------------------
r63541 | nobu | 2018-06-01 15:37:14 +0900 (Fri, 01 Jun 2018) | 4 lines

string.c: doc for [Feature #13712]

* string.c (rb_str_start_with): [DOC] start_with? example with
  regexp.
------------------------------------------------------------------------
r63540 | nobu | 2018-05-31 18:30:49 +0900 (Thu, 31 May 2018) | 6 lines

vm_args.c: refined warning splat to var

* vm_args.c (setup_parameters_complex): refine the warning message
  for a splat hash which was passed to a single variable instead
  of keyword arguments.  this behavior will be changed when the
  "real" keyword argument is introduced in the future.
------------------------------------------------------------------------
r63538 | nobu | 2018-05-31 16:10:39 +0900 (Thu, 31 May 2018) | 4 lines

fix the condition

* test/ruby/test_rubyoptions.rb: Process.wait with WNOHANG returns
  nil while the target process is alive.
------------------------------------------------------------------------
r63537 | nobu | 2018-05-31 15:57:47 +0900 (Thu, 31 May 2018) | 4 lines

test_rubyoptions.rb: relax timeout

* test/ruby/test_rubyoptions.rb: wait for setting process title
  until the child process dies, in the case of extra heavy loads.
------------------------------------------------------------------------
r63536 | yui-knk | 2018-05-31 15:25:58 +0900 (Thu, 31 May 2018) | 1 line

NEWS: Add RubyVM::AST
------------------------------------------------------------------------
r63535 | yui-knk | 2018-05-31 15:24:19 +0900 (Thu, 31 May 2018) | 1 line

Undef RubyVM::AST::Node.new
------------------------------------------------------------------------
r63534 | yui-knk | 2018-05-31 15:13:06 +0900 (Thu, 31 May 2018) | 8 lines

Define AST module under RubyVM [experimental]

* ext/-test-/ast/ast.c: Rename to ast.c
  and define AST module under RubyVM.
* common.mk: compile ast.c.
* ext/-test-/ast/extconf.rb: Don't need this file anymore.
* inits.c (rb_call_inits): Call Init_ast to setup AST module.
* test/-ext-/ast/test_ast.rb: Follow up the namespace change.
------------------------------------------------------------------------
r63533 | svn | 2018-05-31 14:49:57 +0900 (Thu, 31 May 2018) | 1 line

* 2018-05-31
------------------------------------------------------------------------
r63532 | yui-knk | 2018-05-31 14:49:56 +0900 (Thu, 31 May 2018) | 1 line

ast.c: Do not taint TOPLEVEL_BINDING
------------------------------------------------------------------------
r63531 | hsbt | 2018-05-30 22:03:47 +0900 (Wed, 30 May 2018) | 1 line

Ignore bundler assertions on ruby core test suite.
------------------------------------------------------------------------
r63530 | svn | 2018-05-30 22:01:37 +0900 (Wed, 30 May 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63529 | svn | 2018-05-30 22:01:37 +0900 (Wed, 30 May 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r63528 | hsbt | 2018-05-30 22:01:35 +0900 (Wed, 30 May 2018) | 6 lines

Merge RubyGems 3.0.0.beta1.

  * It drop to support < Ruby 2.2
  * Cleanup deprecated methods and classes.
  * Mark obsoleted methods to deprecate.
  * and other enhancements.
------------------------------------------------------------------------
r63527 | normal | 2018-05-30 20:49:06 +0900 (Wed, 30 May 2018) | 3 lines

NEWS: clarify item about built-in thread cache

[Feature #14757]
------------------------------------------------------------------------
r63526 | nobu | 2018-05-30 18:13:21 +0900 (Wed, 30 May 2018) | 1 line

Workaround for old LibreSSL
------------------------------------------------------------------------
r63525 | matz | 2018-05-30 17:24:52 +0900 (Wed, 30 May 2018) | 2 lines

object.c: Add a new alias `then` to `Kernel#yield_self`; [Feature #14594]

------------------------------------------------------------------------
r63524 | svn | 2018-05-30 08:28:51 +0900 (Wed, 30 May 2018) | 1 line

* 2018-05-30
------------------------------------------------------------------------
r63523 | nobu | 2018-05-30 08:28:50 +0900 (Wed, 30 May 2018) | 4 lines

fake.rb: fix RUBY_DESCRIPTION for MJIT

* template/fake.rb.in: switch RUBY_DESCRIPTION at runtime
  depending on the MJIT status.
------------------------------------------------------------------------
r63522 | nobu | 2018-05-29 17:47:07 +0900 (Tue, 29 May 2018) | 3 lines

fake.rb: fix RUBY_DESCRIPTION for MJIT

* template/fake.rb.in: reflect MJIT to RUBY_DESCRIPTION.
------------------------------------------------------------------------
r63521 | nobu | 2018-05-29 17:46:36 +0900 (Tue, 29 May 2018) | 5 lines

spec/ruby: revert r63503 and r63508

When RUBY_DESCRIPTION has `+JIT` already, it will be doubled.
Just fake.rb.in always has copied `RUBY_DESCRIPTION`, regardless
MJIT is enabled or not.  `BOOTSTRAPRUBY` is not involved.
------------------------------------------------------------------------
r63520 | k0kubun | 2018-05-29 11:48:38 +0900 (Tue, 29 May 2018) | 7 lines

mjit_compile.c: drop catch table handling

The loop for `vm_exce_handle_exception` doesn't trigger `mjit_exec`, so
I don't think this code is no longer needed.

This was needed in development of original version of this JIT, but it
seems not needed from the beginning (r62189) at Ruby repository.
------------------------------------------------------------------------
r63519 | yui-knk | 2018-05-29 10:58:57 +0900 (Tue, 29 May 2018) | 5 lines

Unused macro and field

* node.h (nd_cnt, struct RNode): nd_cnt has been unused
  since r60239, and also cnt field.
* .gdbinit (nd_cnt): ditto
------------------------------------------------------------------------
r63518 | yui-knk | 2018-05-29 10:40:01 +0900 (Tue, 29 May 2018) | 4 lines

Unused macro

* node.h (nd_noex): nd_noex has been unused since r24128.
* .gdbinit (nd_noex): ditto
------------------------------------------------------------------------
r63517 | yui-knk | 2018-05-29 10:19:06 +0900 (Tue, 29 May 2018) | 4 lines

Unused macro

* node.h (nd_frml): nd_frml has been unused since r34134.
* .gdbinit (nd_frml): ditto
------------------------------------------------------------------------
r63516 | normal | 2018-05-29 10:18:06 +0900 (Tue, 29 May 2018) | 5 lines

NEWS: add item about built-in thread cache

This change may impact design of future programs and obviate
thread pools in many cases, so it's worth a mention.
Anyways, this seems stable since r63499 [Feature #14757]
------------------------------------------------------------------------
r63515 | yui-knk | 2018-05-29 10:00:54 +0900 (Tue, 29 May 2018) | 4 lines

Unused macro

* node.h (nd_argc): nd_argc has been unused since r24128.
* .gdbinit (nd_argc): ditto
------------------------------------------------------------------------
r63514 | nobu | 2018-05-29 00:35:08 +0900 (Tue, 29 May 2018) | 5 lines

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]
------------------------------------------------------------------------
r63513 | svn | 2018-05-29 00:19:39 +0900 (Tue, 29 May 2018) | 1 line

* 2018-05-29
------------------------------------------------------------------------
r63512 | nobu | 2018-05-29 00:19:38 +0900 (Tue, 29 May 2018) | 4 lines

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]
------------------------------------------------------------------------
r63511 | yui-knk | 2018-05-28 23:24:14 +0900 (Mon, 28 May 2018) | 5 lines

Unused macro and field

* node.h (nd_cfnc, struct RNode): nd_cfnc has been unused
  since r49938, and also cfunc field.
* .gdbinit (nd_cfnc): ditto
------------------------------------------------------------------------
r63510 | svn | 2018-05-28 09:42:33 +0900 (Mon, 28 May 2018) | 1 line

* 2018-05-28
------------------------------------------------------------------------
r63509 | hsbt | 2018-05-28 09:42:32 +0900 (Mon, 28 May 2018) | 1 line

Merge etc gemspec from github repository.
------------------------------------------------------------------------
r63508 | eregon | 2018-05-27 18:52:04 +0900 (Sun, 27 May 2018) | 1 line

Specs must keep working on older versions and other implementations
------------------------------------------------------------------------
r63507 | k0kubun | 2018-05-27 16:33:18 +0900 (Sun, 27 May 2018) | 3 lines

jit_support.rb: debug check_support stderr

rubyci freebsd11zfs doesn't pass this check. I want to know the stderr.
------------------------------------------------------------------------
r63506 | k0kubun | 2018-05-27 14:52:43 +0900 (Sun, 27 May 2018) | 4 lines

st.c: remove redundant export declaration

rb_hash_bulk_insert is added to official C API in r63488. It's no longer
exported only for MJIT.
------------------------------------------------------------------------
r63505 | svn | 2018-05-27 14:47:44 +0900 (Sun, 27 May 2018) | 1 line

* 2018-05-27
------------------------------------------------------------------------
r63504 | k0kubun | 2018-05-27 14:47:43 +0900 (Sun, 27 May 2018) | 10 lines

jit_support.rb: cahce JIT support check

* Before
make test-all -C .ruby-svn TESTS="../test/ruby/test_jit.rb"  22.40s user 5.38s system 91% cpu 30.196 total

* After
make test-all -C .ruby-svn TESTS="../test/ruby/test_jit.rb"  12.91s user 3.33s system 91% cpu 17.648 total

Also, this makes it easier to check if JIT is actually tested, by
showing warning on stderr.
------------------------------------------------------------------------
r63503 | k0kubun | 2018-05-24 23:32:05 +0900 (Thu, 24 May 2018) | 10 lines

spec/ruby: fix RUBY_DESCRIPTION check with JIT enabled

`make test-spec` adds `-r./$(arch)-fake` to pass header options.
But the $(arch)-fake.rb unexpectedly modifies RUBY_DESCRIPTION and it
always drops +JIT from it since the fake.rb is built with BOOTSTRAPRUBY,
which can be miniruby. miniruby can't find MJIT header and thus
mjit_init_p is always FALSE.

So, to pass `make test-spec` with JIT enabled, we can't use
RUBY_DESCRIPTION.
------------------------------------------------------------------------
r63502 | k0kubun | 2018-05-24 22:25:40 +0900 (Thu, 24 May 2018) | 3 lines

test_rubyoptions.rb: RbConfig::CONFIG['cppflags'] can be nil

not '' at least on AppVeyor
------------------------------------------------------------------------
r63501 | k0kubun | 2018-05-24 21:57:40 +0900 (Thu, 24 May 2018) | 4 lines

test_rubyoptions.rb: allow passing test_verbose

with -DMJIT_FORCE_ENABLE. With -DMJIT_FORCE_ENABLE, absence of --jit
doesn't mean JIT disabled.
------------------------------------------------------------------------
r63500 | nobu | 2018-05-24 15:15:43 +0900 (Thu, 24 May 2018) | 1 line

mjit.c: use remove_file in clean_so_file too
------------------------------------------------------------------------
r63499 | normal | 2018-05-24 11:52:46 +0900 (Thu, 24 May 2018) | 4 lines

thread_pthread.c: avoid reading th pointer for thread cache

I suspect GC may free the rb_thread_t (th) pointer by the time
we call register_cached_thread_and_wait.
------------------------------------------------------------------------
r63498 | normal | 2018-05-24 06:16:56 +0900 (Thu, 24 May 2018) | 54 lines

thread_pthread.c: enable thread cache by default

Since r62466 ("thread_pthread.c: shorten and fix thread cache implementation"),
our thread cache is no longer buggy with programs using fork.
This makes significant improvements in vm_thread_alive_check1
and vm_thread_create_join benchmarks and does not introduce
regressions.

Unlike old thread cache, I've changed the cache to only last 3
seconds since per-thread setup in most programs rarely takes
more than a few milliseconds to re-establish things like network
connections.  This is configurable by changing the THREAD_CACHE_TIME
variable.

I hope this allows users to simplify their code by removing the
need for thread pools in many cases.

vm_thread_alive_check1 10.872   0.150
vm_thread_close         1.988   2.027
vm_thread_condvar1      0.751   0.767
vm_thread_condvar2      0.744   0.752
vm_thread_create_join   5.296   2.343
vm_thread_mutex1        1.911   1.892
vm_thread_mutex2        1.902   1.896
vm_thread_mutex3        2.389   2.313
vm_thread_pass          0.271   0.272
vm_thread_pass_flood    0.175   0.179
vm_thread_pipe          0.460   0.436
vm_thread_queue         0.453   0.446
vm_thread_sized_queue   0.547   0.547
vm_thread_sized_queue2  1.417   1.413
vm_thread_sized_queue3  1.410   1.426
vm_thread_sized_queue4  0.787   0.791

Speedup ratio: compare with the result of `trunk' (greater is better)
name    built
vm_thread_alive_check1 72.456
vm_thread_close         0.981
vm_thread_condvar1      0.979
vm_thread_condvar2      0.990
vm_thread_create_join   2.260
vm_thread_mutex1        1.010
vm_thread_mutex2        1.003
vm_thread_mutex3        1.033
vm_thread_pass          0.994
vm_thread_pass_flood    0.980
vm_thread_pipe          1.055
vm_thread_queue         1.016
vm_thread_sized_queue   0.999
vm_thread_sized_queue2  1.003
vm_thread_sized_queue3  0.989
vm_thread_sized_queue4  0.995

[ruby-core:87030] [Feature #14757]
------------------------------------------------------------------------
r63497 | normal | 2018-05-24 05:58:46 +0900 (Thu, 24 May 2018) | 5 lines

benchmark/bm_*erb*: fix for --measure=size/peak in driver.rb

benchmark/memory_wrapper.rb will Kernel#load these
scripts, preventing DATA from being initialized, so
use heredoc instead.
------------------------------------------------------------------------
r63496 | svn | 2018-05-24 00:58:54 +0900 (Thu, 24 May 2018) | 1 line

* 2018-05-24
------------------------------------------------------------------------
r63495 | ngoto | 2018-05-24 00:58:53 +0900 (Thu, 24 May 2018) | 8 lines

ext/pty/pty.c: I_FIND before I_PUSH if possible

* ext/pty/pty.c: Check whether each STREAMS module is already pushed
  or not by using I_FIND ioctl call, before pushing it by using I_PUSH.
  Solved test failure on Solaris. On a Solaris 10 machine, ioctl I_PUSH
  "ldterm" twice was the cause of duplicated "\r".
  [Bug #14786] [ruby-dev:50552]

------------------------------------------------------------------------
r63494 | ko1 | 2018-05-23 15:56:08 +0900 (Wed, 23 May 2018) | 19 lines

remove VM_ENV_DATA_INDEX_ENV_PROC.

* vm_core.h (VM_ENV_DATA_INDEX_ENV_PROC): ep[VM_ENV_DATA_INDEX_ENV_PROC] is
  allocated to mark a Proc which is created from iseq block.
  However, `lep[0]` keeps Proc object itself as a block handler (Proc).
  So we don't need to keep it.

* vm_core.h (VM_ENV_PROCVAL): ditto.

* vm.c (vm_make_env_each): do not need to keep blockprocval as special value.

* vm.c (vm_block_handler_escape): simply return Proc value.

* proc.c (proc_new):  we don't need to check Env because a Proc type block
  handler is a Proc object itself.
  [Bug #14782]

* test/ruby/test_proc.rb: add a test for [Bug #14782]

------------------------------------------------------------------------
r63493 | normal | 2018-05-23 14:51:43 +0900 (Wed, 23 May 2018) | 3 lines

internal.h: export ruby_sized_* for systems w/o malloc_usable_size

[ruby-core:87232]
------------------------------------------------------------------------
r63492 | k0kubun | 2018-05-23 00:48:58 +0900 (Wed, 23 May 2018) | 5 lines

test_jit.rb: propagate suspicious stderr

of child ruby process to parent stderr using `Kernel#warn`.

This fixes a warning in {set,get}classvariable as well.
------------------------------------------------------------------------
r63491 | svn | 2018-05-23 00:39:35 +0900 (Wed, 23 May 2018) | 1 line

* 2018-05-23
------------------------------------------------------------------------
r63490 | k0kubun | 2018-05-23 00:39:34 +0900 (Wed, 23 May 2018) | 1 line

mjit.c: show error message on remove failure
------------------------------------------------------------------------
r63489 | usa | 2018-05-22 21:24:43 +0900 (Tue, 22 May 2018) | 2 lines

rename temporary dummy target

------------------------------------------------------------------------
r63488 | naruse | 2018-05-22 16:31:36 +0900 (Tue, 22 May 2018) | 4 lines

export rb_hash_bulk_insert

msgpack-ruby requests this function public because they want to
create a hash with bulk key value pairs.
------------------------------------------------------------------------
r63487 | normal | 2018-05-22 10:58:47 +0900 (Tue, 22 May 2018) | 4 lines

string.c: MAYBE_UNUSED to suppress warnings for `old`

Building with HAVE_MALLOC_USABLE_SIZE currently makes
SIZED_REALLOC_N ignore the old size arg.
------------------------------------------------------------------------
r63486 | normal | 2018-05-22 10:42:21 +0900 (Tue, 22 May 2018) | 3 lines

gc.c: use RUBY_DEFAULT_FREE instead of open-coded constant

Improves readability and makes future changes easier
------------------------------------------------------------------------
r63485 | normal | 2018-05-22 10:13:08 +0900 (Tue, 22 May 2018) | 4 lines

string.c: size hints for free and realloc calls

Another part of the plan to reduce dependencies on malloc_usable_size:
https://bugs.ruby-lang.org/issues/10238
------------------------------------------------------------------------
r63484 | normal | 2018-05-22 09:44:22 +0900 (Tue, 22 May 2018) | 4 lines

parse.y: use ruby_sized_xfree and SIZED_REALLOC_N

Another part of the plan to reduce dependencies on malloc_usable_size
which costs us speed: https://bugs.ruby-lang.org/issues/10238
------------------------------------------------------------------------
r63483 | normal | 2018-05-22 06:40:54 +0900 (Tue, 22 May 2018) | 5 lines

load.c: use ruby_sized_xfree for calloc-ed RArray VALUE

IMHO, this increases readability, too, since it's not
immediately clear that the object is on the malloc heap
and not a regular Ruby object.
------------------------------------------------------------------------
r63482 | svn | 2018-05-22 06:21:25 +0900 (Tue, 22 May 2018) | 1 line

* 2018-05-22
------------------------------------------------------------------------
r63481 | normal | 2018-05-22 06:21:23 +0900 (Tue, 22 May 2018) | 4 lines

array.c: use ruby_sized_free and SIZED_REALLOC_N

Part of the plan to reduce dependencies on malloc_usable_size
which costs us speed: https://bugs.ruby-lang.org/issues/10238
------------------------------------------------------------------------
r63480 | k0kubun | 2018-05-21 23:32:55 +0900 (Mon, 21 May 2018) | 4 lines

mjit.h: skip accessing mjit_opts if JIT-ed

We want to skip checking `mjit_opts.wait` for already JIT-ed case.
Optcarrot is slightly improved like 65.20 fps -> 66.60 fps.
------------------------------------------------------------------------
r63479 | usa | 2018-05-21 21:36:22 +0900 (Mon, 21 May 2018) | 2 lines

mention about `goruby` target in help

------------------------------------------------------------------------
r63478 | usa | 2018-05-21 21:32:40 +0900 (Mon, 21 May 2018) | 2 lines

now can do `make goruby`

------------------------------------------------------------------------
r63477 | nobu | 2018-05-21 21:25:45 +0900 (Mon, 21 May 2018) | 4 lines

ruby.c: localize a variable

* ruby.c (ruby_init_loadpath_safe): moved libdir to the block
  where it is used.
------------------------------------------------------------------------
r63476 | nobu | 2018-05-21 21:24:47 +0900 (Mon, 21 May 2018) | 6 lines

ruby.c: runtime_libruby_path

* ruby.c (runtime_libruby_path): hoisted out platform dependent
  routine to get the loaded runtime library path.
  cygwin_conv_path does path separator and WCHAR to UTF-8
  conversions too.
------------------------------------------------------------------------
r63475 | usa | 2018-05-21 15:20:24 +0900 (Mon, 21 May 2018) | 2 lines

added `f` for 1 byte FizzBuzz because Hexagony has such feature

------------------------------------------------------------------------
r63474 | shyouhei | 2018-05-21 09:41:57 +0900 (Mon, 21 May 2018) | 6 lines

explicit cast to void* required for %p

No automatic type promotion is expected for variadic arguments.
You have to do it by hand.


------------------------------------------------------------------------
r63473 | usa | 2018-05-21 03:36:53 +0900 (Mon, 21 May 2018) | 2 lines

goruby build was broken

------------------------------------------------------------------------
r63472 | usa | 2018-05-21 03:36:42 +0900 (Mon, 21 May 2018) | 2 lines

should propagate V to sub make

------------------------------------------------------------------------
r63471 | usa | 2018-05-21 03:13:08 +0900 (Mon, 21 May 2018) | 2 lines

goruby build was broken

------------------------------------------------------------------------
r63470 | svn | 2018-05-21 03:09:37 +0900 (Mon, 21 May 2018) | 1 line

* 2018-05-21
------------------------------------------------------------------------
r63469 | usa | 2018-05-21 03:09:36 +0900 (Mon, 21 May 2018) | 2 lines

get rid of unused variable warning.

------------------------------------------------------------------------
r63468 | yui-knk | 2018-05-19 12:43:00 +0900 (Sat, 19 May 2018) | 6 lines

iseq.c: Fix segfault when debug is not 0

* iseq.c (get_insn_info_succinct_bitvector): If
  VM_CHECK_MODE is 0, `body->insns_info.positions` is
  freed in `rb_iseq_insns_info_encode_positions`.
  Print `position` only when VM_CHECK_MODE is set.
------------------------------------------------------------------------
r63467 | yui-knk | 2018-05-19 11:47:26 +0900 (Sat, 19 May 2018) | 1 line

vm_core.h: Remove duplicate declaration
------------------------------------------------------------------------
r63466 | svn | 2018-05-19 09:22:40 +0900 (Sat, 19 May 2018) | 1 line

* 2018-05-19
------------------------------------------------------------------------
r63465 | nobu | 2018-05-19 09:22:39 +0900 (Sat, 19 May 2018) | 5 lines

fileutils.rb: split fu_windows?

* lib/fileutils.rb (FileUtils::StreamUtils_#fu_windows?): select
  the method definition for each platforms, and dropped supports
  for deprecated platforms.
------------------------------------------------------------------------
r63464 | normal | 2018-05-18 17:40:16 +0900 (Fri, 18 May 2018) | 9 lines

Revert "gc.c: use monotonic counters for objspace_malloc_increase"

There were major size regressions I failed to notice before in:

	bm_array_sample_100k__6k
	bm_array_sample_100k___10k
	bm_array_sample_100k___50k

This reverts commit r63463 / 14fb10a9ec41c77a91a778ca2f705c1897958afb
------------------------------------------------------------------------
r63463 | normal | 2018-05-18 17:29:28 +0900 (Fri, 18 May 2018) | 16 lines

gc.c: use monotonic counters for objspace_malloc_increase

atomic_sub_nounderflow is expensive and objspace_malloc_increase
was showing up near the top of some `perf` profiles.  The new
implementation allows the compiler to inline and eliminate
some branches from objspace_malloc_increase.

Furthermore, we do not need atomics for oldmalloc_increase

This consistently improves bm_so_count_words benchmark by
around 10% on my hardware.

name	built
so_count_words	1.107

[ruby-core:87096] [Feature #14767]
------------------------------------------------------------------------
r63462 | normal | 2018-05-18 17:01:07 +0900 (Fri, 18 May 2018) | 15 lines

thread.c (rb_wait_for_single_fd): do not leak EINTR on timeout

We must not leak EINTR to users in case a signal hits a
ppoll/select caller right when (or just before) the timeout
expires.  In other words, the timeout should take precedence
over the -1 result from ppoll or select.

We also try one more time in case of EINTR with a zero timeout,
since technically the syscall finished before timing out if
it returns EINTR.

Regression appeared in r62457
("thread.c (update_timespec): use timespec_update_expire",
 commit e6bf0128add103730d8c96727f3ed4dab95088e4)
and is not in any stable release of Ruby.
------------------------------------------------------------------------
r63461 | hsbt | 2018-05-18 10:39:13 +0900 (Fri, 18 May 2018) | 3 lines

Merge RubyGems 2.7.7

  see release details here: https://blog.rubygems.org/2018/05/18/2.7.7-released.html
------------------------------------------------------------------------
r63460 | nobu | 2018-05-18 09:40:06 +0900 (Fri, 18 May 2018) | 1 line

tool: fixed shadowing variables
------------------------------------------------------------------------
r63459 | nobu | 2018-05-18 09:38:00 +0900 (Fri, 18 May 2018) | 1 line

tool: removed unused variables
------------------------------------------------------------------------
r63458 | nobu | 2018-05-18 09:37:59 +0900 (Fri, 18 May 2018) | 4 lines

redmine-backporter.rb: suppress a warning [ci skip]

* tool/redmine-backporter.rb (StringScanner.readline): use `true`
  to suppress a "literal in condition" warning.
------------------------------------------------------------------------
r63457 | nobu | 2018-05-18 09:36:24 +0900 (Fri, 18 May 2018) | 5 lines

parse.y: relax literal in condition warnings

* parse.y (cond0): do not warn literal boolean (true and false) in
  condition expressions, as they are often used as infinite loops,
  deactivated code block, etc.
------------------------------------------------------------------------
r63456 | svn | 2018-05-18 02:11:08 +0900 (Fri, 18 May 2018) | 1 line

* 2018-05-18
------------------------------------------------------------------------
r63455 | k0kubun | 2018-05-18 02:11:07 +0900 (Fri, 18 May 2018) | 9 lines

_mjit_compile_send.erb: disable attr_reader inline

for now, which was committed in r63333.

Currently trunk's JIT seems to have some wrong behaviors, and this is
the most suspicious culprit of them for now. In the future, I may have
a strict test environment to detect the cause, but there's no enough
time to test this until preview2. So let me revert this and see how it
goes after this.
------------------------------------------------------------------------
r63454 | nobu | 2018-05-17 21:36:33 +0900 (Thu, 17 May 2018) | 5 lines

rb_parser_printf declaration

* node.h (rb_parser_printf): delcare as PRINTF_ARGS.

* parse.y (parser_token_value_print): cast to adjust to %c.
------------------------------------------------------------------------
r63453 | nobu | 2018-05-17 19:46:21 +0900 (Thu, 17 May 2018) | 4 lines

range.c: === by cover?

* range.c (range_eqq): switch `Range#===` to use `cover?` instead
  of `include?`.  [Feature #14575]
------------------------------------------------------------------------
r63452 | naruse | 2018-05-17 16:40:01 +0900 (Thu, 17 May 2018) | 16 lines

http_proxy setting should respect both parent domain and subdomain

URI::Generic: Respect no_proxy for both parent domain and
subdomains It is now possible to add just the subdomains for proxy bypass. In
a setting where the main domain needs to go through proxy while the
subdomains don't, it is now possible to just add the subdomains to the
no_proxy list.
The assumption that subdomains and the parent domain should
behave the same wrt no_proxy has been removed.

eg: Adding .example.com in no_proxy would allow example.com
to go through the proxy.

From: Harsimran Singh Maan <maan.harry@gmail.com>
fix https://github.com/ruby/ruby/pull/1748
[Bug #14345]
------------------------------------------------------------------------
r63451 | normal | 2018-05-17 13:20:33 +0900 (Thu, 17 May 2018) | 7 lines

vm_trace: implement postponed_jobs as st_table

st_table allows the use of st_shift to act as an order-preserving
queue while allowing fast lookups to prevent duplicate jobs.

In typical Ruby apps, this table will only have one entry
for gc_finalize_deferred_register.
------------------------------------------------------------------------
r63450 | normal | 2018-05-17 12:48:32 +0900 (Thu, 17 May 2018) | 9 lines

vm_trace: remove rb_postponed_job_t->flags

This field has been taking up space for 5 years and never used.
Save 8kb of memory on x86-64 for now.  If we ever care about
this flag, we'll simply re-add it.

* vm_trace.c (rb_postponed_job_struct): remove flags
  (postponed_job_register): comment out flags assignment
  [ruby-core:87052] [Misc #14764]
------------------------------------------------------------------------
r63449 | normal | 2018-05-17 12:48:27 +0900 (Thu, 17 May 2018) | 1 line

vm_trace.c: spelling fix: PJRR_SUCESS => PJRR_SUCCESS
------------------------------------------------------------------------
r63448 | normal | 2018-05-17 06:54:42 +0900 (Thu, 17 May 2018) | 6 lines

thread: reduce GET_THREAD calls

This allows native_sleep to use less stack (80 -> 64 bytes on
x86-64) for GVL_UNLOCK_BEGIN/END.  For future APIs, we will pass
`ec` or `th` around anyways, so the BLOCKING_REGION change
should be beneficial in the future.
------------------------------------------------------------------------
r63447 | normal | 2018-05-17 05:39:30 +0900 (Thu, 17 May 2018) | 6 lines

gc.c: use ccan/list

This seems to improve the readability of gc.c a small amount
and it doesn't have any measurable performance impact.

[ruby-core:87067] [Misc #14762]
------------------------------------------------------------------------
r63446 | svn | 2018-05-17 03:55:29 +0900 (Thu, 17 May 2018) | 1 line

* 2018-05-17
------------------------------------------------------------------------
r63445 | stomar | 2018-05-17 03:55:28 +0900 (Thu, 17 May 2018) | 4 lines

lib/optparse.rb: improve docs

* lib/optparse.rb: [DOC] simplify shell prompt in examples;
  other minor improvements.
------------------------------------------------------------------------
r63444 | ngoto | 2018-05-16 20:06:30 +0900 (Wed, 16 May 2018) | 6 lines

configure.ac: move the checks of _XOPEN_SOURCE on Solaris

* configure.ac (solaris*): Move the checks of _XOPEN_SOURCE to the
  location before r63443, to cover non-GCC compilers on Solaris.
  This partly reverts r63443.

------------------------------------------------------------------------
r63443 | ngoto | 2018-05-16 13:11:20 +0900 (Wed, 16 May 2018) | 11 lines

configure.ac: move checks of -std=gnu99 and _XOPEN_SOURCE on Solaris

* configure.ac (ansi_options): On Solaris, "-std=gnu99" should be
  appended to CPPFLAGS instead of warnflags and strict_warnflags,
  because the flag affects existance of functions and macros.

* configure.ac (solaris*): Check _XOPEN_SOURCE just after checking
  "-std=gnu99" on Solaris. Because _XOPEN_SOURCE also affects existance
  of many functions and macros, it is good to define it earlier.
  The check is simplified to use AC_TRY_COMPILE with RUBY_WERROR_FLAG.

------------------------------------------------------------------------
r63442 | ngoto | 2018-05-16 12:57:50 +0900 (Wed, 16 May 2018) | 2 lines

configure.ac: revert r63438

------------------------------------------------------------------------
r63441 | nobu | 2018-05-16 10:40:44 +0900 (Wed, 16 May 2018) | 4 lines

iseq body local variables

* compile.c, iseq.c: extract body and param.keyword in iseq as
  local variables.
------------------------------------------------------------------------
r63440 | nobu | 2018-05-16 10:31:28 +0900 (Wed, 16 May 2018) | 4 lines

fileutils.rb: remove code for OS/2 emx

* lib/fileutils.rb (FileUtils#mv): remove code for OS/2 emx, its
  support has been dropped yeas ago.
------------------------------------------------------------------------
r63439 | svn | 2018-05-16 05:48:24 +0900 (Wed, 16 May 2018) | 1 line

* 2018-05-16
------------------------------------------------------------------------
r63438 | ngoto | 2018-05-16 05:48:23 +0900 (Wed, 16 May 2018) | 5 lines

Change logic to check _XOPEN_SOURCE on Solaris

* configure.ac: Change logic to check _XOPEN_SOURCE on Solaris.
  With _XOPEN_SOURCE, "-std=gnu99" may also be added to CPPFLAGS.

------------------------------------------------------------------------
r63437 | ngoto | 2018-05-15 23:31:47 +0900 (Tue, 15 May 2018) | 7 lines

Split TestThread#test_join_limits into peaces

* test/ruby/test_thread.rb (TestThread#test_join_limit_*): Split
  TestThread#test_join_limits for investigating hang-up on Solaris.
  Each method tests only a single limit value.
  [ruby-core:87045] [Bug #14761]

------------------------------------------------------------------------
r63436 | nobu | 2018-05-15 19:51:07 +0900 (Tue, 15 May 2018) | 1 line

signal.c: follow up r63435
------------------------------------------------------------------------
r63435 | normal | 2018-05-15 19:11:32 +0900 (Tue, 15 May 2018) | 6 lines

vm_core.h (rb_execution_context_t): interrupt_mask size to match interrupt_flag

rb_atomic_t is 32-bit on 64-bit platforms (including the popular
x86-64 Linux), so save 4 bytes on this structure.  This doesn't
result in any final size reduction due to padding, yet, but
future changes are possible to shrink rb_execution_context_t
------------------------------------------------------------------------
r63434 | hsbt | 2018-05-15 19:10:33 +0900 (Tue, 15 May 2018) | 3 lines

Added workaround to fileutils for `make btest` without rbconfig.

  Followed up r63430.
------------------------------------------------------------------------
r63433 | nobu | 2018-05-15 17:08:24 +0900 (Tue, 15 May 2018) | 4 lines

configure.ac: maybe with jemalloc

* configure.ac (--with-jemalloc): accept `maybe` (other than `yes`
  and `no`), check for jemalloc and use it if possible.
------------------------------------------------------------------------
r63432 | nobu | 2018-05-15 16:46:55 +0900 (Tue, 15 May 2018) | 5 lines

generic_erb.rb: get rid of fileutils

* tool/generic_erb.rb: get rid of FileUtils.touch, not to depend
  on fileutils.rb which will depend on rbconfig.rb which does not
  exist when creating encdb.h.
------------------------------------------------------------------------
r63431 | nobu | 2018-05-15 16:45:24 +0900 (Tue, 15 May 2018) | 1 line

share :cause variable
------------------------------------------------------------------------
r63430 | hsbt | 2018-05-15 14:53:18 +0900 (Tue, 15 May 2018) | 6 lines

Retry to merge fileutils-1.1.0.

  * Revert "Revert "Merge fileutils-1.1.0.""
    This reverts commit 84bb8e81c25d4d7d6020c3acfbbc36e9064200fa.

  * Added workaround for make mjit-headers
------------------------------------------------------------------------
r63429 | shyouhei | 2018-05-15 13:35:58 +0900 (Tue, 15 May 2018) | 7 lines

-Wno-cast-function-type

GCC 8.1+ introduced this warning in -Weverything.  It does
shed some lights on something, but rather annoying than
useful ATM.  Might be a subject to revert this option in a
future.

------------------------------------------------------------------------
r63428 | mame | 2018-05-15 13:16:08 +0900 (Tue, 15 May 2018) | 10 lines

Revert "Merge fileutils-1.1.0."

This reverts commit 99da3d2570e110d3024039102205f6d64174bf5e.
The change caused the following build failure:

```
.../ruby/lib/fileutils.rb:88:in `require': cannot load such file -- rbconfig (LoadError)
uncommon.mk:987: recipe for target 'encdb.h' failed
make: *** [encdb.h] Error 1
```
------------------------------------------------------------------------
r63427 | normal | 2018-05-15 12:49:21 +0900 (Tue, 15 May 2018) | 14 lines

thread.c: enable ppoll for FreeBSD 11.0 and later

FreeBSD 11.0+ supports ppoll, so we may use it after accounting
for portability differences in how it treats POLLOUT vs POLLHUP
events as mutually exclusive (as documented in the FreeBSD
poll(2) manpage).

For waiting on high-numbered single FDs, this should put
FreeBSD on equal footing with Linux and should allow cheaper
FD readiness checking with sleepy GC in the future.

* thread.c (USE_POLL, POLLERR_SET): define for FreeBSD 11.0+
  (rb_wait_for_single_fd): return all requested events on POLLERR_SET
  io.c (USE_POLL): define for FreeBSD 11.0+
------------------------------------------------------------------------
r63426 | normal | 2018-05-15 10:29:14 +0900 (Tue, 15 May 2018) | 3 lines

-test-/wait_for_single_fd: fix -Wformat-security warning

Oops
------------------------------------------------------------------------
r63425 | hsbt | 2018-05-15 10:22:36 +0900 (Tue, 15 May 2018) | 4 lines

Merge fileutils-1.1.0.

  This version was migrated JRuby paches.
  https://github.com/ruby/fileutils/pull/18
------------------------------------------------------------------------
r63424 | svn | 2018-05-15 09:08:34 +0900 (Tue, 15 May 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63423 | normal | 2018-05-15 09:08:33 +0900 (Tue, 15 May 2018) | 5 lines

test_io_wait_uncommon: new test for uncommon file types

This should make portability problems more apparent when we try
using ppoll with rb_wait_for_single_fd on FreeBSD or other
non-Linux platforms.
------------------------------------------------------------------------
r63422 | normal | 2018-05-15 08:51:39 +0900 (Tue, 15 May 2018) | 3 lines

test_wait_for_single_fd.rb: remove with_pipe helper

IO.pipe natively accepts a block, nowadays.
------------------------------------------------------------------------
r63421 | normal | 2018-05-15 08:51:35 +0900 (Tue, 15 May 2018) | 8 lines

test_wait_for_single_fd: ensure this works with kqueue

Regardless of future features, this needs to work with
kqueue descriptors across platforms.

Today this will be useful for 3rd-party libraries using
kqueue.  In the future, Ruby may use kqueue natively
and we shall ensure we can wait on it.
------------------------------------------------------------------------
r63420 | normal | 2018-05-15 08:42:10 +0900 (Tue, 15 May 2018) | 1 line

test_wait_for_single_fd.rb: relax test for newer FreeBSD
------------------------------------------------------------------------
r63419 | svn | 2018-05-15 08:40:57 +0900 (Tue, 15 May 2018) | 1 line

* 2018-05-15
------------------------------------------------------------------------
r63418 | normal | 2018-05-15 08:40:55 +0900 (Tue, 15 May 2018) | 13 lines

io.c: cleanup copy_stream wait-for-single-fd cases

Avoid paying unnecessary setup and teardown cost for rb_fdset_t
on platforms (Linux) with good poll() support.  This simplifies
code makes future changes (perhaps for sleepy GC) easier.

* io.c (struct copy_stream_struct): remove rb_fdset_t fds
  (nogvl_wait_for_single_fd): implement with select for non-poll case
  (maygvl_copy_stream_wait_read): remove duplicate definition
  (nogvl_copy_stream_wait_write): remove #ifdef
  (copy_stream_body): remove rb_fd_set calls
  (copy_stream_finalize): remove rb_fd_term call
  (rb_io_s_copy_stream): remove rb_fd_init
------------------------------------------------------------------------
r63417 | nobu | 2018-05-14 17:33:14 +0900 (Mon, 14 May 2018) | 4 lines

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]
------------------------------------------------------------------------
r63416 | hsbt | 2018-05-14 15:39:40 +0900 (Mon, 14 May 2018) | 1 line

Update test-unit 3.2.8 for bundled gems.
------------------------------------------------------------------------
r63415 | svn | 2018-05-14 12:30:05 +0900 (Mon, 14 May 2018) | 1 line

* 2018-05-14
------------------------------------------------------------------------
r63414 | shyouhei | 2018-05-14 12:30:03 +0900 (Mon, 14 May 2018) | 4 lines

RSTRING_PTR is not guaranteed to be char*-aligned

This commit eliminates (char **)RSTRING_PTR(...) like usages.

------------------------------------------------------------------------
r63413 | yui-knk | 2018-05-13 21:31:38 +0900 (Sun, 13 May 2018) | 7 lines

compile.c: Fix segfault when VM_INSN_INFO_TABLE_IMPL is not 2

* compile.c (ibf_dump_iseq_each): Fix a range of a conditional.
  `positions` is only used when VM_INSN_INFO_TABLE_IMPL is 2.
  And always `dump_body` is expected to be initialized by
  `iseq->body`. For example, `dump_body->insns_info.size` is
  used in `ibf_dump_insns_info_positions`.
------------------------------------------------------------------------
r63412 | svn | 2018-05-13 10:18:34 +0900 (Sun, 13 May 2018) | 1 line

* 2018-05-13
------------------------------------------------------------------------
r63411 | nobu | 2018-05-13 10:18:33 +0900 (Sun, 13 May 2018) | 5 lines

optparse.rb: Remove redundant `.freeze`

[Fix GH-1873]

From: Masataka Pocke Kuwabara <kuwabara@pocke.me>
------------------------------------------------------------------------
r63410 | nobu | 2018-05-12 23:41:24 +0900 (Sat, 12 May 2018) | 7 lines

optparse.rb: [DOC] about into: option

* lib/optparse.rb: add documentation for "into" option of #parse
  and family, which stores options to a Hash.
  [ruby-core:87004] [Misc #14753]

From: pocke (Masataka Kuwabara) <kuwabara@pocke.me>
------------------------------------------------------------------------
r63409 | nobu | 2018-05-12 18:13:45 +0900 (Sat, 12 May 2018) | 4 lines

irb.rb: update `_`

* lib/irb.rb (IRB::Irb#eval_input): update `_` after exception.
  [ruby-core:86989] [Bug #14749]
------------------------------------------------------------------------
r63408 | nobu | 2018-05-12 18:09:23 +0900 (Sat, 12 May 2018) | 4 lines

fix TestInputMethod

* test/irb/test_context.rb (TestInputMethod#initialize): fix typos
  and increment `line_no` only when not reaching the end.
------------------------------------------------------------------------
r63407 | kou | 2018-05-12 18:06:00 +0900 (Sat, 12 May 2018) | 8 lines

rss: Add option Hash support to RSS::Parser.parse

Available options:

  * :validate
  * :ignore_unknown_element
  * :parser_class

------------------------------------------------------------------------
r63406 | rhe | 2018-05-12 16:33:53 +0900 (Sat, 12 May 2018) | 15 lines

openssl: merge changes in v2.1.1

Commits in upstream repository since v2.1.0 can be found at:

	https://github.com/ruby/openssl/compare/v2.1.0...v2.1.1

----------------------------------------------------------------
Kazuki Yamaguchi (7):
      test/utils: disable Thread's report_on_exception in start_server
      cipher: validate iterations argument for Cipher#pkcs5_keyivgen
      extconf.rb: fix build with LibreSSL 2.7.0
      test/test_pkey_rsa: fix test failure with OpenSSL 1.1.1
      test/test_ssl_session: set client protocol version explicitly
      Ruby/OpenSSL 2.0.8
      Ruby/OpenSSL 2.1.1
------------------------------------------------------------------------
r63405 | nobu | 2018-05-12 10:26:39 +0900 (Sat, 12 May 2018) | 5 lines

io.c: fix typo and phrase [ci skip]

[Fix GH-1872]

From: Leon M. George <leon@georgemail.eu>
------------------------------------------------------------------------
r63404 | nobu | 2018-05-12 10:24:18 +0900 (Sat, 12 May 2018) | 4 lines

iseq.c: iseq body local variables

* iseq.c: extract body and param.keyword in iseq as local
  variables.
------------------------------------------------------------------------
r63403 | nobu | 2018-05-12 10:24:16 +0900 (Sat, 12 May 2018) | 4 lines

iseq.c: refactoring rb_iseq_free

* iseq.c (rb_iseq_free): call mjit_free_iseq only if iseq->body is
  not NULL too, as the function accesses the body.
------------------------------------------------------------------------
r63402 | stomar | 2018-05-12 05:07:32 +0900 (Sat, 12 May 2018) | 3 lines

lib/securerandom.rb: improve docs

* lib/securerandom.rb: [DOC] drop unnecessary `p' from code examples.
------------------------------------------------------------------------
r63401 | ngoto | 2018-05-12 02:21:37 +0900 (Sat, 12 May 2018) | 7 lines

configure.ac: remove ineffective check on Solaris with GCC

* configure.ac (solaris): Remove ineffective check for -std=iso9899:1999
  on Solaris with GCC. The "-std=iso9899:1999" was replaced by
  "-std=gnu99" by the commit r54895. The check is no longer effective
  after that, and two years have passed without error reports.

------------------------------------------------------------------------
r63400 | ngoto | 2018-05-12 01:47:38 +0900 (Sat, 12 May 2018) | 8 lines

transform_mjit_header.rb: workaround for Solaris 10 with old GCC

* tool/transform_mjit_header.rb (MJITHeader.conflicting_types?):
  Add workaround for Solaris 10 with old GCC (4.6.2), that is
  essentially the same as for AIX (commit r62326), but probably
  due to different GCC versions, different error message is shown.
  [Bug #14751] [ruby-dev:50541]

------------------------------------------------------------------------
r63399 | svn | 2018-05-12 00:46:21 +0900 (Sat, 12 May 2018) | 1 line

* 2018-05-12
------------------------------------------------------------------------
r63398 | ngoto | 2018-05-12 00:46:21 +0900 (Sat, 12 May 2018) | 7 lines

mkmf.rb: set cppflags

* ext/mkmf.rb (configuration): set the default cppflags, which is
  referred from the default CPPFLAGS, for extension libraries.
  This fixes build failure of ext/zlib on Solaris 10.
  [Bug #14746] [ruby-dev:50539]

------------------------------------------------------------------------
r63397 | nobu | 2018-05-11 22:01:36 +0900 (Fri, 11 May 2018) | 5 lines

fix potential memory leaks

* parse.y (primary, new_args_tail, local_tbl): keep the order;
  allocate an empty imemo first then xmalloc, to get rid of
  potential memory leak when allocation imemo failed.
------------------------------------------------------------------------
r63396 | shugo | 2018-05-11 21:39:23 +0900 (Fri, 11 May 2018) | 4 lines

net/imap: Fix ArgumentError in send_string_data

Thanks to ShockwaveNN (Pavel Lobashov) for reporting the bug.
[ruby-core:86990] [Bug #14750]
------------------------------------------------------------------------
r63395 | svn | 2018-05-11 21:12:59 +0900 (Fri, 11 May 2018) | 1 line

* 2018-05-11
------------------------------------------------------------------------
r63394 | kazu | 2018-05-11 21:12:57 +0900 (Fri, 11 May 2018) | 1 line

Use `&.` instead of modifier if
------------------------------------------------------------------------
r63393 | yui-knk | 2018-05-10 18:49:55 +0900 (Thu, 10 May 2018) | 1 line

node.c: Fix format and example of NODE_OPCALL
------------------------------------------------------------------------
r63392 | normal | 2018-05-10 17:54:26 +0900 (Thu, 10 May 2018) | 47 lines

variable.c: fix multiple autoload with identical file (again)

We need to ensure autoload declarations pointing to the same
feature (aka "file") can wait on each other to avoid deadlock
situations.

So, reorganize autoload data structures to maintain a
feature => autoload_data_i mapping, and have module constant
tables point to the new autoload_const struct instead of
directly to autoload_data_i.  This allows multiple
autoload_const structs to refer to the SAME autoload_data_i
struct, and with it, the on-stack autoload_state.waitq.

The end result is different constants can share the same waitq
(tied to the feature name), and not deadlock each other during
loading.

Thanks to Eugene Kenny for the bug report and reproducible test case.

Reported-by: Eugene Kenny <elkenny@gmail.com>

* variable.c (autoload_featuremap): new global
  (struct autoload_const): new per-const struct
  (struct autoload_state): reference autoload_const instead of autoload_data_i
  (struct autoload_data_i): remove per-const
  (autoload_i_mark): delete from autoload_featuremap if unreferenced
  (autoload_c_mark): new dmark callback
  (autoload_c_free): new dfree callback
  (autoload_c_memsize): new memsize callback
  (autoload_const_type): new data type
  (get_autoload_data): set autoload_const as well
  (rb_autoload_str): use new data structures
  (autoload_delete): cleanup from autoload_featuremap
  (check_autoload_required): adjust for new internals
  (rb_autoloading_value): ditto
  (struct autoload_const_set_args): remove, redundant with autoload_const
  (const_tbl_update): adjust for new internals
  (autoload_const_set): ditto
  (autoload_require): ditto
  (autoload_reset): ditto
  (rb_autoload_load): ditto
  (rb_const_set): ditto
  (current_autoload_data): ditto
  (set_const_visibility): ditto
* test/ruby/test_autoload.rb (test_autoload_same_file): new test
  (test_no_leak): new test
  [ruby-core:86935] [Bug #14742]
------------------------------------------------------------------------
r63391 | yui-knk | 2018-05-10 15:34:20 +0900 (Thu, 10 May 2018) | 21 lines

parse.y: Fix locations of NODE_NIL in endless ranges.

* parse.y: Fix to start with the end of dots.

  e.g. The locations of the NODE_NIL is fixed:

  ```
  1..
  ```

  * Before

  ```
  NODE_NIL (line: 1, location: (1,0)-(1,3))
  ```

  * After

  ```
  NODE_NIL (line: 1, location: (1,3)-(1,3))
  ```
------------------------------------------------------------------------
r63390 | normal | 2018-05-10 14:10:13 +0900 (Thu, 10 May 2018) | 5 lines

revert r63387 and r63389 for now

I can't reproduce the problem on my 32-bit machine, and I have
connectivity problems to my 64-bit systems at the moment.
Will revisit in a few hours hopefully.
------------------------------------------------------------------------
r63389 | normal | 2018-05-10 13:18:28 +0900 (Thu, 10 May 2018) | 6 lines

variable.c: fix autoload object lifetimes and leak

We must not call normal Hash methods inside GC free callback,
either, however identity hash may be used.

[ruby-core:86935] [Bug #14742]
------------------------------------------------------------------------
r63388 | shyouhei | 2018-05-10 11:54:04 +0900 (Thu, 10 May 2018) | 5 lines

RSTRING_PTR is not guaranteed to be char*-aligned

We need to ensure aligned memory access by allocating
another memory region.

------------------------------------------------------------------------
r63387 | normal | 2018-05-10 10:19:20 +0900 (Thu, 10 May 2018) | 46 lines

variable.c: fix multiple autoload with identical file

We need to ensure autoload declarations pointing to the same
feature (aka "file") can wait on each other to avoid deadlock
situations.

So, reorganize autoload data structures to maintain a
feature => autoload_data_i mapping, and have module constant
tables point to the new autoload_const struct instead of
directly to autoload_data_i.  This allows multiple
autoload_const structs to refer to the SAME autoload_data_i
struct, and with it, the on-stack autoload_state.waitq.

The end result is different constants can share the same waitq
(tied to the feature name), and not deadlock each other during
loading.

Thanks to Eugene Kenny for the bug report and reproducible test case.

Reported-by: Eugene Kenny <elkenny@gmail.com>

* variable.c (autoload_featuremap): new global
  (struct autoload_const): new per-const struct
  (struct autoload_state): reference autoload_const instead of autoload_data_i
  (struct autoload_data_i): remove per-const
  (autoload_i_mark): delete from autoload_featuremap if unreferenced
  (autoload_c_mark): new dmark callback
  (autoload_c_free): new dfree callback
  (autoload_c_memsize): new memsize callback
  (autoload_const_type): new data type
  (get_autoload_data): set autoload_const as well
  (rb_autoload_str): use new data structures
  (autoload_delete): cleanup from autoload_featuremap
  (check_autoload_required): adjust for new internals
  (rb_autoloading_value): ditto
  (struct autoload_const_set_args): remove, redundant with autoload_const
  (const_tbl_update): adjust for new internals
  (autoload_const_set): ditto
  (autoload_require): ditto
  (autoload_reset): ditto
  (rb_autoload_load): ditto
  (rb_const_set): ditto
  (current_autoload_data): ditto
  (set_const_visibility): ditto
* test/ruby/test_autoload.rb (test_autoload_same_file): new test
  [ruby-core:86935] [Bug #14742]
------------------------------------------------------------------------
r63386 | yui-knk | 2018-05-10 09:23:23 +0900 (Thu, 10 May 2018) | 1 line

node.c: Fix typos
------------------------------------------------------------------------
r63385 | nobu | 2018-05-10 02:40:04 +0900 (Thu, 10 May 2018) | 10 lines

fix potential memory leaks

* gc.c (rb_alloc_tmp_buffer_with_count): keep the order; allocate
  an empty imemo first then xmalloc, to get rid of potential
  memory leak when allocation imemo failed.

* parse.y (rb_parser_malloc, rb_parser_calloc, rb_parser_realloc):
  ditto.

* process.c (rb_execarg_allocate_dup2_tmpbuf): ditto.
------------------------------------------------------------------------
r63384 | k0kubun | 2018-05-10 02:19:23 +0900 (Thu, 10 May 2018) | 5 lines

_mjit_compile_pc_and_sp: re-commit r63360

reverting r63379 (revert of r63360).

The cause of error seems to be r63350. See r63382.
------------------------------------------------------------------------
r63383 | nobu | 2018-05-10 02:17:06 +0900 (Thu, 10 May 2018) | 4 lines

compile.c: suppress a warning

* compile.c (iseq_peephole_optimize): initialize dniobj first, to
  suppress a false warning by gcc 8.1.0.
------------------------------------------------------------------------
r63382 | k0kubun | 2018-05-10 02:11:07 +0900 (Thu, 10 May 2018) | 6 lines

_mjit_compile_send.erb: revert r63350

Revert "_mjit_compile_send.erb: inline recursive call"

I reverted r63360 in r63379, but the errors were reproductive from
r63350. So I need to revert this.
------------------------------------------------------------------------
r63381 | svn | 2018-05-10 01:12:42 +0900 (Thu, 10 May 2018) | 1 line

* 2018-05-10
------------------------------------------------------------------------
r63380 | nobu | 2018-05-10 01:12:41 +0900 (Thu, 10 May 2018) | 4 lines

iseq.h: fix argument order

* iseq.h (ISEQ_ORIGINAL_ISEQ_ALLOC): the order of ruby_xmalloc2
  arguments is `count` and `element size`.
------------------------------------------------------------------------
r63379 | k0kubun | 2018-05-09 22:09:01 +0900 (Wed, 09 May 2018) | 8 lines

_mjit_compile_pc_and_sp.erb: revert r63360

Revert "_mjit_compile_pc_and_sp.erb: make sure no uninitialized"

This triggered some `NoMethodError`s which seem to be caused by the
commit like: https://travis-ci.org/k0kubun/mjit-test/builds/376416934

I'll add tests and fix it later...
------------------------------------------------------------------------
r63378 | kazu | 2018-05-09 21:51:14 +0900 (Wed, 09 May 2018) | 1 line

Use `&.` instead of modifier if
------------------------------------------------------------------------
r63377 | hsbt | 2018-05-09 20:44:30 +0900 (Wed, 09 May 2018) | 1 line

Use hard-coded file list instead of Dir.glob.
------------------------------------------------------------------------
r63376 | hsbt | 2018-05-09 20:44:06 +0900 (Wed, 09 May 2018) | 3 lines

Revert "Use hard-coded vesion number for CI broken."

This reverts commit f5fef0a80d597f40c2d1a8cc8079bf190039fd6f.
------------------------------------------------------------------------
r63375 | shyouhei | 2018-05-09 18:53:19 +0900 (Wed, 09 May 2018) | 6 lines

align jmp_buf to VALUE

This ec->machine.regs is marked by GC. However jmp_buf is
not defined by us.  There are chances of unaligned access.
We should force it VALUE-aligned.

------------------------------------------------------------------------
r63374 | hsbt | 2018-05-09 18:35:12 +0900 (Wed, 09 May 2018) | 3 lines

Use hard-coded vesion number for CI broken.

  https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu/ruby-trunk/log/20180509T063003Z.fail.html.gz
------------------------------------------------------------------------
r63373 | shyouhei | 2018-05-09 16:46:11 +0900 (Wed, 09 May 2018) | 6 lines

RSTRING_PTR is not guaranteed to be VALUE-aligned

Don't abuse struct RString to hold arbitrary memory region.
Thanks to @mame we now have rb_imemo_alloc_auto_free_pointer
so use it instead.

------------------------------------------------------------------------
r63372 | mame | 2018-05-09 16:11:59 +0900 (Wed, 09 May 2018) | 1 line

Rename imemo_alloc with imemo_tmpbuf
------------------------------------------------------------------------
r63371 | mame | 2018-05-09 16:08:53 +0900 (Wed, 09 May 2018) | 8 lines

gc.c (rb_imemo_alloc_new): split for each purpose

imemo_alloc is used for three purposes: auto-free pointer (alternative
of alloca), alloc_tmp_buffer, and heap allocation for bison.
To make it clear, this change introduces three functions:
rb_imemo_alloc_auto_free_pointer,
rb_imemo_alloc_auto_free_maybe_mark_buffer, and
rb_imemo_alloc_parser_heap.
------------------------------------------------------------------------
r63370 | shyouhei | 2018-05-09 15:55:11 +0900 (Wed, 09 May 2018) | 7 lines

type func(); is different from type func(void);

If a function declarator includes no parameter list, that doesn't
mean the function takes zero parameter. rb_ast_new here does take
zero parameter, so it should be explicitly prototypes as (void).


------------------------------------------------------------------------
r63369 | mame | 2018-05-09 15:12:17 +0900 (Wed, 09 May 2018) | 5 lines

gc.c (rb_imemo_alloc_new): improve the API interface

rb_imemo_alloc_new returns rb_imemo_alloc_t*, but took VALUEs, which is
inconsistent.  To make the intention clear, it now takes only a pointer
to the buffer.
------------------------------------------------------------------------
r63368 | shyouhei | 2018-05-09 14:42:06 +0900 (Wed, 09 May 2018) | 5 lines

RSTRING_PTR is not guaranteed to be VALUE-aligned (retry)

Don't abuse struct RString to hold arbitrary memory region.
Raw pointer should just suffice.

------------------------------------------------------------------------
r63367 | hsbt | 2018-05-09 13:45:59 +0900 (Wed, 09 May 2018) | 1 line

Fixed file structure for csv.gemspec.
------------------------------------------------------------------------
r63366 | svn | 2018-05-09 13:39:18 +0900 (Wed, 09 May 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63365 | svn | 2018-05-09 13:39:17 +0900 (Wed, 09 May 2018) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r63364 | hsbt | 2018-05-09 13:39:16 +0900 (Wed, 09 May 2018) | 1 line

Merge csv-1.0.2 from upstream.
------------------------------------------------------------------------
r63363 | shyouhei | 2018-05-09 11:42:22 +0900 (Wed, 09 May 2018) | 2 lines

revert r63362 due to test failure. Sorry!

------------------------------------------------------------------------
r63362 | shyouhei | 2018-05-09 11:36:34 +0900 (Wed, 09 May 2018) | 5 lines

RSTRING_PTR is not guaranteed to be VALUE-aligned

Don't abuse struct RString to hold arbitrary memory region.
use rb_alloc_tmp_buffer for that purpose.

------------------------------------------------------------------------
r63361 | svn | 2018-05-09 00:06:12 +0900 (Wed, 09 May 2018) | 1 line

* 2018-05-09
------------------------------------------------------------------------
r63360 | k0kubun | 2018-05-09 00:06:11 +0900 (Wed, 09 May 2018) | 43 lines

_mjit_compile_pc_and_sp.erb: make sure no uninitialized

area on VM stack to prevent SEGV on GC. GC may mark every value in VM
stack.

Unfortunately I couldn't write a test for it... So let me explain the
situation.

SEGV example:
https://gist.github.com/k0kubun/c7cea2b5761ffdff29ec79ea1a8f7f91

```
$ ruby --dump=insns -e 'def oct(num, len); "%0#{len}o" % num; end'
== disasm: #<ISeq:oct@-e:1 (1,0)-(1,41)> (catch: FALSE)
local table (size: 2, argc: 2 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 2] num@0<Arg> [ 1] len@1<Arg>
0000 putobject                    "%0"                                (   1)[LiCa]
0002 getlocal_WC_0                len@1
0004 dup
0005 checktype                    T_STRING
0007 branchif                     14
0009 dup
0010 opt_send_without_block       <callinfo!mid:to_s, argc:0, FCALL|ARGS_SIMPLE>, <callcache>
0013 tostring
0014 putobject                    "o"
0016 concatstrings                3
0018 getlocal_WC_0                num@0
0020 opt_mod                      <callinfo!mid:%, argc:1, ARGS_SIMPLE>, <callcache>
0023 leave                        [Re]
```

Prior to this commit, after arguments are pushed on 0010, stacks were:
VM stack: [uninitialized, uninitialized, len]
JIT stack: ["%0", len, len]

And then, when GC is invoked on 0016, VM stack will be [uninitialized, uninitialized]
and those uninitialized values will be marked by GC.

With this commit, after arguments are pushed on 0010, stacks will be:
VM stack: [len]
JIT stack: ["%0", len, len]

And VM stack will be [] on 0016.
------------------------------------------------------------------------
r63359 | nobu | 2018-05-08 19:58:56 +0900 (Tue, 08 May 2018) | 5 lines

vm_eval.c: eval_string_protect wrapper

* vm_eval.c (eval_string_protect): cast data instead of the
  function pointer, to suppress "cast between incompatible
  function types" warning by gcc 8.1.
------------------------------------------------------------------------
r63358 | shyouhei | 2018-05-08 18:09:12 +0900 (Tue, 08 May 2018) | 4 lines

rb_ary_dig, rb_hash_dig: nobody is using them outside.

mark them static.

------------------------------------------------------------------------
r63357 | ko1 | 2018-05-08 15:53:54 +0900 (Tue, 08 May 2018) | 4 lines

fix type mismatch.

* cont.c (fiber_context_create): `func` should accept variable args.

------------------------------------------------------------------------
r63356 | hsbt | 2018-05-08 11:07:53 +0900 (Tue, 08 May 2018) | 1 line

Merge rdoc-6.0.4 from upstream.
------------------------------------------------------------------------
r63355 | nobu | 2018-05-08 09:01:16 +0900 (Tue, 08 May 2018) | 1 line

cont.c: host out context setup
------------------------------------------------------------------------
r63354 | kazu | 2018-05-08 09:00:13 +0900 (Tue, 08 May 2018) | 1 line

Remove unreachable break
------------------------------------------------------------------------
r63353 | kazu | 2018-05-08 09:00:12 +0900 (Tue, 08 May 2018) | 1 line

Modify spaces [ci skip]
------------------------------------------------------------------------
r63352 | nobu | 2018-05-08 08:52:48 +0900 (Tue, 08 May 2018) | 1 line

cont.c: wrapper function
------------------------------------------------------------------------
r63351 | nobu | 2018-05-08 08:14:07 +0900 (Tue, 08 May 2018) | 4 lines

cont.c: refined error message

* cont.c (fiber_machine_stack_alloc): refined the error message on
  failure at setting a guard page.
------------------------------------------------------------------------
r63350 | k0kubun | 2018-05-08 01:16:59 +0900 (Tue, 08 May 2018) | 50 lines

_mjit_compile_send.erb: inline recursive call

mjit_compile.c: propagate funcname to compile_insn

test_jit.rb: add test covering this behavior

* Benchmark

```
require 'benchmark_driver'

Benchmark.driver(runner: :time, repeat_count: 4) do |x|
  x.prelude %{
    def fib(x)
      return x if x == 0 || x == 1
      fib(x-1) + fib(x-2)
    end
  }
  x.report 'fib(40)'
  x.loop_count 1

  x.rbenv(
    'before,--jit',
    'before',
    'after,--jit',
    'after',
  )
  x.verbose
end
```

```
before,--jit: ruby 2.6.0dev (2018-05-08 trunk 63349) +JIT [x86_64-linux]
before: ruby 2.6.0dev (2018-05-08 trunk 63349) [x86_64-linux]
after,--jit: ruby 2.6.0dev (2018-05-08 trunk 63349) +JIT [x86_64-linux]
last_commit=_mjit_compile_send.erb: inline recursive call
after: ruby 2.6.0dev (2018-05-08 trunk 63349) [x86_64-linux]
last_commit=_mjit_compile_send.erb: inline recursive call
Calculating -------------------------------------
                     before,--jit      before  after,--jit       after
             fib(40)        2.886       8.685        2.562       8.800 s -       1.000 times

Comparison:
                          fib(40)
         after,--jit:         2.6 s
        before,--jit:         2.9 s - 1.13x  slower
              before:         8.7 s - 3.39x  slower
               after:         8.8 s - 3.44x  slower

```
------------------------------------------------------------------------
r63349 | kazu | 2018-05-08 00:08:46 +0900 (Tue, 08 May 2018) | 3 lines

Remove needless require [ci skip]

already require on top
------------------------------------------------------------------------
r63348 | svn | 2018-05-08 00:07:52 +0900 (Tue, 08 May 2018) | 1 line

* 2018-05-08
------------------------------------------------------------------------
r63347 | kazu | 2018-05-08 00:07:51 +0900 (Tue, 08 May 2018) | 1 line

Use `&.` instead of modifier if and remove needless closed?
------------------------------------------------------------------------
r63346 | kazu | 2018-05-07 23:44:55 +0900 (Mon, 07 May 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r63345 | svn | 2018-05-07 15:59:55 +0900 (Mon, 07 May 2018) | 1 line

* 2018-05-07
------------------------------------------------------------------------
r63344 | nobu | 2018-05-07 15:59:55 +0900 (Mon, 07 May 2018) | 5 lines

cont.c: machine stack cache condition

* cont.c (fiber_store, rb_fiber_terminate): separate the condition
  to cache machine stacks, which is not directly restricted to the
  platforms, and may be used on Windows too in the future.
------------------------------------------------------------------------
r63343 | svn | 2018-05-06 18:53:35 +0900 (Sun, 06 May 2018) | 1 line

* 2018-05-06
------------------------------------------------------------------------
r63342 | nobu | 2018-05-06 18:53:33 +0900 (Sun, 06 May 2018) | 24 lines

optparse: Suppress warnings

Ruby warns "instance variable `@version` not initialized" for optparse when it receives `--version` option.

`test.rb`

```ruby
require 'optparse'
Version = '1'
OptionParser.new.parse(ARGV)
```

```
$ ruby -w test.rb --version
/home/pocke/.rbenv/versions/2.5.1/lib/ruby/2.5.0/optparse.rb:1168: warning: instance variable @version not initialized
/home/pocke/.rbenv/versions/2.5.1/lib/ruby/2.5.0/optparse.rb:1175: warning: instance variable @release not initialized
test 1
```

This change will suppress the warnings.

[Fix GH-1871]

From: Masataka Pocke Kuwabara <kuwabara@pocke.me>
------------------------------------------------------------------------
r63341 | nobu | 2018-05-05 12:12:20 +0900 (Sat, 05 May 2018) | 7 lines

securerandom.rb: [DOC] require in examples

* lib/securerandom.rb: added `require 'securerandom'` to each
  example, to state these methods are defined in this library and
  require it explicitly.  [ruby-core:85933] [Bug #14576]

[ci skip]
------------------------------------------------------------------------
r63340 | shyouhei | 2018-05-05 00:20:17 +0900 (Sat, 05 May 2018) | 2 lines

forgot to add INT2FIX (sorry!)

------------------------------------------------------------------------
r63339 | shyouhei | 2018-05-05 00:18:42 +0900 (Sat, 05 May 2018) | 7 lines

passing rb_thread_sleep to rb_protect is IMHO dangerous

rb_thread_sleep's argument is int, while rb_protect expects the function
to take VALUE. Depending on ABI this could be a problem.

We should wrap rb_thread_sleep here.

------------------------------------------------------------------------
r63338 | svn | 2018-05-05 00:03:37 +0900 (Sat, 05 May 2018) | 1 line

* 2018-05-05
------------------------------------------------------------------------
r63337 | shyouhei | 2018-05-05 00:03:37 +0900 (Sat, 05 May 2018) | 5 lines

nobody is using the return value of rb_io_fptr_finalize

However this function is listed in ruby/io.h.  We cannot but
define a new, void-returning variant to use instead.

------------------------------------------------------------------------
r63336 | kazu | 2018-05-04 22:30:25 +0900 (Fri, 04 May 2018) | 1 line

Use `&.` instead of modifier if
------------------------------------------------------------------------
r63335 | svn | 2018-05-04 15:12:14 +0900 (Fri, 04 May 2018) | 1 line

* 2018-05-04
------------------------------------------------------------------------
r63334 | nobu | 2018-05-04 15:12:12 +0900 (Fri, 04 May 2018) | 5 lines

object.c: raise on long invalid float string

* object.c (rb_cstr_to_dbl_raise): check long invalid float
  string more precisely when truncating insignificant part.
  [ruby-core:86800] [Bug #14729]
------------------------------------------------------------------------
r63333 | k0kubun | 2018-05-03 17:47:32 +0900 (Thu, 03 May 2018) | 14 lines

_mjit_compile_send.erb: retry inlining attr_reader

This reverts r63249 (revert r63212) and fixes a bug in it. The test to
prevent the bug is added as well.

vm_insnhelper.c: add `index` argument to vm_getivar. The argument is
created so that MJIT can pass the value of `cc->aux.index` on compilation
time.  The cache invalidation in _mjit_compile_send_guard.erb is only
working for the cache value on compilation time.
Note: As `index` is always passed as constant and it's force-inlined,
the performance of `vm_getivar` won't be degraded in VM.

_mjit_compile_send_guard.erb: New. Used to invalidate inlined values of cc.
common.mk: update dependencies for _mjit_compile_send_guard.erb
------------------------------------------------------------------------
r63332 | k0kubun | 2018-05-03 16:09:51 +0900 (Thu, 03 May 2018) | 5 lines

mjit_compile.c: skip generating unnecessary goto

after return or longjmp. This is mainly for skipping the check of stack
size in such cases, which shouldn't be checked because it does never
happen.
------------------------------------------------------------------------
r63331 | k0kubun | 2018-05-03 12:08:21 +0900 (Thu, 03 May 2018) | 6 lines

mjit_compile.c: verify stack size agreement

between branches.

mjit_compile.inc.erb: move the compiled_for_pos reference to
mjit_compile.c
------------------------------------------------------------------------
r63330 | normal | 2018-05-03 10:24:09 +0900 (Thu, 03 May 2018) | 4 lines

Revert "ext/cgi/escape: preserve String subclass in result"

This reverts commit 6afea14043b0c0e603f26c89ae0d043f65852668 r63328
I misread the original bug report and got results flipped.
------------------------------------------------------------------------
r63329 | k0kubun | 2018-05-03 09:52:30 +0900 (Thu, 03 May 2018) | 5 lines

mjit_compile.inc.erb: verify stack consistency

on JIT compilation. r63092 was risky without this check.

mjit_compile.c: update comment about stack consistency check
------------------------------------------------------------------------
r63328 | normal | 2018-05-03 08:18:55 +0900 (Thu, 03 May 2018) | 8 lines

ext/cgi/escape: preserve String subclass in result

* ext/cgi/escape/escape.c (optimized_escape_html): use rb_str_new_with_class
  (optimized_unescape_html): ditto
  (optimized_escape): ditto
  (optimized_unescape): ditto
* test/cgi/test_cgi_util.rb (test_escape_string_subclass): new test
  [ruby-core:86847] [Bug #14732]
------------------------------------------------------------------------
r63327 | k0kubun | 2018-05-03 01:27:33 +0900 (Thu, 03 May 2018) | 1 line

test_jit.rb: test local variables
------------------------------------------------------------------------
r63326 | k0kubun | 2018-05-03 01:04:26 +0900 (Thu, 03 May 2018) | 1 line

test_jit.rb: test opt_aref_with again
------------------------------------------------------------------------
r63325 | k0kubun | 2018-05-03 00:41:43 +0900 (Thu, 03 May 2018) | 3 lines

test_jit.rb: make it possible to automatically find

untested insns. Resolved some warnings.
------------------------------------------------------------------------
r63324 | svn | 2018-05-03 00:12:55 +0900 (Thu, 03 May 2018) | 1 line

* 2018-05-03
------------------------------------------------------------------------
r63323 | k0kubun | 2018-05-03 00:12:55 +0900 (Thu, 03 May 2018) | 3 lines

test_jit.rb: verify tested insns

and fix some untested insns
------------------------------------------------------------------------
r63322 | nobu | 2018-05-02 22:37:18 +0900 (Wed, 02 May 2018) | 5 lines

object.c: fix exponent with underscore

* object.c (rb_cstr_to_dbl_raise): do not ignore exponent part
  when the input string longer than internal buffer contains
  underscore(s).  [ruby-core:86836] [Bug #14731]
------------------------------------------------------------------------
r63321 | k0kubun | 2018-05-02 22:11:53 +0900 (Wed, 02 May 2018) | 4 lines

test_jit.rb: add missing dependency

The test works with make test-all, but I sometimes want to do a thing like:
`.ruby-svn/ruby -Itest/lib test/ruby/test_jit.rb -n test_clean_so`
------------------------------------------------------------------------
r63320 | k0kubun | 2018-05-02 21:55:57 +0900 (Wed, 02 May 2018) | 7 lines

compile.c: mark catch_except_p of iseq

which has throw insn, not only ancestor iseqs of it.
I think we should remove catch_except_p flag and try to simplify the
catch table itself, to prevent similar bugs in the future.

test_jit.rb: add test to prevent the bug
------------------------------------------------------------------------
r63319 | mame | 2018-05-02 11:07:26 +0900 (Wed, 02 May 2018) | 1 line

common.mk: Update dependencies on tool/ruby_vm scripts
------------------------------------------------------------------------
r63318 | mame | 2018-05-02 09:57:50 +0900 (Wed, 02 May 2018) | 1 line

tool/ruby_vm/views/_insn_name_info.erb: Auto-detect the longest insn name
------------------------------------------------------------------------
r63317 | mame | 2018-05-02 09:57:47 +0900 (Wed, 02 May 2018) | 4 lines

iseq.c (rb_iseq_disasm_insn): Change the width of insn names

Currently "trace_opt_send_without_block" (28 letters) is the longest
insn.
------------------------------------------------------------------------
r63316 | svn | 2018-05-02 05:55:40 +0900 (Wed, 02 May 2018) | 1 line

* 2018-05-02
------------------------------------------------------------------------
r63315 | normal | 2018-05-02 05:55:39 +0900 (Wed, 02 May 2018) | 11 lines

cont.c: cleanup needless cast

It seems like leftover development step from r59557
("refactoring Fiber status").

I will make fiber_status use BITFIELD macro in a future
commit.

* cont.c (struct rb_fiber_struct): drop const from fiber_status
  (fiber_status_set): remove cast
  [ruby-core:86788] [Misc #14720]
------------------------------------------------------------------------
r63314 | normal | 2018-05-01 17:35:19 +0900 (Tue, 01 May 2018) | 4 lines

use list_head_init instead of open-coding it

While we cannot use LIST_HEAD since r63312, we can at
least use list_head_init to make our code more readable.
------------------------------------------------------------------------
r63313 | nobu | 2018-05-01 15:55:43 +0900 (Tue, 01 May 2018) | 6 lines

ast.c: use enum in switch for warnings

* ext/-test-/ast/ast.c (node_children): use enum instead of int
  for not-handled enumeration value in switch warnings.

* ext/-test-/ast/ast.c (node_children): fix the rb_bug message.
------------------------------------------------------------------------
r63312 | shyouhei | 2018-05-01 13:41:10 +0900 (Tue, 01 May 2018) | 14 lines

LIST_HEAD as a local variable is a C99ism.

Address of a variable whose storage duration is `auto` is _not_ a
compile time constant, according to ISO 9899 section 6.4.
LIST_HEAD takes such thing.  You can't use it to declare local
variables.

Interestingly, address of a static variable _is_ a compile time
constant.  So a declaration like `static LIST_HEAD..` is
completely legal even in C90.

In C99 and newer, this is not a constraint violation.


------------------------------------------------------------------------
r63311 | kou | 2018-05-01 12:12:37 +0900 (Tue, 01 May 2018) | 2 lines

rexml: Suppress warnings

------------------------------------------------------------------------
r63310 | normal | 2018-05-01 08:53:55 +0900 (Tue, 01 May 2018) | 4 lines

test/thread/test_cv.rb: test CV usability inside forked child

* test/thread/test_cv.rb (def test_condvar_fork): new test
  [Bug #14725]
------------------------------------------------------------------------
r63309 | normal | 2018-05-01 08:47:21 +0900 (Tue, 01 May 2018) | 6 lines

thread_sync.c (condvar_ptr): reset fork_gen after forking

Otherwise the condition variable waiter list will always
be empty, which is wrong :x

[Bug #14725] [Bug #14634]
------------------------------------------------------------------------
r63308 | svn | 2018-05-01 08:12:03 +0900 (Tue, 01 May 2018) | 1 line

* 2018-05-01
------------------------------------------------------------------------
r63307 | normal | 2018-05-01 08:12:03 +0900 (Tue, 01 May 2018) | 1 line

thread.c (vm_living_thread_num): constify vm arg
------------------------------------------------------------------------
r63306 | kazu | 2018-04-30 19:01:08 +0900 (Mon, 30 Apr 2018) | 1 line

Use `&.` instead of modifier if
------------------------------------------------------------------------
r63305 | kou | 2018-04-30 15:54:13 +0900 (Mon, 30 Apr 2018) | 2 lines

NEWS: Add recent REXML changes

------------------------------------------------------------------------
r63304 | nobu | 2018-04-30 11:17:03 +0900 (Mon, 30 Apr 2018) | 7 lines

io.c: workaround for EPROTOTYPE

* io.c (internal_write_func, internal_writev_func): retry at
  unexpected EPROTOTYPE on macOS, to get rid of a kernel bug.
  [ruby-core:86690] [Bug #14713]

* ext/socket/init.c (rsock_{sendto,send,write}_blocking): ditto.
------------------------------------------------------------------------
r63303 | svn | 2018-04-30 09:28:31 +0900 (Mon, 30 Apr 2018) | 1 line

* 2018-04-30
------------------------------------------------------------------------
r63302 | nobu | 2018-04-30 09:28:30 +0900 (Mon, 30 Apr 2018) | 1 line

io.c: reuse internal_write_func
------------------------------------------------------------------------
r63301 | usa | 2018-04-29 22:45:11 +0900 (Sun, 29 Apr 2018) | 3 lines

* spec/ruby/command_line/dash_upper_i_spec.rb: skip symlink on Windows like
  other specs.

------------------------------------------------------------------------
r63300 | knu | 2018-04-29 20:15:41 +0900 (Sun, 29 Apr 2018) | 13 lines

Remove the teeny part from the shared library name on macOS

This will prevent macOS users from having to rebuild all extension
libraries every time they upgrade ruby to a new teeny release.

Before:
- libruby.2.6.0.dylib
- libruby.2.6.dylib -> libruby.2.6.0.dylib
- libruby.dylib -> libruby.2.6.0.dylib

After:
- libruby.2.6.dylib
- libruby.dylib -> libruby.2.6.dylib
------------------------------------------------------------------------
r63299 | nobu | 2018-04-29 16:12:56 +0900 (Sun, 29 Apr 2018) | 1 line

range.c: optimize range_each for Bignum
------------------------------------------------------------------------
r63298 | k0kubun | 2018-04-29 12:20:31 +0900 (Sun, 29 Apr 2018) | 19 lines

_mjit_compile_send.erb: fix pointer conversion warning

/var/folders/b0/9hgj_tyx10zgkcbyx3_j2dlr0000gn/T//_ruby_mjit_p72619u0.c:37:58: warning: incompatible integer to pointer
      conversion passing 'long' to parameter of type 'const struct rb_call_info *' [-Wint-conversion]
        vm_caller_setup_arg_block(ec, reg_cfp, &calling, 0x7ff6b2e10ca0, 0x7ff6b3847108, FALSE);
                                                         ^~~~~~~~~~~~~~
/Users/kokubun/.rbenv/versions/ruby-svn/include/ruby-2.6.0/x86_64-darwin16/rb_mjit_min_header-2.6.0.h:15613:66: note:
      passing argument to parameter 'ci' here
     struct rb_calling_info *calling, const struct rb_call_info *ci, rb_iseq_t *blockiseq, const int is_super)
                                                                 ^
/var/folders/b0/9hgj_tyx10zgkcbyx3_j2dlr0000gn/T//_ruby_mjit_p72619u0.c:37:74: warning: incompatible integer to pointer
      conversion passing 'long' to parameter of type 'rb_iseq_t *' (aka 'struct rb_iseq_struct *') [-Wint-conversion]
        vm_caller_setup_arg_block(ec, reg_cfp, &calling, 0x7ff6b2e10ca0, 0x7ff6b3847108, FALSE);
                                                                         ^~~~~~~~~~~~~~
/Users/kokubun/.rbenv/versions/ruby-svn/include/ruby-2.6.0/x86_64-darwin16/rb_mjit_min_header-2.6.0.h:15613:81: note:
      passing argument to parameter 'blockiseq' here
     struct rb_calling_info *calling, const struct rb_call_info *ci, rb_iseq_t *blockiseq, const int is_super)
                                                                                ^
2 warnings generated.
------------------------------------------------------------------------
r63297 | nobu | 2018-04-29 08:31:32 +0900 (Sun, 29 Apr 2018) | 4 lines

range.c: endless symbol range

* range.c (range_each): shortcirtuit endless symbol range too, as
  well as `#step`.
------------------------------------------------------------------------
r63296 | eregon | 2018-04-29 08:04:56 +0900 (Sun, 29 Apr 2018) | 3 lines

Generalize the check to MRI in the -I spec

* The current check seems to fail with AppVeyor.
------------------------------------------------------------------------
r63295 | eregon | 2018-04-29 05:37:20 +0900 (Sun, 29 Apr 2018) | 1 line

Ignore the extension of miniruby on Windows in the -I spec
------------------------------------------------------------------------
r63294 | svn | 2018-04-29 04:50:10 +0900 (Sun, 29 Apr 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63293 | eregon | 2018-04-29 04:50:06 +0900 (Sun, 29 Apr 2018) | 1 line

Update to ruby/spec@6f38a82
------------------------------------------------------------------------
r63292 | svn | 2018-04-29 04:49:25 +0900 (Sun, 29 Apr 2018) | 1 line

* 2018-04-29
------------------------------------------------------------------------
r63291 | eregon | 2018-04-29 04:49:24 +0900 (Sun, 29 Apr 2018) | 1 line

Update to ruby/mspec@b5b13de
------------------------------------------------------------------------
r63290 | nobu | 2018-04-28 20:16:54 +0900 (Sat, 28 Apr 2018) | 7 lines

string.c: adjust to rb_str_upto_each

* range.c (range_each_func): adjust the signature of the callback
  function to rb_str_upto_each, and exit the loop if the callback
  returned non-zero.

* string.c (rb_str_upto_endless_each): ditto.
------------------------------------------------------------------------
r63289 | k0kubun | 2018-04-28 18:22:07 +0900 (Sat, 28 Apr 2018) | 3 lines

test_open3.rb: let test_popen2 work with --jit

test/lib/jit_support.rb: add .remove_mjit_logs to normalize stderr
------------------------------------------------------------------------
r63288 | k0kubun | 2018-04-28 18:11:25 +0900 (Sat, 28 Apr 2018) | 1 line

test_rubyoptions.rb: let all tests work with --jit
------------------------------------------------------------------------
r63287 | k0kubun | 2018-04-28 18:02:56 +0900 (Sat, 28 Apr 2018) | 4 lines

test_bug_reporter.rb: make it work with --jit

test_rubyoptions.rb: replace gsub with sub because it's suboptimal for
this
------------------------------------------------------------------------
r63286 | k0kubun | 2018-04-28 17:52:24 +0900 (Sat, 28 Apr 2018) | 1 line

test_rubyoptions.rb: let test_verbose work w/ --jit
------------------------------------------------------------------------
r63285 | k0kubun | 2018-04-28 17:41:19 +0900 (Sat, 28 Apr 2018) | 3 lines

test_parallel.rb: extend timeout for --jit-wait

testing. 10s was long enough for my machine, but not for travis.
------------------------------------------------------------------------
r63284 | k0kubun | 2018-04-28 17:24:44 +0900 (Sat, 28 Apr 2018) | 4 lines

test_ftp.rb: extend read_timeout for --jit-wait

testing. I'm running `make test-all RUN_OPTS='--jit-wait'` and the
read_timeout was too slow for it.
------------------------------------------------------------------------
r63283 | nobu | 2018-04-28 16:31:32 +0900 (Sat, 28 Apr 2018) | 6 lines

range.c: each on endless range

* range.c (range_each): endless range begins with string-like
  object should iterate from the converted result string, as well
  as `#each` on a string-end range or `#step` method on an endless
  range, i.e., `begin.succ` should not be called.
------------------------------------------------------------------------
r63282 | normal | 2018-04-28 15:23:43 +0900 (Sat, 28 Apr 2018) | 5 lines

thread_sync.c: remove "volatile" qualifiers

I may store ->ec in rb_mutex_t instead of ->th to support green
thread.  For now, "volatile" is useless for thread-safety
anyways and we're not dealing with *jmp or signals with mutex.
------------------------------------------------------------------------
r63281 | normal | 2018-04-28 15:00:39 +0900 (Sat, 28 Apr 2018) | 5 lines

thread_sync.c: remove unused list_heads

I forgot to clean these up in r63215

* thread_sync.c (szqueue_list, queue_list, condvar_list): remove
------------------------------------------------------------------------
r63280 | hsbt | 2018-04-28 10:47:58 +0900 (Sat, 28 Apr 2018) | 6 lines

Merge Pysch 3.0.3.pre1.

  I added the following additional commits from 3.0.3.pre1:
    * https://github.com/ruby/psych/pull/356
    * https://github.com/ruby/psych/pull/357
    * https://github.com/ruby/psych/pull/359
------------------------------------------------------------------------
r63279 | nobu | 2018-04-28 10:45:52 +0900 (Sat, 28 Apr 2018) | 7 lines

mjit_config.h: expand min header name

* Makefile.in, win32/Makefile.sub (mjit_config.h): expand min
  header name, including the version number and the suffix.

* mjit.c (init_header_filename): the version number and the suffix
  are now included in the header name.
------------------------------------------------------------------------
r63278 | kou | 2018-04-28 10:36:18 +0900 (Sat, 28 Apr 2018) | 23 lines

rexml: disable XPath 1.0 compatible "#{ELEMENT_NAME}" processing by default

It breaks backward compatibility than I thought. So it's disabled by
default. It means that REXML's XPath processor isn't compatible with
XPath 1.0. But it will be acceptable for users.

We can enable it by specifying "strict: true" to
REXML::XPathParser.new explicitly.

* lib/rexml/xpath.rb,
  lib/rexml/xpath_parser.rb: Accept "strict: true" option.

* test/rexml/test_contrib.rb,
  test/rexml/xpath/test_base.rb: Use not XPath 1.0 compatible behavior.

* test/rexml/test_jaxen.rb: Use XPath 1.0 compatible behavior.

* test/rss/test_1.0.rb,
  test/rss/test_dublincore.rb,
  spec/ruby/library/rexml/element/namespace_spec.rb,
  spec/ruby/library/rexml/element/namespaces_spec.rb,
  spec/ruby/library/rexml/element/prefixes_spec.rb: Enable again.

------------------------------------------------------------------------
r63277 | svn | 2018-04-28 05:25:50 +0900 (Sat, 28 Apr 2018) | 1 line

* 2018-04-28
------------------------------------------------------------------------
r63276 | stomar | 2018-04-28 05:25:49 +0900 (Sat, 28 Apr 2018) | 1 line

NEWS: fix typos
------------------------------------------------------------------------
r63275 | nobu | 2018-04-27 22:14:09 +0900 (Fri, 27 Apr 2018) | 1 line

iseq.c: consistent rb_bug messages
------------------------------------------------------------------------
r63274 | nobu | 2018-04-27 22:14:08 +0900 (Fri, 27 Apr 2018) | 5 lines

mjit.c: remove undef

* mjit.c (clean_so_file): removed unnecessary undef of `Sleep`
  which is redfined as rb_w32_sleep.  eventually, retry loop with
  sleep has been removed.
------------------------------------------------------------------------
r63273 | nobu | 2018-04-27 16:39:00 +0900 (Fri, 27 Apr 2018) | 7 lines

mjit.c: clean so file on Windows

* mjit.c (dlclose): use FreeLibrary to manage the reference count
  on the loaded module properly.

* mjit.c (clean_so_file): clean shared object file after unloaded,
  in-use files cannot be removed on Windows.
------------------------------------------------------------------------
r63272 | nobu | 2018-04-27 14:20:40 +0900 (Fri, 27 Apr 2018) | 6 lines

mjit.c: fix cc arguments

* mjit.c (CC_LIBS): MJIT_LIBS is used only on Windows.

* mjit.c (compile_c_to_so): moved source and shared object files
  to simplify indexes.
------------------------------------------------------------------------
r63271 | nobu | 2018-04-27 14:20:40 +0900 (Fri, 27 Apr 2018) | 4 lines

ruby.c: moved libdir

* ruby.c (ruby_init_loadpath_safe): moved libdir name inside
  LOAD_RELATIVE.
------------------------------------------------------------------------
r63270 | nobu | 2018-04-27 13:36:34 +0900 (Fri, 27 Apr 2018) | 4 lines

ruby.c: fix compilation error

* ruby.c (ruby_init_loadpath_safe): fix compilation error when
  ENABLE_MULTIARCH but not universal binary.
------------------------------------------------------------------------
r63269 | nobu | 2018-04-27 11:02:29 +0900 (Fri, 27 Apr 2018) | 7 lines

mjit.c: prefix and archdir in init

* ruby.c (ruby_init_loadpath_safe): store prefix and archlibdir
  paths.

* mjit.c (compile_c_to_so, init_header_filename): use just one
  library path on Windows.
------------------------------------------------------------------------
r63268 | nobu | 2018-04-27 10:58:29 +0900 (Fri, 27 Apr 2018) | 5 lines

rbinstall.rb: fix timing to read stub

* tool/rbinstall.rb ($script_installer.stub): read stub file on
  demand.  as `$cmdtype` is set to "exe" in parse_args, it is not
  set yet when `$script_installer` is defined.
------------------------------------------------------------------------
r63267 | tenderlove | 2018-04-27 09:13:51 +0900 (Fri, 27 Apr 2018) | 5 lines

Revert "Fix use of `rb_profile_frames` start parameter"

This reverts commit r63265.

ko1 said I should not have committed this! I'm sorry!
------------------------------------------------------------------------
r63266 | svn | 2018-04-27 07:49:01 +0900 (Fri, 27 Apr 2018) | 1 line

* 2018-04-27
------------------------------------------------------------------------
r63265 | tenderlove | 2018-04-27 07:49:00 +0900 (Fri, 27 Apr 2018) | 12 lines

Fix use of `rb_profile_frames` start parameter

rb_profile_frames was always behaving as if the value given for the
start parameter was 0.

The reason for this was that it would check if (start > 0) { then
continue without updating the control frame pointer or anything other
than decrementing start.

[ruby-core:86147] [Bug #14607]

Co-authored-by: Dylan Thacker-Smith <Dylan.Smith@shopify.com>
------------------------------------------------------------------------
r63264 | nobu | 2018-04-26 21:36:27 +0900 (Thu, 26 Apr 2018) | 5 lines

win32/Makefile.sub: LIBDIR_BASENAME

* mjit.c (init_header_filename): support LIBDIR_BASENAME.

* win32/Makefile.sub (config.h): ditto.
------------------------------------------------------------------------
r63263 | nobu | 2018-04-26 21:36:26 +0900 (Thu, 26 Apr 2018) | 1 line

ruby.c (ruby_init_loadpath_safe): constify
------------------------------------------------------------------------
r63262 | svn | 2018-04-26 09:12:36 +0900 (Thu, 26 Apr 2018) | 1 line

* 2018-04-26
------------------------------------------------------------------------
r63261 | nobu | 2018-04-26 09:12:35 +0900 (Thu, 26 Apr 2018) | 5 lines

test_numeric.rb: loose precision assertion

* test/ruby/test_numeric.rb (TestNumeric#test_step): remove a
  loose precision assertion, as Float cannot keep complete
  precision.  [ruby-core:86684] [Bug #14712]
------------------------------------------------------------------------
r63260 | kazu | 2018-04-25 23:00:47 +0900 (Wed, 25 Apr 2018) | 1 line

[DOC] Fix capitallizing [ci skip]
------------------------------------------------------------------------
r63259 | nobu | 2018-04-25 20:56:58 +0900 (Wed, 25 Apr 2018) | 5 lines

common.rb: unused constant

* lib/uri/common.rb (URI::HTML5ASCIIINCOMPAT): remove the constant
  which has been unused since r40460, and wrong since r49069 due
  to the operator precedence.  [ruby-core:86678] [Bug #14711]
------------------------------------------------------------------------
r63258 | eregon | 2018-04-25 17:16:09 +0900 (Wed, 25 Apr 2018) | 1 line

Avoid "should_not raise_error" in Thread#raise spec
------------------------------------------------------------------------
r63257 | eregon | 2018-04-25 17:15:58 +0900 (Wed, 25 Apr 2018) | 3 lines

Fix style in Thread#raise spec

* Add space after { and before }.
------------------------------------------------------------------------
r63256 | eregon | 2018-04-25 17:11:01 +0900 (Wed, 25 Apr 2018) | 3 lines

Use Thread.pass in loop{} to check interrupts more often

* The spec now runs in ~5ms vs ~100ms before.
------------------------------------------------------------------------
r63255 | nobu | 2018-04-25 15:45:05 +0900 (Wed, 25 Apr 2018) | 5 lines

compile.c: fix unconditional branch optimization

* compile.c (iseq_peephole_optimize): add dummy `putnil` after a
  `jump` replacing an unconditional branch, to adjust removed
  `dup`.  [ruby-core:86666] [Bug #14708]
------------------------------------------------------------------------
r63254 | svn | 2018-04-25 05:32:00 +0900 (Wed, 25 Apr 2018) | 1 line

* 2018-04-25
------------------------------------------------------------------------
r63253 | normal | 2018-04-25 05:31:59 +0900 (Wed, 25 Apr 2018) | 10 lines

eval.c (ruby_setup): disable THP on Linux

Transparent Huge Pages (THP) decrease the effectiveness of
CoW-friendly GC because it decreases page granularity.  That is,
a forked process dirtying one bit of CoW-shared memory can
trigger a copy of a huge page (2MB on x86-64) instead of a smaller,
standard page (4K).

* eval.c (ruby_setup): disable THP on Linux
  [ruby-core:86651] [Feature #14705]
------------------------------------------------------------------------
r63252 | nobu | 2018-04-24 21:25:46 +0900 (Tue, 24 Apr 2018) | 5 lines

string.c: fix scanned substring with `\K`

* string.c (scan_once): fix the matched substring with `\K`, the
  beginning of that string may differ from the matched position.
  [ruby-core:86663] [Bug #14707]
------------------------------------------------------------------------
r63251 | nobu | 2018-04-24 08:46:26 +0900 (Tue, 24 Apr 2018) | 4 lines

rescue Errno::EPROTOTYPE

* test/webrick/test_httpserver.rb (test_gigantic_request_header):
  Errno::EPROTOTYPE is sometimes raised on Mac OS X 10.10.
------------------------------------------------------------------------
r63250 | svn | 2018-04-24 01:20:46 +0900 (Tue, 24 Apr 2018) | 1 line

* 2018-04-24
------------------------------------------------------------------------
r63249 | k0kubun | 2018-04-24 01:20:45 +0900 (Tue, 24 Apr 2018) | 6 lines

revert r63212

except test_jit.rb.

In some situations, this generates a wrong code. I'll add a test for it
later but let me revert this to make it work for now.
------------------------------------------------------------------------
r63248 | nobu | 2018-04-23 21:51:18 +0900 (Mon, 23 Apr 2018) | 4 lines

compile.c: copy a short insn with leave

* compile.c (iseq_peephole_optimize): copy not only `leave`, with
  a non-operand instruction, which are not longer than `jump`.
------------------------------------------------------------------------
r63247 | kazu | 2018-04-23 21:09:21 +0900 (Mon, 23 Apr 2018) | 1 line

[DOC] URI::Generic#port returns Integer [ci skip]
------------------------------------------------------------------------
r63246 | nobu | 2018-04-23 18:52:23 +0900 (Mon, 23 Apr 2018) | 4 lines

compile.c: insn before pop

* compile.c (iseq_peephole_optimize): more eliminatable
  instructions before `pop` without side effects.
------------------------------------------------------------------------
r63245 | normal | 2018-04-23 14:54:06 +0900 (Mon, 23 Apr 2018) | 4 lines

test/ruby/test_io.rb: add extra Thread#join to delay close

Maybe this fixes some CI failures.  Also, use different timeouts
for each item for hopefully easier diagnosis.
------------------------------------------------------------------------
r63244 | nobu | 2018-04-23 11:07:11 +0900 (Mon, 23 Apr 2018) | 5 lines

thread_pthread.c: fallback to CLOCK_REALTIME

* thread_pthread.c (Init_native_thread): fallback to the default
  CLOCK_REALTIME when failed to set to CLOCK_MONOTONIC, e.g. on
  Solaris.  [Misc #14497]
------------------------------------------------------------------------
r63243 | normal | 2018-04-23 06:21:06 +0900 (Mon, 23 Apr 2018) | 6 lines

net/imap: set SO_KEEPALIVE on TCP sockets

Otherwise connections (commonly on IDLE, but it could be any
command) may never receive notifications of link errors.

[ruby-core:86628] [Feature #14703]
------------------------------------------------------------------------
r63242 | stomar | 2018-04-23 04:41:06 +0900 (Mon, 23 Apr 2018) | 4 lines

sprintf.c: fix typo

* sprintf.c: [DOC] fix typo.
  Patch by Lazarus Lazaridis (iridakos).  [Fix GH-1789]
------------------------------------------------------------------------
r63241 | ko1 | 2018-04-23 01:33:49 +0900 (Mon, 23 Apr 2018) | 2 lines

Same as the last commit (comment out tests for CI).

------------------------------------------------------------------------
r63240 | svn | 2018-04-23 01:03:10 +0900 (Mon, 23 Apr 2018) | 1 line

* 2018-04-23
------------------------------------------------------------------------
r63239 | ko1 | 2018-04-23 01:03:09 +0900 (Mon, 23 Apr 2018) | 9 lines

Skip some tests to make CI healthy.

r63236 (or r63237) introduces test failures and CI shows errors.
This commit makes skipping these tests.  Please revert this commit
after tests (and rubyspec) work fine.

Failure log example:
https://gist.github.com/ko1/8456cf25fe35a696bd33ac86135092e4

------------------------------------------------------------------------
r63238 | normal | 2018-04-22 21:09:07 +0900 (Sun, 22 Apr 2018) | 7 lines

thread*: all condvars are monotonic

There's no reason to use CLOCK_REALTIME for any condvars in Ruby.
Indeed, we initialized all condvars with RB_CONDATTR_CLOCK_MONOTONIC
anyway; so simplify our code and reduce ifdefs.

[ruby-core:85639] [Misc #14497]
------------------------------------------------------------------------
r63237 | kou | 2018-04-22 18:38:06 +0900 (Sun, 22 Apr 2018) | 37 lines

rexml: Fix XPath bug of //#{ELEMENT_NAME}[#{POSITION}]

The position should be counted for each nodeset but the previous
implementation counts position for union-ed nodeset.

For example, "/a/*/*[1]" should be matched to "<c1/>" and "<c2/>" with
the following XML.

    <a>
      <b>
        <c1/>
      </b>
      <b>
        <c2/>
      </b>
    </a>

But the previous implementation just returns only "<c1/>".

* lib/rexml/element.rb (REXML::Attributes#each_attribute):
  Support Enumerator for no block use.

* lib/rexml/element.rb (REXML::Attributes#each):
  Support Enumerator for no block use.

* lib/rexml/functions.rb (REXML::Functions.string):
  Support NaN again.

* lib/rexml/xpath_parser.rb: Re-implement "Step" evaluator.
  It should evaluate "AxisSpecifier", "NodeTest" and "Predicate" in one
  step to respect position for each nodeset.

* test/rexml/test_jaxen.rb: Enable more tests. Remained tests should
  be also enabled but it'll not be near future.

* test/rexml/xpath/test_base.rb: Fix expected value.

------------------------------------------------------------------------
r63236 | kou | 2018-04-22 17:09:04 +0900 (Sun, 22 Apr 2018) | 31 lines

rexml: Fix XPath bug of /#{ELEMENT_NAME}

It doesn't mean that all elements which name "ELEMENT_NAME" with any
namespace URI including null namespace URI. It means that all elements
which name "ELEMENT_NAME" with null namespace URI.

https://www.w3.org/TR/1999/REC-xpath-19991116/#NT-NodeTest

> if the QName does not have a prefix, then the namespace URI is null
> (this is the same way attribute names are expanded).

We need to use "*[local-name()='#{ELEMENT_NAME}']" for all elements
which name "ELEMENT_NAME" with any namespace URI including null
namespace URI in XPath 1.0. But it's inconvenient. So this change
includes "*:#{LOCAL_NAME}" syntax support that is introduced since
XPath 2.0.

* lib/rexml/parsers/xpathparser.rb: Support "*:#{LOCAL_NAME}" syntax that
  is introduced since XPath 2.0.

* lib/rexml/xpath_parser.rb:
  * Fix namespace URI processing for "#{ELEMENT_NAME}". Now,
    "#{ELEMENT_NAME}" doesn't accept elements with null namespace URI.
  * Add "*:#{LOCAL_NAME}" support.

* test/rexml/test_contrib.rb,
  test/rexml/test_core.rb,
  test/rexml/xpath/test_base.rb: Follow this change.

* test/rexml/test_jaxen.rb: Fix namespace processing.

------------------------------------------------------------------------
r63235 | k0kubun | 2018-04-22 13:01:23 +0900 (Sun, 22 Apr 2018) | 3 lines

mjit_compile.c: comment the intention of r63092 [ci skip]

It's for "leave" instruction.
------------------------------------------------------------------------
r63234 | nobu | 2018-04-22 09:47:56 +0900 (Sun, 22 Apr 2018) | 1 line

made *.cmd excutable
------------------------------------------------------------------------
r63233 | nobu | 2018-04-22 09:46:08 +0900 (Sun, 22 Apr 2018) | 1 line

made *.cmd excutable
------------------------------------------------------------------------
r63232 | nobu | 2018-04-22 09:02:56 +0900 (Sun, 22 Apr 2018) | 5 lines

Makefile.in: MJIT_ARCHFLAG

* Makefile.in (mjit_config.h): separate MJIT_ARCHFLAG for each
  architecture on universal binary.  cannot use precompiled-header
  with multiple -arch options.
------------------------------------------------------------------------
r63231 | normal | 2018-04-22 08:32:18 +0900 (Sun, 22 Apr 2018) | 9 lines

test/ruby/test_io.rb: try to diagnose stuck test_recycled_fd_close

I can't reproduce the problem myself, but gets loop seems ought
to give more useful information for tracking down where we're
stuck, at least.

Followup-to: r63217

cf. http://ci.rvm.jp/results/trunk-test@frontier/804284
------------------------------------------------------------------------
r63230 | nobu | 2018-04-22 08:02:21 +0900 (Sun, 22 Apr 2018) | 4 lines

mjit.c: check pch status

* mjit.c (mjit_add_iseq_to_process, mjit_get_iseq_func): check if
  pch failed before timedout.
------------------------------------------------------------------------
r63229 | svn | 2018-04-22 05:04:06 +0900 (Sun, 22 Apr 2018) | 1 line

* 2018-04-22
------------------------------------------------------------------------
r63228 | stomar | 2018-04-22 05:04:05 +0900 (Sun, 22 Apr 2018) | 16 lines

Improve docs for URI library

* lib/uri/generic.rb: [DOC] fix invalid example code to make it
  syntax highlighted; drop unnecessary `puts', `p'; adapt to current
  inspect format without Object id; do not display unnecessary return
  values in examples; fix or prevent unintended description lists;
  fix broken RDoc; fix grammar and typos.

* lib/uri.rb: ditto.
* lib/uri/common.rb: ditto.
* lib/uri/file.rb: ditto.
* lib/uri/ftp.rb: ditto.
* lib/uri/http.rb: ditto.
* lib/uri/ldap.rb: ditto.
* lib/uri/mailto.rb: ditto.
* lib/uri/rfc2396_parser.rb: ditto.
------------------------------------------------------------------------
r63227 | k0kubun | 2018-04-21 22:15:43 +0900 (Sat, 21 Apr 2018) | 5 lines

test_jit.rb: follow the change of instruction

in r63225. Not strictly needed but to avoid confusion.

The JIT compiler itself seems working fine.
------------------------------------------------------------------------
r63226 | nobu | 2018-04-21 19:52:53 +0900 (Sat, 21 Apr 2018) | 4 lines

compile.c: optimize checktype

* compile.c (optimize_checktype): optimize `checktype` instruction
  on a literal.
------------------------------------------------------------------------
r63225 | nobu | 2018-04-21 19:52:52 +0900 (Sat, 21 Apr 2018) | 4 lines

insns.def: checktype

* insns.def (checktype): split branchiftype to checktype and
  branchif, to make branch condition negation possible.
------------------------------------------------------------------------
r63224 | nobu | 2018-04-21 16:48:36 +0900 (Sat, 21 Apr 2018) | 4 lines

compile.c: renamed macro arguments

* compile.c (INSERT_BEFORE_INSN, INSERT_BEFORE_INSN1): rename
  argument `prev` as `next`.
------------------------------------------------------------------------
r63223 | kou | 2018-04-21 15:45:42 +0900 (Sat, 21 Apr 2018) | 2 lines

rexml: Enable more tests

------------------------------------------------------------------------
r63222 | kou | 2018-04-21 15:43:58 +0900 (Sat, 21 Apr 2018) | 6 lines

rexml: Fix XPath concat() implementation

* lib/rexml/functions.rb (REXML::Functions.concat): Implement.

* test/rexml/test_jaxen.rb: Enable one more test.

------------------------------------------------------------------------
r63221 | kou | 2018-04-21 15:39:43 +0900 (Sat, 21 Apr 2018) | 10 lines

rexml: Fix XPath string() implementation

* lib/rexml/functions.rb( REXML::Functions.string):
  * Support context node.
  * Fix implementation for document node to remove out of root nodes.
  * Support processing instruction node.
  * Improve implementation for integer to omit decimals.

* test/rexml/test_jaxen.rb: Enable processing instruction test.

------------------------------------------------------------------------
r63220 | kou | 2018-04-21 15:21:41 +0900 (Sat, 21 Apr 2018) | 4 lines

rexml: Make more readable

test/rexml/test_jaxen.rb: Use more meaningful name.

------------------------------------------------------------------------
r63219 | kou | 2018-04-21 15:21:02 +0900 (Sat, 21 Apr 2018) | 5 lines

rexml: Fix a test bug

test/rexml/test_jaxen.rb: Fix wrong assert_raise usage. Note that this code
isn't used yet.

------------------------------------------------------------------------
r63218 | kou | 2018-04-21 15:18:08 +0900 (Sat, 21 Apr 2018) | 4 lines

rexml: Make more readable

test/rexml/xpath/test_base.rb: Use here document for readability.

------------------------------------------------------------------------
r63217 | normal | 2018-04-21 13:02:41 +0900 (Sat, 21 Apr 2018) | 3 lines

test/ruby/test_io.rb: add closing recycled FD test

Followup-to: r63216
------------------------------------------------------------------------
r63216 | normal | 2018-04-21 12:12:36 +0900 (Sat, 21 Apr 2018) | 27 lines

io.c: do not use rb_notify_fd_close close on recycled FD

It is unsafe to release GVL and call rb_notify_fd_close after
close(2) on any given FD.  FDs (file descriptor) may be recycled
in other threads immediately after close() to point to a different
file description.  Note the distinction between "file description"
and "file descriptor".

th-1                           | th-2
-------------------------------+---------------------------------------
io_close_fptr                  |
  rb_notify_fd_close(fd)       |
  fptr_finalize_flush          |
    close(fd)                  |
  rb_thread_schedule           |
                               | fd reused (via pipe/open/socket/etc)
  rb_notify_fd_close(fd)       |
                               | sees "stream closed" exception
			       |   for DIFFERENT file description

* thread.c (rb_thread_io_blocking_region): adjust comment for list_del
* thread.c (rb_notify_fd_close): give busy list to caller
* thread.c (rb_thread_fd_close): loop on busy list
* io.c (io_close_fptr): do not call rb_thread_fd_close on invalid FD
* io.c (io_reopen): use rb_thread_fd_close

Fixes: r57422 ("io.c: close before wait")
------------------------------------------------------------------------
r63215 | normal | 2018-04-21 07:53:37 +0900 (Sat, 21 Apr 2018) | 30 lines

thread_sync: redo r62934 to use fork_gen

Instead of maintaining linked-lists to store all
rb_queue/rb_szqueue/rb_condvar structs; store only a fork_gen
serial number to simplify management of these items.

This reduces initialization costs and avoids the up-front cost
of resetting all Queue/SizedQueue/ConditionVariable objects at
fork while saving 8 bytes per-structure on 64-bit.  There are no
savings on 32-bit.

* thread.c (rb_thread_atfork_internal): remove rb_thread_sync_reset_all call
* thread_sync.c (rb_thread_sync_reset_all): remove
* thread_sync.c (queue_live): remove
* thread_sync.c (queue_free): remove
* thread_sync.c (struct rb_queue): s/live/fork_gen/
* thread_sync.c (queue_data_type): use default free
* thread_sync.c (queue_alloc): remove list_add
* thread_sync.c (queue_fork_check): new function
* thread_sync.c (queue_ptr): call queue_fork_check
* thread_sync.c (szqueue_free): remove
* thread_sync.c (szqueue_data_type): use default free
* thread_sync.c (szqueue_alloc): remove list_add
* thread_sync.c (szqueue_ptr):  check fork_gen via queue_fork_check
* thread_sync.c (struct rb_condvar): s/live/fork_gen/
* thread_sync.c (condvar_free): remove
* thread_sync.c (cv_data_type): use default free
* thread_sync.c (condvar_ptr): check fork_gen
* thread_sync.c (condvar_alloc): remove list_add
  [ruby-core:86316] [Bug #14634]
------------------------------------------------------------------------
r63214 | svn | 2018-04-21 06:38:28 +0900 (Sat, 21 Apr 2018) | 1 line

* 2018-04-21
------------------------------------------------------------------------
r63213 | normal | 2018-04-21 06:38:27 +0900 (Sat, 21 Apr 2018) | 11 lines

simplify altstack and enable reuse with thread cache

Instead of allocating and registering the altstack in different
places, do it together to reduce code and improve readability.
When thread cache is enabled, storing altstack in rb_thread_t
is wasteful and we may reuse altstack in the same pthread.

This also lets us clearly allow use of xmalloc to allow GC to
recover from ENOMEM.

[ruby-core:85621] [Feature #14487]
------------------------------------------------------------------------
r63212 | k0kubun | 2018-04-20 22:42:08 +0900 (Fri, 20 Apr 2018) | 63 lines

_mjit_compile_send.erb: inline attr_reader call

_mjit_compile_send_guard.erb: carve out the shared logic to invalidate
inlined method call

common.mk: update dependency for this change

test_jit.rb: add test for attr_reader optimization

* Benchmark

```
require 'benchmark_driver'

Benchmark.driver do |x|
  x.prelude %{
    class C
      attr_reader :a
      def initialize
        @a = 1
      end
    end

    o = C.new

    def l o
      i = 0
      while i < 1000000
        o.a
        i += 1
      end
    end
  }
  x.report 'aread', %{ l o }
  x.loop_count 1000

  x.rbenv 'before', 'before,--jit', 'after,--jit'
  x.verbose
end
```

```
before: ruby 2.6.0dev (2018-04-20 trunk 63211) [x86_64-linux]
before,--jit: ruby 2.6.0dev (2018-04-20 trunk 63211) +JIT [x86_64-linux]
after,--jit: ruby 2.6.0dev (2018-04-20 trunk 63211) +JIT [x86_64-linux]
last_commit=_mjit_compile_send.erb: inline attr_reader call
Calculating -------------------------------------
                         before  before,--jit  after,--jit
               aread     54.597       122.894      218.574 i/s -      1.000k times in 18.316102s 8.137089s 4.575106s

Comparison:
                            aread
         after,--jit:       218.6 i/s
        before,--jit:       122.9 i/s - 1.78x  slower
              before:        54.6 i/s - 4.00x  slower

```

* Optcarrot

A little made faster?

fps: 71.35 -> 72.11
------------------------------------------------------------------------
r63211 | hsbt | 2018-04-20 16:10:53 +0900 (Fri, 20 Apr 2018) | 4 lines

Update latest bundled gems:

  did_you_mean: 1.2.1
  rake: 12.3.1
------------------------------------------------------------------------
r63210 | normal | 2018-04-20 12:22:26 +0900 (Fri, 20 Apr 2018) | 20 lines

variable.c: fix thread + fork errors in autoload

This is fairly non-intrusive bugfix to prevent children
from trying to reach into thread stacks of the parent.
I will probably reuse this idea and redo r62934, too
(same bug).

* vm_core.h (typedef struct rb_vm_struct): add fork_gen counter
* thread.c (rb_thread_atfork_internal): increment fork_gen
* variable.c (struct autoload_data_i): store fork_gen
* variable.c (check_autoload_data): remove (replaced with get_...)
* variable.c (get_autoload_data): check fork_gen when retrieving
* variable.c (check_autoload_required): use get_autoload_data
* variable.c (rb_autoloading_value): ditto
* variable.c (rb_autoload_p): ditto
* variable.c (current_autoload_data): ditto
* variable.c (autoload_reset): reset fork_gen, adjust indent
* variable.c (rb_autoload_load): set fork_gen when setting state
* test/ruby/test_autoload.rb (test_autoload_fork): new test
  [ruby-core:86410] [Bug #14634]
------------------------------------------------------------------------
r63209 | nobu | 2018-04-20 09:25:30 +0900 (Fri, 20 Apr 2018) | 1 line

vm_core.h: adjust indent [ci skip]
------------------------------------------------------------------------
r63208 | nobu | 2018-04-20 09:23:01 +0900 (Fri, 20 Apr 2018) | 4 lines

range.c: step in bignum

* range.c (range_step): honor step in bignum addition.
  [Feature #12912]
------------------------------------------------------------------------
r63207 | nobu | 2018-04-20 09:10:46 +0900 (Fri, 20 Apr 2018) | 4 lines

range.c: fix fixnum loop condition

* range.c (range_step): FIXABLE + FIXABLE never overflow, but may
  not be FIXABLE.  [Feature #12912]
------------------------------------------------------------------------
r63206 | nobu | 2018-04-20 08:46:55 +0900 (Fri, 20 Apr 2018) | 3 lines

fiddle/test_import.rb: fix warnings by rubygems

[Bug #14686]
------------------------------------------------------------------------
r63205 | nobu | 2018-04-20 08:35:39 +0900 (Fri, 20 Apr 2018) | 4 lines

fiddle/import.rb: suppress warning

* ext/fiddle/lib/fiddle/import.rb: suppress exception report when
  $DEBUG is enabled.  [ruby-core:86536] [Bug #14686]
------------------------------------------------------------------------
r63204 | kou | 2018-04-20 06:34:40 +0900 (Fri, 20 Apr 2018) | 8 lines

rexml: Fix a XPath bug that white spaces aren't ignored

lib/rexml/parsers/xpathparser.rb: Ignore white spaces in relative
location path.

test/rexml/xpath/test_base.rb: Add more test patterns and use more
debug friendly assertion style.

------------------------------------------------------------------------
r63203 | kou | 2018-04-20 05:51:07 +0900 (Fri, 20 Apr 2018) | 4 lines

rexml: Fix wrong assertion

test/rexml/xpath/test_base.rb: Use constant value for the expected value.

------------------------------------------------------------------------
r63202 | kou | 2018-04-20 05:49:53 +0900 (Fri, 20 Apr 2018) | 5 lines

rexml: Use more debug friendly assertion style

test/rexml/xpath/test_base.rb: Expand loop assertion and stop to checking
just the first value.

------------------------------------------------------------------------
r63201 | kou | 2018-04-20 05:48:28 +0900 (Fri, 20 Apr 2018) | 5 lines

rexml: Use more debug friendly assertion style

test/rexml/xpath/test_base.rb: Stop to use separated assertions for
checking array value.

------------------------------------------------------------------------
r63200 | kou | 2018-04-20 05:45:16 +0900 (Fri, 20 Apr 2018) | 4 lines

rexml: Make more readable

test/rexml/xpath/test_base.rb: Use here document for XML.

------------------------------------------------------------------------
r63199 | k0kubun | 2018-04-20 01:57:59 +0900 (Fri, 20 Apr 2018) | 8 lines

_mjit_compile_send.erb: simplify control flow

to introduce additional optimization for another `cc->me->def->type`
later. I carved out the `cc->me->def->type == VM_METHOD_TYPE_ISEQ`
part because I wanted to check other types as well.

mjit_compile.c: drop get_iseq_if_available and define simplified version
of it, has_valid_method_type.
------------------------------------------------------------------------
r63198 | k0kubun | 2018-04-20 01:19:48 +0900 (Fri, 20 Apr 2018) | 9 lines

internal.h: use the same declaration as definition

range.c: cast the function type to meet the declaration

This change is for fixing build error on AppVeyor:
https://ci.appveyor.com/project/ruby/ruby/build/1.0.8177

string.c
../string.c(4330) : error C4028: formal parameter 2 different from declaration
------------------------------------------------------------------------
r63197 | mame | 2018-04-20 00:23:34 +0900 (Fri, 20 Apr 2018) | 1 line

Adds "endless range" to NEWS
------------------------------------------------------------------------
r63196 | mame | 2018-04-20 00:19:00 +0900 (Fri, 20 Apr 2018) | 3 lines

Prefer CONST_ID to static global IDs

Just refactoring.
------------------------------------------------------------------------
r63195 | mame | 2018-04-20 00:18:57 +0900 (Fri, 20 Apr 2018) | 1 line

range.c: Make Range#bsearch support endless ranges
------------------------------------------------------------------------
r63194 | mame | 2018-04-20 00:18:53 +0900 (Fri, 20 Apr 2018) | 1 line

Make Range#min, max, include?, cover?, and === to support endless range
------------------------------------------------------------------------
r63193 | svn | 2018-04-20 00:18:51 +0900 (Fri, 20 Apr 2018) | 1 line

* 2018-04-20
------------------------------------------------------------------------
r63192 | mame | 2018-04-20 00:18:50 +0900 (Fri, 20 Apr 2018) | 7 lines

Introduce endless range [Feature#12912]

Typical usages:
```
p ary[1..]          # drop the first element; identical to ary[1..-1]
(1..).each {|n|...} # iterate forever from 1; identical to 1.step{...}
```
------------------------------------------------------------------------
r63191 | naruse | 2018-04-19 16:28:40 +0900 (Thu, 19 Apr 2018) | 1 line

pack/unpack M only handles LF line breaks [Feature #14352]
------------------------------------------------------------------------
r63190 | nobu | 2018-04-19 16:05:39 +0900 (Thu, 19 Apr 2018) | 4 lines

dir.c: warning for NUL

* dir.c (rb_push_glob): warn NUL-separated glob patterns.
  [Feature #14643]
------------------------------------------------------------------------
r63189 | svn | 2018-04-19 14:55:43 +0900 (Thu, 19 Apr 2018) | 1 line

* 2018-04-19
------------------------------------------------------------------------
r63188 | nobu | 2018-04-19 14:55:42 +0900 (Thu, 19 Apr 2018) | 5 lines

Add slice method to ENV like Hash#slice

[Feature #14559]

From:    Benoit Tigeot <benoit@hopsandfork.com>
------------------------------------------------------------------------
r63187 | nobu | 2018-04-18 12:51:19 +0900 (Wed, 18 Apr 2018) | 7 lines

win32.c: fix CSI sequences to delete

* win32/win32.c (constat_apply): CSI 'J' and 'K' are defaulted to
  1, not 0.  [ruby-core:86560] [Bug #14691]

* win32/win32.c (constat_apply): "delete before cursor" sequences
  include the cursor position.
------------------------------------------------------------------------
r63186 | stomar | 2018-04-18 04:52:10 +0900 (Wed, 18 Apr 2018) | 5 lines

lib/uri/generic.rb: fix error in docs for URI::Generic#opaque

* lib/uri/generic.rb: [DOC] fix description of URI::Generic#opaque,
  and add an example. According to RFC2396, opaque path components do not
  use the slash "/" character, as opposed to hierarchical path components.
------------------------------------------------------------------------
r63185 | stomar | 2018-04-18 04:49:51 +0900 (Wed, 18 Apr 2018) | 4 lines

lib/uri/ldap.rb: fix errors in docs for URI::LDAP

* lib/uri/ldap.rb: [DOC] fix errors in example code
  for URI::LDAP.build and URI::LDAP.new.
------------------------------------------------------------------------
r63184 | stomar | 2018-04-18 04:47:57 +0900 (Wed, 18 Apr 2018) | 5 lines

lib/uri/file.rb: fix errors in docs for URI::File.build

* lib/uri/file.rb: [DOC] fix description and example for URI::File.build;
  for file URIs the path component must be absolute, escaping of
  absolute paths is only done for URI::FTP.
------------------------------------------------------------------------
r63183 | svn | 2018-04-18 04:46:26 +0900 (Wed, 18 Apr 2018) | 1 line

* 2018-04-18
------------------------------------------------------------------------
r63182 | stomar | 2018-04-18 04:46:25 +0900 (Wed, 18 Apr 2018) | 5 lines

lib/uri/file.rb: improve docs for URI::File

* lib/uri/file.rb: [DOC] fix invalid example code for URI::File.build
  to make it syntax highlighted; drop unnecessary `puts';
  fix unintended description list; fix typos.
------------------------------------------------------------------------
r63181 | mame | 2018-04-17 17:52:25 +0900 (Tue, 17 Apr 2018) | 1 line

test/ruby/test_super.rb: Remove unused assertions
------------------------------------------------------------------------
r63180 | mame | 2018-04-17 17:47:58 +0900 (Tue, 17 Apr 2018) | 1 line

The test for TracePoint with thread had never worked correctly
------------------------------------------------------------------------
r63179 | mame | 2018-04-17 17:47:56 +0900 (Tue, 17 Apr 2018) | 1 line

The test for TracePoint#raised_exception had never worked correctly
------------------------------------------------------------------------
r63178 | mame | 2018-04-17 17:47:56 +0900 (Tue, 17 Apr 2018) | 1 line

Remove the old disabled assertions for 1.8/1.9
------------------------------------------------------------------------
r63177 | mame | 2018-04-17 17:26:20 +0900 (Tue, 17 Apr 2018) | 1 line

Enable the assertions that had been disabled for historical reason
------------------------------------------------------------------------
r63176 | mame | 2018-04-17 17:26:19 +0900 (Tue, 17 Apr 2018) | 1 line

Remove the assertions that have no meaning
------------------------------------------------------------------------
r63175 | mame | 2018-04-17 17:18:58 +0900 (Tue, 17 Apr 2018) | 1 line

Remove the disabled old tests for Ruby 1.8/1.9 feature change
------------------------------------------------------------------------
r63174 | mame | 2018-04-17 17:18:57 +0900 (Tue, 17 Apr 2018) | 1 line

Use assert(false) for the path that is expected unreachable
------------------------------------------------------------------------
r63173 | mame | 2018-04-17 17:18:56 +0900 (Tue, 17 Apr 2018) | 3 lines

test/date/test_date_base.rb: removed

It depends upon calendar.so which is not bundled.
------------------------------------------------------------------------
r63172 | mame | 2018-04-17 16:03:44 +0900 (Tue, 17 Apr 2018) | 3 lines

test/csv/test_features.rb: enable accidentally-disabled assertions

CSV.new does not yield the instance.
------------------------------------------------------------------------
r63171 | mame | 2018-04-17 15:38:08 +0900 (Tue, 17 Apr 2018) | 1 line

test/zlib/test_zlib.rb (test_path): enable the accidentally-disabled assertion
------------------------------------------------------------------------
r63170 | nobu | 2018-04-17 13:12:57 +0900 (Tue, 17 Apr 2018) | 3 lines

string.c: suppress warning

* string.c (str_undump): get rid of warning C4129 by VC.
------------------------------------------------------------------------
r63169 | svn | 2018-04-17 10:22:27 +0900 (Tue, 17 Apr 2018) | 1 line

* 2018-04-17
------------------------------------------------------------------------
r63168 | nobu | 2018-04-17 10:22:26 +0900 (Tue, 17 Apr 2018) | 6 lines

parse.y: fix cmdarg in command_args

* parse.y (call_args): fix invalid CMDARG state after command_args
  followed by tLBRACE_ARG.  [ruby-core:86551] [Bug #14690]

From: Ilya Bylich <ibylich@gmail.com>
------------------------------------------------------------------------
r63167 | nobu | 2018-04-16 21:46:08 +0900 (Mon, 16 Apr 2018) | 4 lines

compile.c: align range

* compile.c (ibf_dump_object_struct): align range elements.
  [ruby-core:86548] [Bug #14689]
------------------------------------------------------------------------
r63166 | k0kubun | 2018-04-16 19:20:15 +0900 (Mon, 16 Apr 2018) | 8 lines

[DOC] Fix links of cve [ci skip]

`http://www.cve.mitre.org/` seem to move `http://cve.mitre.org/`.
I can't access `http://www.cve.mitre.org/`.

[Fix GH-1857]

From: willnet <netwillnet@gmail.com>
------------------------------------------------------------------------
r63165 | nobu | 2018-04-16 17:54:03 +0900 (Mon, 16 Apr 2018) | 4 lines

parse.y: `else` indent

* parse.y (keyword_else): warn less-indented `else` than `case`.
  [ruby-core:86492] [Bug #14674]
------------------------------------------------------------------------
r63164 | nobu | 2018-04-16 16:12:06 +0900 (Mon, 16 Apr 2018) | 4 lines

string.c: fix dumped suffix

* string.c (rb_str_dump): get rid of an error on evaling with
  frozen-string-literal enabled.  [ruby-core:86539] [Bug #14687]
------------------------------------------------------------------------
r63163 | svn | 2018-04-16 15:37:43 +0900 (Mon, 16 Apr 2018) | 1 line

* 2018-04-16
------------------------------------------------------------------------
r63162 | nobu | 2018-04-16 15:37:42 +0900 (Mon, 16 Apr 2018) | 5 lines

string.c: fix checking order

* string.c (str_undump): check for suffix before if Unicode escape
  conflicts with it.  the message "but used force_encoding" sounds
  strange when it is not used.
------------------------------------------------------------------------
r63161 | stomar | 2018-04-15 01:51:34 +0900 (Sun, 15 Apr 2018) | 1 line

thread_sync.c: [DOC] fix typo
------------------------------------------------------------------------
r63160 | stomar | 2018-04-15 01:50:42 +0900 (Sun, 15 Apr 2018) | 1 line

string.c: [DOC] fix typo
------------------------------------------------------------------------
r63159 | stomar | 2018-04-15 01:50:06 +0900 (Sun, 15 Apr 2018) | 1 line

gc.c: [DOC] fix typo
------------------------------------------------------------------------
r63158 | stomar | 2018-04-15 01:49:27 +0900 (Sun, 15 Apr 2018) | 1 line

process.c: [DOC] fix grammar
------------------------------------------------------------------------
r63157 | stomar | 2018-04-15 01:48:40 +0900 (Sun, 15 Apr 2018) | 1 line

man/ruby.1: [DOC] fix grammar
------------------------------------------------------------------------
r63156 | stomar | 2018-04-15 01:47:59 +0900 (Sun, 15 Apr 2018) | 1 line

lib/fileutils.rb: [DOC] fix typos and grammar
------------------------------------------------------------------------
r63155 | stomar | 2018-04-15 01:46:58 +0900 (Sun, 15 Apr 2018) | 1 line

error.c: [DOC] minor fixes
------------------------------------------------------------------------
r63154 | stomar | 2018-04-15 01:45:46 +0900 (Sun, 15 Apr 2018) | 4 lines

random.c: improve docs for Random.bytes

* random.c: [DOC] improve language and RDoc markup in Random.bytes docs;
  also adjust call-seq style of Random.bytes and Random#bytes.
------------------------------------------------------------------------
r63153 | svn | 2018-04-15 01:43:43 +0900 (Sun, 15 Apr 2018) | 1 line

* 2018-04-15
------------------------------------------------------------------------
r63152 | stomar | 2018-04-15 01:43:42 +0900 (Sun, 15 Apr 2018) | 4 lines

complex.c: improve docs for Complex#{finite?,infinite?}

* complex.c: [DOC] correct term "real value" to "real part", and same
  for imaginary part, in documentation for Complex#{finite?,infinite?}.
------------------------------------------------------------------------
r63151 | naruse | 2018-04-14 23:05:38 +0900 (Sat, 14 Apr 2018) | 4 lines

Extend timeout

On armv7 environment, the timeout is too short
http://rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20180319T191706Z.diff.html.gz
------------------------------------------------------------------------
r63150 | nobu | 2018-04-14 22:05:52 +0900 (Sat, 14 Apr 2018) | 7 lines

irb.rb: restore the last error

* lib/irb.rb (eval_input): restore the last error `$!`, as the
  previous result.  [Feature #14684]

* lib/irb/context.rb (evaluate): add `exception` keyword argument
  to set the last error.
------------------------------------------------------------------------
r63149 | nobu | 2018-04-14 21:49:30 +0900 (Sat, 14 Apr 2018) | 1 line

irb/{context,workspace}.rb: use local_variable_set
------------------------------------------------------------------------
r63148 | nobu | 2018-04-14 21:36:05 +0900 (Sat, 14 Apr 2018) | 1 line

irb/context.rb: using input-method
------------------------------------------------------------------------
r63147 | tenderlove | 2018-04-14 06:36:51 +0900 (Sat, 14 Apr 2018) | 10 lines

Add write barrier calls for direct marking objects.

This commit adds write barriers for objects marked from `rb_iseq_mark`.
r62851 introduced direct marking from iseqs to:

* keyword arg default values
* catch table iseqs
* VALUEs embedded in encoded instructions

This patch adds missing write barrier calls to those references.
------------------------------------------------------------------------
r63146 | nobu | 2018-04-14 03:11:22 +0900 (Sat, 14 Apr 2018) | 4 lines

irb.rb: backtrace order

* lib/irb.rb (handle_exception): show backtrace from the topmost
  if stdout is not a tty.
------------------------------------------------------------------------
r63145 | svn | 2018-04-14 03:06:36 +0900 (Sat, 14 Apr 2018) | 1 line

* 2018-04-14
------------------------------------------------------------------------
r63144 | nobu | 2018-04-14 03:06:35 +0900 (Sat, 14 Apr 2018) | 1 line

irb.rb: hoist out handle_exception
------------------------------------------------------------------------
r63143 | nobu | 2018-04-13 15:26:30 +0900 (Fri, 13 Apr 2018) | 4 lines

file.c: chardev is loadable

* file.c (ruby_is_fd_loadable): allow character devices to load,
  e.g., `ruby /dev/null` exits successfully.
------------------------------------------------------------------------
r63142 | svn | 2018-04-13 07:13:10 +0900 (Fri, 13 Apr 2018) | 1 line

* 2018-04-13
------------------------------------------------------------------------
r63141 | nobu | 2018-04-13 07:13:09 +0900 (Fri, 13 Apr 2018) | 4 lines

parse.y: `when` indent

* parse.y (k_when): warn less-indented `when` than `case`.
  [ruby-core:86492] [Bug #14674]
------------------------------------------------------------------------
r63140 | svn | 2018-04-12 23:24:07 +0900 (Thu, 12 Apr 2018) | 1 line

* properties.
------------------------------------------------------------------------
r63139 | kazu | 2018-04-12 23:24:06 +0900 (Thu, 12 Apr 2018) | 3 lines

[DOC] Add win32/README.win32 to .document

see https://github.com/ruby/docs.ruby-lang.org/issues/56
------------------------------------------------------------------------
r63138 | nobu | 2018-04-12 21:01:51 +0900 (Thu, 12 Apr 2018) | 1 line

assert indents of `case` and `end`
------------------------------------------------------------------------
r63137 | nobu | 2018-04-12 18:34:54 +0900 (Thu, 12 Apr 2018) | 4 lines

error.c: fix for DRb

* error.c (name_err_init_attr): hide the receiver object from
  Marshal, as DRb depends on it.
------------------------------------------------------------------------
r63136 | nobu | 2018-04-12 12:48:48 +0900 (Thu, 12 Apr 2018) | 12 lines

error.c: super in method_missing

* error.c (nometh_err_initialize): do not shirtcut rb_call_super,
  to push proper control frame.  [ruby-dev:50522] [Bug #14670]

* error.c (rb_nomethod_err_new): allocate and initialize a new
  NoMethodError instance.

* vm_eval.c (rb_make_no_method_exception): create a new exception
  instance directly without method calls, to prevent influence of
  ruby level method definitions, which can cause an unpredictable
  behavior, e.g., infinite recursion.
------------------------------------------------------------------------
r63135 | svn | 2018-04-12 12:40:17 +0900 (Thu, 12 Apr 2018) | 1 line

* 2018-04-12
------------------------------------------------------------------------
r63134 | nobu | 2018-04-12 12:40:16 +0900 (Thu, 12 Apr 2018) | 5 lines

marshaltestlib.rb: use clean object for exception

* test/ruby/marshaltestlib.rb (test_exception): use separate
  clean object to raise an exception.  TestCase instance often has
  modules included.
------------------------------------------------------------------------
r63133 | nobu | 2018-04-11 17:03:43 +0900 (Wed, 11 Apr 2018) | 6 lines

eval_error.c: fix loop on exception in message

* error.c (rb_get_message): accessor to the message.

* eval_error.c (rb_ec_error_print): handle exceptions on fetching
  the message.  [Bug #14566]
------------------------------------------------------------------------
r63132 | svn | 2018-04-11 00:29:17 +0900 (Wed, 11 Apr 2018) | 1 line

* 2018-04-11
------------------------------------------------------------------------
r63131 | kazu | 2018-04-11 00:29:16 +0900 (Wed, 11 Apr 2018) | 3 lines

Try to fix some broken links

see https://github.com/ruby/docs.ruby-lang.org/issues/56
------------------------------------------------------------------------
r63130 | nobu | 2018-04-10 09:41:47 +0900 (Tue, 10 Apr 2018) | 7 lines

symbol.c: non-ASCII constant names

* symbol.c (rb_sym_constant_char_p): support for non-ASCII
  constant names.  [Feature #13770]

* object.c (rb_mod_const_get, rb_mod_const_defined): support for
  non-ASCII constant names.
------------------------------------------------------------------------
r63129 | svn | 2018-04-10 01:00:50 +0900 (Tue, 10 Apr 2018) | 1 line

* 2018-04-10
------------------------------------------------------------------------
r63128 | kou | 2018-04-10 01:00:49 +0900 (Tue, 10 Apr 2018) | 7 lines

rexml: Fix a XPath bug of -

[Bug #14600]

* lib/rexml/parsers/xpathparser.rb: Fix a bug that "N-M" requires a space
  before "-".

------------------------------------------------------------------------
r63127 | nobu | 2018-04-09 21:39:59 +0900 (Mon, 09 Apr 2018) | 6 lines

parse.y: [DOC] Ripper.dedent_string is internal

* parse.y (parser_dedent_string): stated that Ripper.dedent_string
  is for internal use only.

[ci skip]
------------------------------------------------------------------------
r63126 | nobu | 2018-04-09 20:09:30 +0900 (Mon, 09 Apr 2018) | 4 lines

parse.y: extra error message after no digits

* parse.y (no_digits): return tINTEGER instead of unexpected
  end-of-input, to get rid of extra error messages.
------------------------------------------------------------------------
r63125 | nobu | 2018-04-09 18:59:36 +0900 (Mon, 09 Apr 2018) | 1 line

test_literal.rb: use assert_syntax_error
------------------------------------------------------------------------
r63124 | shyouhei | 2018-04-09 12:24:21 +0900 (Mon, 09 Apr 2018) | 5 lines

offsetof(type, foo.bar) is (arguably) a GCCism

clang -Wextended-offsetof warns this line.
CF: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2031.htm

------------------------------------------------------------------------
r63123 | shyouhei | 2018-04-09 11:40:12 +0900 (Mon, 09 Apr 2018) | 4 lines

Prefer alignof() over _Alignof()

to allow C++ programs include <ruby.h>. [Bug #14668]

------------------------------------------------------------------------
r63122 | svn | 2018-04-09 04:39:39 +0900 (Mon, 09 Apr 2018) | 1 line

* 2018-04-09
------------------------------------------------------------------------
r63121 | stomar | 2018-04-09 04:39:38 +0900 (Mon, 09 Apr 2018) | 4 lines

parse.y: fix docs for Ripper.dedent_string

* parse.y: [DOC] fix return type in call-seq of Ripper.dedent_string,
  clarify the method's behavior.
------------------------------------------------------------------------
r63120 | nobu | 2018-04-08 20:17:45 +0900 (Sun, 08 Apr 2018) | 1 line

compile.c: disable debug prints on sparc
------------------------------------------------------------------------
r63119 | nobu | 2018-04-08 20:12:17 +0900 (Sun, 08 Apr 2018) | 1 line

compile.c: fix an exception argument
------------------------------------------------------------------------
r63118 | nobu | 2018-04-08 17:28:40 +0900 (Sun, 08 Apr 2018) | 1 line

compile.c: suppress warnings
------------------------------------------------------------------------
r63117 | nobu | 2018-04-08 17:20:11 +0900 (Sun, 08 Apr 2018) | 1 line

compile.c: align ibf_object_header
------------------------------------------------------------------------
r63116 | nobu | 2018-04-08 16:42:23 +0900 (Sun, 08 Apr 2018) | 1 line

compile.c: debug prints in ibf_load_object
------------------------------------------------------------------------
r63115 | kazu | 2018-04-08 16:31:46 +0900 (Sun, 08 Apr 2018) | 7 lines

[DOC] `*` in glob matches `\n` too [ci skip]

```
File.fnmatch("a*b", "a\nb") # => true
/\Aa.*b\z/x.match?("a\nb")  # => false
/\Aa.*b\z/mx.match?("a\nb") # => true
```
------------------------------------------------------------------------
r63114 | svn | 2018-04-08 14:22:50 +0900 (Sun, 08 Apr 2018) | 1 line

* 2018-04-08
------------------------------------------------------------------------
r63113 | nobu | 2018-04-08 14:22:49 +0900 (Sun, 08 Apr 2018) | 1 line

compile.c: align IBF dumped data
------------------------------------------------------------------------
r63112 | nobu | 2018-04-07 22:03:35 +0900 (Sat, 07 Apr 2018) | 7 lines

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>
------------------------------------------------------------------------
r63111 | nobu | 2018-04-07 18:44:30 +0900 (Sat, 07 Apr 2018) | 4 lines

compile.c: refine debug prints

* compile.c (ibf_load_iseq_complete): use alternate hexadecimal
  form for offset.
------------------------------------------------------------------------
r63110 | nobu | 2018-04-07 12:48:45 +0900 (Sat, 07 Apr 2018) | 1 line

test/ruby/test_iseq.rb: hexdump to diff
------------------------------------------------------------------------
r63109 | nobu | 2018-04-07 12:48:44 +0900 (Sat, 07 Apr 2018) | 6 lines

Use assert_include

For better failure message:

- by assert_operator: Expected "X" to be include? "Y"
- by assert_include: Expected "X" to include "Y"
------------------------------------------------------------------------
r63108 | stomar | 2018-04-07 05:50:28 +0900 (Sat, 07 Apr 2018) | 1 line

tool/ruby_vm/scripts/insns2vm.rb: fix typo in r62064
------------------------------------------------------------------------
r63107 | svn | 2018-04-07 00:06:53 +0900 (Sat, 07 Apr 2018) | 1 line

* 2018-04-07
------------------------------------------------------------------------
r63106 | kazu | 2018-04-07 00:06:52 +0900 (Sat, 07 Apr 2018) | 1 line

Use assert_operator instead of assert
------------------------------------------------------------------------
r63105 | svn | 2018-04-06 22:25:12 +0900 (Fri, 06 Apr 2018) | 1 line

* 2018-04-06
------------------------------------------------------------------------
r63104 | nobu | 2018-04-06 22:25:11 +0900 (Fri, 06 Apr 2018) | 1 line

symbol.h: remove stale symbol deleted at r47913
------------------------------------------------------------------------
r63103 | nobu | 2018-04-05 22:13:00 +0900 (Thu, 05 Apr 2018) | 4 lines

compile.c: fix positions encode

* compile.c (ibf_load_iseq_each): iseq_size necessary to encode
  positions is set in ibf_load_code().  [Bug #14660]
------------------------------------------------------------------------
r63102 | nobu | 2018-04-05 21:46:46 +0900 (Thu, 05 Apr 2018) | 4 lines

compile.c: do not dump pointers

* compile.c (ibf_dump_iseq_each): ensure succ_index_table pointer
  field to be 0.
------------------------------------------------------------------------
r63101 | nobu | 2018-04-05 21:03:36 +0900 (Thu, 05 Apr 2018) | 4 lines

compile.c: clear padding

* compile.c (IBF_ZERO): clear padding of struct not to include
  garbages in dumped binary data.
------------------------------------------------------------------------
r63100 | mame | 2018-04-05 18:48:16 +0900 (Thu, 05 Apr 2018) | 4 lines

lib/rubygems/test_case.rb: take over @gem_prelude_index

Gem::TestCase normalizes each path in $LOAD_PATH, which deleted the flag
of @gem_prelude_index.
------------------------------------------------------------------------
r63099 | nobu | 2018-04-05 16:04:39 +0900 (Thu, 05 Apr 2018) | 5 lines

compile.c: do not dump pointers

* compile.c (ibf_dump_iseq_each): do not dump succ_index_table
  pointer.  positions are dumped as integer arrays.  pointer
  values are meaningless outside the process.
------------------------------------------------------------------------
r63098 | nobu | 2018-04-05 16:00:08 +0900 (Thu, 05 Apr 2018) | 4 lines

compile.c: zero fill

* compile.c (ibf_dump_align): fill padding with zero, instead of
  resizing only, not to leave garbages.
------------------------------------------------------------------------
r63097 | mame | 2018-04-05 10:05:16 +0900 (Thu, 05 Apr 2018) | 1 line

`make test-all COVERAGE=true` supports directory-separated build
------------------------------------------------------------------------
r63096 | usa | 2018-04-05 00:44:56 +0900 (Thu, 05 Apr 2018) | 4 lines

* test/test_tempfile.rb (test_{new,create}_traversal_dir): should not assume `t`
  is always set.  if `t` is nil, `NoMethodError` will be raised and the real
  cause will be hidden.

------------------------------------------------------------------------
r63095 | svn | 2018-04-05 00:26:12 +0900 (Thu, 05 Apr 2018) | 1 line

* 2018-04-05
------------------------------------------------------------------------
r63094 | mame | 2018-04-05 00:26:11 +0900 (Thu, 05 Apr 2018) | 3 lines

test/test_tempfile.rb: close a file object created by Tempfile.create

To stop a "Leaked file descriptor" warning.
------------------------------------------------------------------------
r63093 | mame | 2018-04-04 23:02:59 +0900 (Wed, 04 Apr 2018) | 4 lines

bignum.c: Bignum#fdiv avoids double division when divisor is bignum

`Rational(int, bignum).to_f` sometimes returned a wrong result because
`Bignum#div` casted its divisor to double.  [Bug #14637] [ruby-core:86330]
------------------------------------------------------------------------
r63092 | k0kubun | 2018-04-04 22:17:01 +0900 (Wed, 04 Apr 2018) | 17 lines

mjit_compile.c: disable stack consistency check

This should be basically safe because VM already does this check.
I don't think JIT-ed code, which should be specially optimized, should
still do this.

* Benchmark

Calculating -------------------------------------
                         before  before,--jit  after,--jit
           optcarrot     53.851        68.050       71.641 fps

Comparison:
                        optcarrot
         after,--jit:        71.6 fps
        before,--jit:        68.1 fps - 1.05x  slower
              before:        53.9 fps - 1.33x  slower
------------------------------------------------------------------------
r63091 | nobu | 2018-04-04 20:00:39 +0900 (Wed, 04 Apr 2018) | 3 lines

iseq.c: indent iseq dump

* iseq.c (rb_iseq_disasm): indent catch_table iseq entries.
------------------------------------------------------------------------
r63090 | ko1 | 2018-04-04 17:19:28 +0900 (Wed, 04 Apr 2018) | 11 lines

refactoring r63073.

* cont.c (root_fiber_alloc): call `ConvertThreadToFiber()` here.

  `rb_fiber_t` for root_fiber is allocated before running Threads.
  Fiber objects wrapping this rb_fiber_t for root_fiber are created
  when root Fiber object is required explicitly (for example, Fiber
  switching and so on). We can put calling `ConvertThreadToFiber()`.
  In other words, we can pending `ConvertThreadToFiber()`
  until Fiber objects are created.

------------------------------------------------------------------------
r63089 | yui-knk | 2018-04-04 16:46:06 +0900 (Wed, 04 Apr 2018) | 3 lines

gc.c: Fix a typo

Pointed by hkdnet <satoko.itse@gmail.com>
------------------------------------------------------------------------
r63088 | kou | 2018-04-04 15:53:57 +0900 (Wed, 04 Apr 2018) | 9 lines

rexml: Fix a XPath bug of /child::node()
    
[Bug #14600]
    
* lib/rexml/xpath_parser.rb: Fix a bug that "/child::node()" returns
  XML declaration and text nodes out of root element.

* test/rexml/test_jaxen.rb: Enable more tests.

------------------------------------------------------------------------
r63087 | kou | 2018-04-04 15:51:07 +0900 (Wed, 04 Apr 2018) | 2 lines

rexml: Add codes for debugging XPath logic

------------------------------------------------------------------------
r63086 | kou | 2018-04-04 15:36:06 +0900 (Wed, 04 Apr 2018) | 7 lines

rexml: Fix a XPath bug of function()/path
    
[Bug #14600]
    
* lib/rexml/functions.rb: Fix a bug that "function()/path" always returns
  nothing.

------------------------------------------------------------------------
r63085 | ko1 | 2018-04-04 14:00:52 +0900 (Wed, 04 Apr 2018) | 5 lines

use Queue for inter-thread synchronization.

* test/ruby/test_bignum.rb (test_interrupt_during_to_s): should not use
  "while" synchronization, but should use Queue.

------------------------------------------------------------------------
r63084 | nobu | 2018-04-04 13:28:47 +0900 (Wed, 04 Apr 2018) | 1 line

iseq.c: strip trailing spaces in dump
------------------------------------------------------------------------
r63083 | kou | 2018-04-04 12:27:20 +0900 (Wed, 04 Apr 2018) | 9 lines

rexml: Fix a XPath bug of @attribute/parent

[Bug #14600]
    
* lib/rexml/functions.rb: Fix a bug that "@attribute/parent" doesn't
  return element of its attribute.

* test/rexml/test_jaxen.rb: Enable more tests.

------------------------------------------------------------------------
r63082 | kou | 2018-04-04 12:26:01 +0900 (Wed, 04 Apr 2018) | 7 lines

rexml: Fix a  XPath bug of $variable

[Bug #14600]
    
* lib/rexml/functions.rb: Fix a bug that "$variable" returns
  node instead of ndoe set.

------------------------------------------------------------------------
r63081 | nobu | 2018-04-04 01:54:27 +0900 (Wed, 04 Apr 2018) | 5 lines

test_fiber.rb: fix test_create_fiber_in_new_thread

* test/ruby/test_fiber.rb (test_create_fiber_in_new_thread):
  prefix to run, and get the result value not only waiting.
  [Bug #14642]
------------------------------------------------------------------------
r63080 | nobu | 2018-04-04 01:50:17 +0900 (Wed, 04 Apr 2018) | 6 lines

Fix typo

[Bug #14642]
[Fix GH-1855]

From: MSP-Greg <MSP-Greg@users.noreply.github.com>
------------------------------------------------------------------------
r63079 | kou | 2018-04-04 00:51:08 +0900 (Wed, 04 Apr 2018) | 9 lines

rexml: Fix a XPath bug of name(node-set)

[Bug #14600]
    
* lib/rexml/functions.rb: Fix a bug that "name(node-set)" returns
  element instead of element name.
  
* test/rexml/test_jaxen.rb: Enable more tests.

------------------------------------------------------------------------
r63078 | svn | 2018-04-04 00:42:01 +0900 (Wed, 04 Apr 2018) | 1 line

* 2018-04-04
------------------------------------------------------------------------
r63077 | k0kubun | 2018-04-04 00:42:00 +0900 (Wed, 04 Apr 2018) | 10 lines

mjit.c: add class serial of singleton class

for toplevel self.

Toplevel self's class is not `Object` but `#<Class:Object>`.
This commit allows to inline method call setup for toplevel methods.
I've thought r63053 works but it doesn't...

I actually want to add all singleton classes but I'm not sure what's the
good way for it. I assumed that using ObjectSpace.each_object is suboptimal.
------------------------------------------------------------------------
r63076 | nobu | 2018-04-03 20:27:00 +0900 (Tue, 03 Apr 2018) | 1 line

adjust indent [ci skip]
------------------------------------------------------------------------
r63075 | nobu | 2018-04-03 19:50:47 +0900 (Tue, 03 Apr 2018) | 1 line

Reproducible test for [Feature#14370] @ [Bug #14660]
------------------------------------------------------------------------
r63074 | ko1 | 2018-04-03 19:22:45 +0900 (Tue, 03 Apr 2018) | 2 lines

repatch r62966 and r62969.

------------------------------------------------------------------------
r63073 | ko1 | 2018-04-03 19:21:47 +0900 (Tue, 03 Apr 2018) | 21 lines

Fix Fiber with Thread issue on Windows [Bug #14642]

* cont.c (rb_threadptr_root_fiber_setup): divide into two functions:
  * rb_threadptr_root_fiber_setup_by_parent(): called by the parent thread.
  * rb_threadptr_root_fiber_setup_by_child(): called by the created thread.

  `rb_threadptr_root_fiber_setup()` is called by the parent thread and
  set fib->fib_handle by ConvertThreadToFiber() on the parent thread on
  Windows enveironment.
  This means that root_fib->fib_handle of child thread is initialized
  with parent thread's Fiber handle. Furthermore, second call of
  `ConvertThreadToFiber()` for the same thread fails.

  This patch solves this weird situateion. However, maybe we can make more
  clean code.

* thread.c (thread_start_func_2): call
  `rb_threadptr_root_fiber_setup_by_child()` at thread initialize routine.

* vm.c (th_init): call `rb_threadptr_root_fiber_setup_by_parent()`.

------------------------------------------------------------------------
r63072 | nobu | 2018-04-03 17:29:51 +0900 (Tue, 03 Apr 2018) | 1 line

Honor --silent option
------------------------------------------------------------------------
r63071 | nobu | 2018-04-03 17:29:50 +0900 (Tue, 03 Apr 2018) | 1 line

Fixed unmatched quotes and brackets
------------------------------------------------------------------------
r63070 | nobu | 2018-04-03 17:10:32 +0900 (Tue, 03 Apr 2018) | 1 line

adjust indent [ci skip]
------------------------------------------------------------------------
r63069 | naruse | 2018-04-03 16:54:18 +0900 (Tue, 03 Apr 2018) | 3 lines

Revert r62966 and r62969

It breaks mswin's test-all
------------------------------------------------------------------------
r63068 | nobu | 2018-04-03 15:57:44 +0900 (Tue, 03 Apr 2018) | 5 lines

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]
------------------------------------------------------------------------
r63067 | nobu | 2018-04-03 15:57:43 +0900 (Tue, 03 Apr 2018) | 6 lines

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>
------------------------------------------------------------------------
r63066 | nobu | 2018-04-03 15:25:10 +0900 (Tue, 03 Apr 2018) | 1 line

removed never used variable
------------------------------------------------------------------------
r63065 | svn | 2018-04-03 14:56:17 +0900 (Tue, 03 Apr 2018) | 1 line

* 2018-04-03
------------------------------------------------------------------------
r63064 | hsbt | 2018-04-03 14:56:16 +0900 (Tue, 03 Apr 2018) | 1 line

Support upstream directory structure for ruby/csv.
------------------------------------------------------------------------
r63063 | nobu | 2018-04-02 21:39:01 +0900 (Mon, 02 Apr 2018) | 3 lines

Win32API.rb: use uplevel option to warn

Also warns always regardless $VERBOSE.
------------------------------------------------------------------------
r63062 | nobu | 2018-04-02 20:39:10 +0900 (Mon, 02 Apr 2018) | 5 lines

error.c: prepend "warning: " always

* error.c (rb_warn_m): prepend the string "warning: " if uplevel
  keyword is given, even if caller file and line information are
  not available.
------------------------------------------------------------------------
r63061 | nobu | 2018-04-02 13:44:35 +0900 (Mon, 02 Apr 2018) | 4 lines

Improve mkmf error message

* lib/mkmf.rb: Improve the error message when ruby.h is missing,
  to suggest installing separate packages.  [Feature #14656]
------------------------------------------------------------------------
r63060 | nobu | 2018-04-02 13:20:07 +0900 (Mon, 02 Apr 2018) | 5 lines

Keep feature names loaded in the block

* lib/rubygems/test_case.rb (Gem::TestCase#save_loaded_features):
  keep feature names for rubygem libraries loaded in the block.
  c.f. rubygems/rubygems#2261
------------------------------------------------------------------------
r63059 | nobu | 2018-04-02 12:30:30 +0900 (Mon, 02 Apr 2018) | 6 lines

Fix typo on URI.hierarchical? [ci skip]

* lib/uri/generic.rb (hierarchical?): [DOC] Fix typo in the
  description.  [Fix GH-1851]

From: Harry Llewelyn <advocation@gmail.com>
------------------------------------------------------------------------
r63058 | svn | 2018-04-02 01:17:53 +0900 (Mon, 02 Apr 2018) | 1 line

* 2018-04-02
------------------------------------------------------------------------
r63057 | kou | 2018-04-02 01:17:52 +0900 (Mon, 02 Apr 2018) | 10 lines

Start re-enabling Jaxen tests

[Bug #14600]
Reported by MSP-Greg. Thanks!!!

* lib/rexml/xpath_parser.rb: Fix a bug that "following_siblings::*[N]"
  doesn't work.

* test/rexml/test_jaxen.rb: Enable only axis test for now.

------------------------------------------------------------------------
r63056 | nobu | 2018-04-01 22:16:14 +0900 (Sun, 01 Apr 2018) | 5 lines

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]
------------------------------------------------------------------------
r63055 | nobu | 2018-04-01 22:02:11 +0900 (Sun, 01 Apr 2018) | 5 lines

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]
------------------------------------------------------------------------
r63054 | nobu | 2018-04-01 11:00:36 +0900 (Sun, 01 Apr 2018) | 5 lines

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]
------------------------------------------------------------------------
r63053 | k0kubun | 2018-04-01 10:41:55 +0900 (Sun, 01 Apr 2018) | 4 lines

mjit.c: make Object's class serial valid in JIT

Without this change, we couldn't inline method call setup for methods
which are defined in the top level.
------------------------------------------------------------------------
r63052 | svn | 2018-04-01 00:48:59 +0900 (Sun, 01 Apr 2018) | 1 line

* 2018-04-01
------------------------------------------------------------------------
r63051 | nobu | 2018-04-01 00:48:59 +0900 (Sun, 01 Apr 2018) | 3 lines

compile.c: compile_evstr

* compile.c (compile_evstr): extract from iseq_compile_each.
------------------------------------------------------------------------
r63050 | nobu | 2018-04-01 00:48:57 +0900 (Sun, 01 Apr 2018) | 4 lines

compile.c: end_label

* compile.c (compile_if): branch to end_label is not used if
  else_seq is not used.
------------------------------------------------------------------------
r63048 | naruse | 2018-03-31 22:48:32 +0900 (Sat, 31 Mar 2018) | 1 line

Resurvey performance of RDoc by frozen_string_literal: true [Bug #14654]
------------------------------------------------------------------------
r63047 | nobu | 2018-03-31 20:11:31 +0900 (Sat, 31 Mar 2018) | 1 line

use requrie_relative
------------------------------------------------------------------------
r63046 | nobu | 2018-03-31 19:34:16 +0900 (Sat, 31 Mar 2018) | 5 lines

use require_relative

* spec/ruby/core/file/ftype_spec.rb: use require_relative which
  resolves symbolic links consistently to git rid of constant
  re-definition warnings.
------------------------------------------------------------------------
r63045 | nobu | 2018-03-31 15:05:04 +0900 (Sat, 31 Mar 2018) | 6 lines

file_types.rb: use the current terminal device

* spec/ruby/core/file/fixtures/file_types.rb (configure_types):
  try the current standard input terminal device first to get rid
  of a race condition.  other terminal devices may be used by
  other processes and disposed during the test.
------------------------------------------------------------------------
r63044 | kazu | 2018-03-31 11:29:19 +0900 (Sat, 31 Mar 2018) | 1 line

test/lib/leakchecker.rb: Add check_verbose
------------------------------------------------------------------------
r63043 | svn | 2018-03-31 00:08:53 +0900 (Sat, 31 Mar 2018) | 1 line

* 2018-03-31
------------------------------------------------------------------------
r63042 | k0kubun | 2018-03-31 00:08:52 +0900 (Sat, 31 Mar 2018) | 3 lines

test_jit.rb: loosen CC check condition

see also: r63037. Probably it was not enough.
------------------------------------------------------------------------
r63041 | nobu | 2018-03-30 22:48:16 +0900 (Fri, 30 Mar 2018) | 4 lines

dir.c: Dir.glob example

* dir.c (dir_s_glob): [DOC] added an example of Dir.glob using
  pattern list.  [ci skip]
------------------------------------------------------------------------
r63040 | nobu | 2018-03-30 14:15:07 +0900 (Fri, 30 Mar 2018) | 5 lines

compile.c: do not dump unused callinfos

* compile.c (compile_if): rewind callinfo indexes used in
  unreachable paths, to get rid of dumping unused callinfos.
  [ruby-core:86399] [Bug #14553]
------------------------------------------------------------------------
r63039 | svn | 2018-03-30 11:52:13 +0900 (Fri, 30 Mar 2018) | 1 line

* 2018-03-30
------------------------------------------------------------------------
r63038 | nobu | 2018-03-30 11:52:12 +0900 (Fri, 30 Mar 2018) | 5 lines

ruby.1: [DOC] options to exit [ci skip]

* man/ruby.1: `--copyright` and `--version` quit immediately, and
  also `--verbose` if no scripts are given.
  [ruby-core:86391] [Bug #14633]
------------------------------------------------------------------------
r63037 | k0kubun | 2018-03-29 21:37:31 +0900 (Thu, 29 Mar 2018) | 5 lines

test_jit.rb: loosen debug log check

We couldn't catch log with
https://gist.github.com/ko1/0fdc6a8d4add70cd8648000b16a3da38#file-brlog-trunk_gcc6-20180329-003723-L370
because the error message started with "gcc-6:".
------------------------------------------------------------------------
r63034 | nobu | 2018-03-29 14:56:04 +0900 (Thu, 29 Mar 2018) | 4 lines

dir.c: do not assume NUL terminator

* dir.c (rb_push_glob): do not assume string is NUL terminated
  always, shared substring may not in the future.
------------------------------------------------------------------------
r63033 | nobu | 2018-03-29 12:42:32 +0900 (Thu, 29 Mar 2018) | 3 lines

Use only CMDARG/COND _PUSH/POP for cmdarg/cond management.

From: Ilya Bylich <ibylich@gmail.com>
------------------------------------------------------------------------
r63032 | nobu | 2018-03-29 10:33:25 +0900 (Thu, 29 Mar 2018) | 1 line

parse.y: remove `p->` from bitstack traces
------------------------------------------------------------------------
r63031 | svn | 2018-03-29 09:05:46 +0900 (Thu, 29 Mar 2018) | 1 line

* 2018-03-29
------------------------------------------------------------------------
r63030 | nobu | 2018-03-29 09:05:45 +0900 (Thu, 29 Mar 2018) | 5 lines

array.c: yield blockarg in collect

* array.c (rb_ary_collect): yield in block argument semantics
  always to splat array elements to lambda, for the backward
  compatibility.  [ruby-core:86362] [Bug #14639]
------------------------------------------------------------------------
r63008 | usa | 2018-03-28 22:27:35 +0900 (Wed, 28 Mar 2018) | 7 lines

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.

------------------------------------------------------------------------
r63000 | nobu | 2018-03-28 20:30:27 +0900 (Wed, 28 Mar 2018) | 4 lines

unixsocket.c: abstract namespace

* ext/socket/unixsocket.c (unixsock_path_value): fix r62991 for
  Linux abstract namespace.
------------------------------------------------------------------------
r62993 | nobu | 2018-03-28 19:22:57 +0900 (Wed, 28 Mar 2018) | 4 lines

Use Regexp#match? in time.rb for conditionals
[Fix GH-1852]

From: Bart <bartdewater@gmail.com>
------------------------------------------------------------------------
r62992 | nobu | 2018-03-28 19:12:17 +0900 (Wed, 28 Mar 2018) | 4 lines

pack.c: fix underflow

* pack.c (pack_unpack_internal): get rid of underflow.
  https://hackerone.com/reports/298246
------------------------------------------------------------------------
r62991 | nobu | 2018-03-28 19:08:57 +0900 (Wed, 28 Mar 2018) | 4 lines

unixsocket.c: check NUL bytes

* ext/socket/unixsocket.c (rsock_init_unixsock): check NUL bytes.
  https://hackerone.com/reports/302997
------------------------------------------------------------------------
r62990 | hsbt | 2018-03-28 19:03:03 +0900 (Wed, 28 Mar 2018) | 3 lines

Ignore file separator from tmpfile/tmpdir name.

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r62989 | nobu | 2018-03-28 18:58:52 +0900 (Wed, 28 Mar 2018) | 7 lines

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
------------------------------------------------------------------------
r62969 | nobu | 2018-03-28 17:48:52 +0900 (Wed, 28 Mar 2018) | 1 line

adjust indents [ci skip]
------------------------------------------------------------------------
r62968 | normal | 2018-03-28 17:38:26 +0900 (Wed, 28 Mar 2018) | 9 lines

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
------------------------------------------------------------------------
r62967 | normal | 2018-03-28 17:38:21 +0900 (Wed, 28 Mar 2018) | 7 lines

io.c: IO#write without args returns 0

This is consistent with other implementations of .write
in openssl and stringio.

* io.c (io_write_m): return 0 on argc == 0
  [ruby-core:86285] [Bug #14338]
------------------------------------------------------------------------
r62966 | normal | 2018-03-28 17:06:55 +0900 (Wed, 28 Mar 2018) | 23 lines

webrick/httpproxy: stream request and response bodies

Reading entire request or response bodies into memory can lead
to trivial denial-of-service attacks.  Introduce Fibers in both
cases to allow streaming.

WEBrick::HTTPRequest gains a new body_reader method to prepare
itself as a source for IO.copy_stream.  This allows the
WEBrick::HTTPRequest object to be used as the
Net::HTTPGenericRequest#body_stream= arg for Net::HTTP.

For HTTP proxy response bodies, we also use a Fiber to
to make the HTTP request and read the response body.

* lib/webrick/httprequest.rb (body_reader): new method
  (readpartial): ditto
* lib/webrick/httpproxy.rb (perform_proxy_request): use Fiber
  to stream response body
  (do_GET, do_HEAD): adjust call
  (do_POST): adjust call and supply body_reader
* test/webrick/test_httprequest.rb (test_chunked): test
  for IO.copy_stream compatibility
* test/webrick/test_httpproxy.rb (test_big_bodies): new test
------------------------------------------------------------------------
r62965 | normal | 2018-03-28 17:06:49 +0900 (Wed, 28 Mar 2018) | 18 lines

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
------------------------------------------------------------------------
r62964 | normal | 2018-03-28 17:06:44 +0900 (Wed, 28 Mar 2018) | 9 lines

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
------------------------------------------------------------------------
r62963 | normal | 2018-03-28 17:06:39 +0900 (Wed, 28 Mar 2018) | 9 lines

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
------------------------------------------------------------------------
r62962 | normal | 2018-03-28 17:06:34 +0900 (Wed, 28 Mar 2018) | 7 lines

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
------------------------------------------------------------------------
r62961 | normal | 2018-03-28 17:06:28 +0900 (Wed, 28 Mar 2018) | 9 lines

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)
------------------------------------------------------------------------
r62960 | normal | 2018-03-28 17:06:23 +0900 (Wed, 28 Mar 2018) | 13 lines

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
------------------------------------------------------------------------
r62959 | normal | 2018-03-28 17:06:18 +0900 (Wed, 28 Mar 2018) | 9 lines

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
------------------------------------------------------------------------
r62958 | normal | 2018-03-28 17:06:13 +0900 (Wed, 28 Mar 2018) | 7 lines

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
------------------------------------------------------------------------
r62957 | normal | 2018-03-28 17:06:08 +0900 (Wed, 28 Mar 2018) | 8 lines

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
------------------------------------------------------------------------
r62956 | normal | 2018-03-28 17:06:02 +0900 (Wed, 28 Mar 2018) | 7 lines

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
------------------------------------------------------------------------
r62955 | normal | 2018-03-28 17:05:57 +0900 (Wed, 28 Mar 2018) | 10 lines

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
------------------------------------------------------------------------
r62954 | normal | 2018-03-28 17:05:52 +0900 (Wed, 28 Mar 2018) | 14 lines

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]
------------------------------------------------------------------------
r62953 | normal | 2018-03-28 17:05:46 +0900 (Wed, 28 Mar 2018) | 15 lines

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
------------------------------------------------------------------------
r62952 | nobu | 2018-03-28 16:01:48 +0900 (Wed, 28 Mar 2018) | 5 lines

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]
------------------------------------------------------------------------
r62936 | svn | 2018-03-28 12:18:01 +0900 (Wed, 28 Mar 2018) | 1 line

* 2018-03-28
------------------------------------------------------------------------
r62935 | ko1 | 2018-03-28 12:18:00 +0900 (Wed, 28 Mar 2018) | 7 lines

fix regexp introduced at recent RDoc update (r62924).

* lib/rdoc/text.rb: should escape `-` character.
  Sometimes test fails if `$VERBOSE = 1` with the following warning:

  > text.rb:172: warning: character class has duplicated range: ...

------------------------------------------------------------------------
r62934 | normal | 2018-03-27 18:28:37 +0900 (Tue, 27 Mar 2018) | 9 lines

thread_sync.c: avoid reaching across stacks of dead threads

rb_ensure is insufficient cleanup for fork and we must
reinitialize all waitqueues in the child process.

Unfortunately this increases the footprint of ConditionVariable,
Queue and SizedQueue by 8 bytes on 32-bit (16 bytes on 64-bit).

[ruby-core:86316] [Bug #14634]
------------------------------------------------------------------------
r62933 | nobu | 2018-03-27 10:09:14 +0900 (Tue, 27 Mar 2018) | 4 lines

configure.ac: string literal concatenation

* configure.ac: bail out if string literal concatenation is not
  available, as it is used everywhere now.
------------------------------------------------------------------------
r62932 | nobu | 2018-03-27 09:44:34 +0900 (Tue, 27 Mar 2018) | 4 lines

ruby.c: exit by --version

* ruby.c (usage): stated exiting by `--version` option with
  nothing done.
------------------------------------------------------------------------
r62931 | eregon | 2018-03-27 05:48:21 +0900 (Tue, 27 Mar 2018) | 1 line

Update to ruby/spec@a585ec3
------------------------------------------------------------------------
r62930 | svn | 2018-03-27 05:48:02 +0900 (Tue, 27 Mar 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62929 | eregon | 2018-03-27 05:48:01 +0900 (Tue, 27 Mar 2018) | 1 line

Update to ruby/mspec@8b54bf3
------------------------------------------------------------------------
r62928 | svn | 2018-03-27 01:25:06 +0900 (Tue, 27 Mar 2018) | 1 line

* 2018-03-27
------------------------------------------------------------------------
r62927 | nobu | 2018-03-27 01:25:05 +0900 (Tue, 27 Mar 2018) | 5 lines

ruby.c: fix --verbose description in usage

* ruby.c (usage): fix the description of `--verbose` option, which
  does not print the version number unlike `-v` option.
  [ruby-core:86307] [Bug #14633]
------------------------------------------------------------------------
r62926 | kazu | 2018-03-26 19:18:46 +0900 (Mon, 26 Mar 2018) | 1 line

Fix test error
------------------------------------------------------------------------
r62925 | svn | 2018-03-26 14:56:29 +0900 (Mon, 26 Mar 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r62924 | hsbt | 2018-03-26 14:56:26 +0900 (Mon, 26 Mar 2018) | 5 lines

Merge RDoc 6.0.3 from upstream.

  It fixed the several bugs that was found after RDoc 6 releasing.

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r62923 | nobu | 2018-03-26 09:25:16 +0900 (Mon, 26 Mar 2018) | 4 lines

bigdecimal.c: fix missing argument

* ext/bigdecimal/bigdecimal.c (rb_rational_num, rb_rational_den):
  fix missing argc argument for old ruby.
------------------------------------------------------------------------
r62922 | svn | 2018-03-26 09:02:20 +0900 (Mon, 26 Mar 2018) | 1 line

* 2018-03-26
------------------------------------------------------------------------
r62921 | nobu | 2018-03-26 09:02:20 +0900 (Mon, 26 Mar 2018) | 7 lines

Update Complex#infinite? documenation

to state what it really does.

[Fix GH-1848]

From: Christian Bruckmayer <cbruckmayer@suse.com>
------------------------------------------------------------------------
r62920 | nobu | 2018-03-26 09:02:19 +0900 (Mon, 26 Mar 2018) | 7 lines

Update Complex#finite? documentation

to state what it really does.

[Fix GH-1848]

From: Christian Bruckmayer <cbruckmayer@suse.com>
------------------------------------------------------------------------
r62919 | nobu | 2018-03-25 23:06:06 +0900 (Sun, 25 Mar 2018) | 5 lines

assertions for r62914

* test/ruby/test_keyword.rb (test_splat_hash): assertion on
  mandatory and rest arguments.  r62914 is not only for optional
  argument.
------------------------------------------------------------------------
r62914 | nobu | 2018-03-25 11:22:14 +0900 (Sun, 25 Mar 2018) | 5 lines

vm_args.c: warn splat to var

* vm_args.c (setup_parameters_complex): [EXPERIMENTAL] warn when
  splat keyword arguments is passed as a single ordinary argument,
  not as a keyword rest argument.
------------------------------------------------------------------------
r62913 | svn | 2018-03-25 10:52:23 +0900 (Sun, 25 Mar 2018) | 1 line

* 2018-03-25
------------------------------------------------------------------------
r62912 | nobu | 2018-03-25 10:52:22 +0900 (Sun, 25 Mar 2018) | 1 line

extmk.rb: get rid of shadowing outer local variable
------------------------------------------------------------------------
r62910 | nobu | 2018-03-24 23:28:45 +0900 (Sat, 24 Mar 2018) | 4 lines

configure.ac: named blocks

* configure.ac: turned section block comments into named blocks.
  http://c16e.com/1603281120/
------------------------------------------------------------------------
r62908 | nobu | 2018-03-24 20:15:10 +0900 (Sat, 24 Mar 2018) | 4 lines

compile.c: split add_insn_info

* compile.c (add_insn_info, add_adjust_info): split for each
  list->type, to remove unnecessary repeated conditions and casts.
------------------------------------------------------------------------
r62907 | svn | 2018-03-24 20:04:38 +0900 (Sat, 24 Mar 2018) | 1 line

* 2018-03-24
------------------------------------------------------------------------
r62906 | nobu | 2018-03-24 20:04:37 +0900 (Sat, 24 Mar 2018) | 4 lines

compile.c: suppress missing-noreturn

* compile.c (add_insn_info): move return statement to suppress
  missing-noreturn warning.
------------------------------------------------------------------------
r62902 | nobu | 2018-03-23 10:09:57 +0900 (Fri, 23 Mar 2018) | 4 lines

parse.y: k_else in bodystmt

* parse.y (bodystmt): expand opt_else to show the error message at
  the right place.
------------------------------------------------------------------------
r62901 | nobu | 2018-03-23 09:40:08 +0900 (Fri, 23 Mar 2018) | 13 lines

parse.y: else without rescue

* parse.y (bodystmt): [EXPERIMENTAL] make `else` without `rescue`
  a syntax error.  [DevelopersMeeting20180315Japan]

  https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20180315Japan
  https://docs.google.com/document/d/1RT0ijSo8uJ4Awn3CEvuYkjH0TVeXSYgeAFNmVGYC3ak/edit#
  > * do-else-end
  >   https://twitter.com/joker1007/status/974173396006129664
  >   https://twitter.com/joker1007/status/974173641347756032
  >   https://twitter.com/joker1007/status/974176512554369027
  >   Will be SyntaxError in 2.6-preview2
  >   All of begin/do/def (experimental)
------------------------------------------------------------------------
r62900 | svn | 2018-03-23 01:05:05 +0900 (Fri, 23 Mar 2018) | 1 line

* 2018-03-23
------------------------------------------------------------------------
r62899 | nobu | 2018-03-23 01:05:04 +0900 (Fri, 23 Mar 2018) | 1 line

test_exception.rb: assertions with Exception.to_tty?
------------------------------------------------------------------------
r62898 | kazu | 2018-03-22 22:01:17 +0900 (Thu, 22 Mar 2018) | 1 line

sample/timeout.rb: Remove unnecessary increment [ci skip]
------------------------------------------------------------------------
r62897 | naruse | 2018-03-22 20:20:03 +0900 (Thu, 22 Mar 2018) | 5 lines

set UTF-8 if given URI string is ASCII

Now URI is normally UTF-8, and US-ASCII URI string is considered as
escaped a UTF-8 string.
https://github.com/rails/rails/issues/32294
------------------------------------------------------------------------
r62894 | nobu | 2018-03-22 17:26:23 +0900 (Thu, 22 Mar 2018) | 4 lines

error.c: full_message options

* error.c (exc_full_message): add highlight: and reverse: keyword
  options.  [Bug #14324]
------------------------------------------------------------------------
r62893 | naruse | 2018-03-22 16:58:39 +0900 (Thu, 22 Mar 2018) | 1 line

Factor out get_reg_grapheme_cluster
------------------------------------------------------------------------
r62892 | naruse | 2018-03-22 16:58:38 +0900 (Thu, 22 Mar 2018) | 3 lines

fix each_grapheme_cluster's size [Bug #14363]

From: Hugo Peixoto <hugo.peixoto@gmail.com>
------------------------------------------------------------------------
r62891 | naruse | 2018-03-22 16:58:37 +0900 (Thu, 22 Mar 2018) | 3 lines

Revert "each_grapheme_cluster shouldn't return size [Bug #14363]"

This reverts commit r62887.
------------------------------------------------------------------------
r62888 | naruse | 2018-03-22 15:59:54 +0900 (Thu, 22 Mar 2018) | 3 lines

each_grapheme_cluster shouldn't return size [Bug #14363]

From: Stefan Schu{U+00DF}ler <mail@stefanschuessler.de>
------------------------------------------------------------------------
r62887 | nobu | 2018-03-22 15:47:53 +0900 (Thu, 22 Mar 2018) | 4 lines

parse.y: reorder in the place

* parse.y (new_args_tail): reorder required and optional keyword
  argument variable IDs in the place.
------------------------------------------------------------------------
r62882 | nobu | 2018-03-22 01:03:59 +0900 (Thu, 22 Mar 2018) | 8 lines

Docs and tests on URI.hierarchical?, URI.absolute?

Improve code coverage and clarify meaning of hierarchical based on RFC
text.

[Fix GH-1846]

From: Xavier Riley <xavriley@hotmail.com>
------------------------------------------------------------------------
r62881 | nobu | 2018-03-22 01:02:26 +0900 (Thu, 22 Mar 2018) | 7 lines

Improve documentation for 'text '.split

The documentation didn't mention trailing spaces and the
example only demonstrated the case with leading spaces.
[Fix GH-1845]

From: Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com>
------------------------------------------------------------------------
r62879 | svn | 2018-03-22 00:46:16 +0900 (Thu, 22 Mar 2018) | 1 line

* 2018-03-22
------------------------------------------------------------------------
r62878 | nobu | 2018-03-22 00:46:15 +0900 (Thu, 22 Mar 2018) | 6 lines

Remove outdated proc.c binding comment.

Passing a proc as the second argument to eval is no longer supported.
[Fix GH-1843]

From: Tieg Zaharia <tieg.zaharia@gmail.com>
------------------------------------------------------------------------
r62873 | nobu | 2018-03-21 21:40:16 +0900 (Wed, 21 Mar 2018) | 4 lines

parse.y: terminator at continued line

* parse.y (here_document): a continuing line is not the
  terminator.  [ruby-core:86283] [Bug #14621]
------------------------------------------------------------------------
r62872 | nobu | 2018-03-21 19:32:15 +0900 (Wed, 21 Mar 2018) | 5 lines

parse.y: unindent continued line

* parse.y (tokadd_string): stop at continued line in dedented here
  documents, to dedent for each lines before removing escaped
  newlines.  [ruby-core:86236] [Bug #14621]
------------------------------------------------------------------------
r62871 | nobu | 2018-03-21 19:06:23 +0900 (Wed, 21 Mar 2018) | 5 lines

test_iseq.rb: disable load_from_binary

* test/ruby/test_iseq.rb (test_to_binary_with_objects): disable
  load_from_binary right now, r62851 seems having a trouble around
  get_insn_info_succinct_bitvector() yet.
------------------------------------------------------------------------
r62870 | svn | 2018-03-21 11:20:38 +0900 (Wed, 21 Mar 2018) | 1 line

* 2018-03-21
------------------------------------------------------------------------
r62869 | nobu | 2018-03-21 11:20:37 +0900 (Wed, 21 Mar 2018) | 1 line

iseq.c: constfied validate_get_insn_info [ci skip]
------------------------------------------------------------------------
r62861 | nobu | 2018-03-20 22:30:57 +0900 (Tue, 20 Mar 2018) | 1 line

node.c: predicates for special NODEs
------------------------------------------------------------------------
r62857 | shugo | 2018-03-20 18:09:49 +0900 (Tue, 20 Mar 2018) | 6 lines

io.c: Methods of File should not invoke external commands

For security reasons, File.read, File.binread, File.write, File.binwrite,
File.foreach, and File.readlines should not invoke external commands even
if the path starts with the pipe character |.
[ruby-core:84495] [Feature #14245]
------------------------------------------------------------------------
r62856 | nobu | 2018-03-20 17:36:42 +0900 (Tue, 20 Mar 2018) | 8 lines

compile.c: fix ibf_load_code

* compile.c (ibf_load_iseq_each): manage iseq_size to point loaded
  objects in iseq_encoded.  now marking iseq scans iseq_encoded
  directly.

* test/ruby/test_iseq.rb (test_to_binary_with_objects): skip for
  now, but fix argument order of assert_equal.
------------------------------------------------------------------------
r62851 | tenderlove | 2018-03-20 03:21:54 +0900 (Tue, 20 Mar 2018) | 5 lines

Reverting r62775, this should fix i686 builds

We need to mark default values for kwarg methods.  This also fixes
Bootsnap.  IBF iseq loading needed to mark iseqs as "having markable
objects".
------------------------------------------------------------------------
r62844 | svn | 2018-03-20 00:40:33 +0900 (Tue, 20 Mar 2018) | 1 line

* 2018-03-20
------------------------------------------------------------------------
r62843 | usa | 2018-03-20 00:40:32 +0900 (Tue, 20 Mar 2018) | 2 lines

* win32/README.win32: `make up` is only necessary when building from SVN source.

------------------------------------------------------------------------
r62841 | nobu | 2018-03-19 23:12:00 +0900 (Mon, 19 Mar 2018) | 7 lines

parse.y: NUL-terminate ruby_sourcefile

* parse.y (yycompile): in some cases (warning, error, dtrace,...),
  ruby_sourcefile is expected to be NUL-terminated, so ensure it.

* template/prelude.c.tmpl (prelude_name): NUL-terminate to get rid
  of copying static data.
------------------------------------------------------------------------
r62840 | usa | 2018-03-19 22:04:22 +0900 (Mon, 19 Mar 2018) | 5 lines

note that patch is required and need to run make up before make

	* win32/README.win32: patch(1) is required, and running `make up` before
	  `make` is also required.

------------------------------------------------------------------------
r62839 | nobu | 2018-03-19 21:40:34 +0900 (Mon, 19 Mar 2018) | 6 lines

parse.y: push `do` token info

* parse.y (k_rescue, k_ensure): revert r62838.

* parse.y (k_do, k_do_LAMBDA, k_do_block): push token infos of
  `do`.
------------------------------------------------------------------------
r62838 | nobu | 2018-03-19 17:37:12 +0900 (Mon, 19 Mar 2018) | 4 lines

parse.y: ignore do indentations

* parse.y (k_rescue, k_ensure): ignore indentations of `do`, it
  is not at the beginning of line usually.
------------------------------------------------------------------------
r62836 | nobu | 2018-03-19 17:21:26 +0900 (Mon, 19 Mar 2018) | 4 lines

parse.y: mismatched indentations at middle

* parse.y (k_rescue, k_ensure, k_when, k_else, k_elsif): warn
  mismatched indentations at keywords in middle of blocks.
------------------------------------------------------------------------
r62833 | nobu | 2018-03-19 13:08:19 +0900 (Mon, 19 Mar 2018) | 6 lines

compile.c: arg var index

* compile.c (iseq_set_arguments): determine argument variable
  indexes by the order, not by just IDs.  arguments begin with `_`
  can be duplicate, so by-ID index may result in a wrong value.
  [ruby-core:86159] [Bug #14611]
------------------------------------------------------------------------
r62832 | nobu | 2018-03-19 12:16:40 +0900 (Mon, 19 Mar 2018) | 9 lines

parse.y: fix duplicate kwrest

* parse.y (f_kwrest): add the variable name as an argument, as
  well as an internal variable.

* parse.y (new_args_tail): now keyword rest argument variable is
  always placed between keyword arguments and block argument, so
  so just reorder required and optional keyword arguments.  no
  longer kwrest duplicates.
------------------------------------------------------------------------
r62831 | nobu | 2018-03-19 09:32:52 +0900 (Mon, 19 Mar 2018) | 1 line

iseq.c: append local var index to name
------------------------------------------------------------------------
r62830 | svn | 2018-03-19 09:32:52 +0900 (Mon, 19 Mar 2018) | 1 line

* 2018-03-19
------------------------------------------------------------------------
r62829 | nobu | 2018-03-19 09:32:51 +0900 (Mon, 19 Mar 2018) | 1 line

iseq.c: mark kwrest arg
------------------------------------------------------------------------
r62807 | nobu | 2018-03-18 19:41:53 +0900 (Sun, 18 Mar 2018) | 4 lines

compile.c: fix function name [ci skip]

* compile.c (ibf_dump_object_object): fix a probable typo in the
  function name, s/lbf/ibf/.
------------------------------------------------------------------------
r62806 | watson1978 | 2018-03-18 19:28:58 +0900 (Sun, 18 Mar 2018) | 76 lines

Improve CSV performance

If it will not use special variables (like $1, $&, $`...),
it can improve the performance by using Regexp#match? or String#match? instead of Regexp#=~ or String#=~.

This patch is same idea as https://github.com/ruby/ruby/pull/1836

[Fix GH-1842]

## Environment
* OS : Ubuntu 17.10
* Compiler : gcc version 7.2.0
* CPU : Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
* Memory : 16 GB

## TL;DR
Methods     | Before | After  | Speed up
----------- | ------ | ------ | --------
CSV.foreach | 44.825 | 48.201 | 7.5%
CSV#shift   | 45.200 | 49.584 | 9.7%
CSV.read    | 42.968 | 46.853 | 9.0%
CSV.table   | 10.933 | 11.277 | 3.1%

## Before
```
Calculating -------------------------------------
         CSV.foreach     44.825  ({U+00B1} 0.0%) i/s -    228.000  in   5.086576s
           CSV#shift     45.200  ({U+00B1} 0.0%) i/s -    228.000  in   5.044297s
            CSV.read     42.968  ({U+00B1} 0.0%) i/s -    216.000  in   5.027504s
           CSV.table     10.933  ({U+00B1} 0.0%) i/s -     55.000  in   5.031098s
```

## After
```
Calculating -------------------------------------
         CSV.foreach     48.201  ({U+00B1} 0.0%) i/s -    244.000  in   5.062256s
           CSV#shift     49.584  ({U+00B1} 0.0%) i/s -    248.000  in   5.001652s
            CSV.read     46.853  ({U+00B1} 0.0%) i/s -    236.000  in   5.037044s
           CSV.table     11.277  ({U+00B1} 0.0%) i/s -     57.000  in   5.054694s
```

## Benchmark code
```ruby
require 'csv'
require 'benchmark/ips'

CSV.open("/tmp/file.csv", "w") do |csv|
  csv << ["player", "gameA", "gameB"]
  1000.times do
    csv << ['"Alice"', "84.0", "79.5"]
    csv << ['"Bob"', "20.0", "56.5"]
  end
end

Benchmark.ips do |x|
  x.report "CSV.foreach" do
    CSV.foreach("/tmp/file.csv") do |row|
    end
  end

  x.report "CSV#shift" do
    CSV.open("/tmp/file.csv") do |csv|
      while line = csv.shift
      end
    end
  end

  x.report "CSV.read" do
    CSV.read("/tmp/file.csv")
  end

  x.report "CSV.table" do
    CSV.table("/tmp/file.csv")
  end
end
```
------------------------------------------------------------------------
r62805 | kazu | 2018-03-18 15:54:21 +0900 (Sun, 18 Mar 2018) | 1 line

Remove duplicated `,` [ci skip]
------------------------------------------------------------------------
r62800 | nobu | 2018-03-18 12:40:49 +0900 (Sun, 18 Mar 2018) | 1 line

IBF works only on x86 platforms now
------------------------------------------------------------------------
r62799 | svn | 2018-03-18 00:13:40 +0900 (Sun, 18 Mar 2018) | 1 line

* 2018-03-18
------------------------------------------------------------------------
r62798 | seki | 2018-03-18 00:13:39 +0900 (Sun, 18 Mar 2018) | 2 lines

If host of URI is omitted, make it with IP address. 

------------------------------------------------------------------------
r62796 | nobu | 2018-03-17 20:42:08 +0900 (Sat, 17 Mar 2018) | 4 lines

compile.c: resize to align offsets

* compile.c (ibf_dump_align): resize the dump buffer.
  rb_str_modify_expand expands the buffer but not set the length.
------------------------------------------------------------------------
r62795 | nobu | 2018-03-17 18:41:19 +0900 (Sat, 17 Mar 2018) | 1 line

debugging SEGV on Solaris11s
------------------------------------------------------------------------
r62794 | k0kubun | 2018-03-17 15:41:35 +0900 (Sat, 17 Mar 2018) | 11 lines

Remove unused variables

This fixes following warning:

```
test/logger/test_logger.rb:329: warning: assigned but unused variable - read_read
```

[Fix GH-1840]

From: yuuji.yaginuma <yuuji.yaginuma@gmail.com>
------------------------------------------------------------------------
r62793 | k0kubun | 2018-03-17 15:39:18 +0900 (Sat, 17 Mar 2018) | 7 lines

Add doc for `opt` parameter of IO#reopen [ci skip]

It can be specified from 2.0. Ref: https://bugs.ruby-lang.org/issues/7103

[Fix GH-1841]

From: yuuji.yaginuma <yuuji.yaginuma@gmail.com>
------------------------------------------------------------------------
r62792 | k0kubun | 2018-03-17 15:33:28 +0900 (Sat, 17 Mar 2018) | 3 lines

test_jit.rb: debug cc1 availability

ENV didn't have any useful information.
------------------------------------------------------------------------
r62791 | nobu | 2018-03-17 13:46:26 +0900 (Sat, 17 Mar 2018) | 7 lines

compile.c: align offsets

* compile.c (ibf_dump_align): expand the buffer for alignment.

* compile.c (ibf_dump_iseq_list, ibf_dump_object_list): align as
  ibf_offset_t.  not all processors do not allow unaligned word,
  or larger, access.
------------------------------------------------------------------------
r62790 | nobu | 2018-03-17 13:13:26 +0900 (Sat, 17 Mar 2018) | 4 lines

string.c: [DOC] split with block [ci skip]

* string.c (rb_str_split_m): [DOC] about split with block.
  [Feature #4780]
------------------------------------------------------------------------
r62789 | k0kubun | 2018-03-17 11:37:51 +0900 (Sat, 17 Mar 2018) | 5 lines

misc/ruby-style.el: use spaces for indentation

instead of hard tabs.

[Bug #14246]
------------------------------------------------------------------------
r62788 | nobu | 2018-03-17 11:18:46 +0900 (Sat, 17 Mar 2018) | 5 lines

transform_mjit_header.rb: read output and errors

* tool/transform_mjit_header.rb (MJITHeader.check_code): read
  output and errors than discarding errors.  also cl.exe prints
  the source file name which is a garbage at this time.
------------------------------------------------------------------------
r62787 | nobu | 2018-03-17 11:11:06 +0900 (Sat, 17 Mar 2018) | 1 line

debugging SEGV on Solaris11s
------------------------------------------------------------------------
r62786 | svn | 2018-03-17 11:00:31 +0900 (Sat, 17 Mar 2018) | 1 line

* 2018-03-17
------------------------------------------------------------------------
r62785 | k0kubun | 2018-03-17 11:00:30 +0900 (Sat, 17 Mar 2018) | 9 lines

mjit.c: add timeout for --jit-wait

Sometimes test hangs in `mjit_get_iseq_func` like this:
http://ci.rvm.jp/results/trunk-test@ruby-sky3/659391

It seems that a process waiting in `mjit_get_iseq_func` does no longer
have MJIT worker thread. We don't wait for JIT finish forever. So I
added timeout for the case. I'm not sure why there was no MJIT worker
thread in ruby-sky3 test process though.
------------------------------------------------------------------------
r62781 | nobu | 2018-03-16 23:12:39 +0900 (Fri, 16 Mar 2018) | 1 line

test_weakmap.rb: skip unstable assertion
------------------------------------------------------------------------
r62780 | kazu | 2018-03-16 23:09:40 +0900 (Fri, 16 Mar 2018) | 4 lines

sample/timeout.rb: fix warnings

warning: Object#timeout is deprecated, use Timeout.timeout instead.
[ci skip]
------------------------------------------------------------------------
r62779 | nobu | 2018-03-16 22:37:44 +0900 (Fri, 16 Mar 2018) | 7 lines

re.c: do not escape terminator in Regexp.union

* re.c (rb_reg_str_with_term): change terminator.

* re.c (rb_reg_s_union): terminator in source string does not need
  to be escaped.  terminators are outside of regexp source itself.
  [ruby-core:86149] [Bug #14608]
------------------------------------------------------------------------
r62778 | nobu | 2018-03-16 22:29:27 +0900 (Fri, 16 Mar 2018) | 1 line

debugging SEGV on Solaris11s
------------------------------------------------------------------------
r62777 | nobu | 2018-03-16 21:22:33 +0900 (Fri, 16 Mar 2018) | 1 line

debugging SEGV on Solaris11s
------------------------------------------------------------------------
r62776 | nobu | 2018-03-16 21:06:55 +0900 (Fri, 16 Mar 2018) | 4 lines

test_iseq.rb: skip iseq with coverage

* test/ruby/test_iseq.rb (test_to_binary_with_objects): #to_binary
  does not support iseq compiled with coverage, just skip.
------------------------------------------------------------------------
r62775 | naruse | 2018-03-16 16:59:10 +0900 (Fri, 16 Mar 2018) | 7 lines

Revert "Add direct marking on iseq operands"

This reverts commit r62706.

It causes SEGV on i686-linux (debian) and armv7l-linux-eabihf:
http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20180309T204300Z.diff.html.gz
http://rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20180309T211706Z.diff.html.gz
------------------------------------------------------------------------
r62774 | naruse | 2018-03-16 16:59:09 +0900 (Fri, 16 Mar 2018) | 3 lines

Revert "Fix error: implicit conversion loses integer precision"

This reverts commit r62708.
------------------------------------------------------------------------
r62773 | naruse | 2018-03-16 16:59:08 +0900 (Fri, 16 Mar 2018) | 3 lines

Revert "Fix warning: cast from pointer to integer of different size"

This reverts commit r62709.
------------------------------------------------------------------------
r62772 | nobu | 2018-03-16 11:27:50 +0900 (Fri, 16 Mar 2018) | 6 lines

compile.c: fix load_from_binary

* compile.c (ibf_load_iseq_each): realpath may be nil.  follow up
  r59709.  [fix https://github.com/Shopify/bootsnap/issues/132]

From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
------------------------------------------------------------------------
r62771 | nobu | 2018-03-16 11:07:43 +0900 (Fri, 16 Mar 2018) | 4 lines

gmake.mk: expand MJIT header rules

* defs/gmake.mk: expand MJIT header file rules for each
  architectures.
------------------------------------------------------------------------
r62770 | nobu | 2018-03-16 10:48:02 +0900 (Fri, 16 Mar 2018) | 5 lines

configure.ac: DLDFLAGS without arch flags

* configure.ac (DLDFLAGS): copy LDFLAGS before adding arch flags.
  multiple arch flags on universal binary make mjit_header.h
  failed.
------------------------------------------------------------------------
r62769 | naruse | 2018-03-16 01:51:34 +0900 (Fri, 16 Mar 2018) | 4 lines

Revert r62617 "compile.c: fix load_from_binary"

It breaks Solaris:
http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180301T012502Z.diff.html.gz
------------------------------------------------------------------------
r62768 | svn | 2018-03-16 01:51:32 +0900 (Fri, 16 Mar 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62767 | naruse | 2018-03-16 01:51:31 +0900 (Fri, 16 Mar 2018) | 8 lines

Introduce URI::File to handle file URI scheme

* the default value of URI::File's authority is "" (localhost).
  Both nil and "localhost" is normalized to "" by default.
* URI::File ignores setting userinfo and port
[Feature #14035]
fix https://github.com/ruby/ruby/pull/1719
fic https://github.com/ruby/ruby/pull/1832
------------------------------------------------------------------------
r62766 | svn | 2018-03-16 00:20:08 +0900 (Fri, 16 Mar 2018) | 1 line

* 2018-03-16
------------------------------------------------------------------------
r62765 | nobu | 2018-03-16 00:20:08 +0900 (Fri, 16 Mar 2018) | 5 lines

configure.ac: fix rb_cv_gcc_compiler_cas

* configure.ac (rb_cv_gcc_compiler_cas): do not use one variable
  for multiple AC_CACHE_CHECK.  in one check, select by different
  values.
------------------------------------------------------------------------
r62764 | mrkn | 2018-03-15 21:01:08 +0900 (Thu, 15 Mar 2018) | 1 line

NEWS: add descriptions of [Feature #12732]
------------------------------------------------------------------------
r62763 | nobu | 2018-03-15 20:08:04 +0900 (Thu, 15 Mar 2018) | 4 lines

string.c: split with block

* string.c (rb_str_split_m): yield each split substrings if the
  block is given, instead of returing the array.  [Feature #4780]
------------------------------------------------------------------------
r62762 | nobu | 2018-03-15 18:58:50 +0900 (Thu, 15 Mar 2018) | 1 line

test_array.rb (test_slice!): moved misplaced test
------------------------------------------------------------------------
r62760 | mrkn | 2018-03-15 16:19:48 +0900 (Thu, 15 Mar 2018) | 7 lines

Add `exception:` keyword in Kernel#Complex()

Support `exception:` keyword argument in `Kernel#Complex()`.
If `exception:` is `false`, `Kernel#Complex()` returns `nil` if the given
value cannot be interpreted as a complex value.
The default value of `exception:` is `true`.
This is part of [Feature #12732].
------------------------------------------------------------------------
r62759 | mrkn | 2018-03-15 16:19:46 +0900 (Thu, 15 Mar 2018) | 7 lines

Add `exception:` keyword in Kernel#Rational()

Support `exception:` keyword argument in `Kernel#Rational()`.
If `exception:` is `false`, `Kernel#Rational()` returns `nil` if the given
value cannot be interpreted as a rational value.
The default value of `exception:` is `true`.
This is part of [Feature #12732].
------------------------------------------------------------------------
r62758 | mrkn | 2018-03-15 16:19:45 +0900 (Thu, 15 Mar 2018) | 7 lines

Add `exception:` keyword in Kernel#Float()

Support `exception:` keyword argument in `Kernel#Float()`.
If `exception:` is `false`, `Kernel#Float()` returns `nil` if the given
value cannot be interpreted as a float value.
The default value of `exception:` is `true`.
This is part of [Feature #12732].
------------------------------------------------------------------------
r62757 | mrkn | 2018-03-15 16:19:43 +0900 (Thu, 15 Mar 2018) | 7 lines

Add `exception:` keyword in Kernel#Integer()

Support `exception:` keyword argument in Kernel#Integer().
If `exception:` is `false`, `Kernel#Integer()` returns `nil` if the given
value cannot be interpreted as an integer value.
The default value of `exception:` is `true`.
This is part of [Feature #12732].
------------------------------------------------------------------------
r62756 | nobu | 2018-03-15 16:15:26 +0900 (Thu, 15 Mar 2018) | 1 line

variable.c: hoisted out overtaken cvar warnings
------------------------------------------------------------------------
r62755 | nobu | 2018-03-15 15:29:04 +0900 (Thu, 15 Mar 2018) | 4 lines

enumerator.c: pretty kwags

* enumerator.c (append_method): pretty format for keyword
  arguments.
------------------------------------------------------------------------
r62754 | ko1 | 2018-03-15 12:55:33 +0900 (Thu, 15 Mar 2018) | 9 lines

use SIGUSR2 to debug.

* test/ruby/test_io.rb: use SIGUSR2 instead of SIGUSR1 to confirm
  unknown SIGUSR1 exception. On parallel testing, sometime
  (1 per some days) SIGUSR1 exception. This fix will make clear which
  signal is a suspect.

  http://ci.rvm.jp/results/trunk-test@ruby-sky3/643893

------------------------------------------------------------------------
r62753 | nobu | 2018-03-15 10:05:00 +0900 (Thu, 15 Mar 2018) | 1 line

win32/configure.bat: stop when setup failed
------------------------------------------------------------------------
r62752 | nobu | 2018-03-15 09:12:17 +0900 (Thu, 15 Mar 2018) | 4 lines

vm.c: refined error message

* vm.c (kw_check_symbol): refined the error message for non-symbol
  key.  [Feature #14603]
------------------------------------------------------------------------
r62751 | svn | 2018-03-15 08:27:11 +0900 (Thu, 15 Mar 2018) | 1 line

* 2018-03-15
------------------------------------------------------------------------
r62750 | tenderlove | 2018-03-15 08:27:10 +0900 (Thu, 15 Mar 2018) | 9 lines

Unconditionally define `TRACE_INSN_P`

`TRACE_INSN_P` doesn't need to know about encoded iseqs, it just needs
to look at decoded iseqs.  We have the decoded iseqs available, so no
reason to look at encoded ones.  This change allows us to clear
`original_iseq` from the iseq struct without any segvs (previously,
clearing `original_iseq` would cause the tests to crash).

* iseq.c (rb_iseq_trace_set): Only use decoded iseq with `TRACE_INSN_P`
------------------------------------------------------------------------
r62749 | nobu | 2018-03-14 23:07:00 +0900 (Wed, 14 Mar 2018) | 4 lines

configure.ac: basic libs

* configure.ac: basic libraries like -lm are necessary for some
  extension libraries on some platforms.
------------------------------------------------------------------------
r62748 | nobu | 2018-03-14 20:55:07 +0900 (Wed, 14 Mar 2018) | 4 lines

test_weakmap.rb: fixing CI failures

* test/ruby/test_weakmap.rb (test_include?): create and release
  the object to be garbage-collected in deeper frame.
------------------------------------------------------------------------
r62747 | nobu | 2018-03-14 11:35:51 +0900 (Wed, 14 Mar 2018) | 5 lines

quote symbols

* sprintf.c (ruby__sfvextra): quote symbols as identifiers.

* string.c (rb_id_quote_unprintable): ditto.
------------------------------------------------------------------------
r62746 | svn | 2018-03-14 00:11:00 +0900 (Wed, 14 Mar 2018) | 1 line

* 2018-03-14
------------------------------------------------------------------------
r62745 | kazu | 2018-03-14 00:10:59 +0900 (Wed, 14 Mar 2018) | 1 line

Fix typos [ci skip]
------------------------------------------------------------------------
r62744 | k0kubun | 2018-03-13 22:03:12 +0900 (Tue, 13 Mar 2018) | 1 line

test/ripper/test_lexer.rb: add test for r62743
------------------------------------------------------------------------
r62743 | k0kubun | 2018-03-13 21:56:04 +0900 (Tue, 13 Mar 2018) | 26 lines

Fix FrozenError on `Ripper.slice`

Currently `Ripper.slice` raises a FrozenError

```ruby
require 'ripper'
p Ripper.slice('foo', 'ident')
```

```
/path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:193:in `concat': can't modify frozen String (FrozenError)
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:193:in `block in compile'
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:190:in `scan'
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:190:in `compile'
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:169:in `initialize'
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:151:in `new'
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:151:in `token_match'
	from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:144:in `slice'
	from /tmp/tmp.kb4cnhvum2/test.rb:2:in `<main>'
```

This patch will fix the problem.

[Fix GH-1837]

From: Masataka Pocke Kuwabara <kuwabara@pocke.me>
------------------------------------------------------------------------
r62742 | k0kubun | 2018-03-13 21:32:31 +0900 (Tue, 13 Mar 2018) | 3 lines

mjit_compile.c: remove unintended definition

Actually r62741 defined the macro... It wasn't intentional.
------------------------------------------------------------------------
r62741 | k0kubun | 2018-03-13 21:29:55 +0900 (Tue, 13 Mar 2018) | 7 lines

mjit_compile.c: disable comment_id by default

Doing `rb_ary_aref` to `global_symbols.ids` is not thread-safe and
randomly causes SEGV.
https://gist.github.com/k0kubun/ab60727c6be7c0e777d2b4241f59173c

But it's convenient for development. So I keep it optionally available.
------------------------------------------------------------------------
r62740 | watson1978 | 2018-03-13 18:15:10 +0900 (Tue, 13 Mar 2018) | 109 lines

Improve Pathname performance

If it will not use special variables (like $1, $&, $`...),
it can improve the performance by using Regexp#match? instead of Regexp#=~.
Because Regexp#=~ will generate the objects to special variables by pattern matching.

This patch will replace Regexp#=~ without special variables to Regexp#match?.
(Excludes https://github.com/ruby/ruby/blob/trunk/ext/pathname/lib/pathname.rb#L144-L153)

[Fix GH-1836] [ruby-core:86093] [Bug #14599]

## Environment
* OS : Ubuntu 17.10
* Compiler : gcc version 7.2.0
* CPU : Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
* Memory : 16 GB

## TL;DR
                            | Before | After  | Speed up
--------------------------- | ------ | ------ | --------
Pathname#absolute?          | 142836 | 198487 | 39.0%
Pathname#cleanpath          |  60706 |  79415 | 30.8%
Pathname#root?              | 603806 | 759157 | 25.7%
Pathname#absolute?          | 142592 | 197859 | 38.8%
Pathname#each_filename      | 115600 | 152982 | 32.3%
Pathname#ascend             |  50494 |  63606 | 26.0%
Pathname#+                  | 100550 | 130372 | 29.7%
Pathname#join               |  46673 |  60994 | 30.7%
Pathname#relative_path_from |  28362 |  37494 | 32.2%

## Before
```
Calculating -------------------------------------
  Pathname#absolute?    142.836k ({U+00B1} 0.1%) i/s -    722.304k in   5.056884s
  Pathname#cleanpath     60.706k ({U+00B1} 0.1%) i/s -    306.764k in   5.053305s
      Pathname#root?    603.806k ({U+00B1} 0.3%) i/s -      3.062M in   5.071696s
  Pathname#absolute?    142.592k ({U+00B1} 0.1%) i/s -    720.846k in   5.055301s
Pathname#each_filename
                        115.600k ({U+00B1} 0.1%) i/s -    586.818k in   5.076292s
     Pathname#ascend     50.494k ({U+00B1} 0.1%) i/s -    255.301k in   5.056049s
          Pathname#+    100.550k ({U+00B1} 0.1%) i/s -    509.630k in   5.068433s
       Pathname#join     46.673k ({U+00B1} 0.1%) i/s -    236.433k in   5.065696s
Pathname#relative_path_from
                         28.362k ({U+00B1} 0.0%) i/s -    143.728k in   5.067640s
```

## After
```
Calculating -------------------------------------
  Pathname#absolute?    198.487k ({U+00B1} 0.1%) i/s -    995.665k in   5.016272s
  Pathname#cleanpath     79.415k ({U+00B1} 0.1%) i/s -    404.406k in   5.092344s
      Pathname#root?    759.157k ({U+00B1} 0.0%) i/s -      3.800M in   5.005072s
  Pathname#absolute?    197.859k ({U+00B1} 0.1%) i/s -    995.720k in   5.032494s
Pathname#each_filename
                        152.982k ({U+00B1} 0.1%) i/s -    775.555k in   5.069607s
     Pathname#ascend     63.606k ({U+00B1} 0.0%) i/s -    320.862k in   5.044560s
          Pathname#+    130.372k ({U+00B1} 0.1%) i/s -    660.856k in   5.068991s
       Pathname#join     60.994k ({U+00B1} 0.1%) i/s -    305.068k in   5.001626s
Pathname#relative_path_from
                         37.494k ({U+00B1} 0.4%) i/s -    189.124k in   5.044146s
```

## Benchmark code
```ruby
require 'pathname'
require 'benchmark/ips'

Benchmark.ips do |x|
  root  = Pathname.new('/')
  path1 = Pathname.new('/path/to/some/file1.rb')
  path2 = Pathname.new('/path/to/some/file2.rb')

  x.report("Pathname#absolute?") do
    path1.absolute?
  end

  x.report("Pathname#cleanpath") do
    Pathname.new('/path/to/some/file.rb').cleanpath
  end

  x.report("Pathname#root?") do
    path1.root?
  end

  x.report("Pathname#absolute?") do
    path1.absolute?
  end

  x.report("Pathname#each_filename") do
    path1.each_filename { |file| }
  end

  x.report("Pathname#ascend") do
    path1.ascend { |path| }
  end

  x.report("Pathname#+") do
    path1 + path2
  end

  x.report("Pathname#join") do
    path1.join("../file3.rb")
  end

  x.report("Pathname#relative_path_from") do
    path1.relative_path_from(root)
  end
end
```
------------------------------------------------------------------------
r62739 | mame | 2018-03-13 17:18:03 +0900 (Tue, 13 Mar 2018) | 6 lines

Add FileUtils#cp_lr

* lib/fileutils.rb: Add FileUtils#cp_lr.  This method creates hard links
  of each file from directory to another directory recursively.
  This patch is based on Thomas Sawyers and Zachary Scott.
  [Feature #4189] [ruby-core:33820]
------------------------------------------------------------------------
r62738 | nobu | 2018-03-13 15:29:02 +0900 (Tue, 13 Mar 2018) | 5 lines

Rename test classes to allow stable test count when running test-all -j

[Fix GH-1763]

From: MSP-Greg <MSP-Greg@users.noreply.github.com>
------------------------------------------------------------------------
r62737 | nobu | 2018-03-13 12:48:56 +0900 (Tue, 13 Mar 2018) | 4 lines

eval_error.c: reset attributes

* eval_error.c (print_errinfo): reset all attributes for each
  lines before newlines.
------------------------------------------------------------------------
r62736 | nobu | 2018-03-13 12:40:10 +0900 (Tue, 13 Mar 2018) | 4 lines

eval_error.c: last newline

* eval_error.c (print_errinfo): do not print an empty line at the
  end when the message ends with a newline.
------------------------------------------------------------------------
r62735 | nobu | 2018-03-13 11:43:04 +0900 (Tue, 13 Mar 2018) | 5 lines

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.
------------------------------------------------------------------------
r62734 | nobu | 2018-03-13 11:00:42 +0900 (Tue, 13 Mar 2018) | 5 lines

Add missing class FrozenError to Exception subclasses list documentation

[Fix GH-1818]

From: Miguel Landaeta <miguel@miguel.cc>
------------------------------------------------------------------------
r62733 | nobu | 2018-03-13 10:28:28 +0900 (Tue, 13 Mar 2018) | 1 line

Hash instead of Set
------------------------------------------------------------------------
r62732 | nobu | 2018-03-13 10:28:27 +0900 (Tue, 13 Mar 2018) | 8 lines

Speed up func1.func2 completion by using Set for ignored modules

And thus avoiding Module#name calls. Those are slow, especially in
larger projects, with lots of anonymous modules.

[Fix GH-1798]

From: Dmitry Gutov <dgutov@yandex.ru>
------------------------------------------------------------------------
r62731 | nobu | 2018-03-13 10:00:08 +0900 (Tue, 13 Mar 2018) | 19 lines

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>
------------------------------------------------------------------------
r62730 | svn | 2018-03-13 00:19:38 +0900 (Tue, 13 Mar 2018) | 1 line

* 2018-03-13
------------------------------------------------------------------------
r62729 | nobu | 2018-03-13 00:19:37 +0900 (Tue, 13 Mar 2018) | 4 lines

assertions.rb: parentheses

* test/lib/test/unit/assertions.rb (assert_not_all): fix missing
  parentheses.
------------------------------------------------------------------------
r62728 | nobu | 2018-03-12 22:04:28 +0900 (Mon, 12 Mar 2018) | 4 lines

eval_error.c: fix underflow

* eval_error.c (print_errinfo): get rid of negative string length.
  [ruby-core:86086] [Bug #14598]
------------------------------------------------------------------------
r62727 | nobu | 2018-03-12 16:55:17 +0900 (Mon, 12 Mar 2018) | 6 lines

ripper: fix escaped space

* parse.y: use tSP same as ripper instead of tSPACE.
  [ruby-core:86080] [Bug #14597]

* ext/ripper/eventids2.c: tSP is defined in ripper.c now.
------------------------------------------------------------------------
r62726 | svn | 2018-03-12 15:54:44 +0900 (Mon, 12 Mar 2018) | 1 line

* 2018-03-12
------------------------------------------------------------------------
r62725 | nobu | 2018-03-12 15:54:43 +0900 (Mon, 12 Mar 2018) | 7 lines

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>
------------------------------------------------------------------------
r62724 | nobu | 2018-03-11 21:19:08 +0900 (Sun, 11 Mar 2018) | 8 lines

parse.y: fix interpolated string literal dedent

* parse.y (heredoc_dedent): fix interpolated string literal dedent,
  remove indentations from only nodes with the newline flag.
  [ruby-core:85983] [Bug #14584]

* parse.y (here_document): set the newline flag on literal string
  nodes starting at the beginning of line.
------------------------------------------------------------------------
r62723 | nobu | 2018-03-11 21:12:08 +0900 (Sun, 11 Mar 2018) | 1 line

parse.y: reduce duplicate code
------------------------------------------------------------------------
r62722 | k0kubun | 2018-03-11 18:47:28 +0900 (Sun, 11 Mar 2018) | 5 lines

test_jit.rb: show debugging output on stderr

instead of stdout.

We would not capture the output as test results.
------------------------------------------------------------------------
r62721 | k0kubun | 2018-03-11 18:36:08 +0900 (Sun, 11 Mar 2018) | 1 line

test_jit.rb: fix typo
------------------------------------------------------------------------
r62720 | k0kubun | 2018-03-11 18:32:48 +0900 (Sun, 11 Mar 2018) | 8 lines

test_jit.rb: add debugging output

Sometimes gcc fails to exec cc1 like this:
https://gist.github.com/ko1/c3db8b193e9cc65c39c541e10d957509

I'm not sure why it happens at all. Please let me add this debugging
output to inspect the random failure on CI for now.
I'll remove this after we confirm it's not helpful.
------------------------------------------------------------------------
r62719 | svn | 2018-03-11 09:05:14 +0900 (Sun, 11 Mar 2018) | 1 line

* 2018-03-11
------------------------------------------------------------------------
r62718 | nobu | 2018-03-11 09:05:12 +0900 (Sun, 11 Mar 2018) | 5 lines

re.c: fixed escaped multibyte char

* re.c (unescape_nonascii): escaped multibyte character should be
  copied as-is, just with checking if the encoding matches.
  https://twitter.com/sakuro/status/972014409986883584
------------------------------------------------------------------------
r62717 | k0kubun | 2018-03-10 23:52:12 +0900 (Sat, 10 Mar 2018) | 33 lines

compile.c: mark all ISeq ancestors as catch_except_p

This change assumes that continuously reading `parent_iseq` from block
ISeq would reach non-block ISeq finally.

test/ruby/test_jit.rb: add test that catches 2-depth exception

Combination of r62654 and r62678 caused following error in this test.

-e:12:in `wrapper': Stack consistency error (sp: 14, bp: 13) (fatal)
== disasm: #<ISeq:wrapper@-e:10 (10,0)-(12,3)> (catch: FALSE)===========
local table (size: 2, argc: 2 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 2] paths<Arg> [ 1] prefixes<Arg>
0000 putself                                                          (  11)[LiCa]
0001 getlocal_WC_0    paths
0003 getlocal_WC_0    prefixes
0005 opt_send_without_block <callinfo!mid:catch_true, argc:2, FCALL|ARGS_SIMPLE>, <callcache>
0008 leave                                                            (  12)[Re]

As you can see, it says `catch: FALSE`, but obviously it catches
exception raised from `return path`.

As of r62655, it was kind of intentional because I only cared about
expiration of JIT-ed frame and I've thought calling `vm_exec` is only
needed once for it. So r62654 was NOT actually checking if it may catch
exception.

But for r62678, obviously we should set catch_except_p=TRUE for all
ISeqs which may catch exception. Otherwise catch table lookup would
fail.

With this bugfix, code generated by r62655 might be worse, but at least
while loop can be marked as `catch: FALSE` as expected.
------------------------------------------------------------------------
r62716 | nobu | 2018-03-10 20:26:54 +0900 (Sat, 10 Mar 2018) | 1 line

signal.c: refine error messages
------------------------------------------------------------------------
r62715 | nobu | 2018-03-10 19:36:35 +0900 (Sat, 10 Mar 2018) | 4 lines

signal.c: check NUL bytes

* signal.c (trap_signm): check NUL bytes explicitly before raising
  "unsupported signal" ArgumentError.
------------------------------------------------------------------------
r62714 | k0kubun | 2018-03-10 16:05:32 +0900 (Sat, 10 Mar 2018) | 8 lines

mjit.c: keep mutex unlocked on destroy

`mjit_finish` may destroy mutex even while it's still locked by
`worker` by race condition. That would result in the following error:
[BUG] pthread_mutex_destroy: Device or resource busy (EBUSY)

Actually I couldn't get a core dump for it and reproduce it multiple
times. So I'm not sure this fixes the issue which I faced or not.
------------------------------------------------------------------------
r62713 | suke | 2018-03-10 15:46:01 +0900 (Sat, 10 Mar 2018) | 1 line

ext/win32ole/win32ole.c: fix typo. [ci skip]
------------------------------------------------------------------------
r62710 | suke | 2018-03-10 11:16:30 +0900 (Sat, 10 Mar 2018) | 1 line

* ext/win32ole/win32ole.c: fix url of ActiveState. Thanks to Kazuhiro Nishiyama. [ci skip]
------------------------------------------------------------------------
r62709 | kazu | 2018-03-10 09:34:24 +0900 (Sat, 10 Mar 2018) | 8 lines

Fix warning: cast from pointer to integer of different size

```
.../ruby/iseq.c: In function 'rb_vm_insn_null_translator':
.../ruby/iseq.c:137:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     return (int)addr;
            ^
```
------------------------------------------------------------------------
r62708 | kazu | 2018-03-10 09:33:11 +0900 (Sat, 10 Mar 2018) | 8 lines

Fix error: implicit conversion loses integer precision

http://ci.rvm.jp/results/trunk_clang_50@silicon-docker/627906
```
iseq.h:41:36: error: implicit conversion loses integer precision: 'rb_num_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
    int cnt = iseq->body->variable.flip_count;
        ~~~   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
```
------------------------------------------------------------------------
r62707 | svn | 2018-03-10 05:11:46 +0900 (Sat, 10 Mar 2018) | 1 line

* 2018-03-10
------------------------------------------------------------------------
r62706 | tenderlove | 2018-03-10 05:11:45 +0900 (Sat, 10 Mar 2018) | 35 lines

Add direct marking on iseq operands

Directly marking iseq operands allows us to eliminate the "mark array"
stored on ISEQ objects, which will reduce the amount of memory ISEQ
objects consume.  This patch changes the iseq mark function to:

* Directly marks ISEQ operands
* Iterate over and mark child ISEQs

It also introduces two flags on the ISEQ object.  In order to mark
instruction operands, we have to disassemble the instructions and find
the instruction parameters and types.  Instructions may also be
translated to jump addresses.  Instruction sequences may get marked by
the GC *while* they're mid flight (being compiled).  The
`ISEQ_TRANSLATED` flag is used to indicate whether or not the
instructions have been translated to jump addresses so that when we
decode the instructions we know whether or not we need to go from jump
location back to original instruction or not.

Not all ISEQ objects have any markable objects embedded in their
instructions.  We can detect whether or not an ISEQ has markable objects
in the instructions at compile time.  If the instructions contain
markable objects, we set a flag `ISEQ_MARKABLE_ISEQ` on the ISEQ object.
This means that during the mark phase, we can skip decompilation if the
flag is *not* set.  In other words, we can avoid decompilation of we
know in advance there is nothing to mark.

`once` instructions have an operand that contains the result of a
one-time compilation of a regex.  Before this patch, that operand was
called an "inline cache", even though the struct was actually an "inline
storage".  This patch changes the operand to be an "inline storage" so
that we can differentiate between caches that need marking (the inline
storage) and caches that don't need marking (inline cache).

[ruby-core:84909]
------------------------------------------------------------------------
r62705 | nobu | 2018-03-09 13:24:48 +0900 (Fri, 09 Mar 2018) | 7 lines

configure.ac: --disable-mathn option

* Makefile.in, win32/Makefile.sub: move CANONICALIZATION_FOR_MATHN
  from config.h which affects all extension libraries to XCFLAGS
  for the core only.

* configure.ac: added --disable-mathn option.
------------------------------------------------------------------------
r62704 | nobu | 2018-03-09 12:57:34 +0900 (Fri, 09 Mar 2018) | 4 lines

math.c: calling order

* math.c (math_log, rb_math_log): inverted calling order, to
  remove unused argument.
------------------------------------------------------------------------
r62703 | nobu | 2018-03-09 12:51:04 +0900 (Fri, 09 Mar 2018) | 1 line

Removed useless assertions [ci skip]
------------------------------------------------------------------------
r62702 | nobu | 2018-03-09 12:02:08 +0900 (Fri, 09 Mar 2018) | 3 lines

rational.c: removed redundant conditions

Fixnums can be compared by object values themselves only.
------------------------------------------------------------------------
r62701 | nobu | 2018-03-09 11:06:39 +0900 (Fri, 09 Mar 2018) | 5 lines

complex.c: removed redundant conditions

Fixnums can be compared by object values themselves only.
Addition/subtraction/mulplication of fixnum 0 do not affect the
sign.
------------------------------------------------------------------------
r62700 | nobu | 2018-03-09 10:51:25 +0900 (Fri, 09 Mar 2018) | 1 line

complex.c: removed already unused macros
------------------------------------------------------------------------
r62699 | svn | 2018-03-09 01:07:55 +0900 (Fri, 09 Mar 2018) | 1 line

* 2018-03-09
------------------------------------------------------------------------
r62698 | naruse | 2018-03-09 01:07:54 +0900 (Fri, 09 Mar 2018) | 4 lines

Raise ArgumentError if host component is nil

From: oss92 <mohamed.o.alnagdy@gmail.com>
fix https://github.com/ruby/ruby/pull/1278
------------------------------------------------------------------------
r62697 | kazu | 2018-03-08 22:00:04 +0900 (Thu, 08 Mar 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r62696 | svn | 2018-03-08 18:38:02 +0900 (Thu, 08 Mar 2018) | 1 line

* 2018-03-08
------------------------------------------------------------------------
r62695 | naruse | 2018-03-08 18:38:01 +0900 (Thu, 08 Mar 2018) | 5 lines

fix error if the input is mixed Unicode and percent-escapes

Reported by kivikakk (Ashe Connor) with tests and doc fix
Patch based on mame and fix by naruse
[Bug #14586]
------------------------------------------------------------------------
r62693 | k0kubun | 2018-03-07 23:35:28 +0900 (Wed, 07 Mar 2018) | 15 lines

transform_mjit_header.rb: inline ivar operations

* Optcarrot

before,--jit: ruby 2.6.0dev (2018-03-07 trunk 62689) +JIT [x86_64-linux]
after,--jit: ruby 2.6.0dev (2018-03-07 trunk 62689) +JIT [x86_64-linux]
last_commit=transform_mjit_header.rb: inline ivar operations
Calculating -------------------------------------
                     before,--jit  after,--jit
           optcarrot       67.852       69.359 fps

Comparison:
                        optcarrot
         after,--jit:        69.4 fps
        before,--jit:        67.9 fps - 1.02x  slower
------------------------------------------------------------------------
r62689 | nobu | 2018-03-07 21:04:43 +0900 (Wed, 07 Mar 2018) | 4 lines

complex.c: check type

* complex.c (m_cos, m_sin): determine the type by the internal
  type, not by a method.
------------------------------------------------------------------------
r62688 | nobu | 2018-03-07 20:54:07 +0900 (Wed, 07 Mar 2018) | 4 lines

complex.c: check type

* complex.c (nucomp_s_canonicalize_internal): determine the type
  by the internal type, not by a method.
------------------------------------------------------------------------
r62687 | nobu | 2018-03-07 20:49:24 +0900 (Wed, 07 Mar 2018) | 3 lines

complex.c, rational.c: no backref

Since r37702, parsing complex and rational do not use regexp.
------------------------------------------------------------------------
r62686 | nobu | 2018-03-07 20:49:23 +0900 (Wed, 07 Mar 2018) | 1 line

complex.c, rational.c: adjust indent
------------------------------------------------------------------------
r62685 | nobu | 2018-03-07 17:07:24 +0900 (Wed, 07 Mar 2018) | 4 lines

date_core.c: check conversion

* ext/date/date_core.c (offset_to_sec, d_lite_plus): check
  conversion results, to get rid of infinite recursion.
------------------------------------------------------------------------
r62684 | nobu | 2018-03-07 16:56:40 +0900 (Wed, 07 Mar 2018) | 1 line

test_date_arith.rb: needs `test_` prefix
------------------------------------------------------------------------
r62683 | nobu | 2018-03-07 16:43:07 +0900 (Wed, 07 Mar 2018) | 4 lines

object.c: conversions with ID

* object.c (rb_to_integer, rb_check_to_int): convert to Integer
  with method ID.
------------------------------------------------------------------------
r62682 | nobu | 2018-03-07 11:27:18 +0900 (Wed, 07 Mar 2018) | 1 line

complex.c, rational.c: simplified macro conditions
------------------------------------------------------------------------
r62681 | svn | 2018-03-07 00:14:23 +0900 (Wed, 07 Mar 2018) | 1 line

* 2018-03-07
------------------------------------------------------------------------
r62680 | nobu | 2018-03-07 00:14:22 +0900 (Wed, 07 Mar 2018) | 5 lines

vm_insnhelper.c: blockparamproxy in rescue

* vm_insnhelper.c (vm_call_opt_block_call): get block handler from
  the method local frame.  fix segfault at calling the proxy in
  rescue.  http://twitter.com/wannabe53/status/970955247626567680
------------------------------------------------------------------------
r62679 | nobu | 2018-03-06 22:43:54 +0900 (Tue, 06 Mar 2018) | 1 line

test_signal.rb: fix arguments order
------------------------------------------------------------------------
r62678 | k0kubun | 2018-03-06 22:23:22 +0900 (Tue, 06 Mar 2018) | 13 lines

_mjit_compile_pc_and_sp.erb: skip moving pc

on !body->catch_except_p. We need to move pc only when JIT execution is
canceled if the frame does not catch an exception.

_mjit_compile_insn.erb: lazily move pc for such optimized case
_mjit_compile_insn_body.erb: ditto
_mjit_compile_send.erb: ditto

* Optcarrot benchmark (--jit)

Before: 65.31 fps
After: 67.82 fps
------------------------------------------------------------------------
r62677 | k0kubun | 2018-03-06 21:53:19 +0900 (Tue, 06 Mar 2018) | 6 lines

transform_mjit_header.rb: inline VM instructions

* Optcarrot benchmark (--jit)

Before: 62.42 fps
After: 65.31 fps
------------------------------------------------------------------------
r62676 | k0kubun | 2018-03-06 20:46:02 +0900 (Tue, 06 Mar 2018) | 3 lines

transform_mjit_header.rb: drop obsoleted debug code

Now RubyCI is stable for this part. We no longer use this.
------------------------------------------------------------------------
r62675 | nobu | 2018-03-06 18:03:24 +0900 (Tue, 06 Mar 2018) | 5 lines

parse.y: tSPACE for old bison

* parse.y (tSPACE): define a separate token for escaped space, to
  fix `redefining user token number of ' '` error at word list
  separator on bison 2.
------------------------------------------------------------------------
r62674 | nobu | 2018-03-06 14:59:29 +0900 (Tue, 06 Mar 2018) | 1 line

use the reference as failure messages
------------------------------------------------------------------------
r62673 | nobu | 2018-03-06 14:15:57 +0900 (Tue, 06 Mar 2018) | 5 lines

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]
------------------------------------------------------------------------
r62672 | nobu | 2018-03-06 12:31:46 +0900 (Tue, 06 Mar 2018) | 4 lines

resolv.rb: remove rangerand

* lib/resolv.rb (Resolv::DNS.rangerand): rand and random_number
  accept a Range.
------------------------------------------------------------------------
r62671 | nobu | 2018-03-06 11:48:17 +0900 (Tue, 06 Mar 2018) | 16 lines

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>
------------------------------------------------------------------------
r62670 | hsbt | 2018-03-06 09:52:15 +0900 (Tue, 06 Mar 2018) | 1 line

Removed redundant private declaration.
------------------------------------------------------------------------
r62669 | svn | 2018-03-06 07:58:14 +0900 (Tue, 06 Mar 2018) | 1 line

* 2018-03-06
------------------------------------------------------------------------
r62668 | normal | 2018-03-06 07:58:13 +0900 (Tue, 06 Mar 2018) | 11 lines

thread.c: reset waitq of keeping mutexes in child

We must not maintain references to threads in the parent process
in any mutexes held by the child process.

* thread_sync.c (rb_mutex_cleanup_keeping_mutexes): new function
* thread.c (rb_thread_atfork): cleanup keeping mutexes
  [ruby-core:85940] [Bug #14578]

Fixes: r58604 (commit 3586c9e0876e784767a1c1adba9ebc2499fa0ec2)
       ("reduce rb_mutex_t size from 160 to 80 bytes on 64-bit")
------------------------------------------------------------------------
r62664 | kazu | 2018-03-05 21:23:48 +0900 (Mon, 05 Mar 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r62663 | nobu | 2018-03-05 17:32:46 +0900 (Mon, 05 Mar 2018) | 4 lines

parse.y: named whitespaces

* parse.y: named escaped whitespaces to show unexpected character.
  bare whitespaces should not appear outside of word_list.
------------------------------------------------------------------------
r62662 | nobu | 2018-03-05 16:21:54 +0900 (Mon, 05 Mar 2018) | 6 lines

README.md: removed unnecessary schemes

`mailto:` scheme on text looking like email-address is unnecessary
in Markdown.  [Fix GH-1827]

Co-Authored-By: YoeriH <yoeri90@gmail.com>
------------------------------------------------------------------------
r62661 | nobu | 2018-03-05 15:56:09 +0900 (Mon, 05 Mar 2018) | 11 lines

Tiny Fix for ASYNC BUG error message copying

The previous logic would overwrite the error message, replacing the message with the `fd` number.

This tiny update will print the message in full.

(I'm trying to debug an issue with the timer thread on my machine and the lack of error messages makes it really hard).

[Fix GH-1829]

From: Bo <bo@bowild.com>
------------------------------------------------------------------------
r62660 | nobu | 2018-03-05 10:57:27 +0900 (Mon, 05 Mar 2018) | 4 lines

required paths are real paths

Fix `test-spec` failures when the build directory is a symbolic
link.
------------------------------------------------------------------------
r62659 | nobu | 2018-03-05 10:54:21 +0900 (Mon, 05 Mar 2018) | 4 lines

Makefile.sub: reconfig

* win32/Makefile.sub (reconfig): phony target to force reconfigure
  with previous options.
------------------------------------------------------------------------
r62658 | ko1 | 2018-03-05 10:17:08 +0900 (Mon, 05 Mar 2018) | 4 lines

add prefix to the function name.

* vm.c (handle_exception): rename to vm_exce_handle_exception.

------------------------------------------------------------------------
r62657 | svn | 2018-03-05 00:10:12 +0900 (Mon, 05 Mar 2018) | 1 line

* 2018-03-05
------------------------------------------------------------------------
r62656 | eregon | 2018-03-05 00:09:32 +0900 (Mon, 05 Mar 2018) | 1 line

Update to ruby/spec@c1b568b
------------------------------------------------------------------------
r62655 | k0kubun | 2018-03-04 16:04:40 +0900 (Sun, 04 Mar 2018) | 79 lines

mjit_compile.c: use local variables for stack

if catch_except_p is FALSE. If catch_except_p is TRUE, stack values
should be on VM's stack when exception is thrown and the JIT-ed frame
is re-executed by VM's exception handler. If it's FALSE, the JIT-ed
frame won't be re-executed and don't need to keep values on VM's stack.

Using local variables allows us to reduce cfp->sp motion. Moving cfp->sp
is needed only for insns whose handles_frame? is false. So it improves
performance.

_mjit_compile_insn.erb: Prepare `stack_size` variable for GET_SP,
STACK_ADDR_FROM_TOP, TOPN macros. Share pc and sp motion partial view.
Use cancel handler created in mjit_compile.c.

_mjit_compile_send.erb: ditto. Also, when iseq->body->catch_except_p is
TRUE, this stops to call mjit_exec directly. I described the reason in
vm_insnhelper.h's comment for EXEC_EC_CFP.

_mjit_compile_pc_and_sp.erb: Shared logic for moving sp and pc. As you
can see from thsi file, when status->local_stack_p is TRUE and
insn.handles_frame? is false, moving sp is skipped. But if
insn.handles_frame? is true, values should be rolled back to VM's stack.
common.mk: add dependency for the file

_mjit_compile_insn_body.erb: Set sp value before canceling JIT on
DISPATCH_ORIGINAL_INSN. Replace GET_SP, STACK_ADDR_FROM_TOP, TOPN macros
for the case ocal_stack_p is TRUE and insn.handles_frame? is false.
In that case, values are not available on VM's stack and those macros
should be replaced.

mjit_compile.inc.erb: updated comments of macros which are supported by
JIT compiler. All references to `cfp->sp` should be replaced and thus
INC_SP, SET_SV, PUSH are no longer supported for now, because they are
not used now.

vm_exec.h: moved EXEC_EC_CFP definition to vm_insnhelper.h because it's
tighly coupled to CALL_METHOD.

vm_insnhelper.h: Have revised EXEC_EC_CFP definition moved from vm_exec.h.
Now it triggers mjit_exec for VM, and has the guard for catch_except_p
on JIT-ed code. See comments for details. CALL_METHOD delegates
triggering mjit_exec to EXEC_EC_CFP.

insns.def: Stopped using EXEC_EC_CFP for the case we don't want to
trigger mjit_exec. Those insns (defineclass, opt_call_c_function) are
not supported by JIT and it's safe to use RESTORE_REGS(), NEXT_INSN().
expandarray is changed to pass GET_SP() to replace the macro in
_mjit_compile_insn_body.erb.

vm_insnhelper.c: change to take sp for the above reason.

[close https://github.com/ruby/ruby/pull/1828]

This patch resurrects the performance which was attached in
[Feature #14235].

* Benchmark

Optcarrot (with configuration for benchmark_driver.gem)
https://github.com/benchmark-driver/optcarrot

$ benchmark-driver benchmark.yml --verbose 1 --rbenv 'before;before+JIT::before,--jit;after;after+JIT::after,--jit' --repeat-count 10
before: ruby 2.6.0dev (2018-03-04 trunk 62652) [x86_64-linux]
before+JIT: ruby 2.6.0dev (2018-03-04 trunk 62652) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-03-04 local-variable.. 62652) [x86_64-linux]
last_commit=mjit_compile.c: use local variables for stack
after+JIT: ruby 2.6.0dev (2018-03-04 local-variable.. 62652) +JIT [x86_64-linux]
last_commit=mjit_compile.c: use local variables for stack
Calculating -------------------------------------
                         before  before+JIT       after   after+JIT
           optcarrot     53.552      59.680      53.697      63.358 fps

Comparison:
                        optcarrot
           after+JIT:        63.4 fps
          before+JIT:        59.7 fps - 1.06x  slower
               after:        53.7 fps - 1.18x  slower
              before:        53.6 fps - 1.18x  slower
------------------------------------------------------------------------
r62654 | k0kubun | 2018-03-04 16:04:28 +0900 (Sun, 04 Mar 2018) | 8 lines

compile.c: set catch_except_p flag

to be used for MJIT's optimization. It's not used for optimization
in this commit yet.

vm_core.h: added catch_except_p field.

iseq.c: show the flag in ISeq disasm for debugging.
------------------------------------------------------------------------
r62653 | nobu | 2018-03-04 15:24:38 +0900 (Sun, 04 Mar 2018) | 1 line

vm.c: trivial optimization
------------------------------------------------------------------------
r62652 | nobu | 2018-03-04 11:37:22 +0900 (Sun, 04 Mar 2018) | 4 lines

vm.c: handle_exception loop

* vm.c (vm_exec): hoist out handle_exception and loop to rewind
  for each catching frames.
------------------------------------------------------------------------
r62650 | nobu | 2018-03-04 11:09:47 +0900 (Sun, 04 Mar 2018) | 4 lines

vm.c: untangle goto loop

* vm.c (vm_exec): moved code to get rid of cross-jumps across
  branches.
------------------------------------------------------------------------
r62649 | svn | 2018-03-04 10:52:20 +0900 (Sun, 04 Mar 2018) | 1 line

* 2018-03-04
------------------------------------------------------------------------
r62648 | nobu | 2018-03-04 10:52:19 +0900 (Sun, 04 Mar 2018) | 1 line

vm_exec.c: reduced repeated same calls
------------------------------------------------------------------------
r62644 | nobu | 2018-03-03 14:09:32 +0900 (Sat, 03 Mar 2018) | 7 lines

mjit_config.h: MJIT_LDSHARED

* configure.in (MJIT_LDSHARED): define based on LDSHARED with
  replacing CC with MJIT_CC.

* Makefile.in, win32/Makefile.sub (mjit_config.h): instead of the
  default LDSHARED, use MJIT_LDSHARED to link mjit shared objects.
------------------------------------------------------------------------
r62643 | k0kubun | 2018-03-03 13:50:14 +0900 (Sat, 03 Mar 2018) | 46 lines

insns.def: unwrap vm_exec for yield

Outer vm_exec can catch longjmp. We don't need to call vm_exec first
here.

This optimizes JIT-ed yield:

* Benchmark script

```
require 'benchmark_driver'

Benchmark.driver do |x|
  x.prelude %{
    def yielder
      yield + 1
    end
  }
  x.report 'yielder', %{
    yielder { 1 }
  }
  x.loop_count 300_000_000

  x.rbenv 'before', 'before,--jit', 'after', 'after,--jit'
  x.verbose
end
```

* Result

before: ruby 2.6.0dev (2018-03-03 trunk 62642) [x86_64-linux]
before,--jit: ruby 2.6.0dev (2018-03-03 trunk 62642) +JIT [x86_64-linux]
after: ruby 2.6.0dev (2018-03-03 trunk 62642) [x86_64-linux]
last_commit=insns.def: unwrap vm_exec for yield
after,--jit: ruby 2.6.0dev (2018-03-03 trunk 62642) +JIT [x86_64-linux]
last_commit=insns.def: unwrap vm_exec for yield
Calculating -------------------------------------
                         before  before,--jit       after  after,--jit
             yielder    37.214M       29.222M     35.904M      38.035M i/s -    300.000M times in 8.061581s 10.266312s 8.355716s 7.887447s

Comparison:
                          yielder
         after,--jit:  38035121.0 i/s
              before:  37213544.0 i/s - 1.02x  slower
               after:  35903565.7 i/s - 1.06x  slower
        before,--jit:  29221787.6 i/s - 1.30x  slower
------------------------------------------------------------------------
r62642 | svn | 2018-03-03 13:07:03 +0900 (Sat, 03 Mar 2018) | 1 line

* 2018-03-03
------------------------------------------------------------------------
r62641 | k0kubun | 2018-03-03 13:07:02 +0900 (Sat, 03 Mar 2018) | 173 lines

vm.c: add mjit_enable_p flag

to count up total calls properly. Some places (especially CALL_METHOD)
invoke mjit_exec twice for one method call. It would be problematic when
debugging, or possibly it would result in a wrong profiling result.

This commit doesn't have impact for performance:

* Optcarrot benchmark

** before

fps: 59.37757770848619
fps: 56.49998488958699
fps: 59.07900362739362
fps: 58.924749807695996
fps: 57.667905665594894
fps: 57.540021018385254
fps: 59.5518055679647
fps: 55.93831555148311
fps: 57.82685112863262
fps: 59.22391754481736
checksum: 59662

** after

fps: 58.461881158098194
fps: 59.32685183081354
fps: 54.11334310279802
fps: 59.2281560439788
fps: 58.60495705318312
fps: 55.696478648491045
fps: 58.49003452654724
fps: 58.387771929393224
fps: 59.24156772816439
fps: 56.68804731968107
checksum: 59662

* Discourse

Your Results: (note for timings- percentile is first, duration is second in millisecs)

** before (without JIT)

categories_admin:
  50: 16
  75: 17
  90: 24
  99: 37
home_admin:
  50: 20
  75: 20
  90: 24
  99: 42
topic_admin:
  50: 16
  75: 16
  90: 18
  99: 28
categories:
  50: 36
  75: 37
  90: 45
  99: 68
home:
  50: 38
  75: 40
  90: 53
  99: 92
topic:
  50: 14
  75: 15
  90: 17
  99: 26

** after (without JIT)

categories_admin:
  50: 16
  75: 16
  90: 24
  99: 36
home_admin:
  50: 19
  75: 20
  90: 23
  99: 41
topic_admin:
  50: 16
  75: 16
  90: 19
  99: 33
categories:
  50: 35
  75: 36
  90: 44
  99: 61
home:
  50: 38
  75: 40
  90: 52
  99: 101
topic:
  50: 14
  75: 15
  90: 15
  99: 24

** before (with JIT)

categories_admin:
  50: 19
  75: 23
  90: 29
  99: 44
home_admin:
  50: 24
  75: 26
  90: 32
  99: 46
topic_admin:
  50: 20
  75: 22
  90: 27
  99: 44
categories:
  50: 41
  75: 43
  90: 51
  99: 66
home:
  50: 46
  75: 49
  90: 56
  99: 68
topic:
  50: 18
  75: 19
  90: 22
  99: 31

** after (with JIT)

categories_admin:
  50: 18
  75: 21
  90: 28
  99: 42
home_admin:
  50: 23
  75: 25
  90: 31
  99: 51
topic_admin:
  50: 19
  75: 20
  90: 24
  99: 31
categories:
  50: 41
  75: 44
  90: 52
  99: 69
home:
  50: 45
  75: 48
  90: 61
  99: 88
topic:
  50: 19
  75: 20
  90: 24
  99: 33
------------------------------------------------------------------------
r62637 | nobu | 2018-03-02 23:45:28 +0900 (Fri, 02 Mar 2018) | 5 lines

openssl: search winsock

* ext/openssl/extconf.rb: on Windows search winsock library
  always, regardless pkg-config.  direct use of winsock is not
  region of OpenSSL.  [ruby-core:85895] [Bug #14568]
------------------------------------------------------------------------
r62635 | eregon | 2018-03-02 21:56:37 +0900 (Fri, 02 Mar 2018) | 3 lines

Clarify the documentation of the YAML module [Misc #14567]

Based on a patch from Victor Shepelev
------------------------------------------------------------------------
r62633 | nobu | 2018-03-02 20:24:29 +0900 (Fri, 02 Mar 2018) | 1 line

io/console: drop 2.1.0 support [ci skip]
------------------------------------------------------------------------
r62631 | nobu | 2018-03-02 16:53:27 +0900 (Fri, 02 Mar 2018) | 1 line

io/console: drop 2.0.0 support [ci skip]
------------------------------------------------------------------------
r62630 | nobu | 2018-03-02 16:49:20 +0900 (Fri, 02 Mar 2018) | 4 lines

Makefile.sub: need suffix

* win32/Makefile.sub: fix missing suffix of user32.lib.
  [Bug #14422]
------------------------------------------------------------------------
r62629 | nobu | 2018-03-02 16:24:16 +0900 (Fri, 02 Mar 2018) | 4 lines

Makefile.sub: link user32.lib

* win32/Makefile.sub: always link user32.lib which provides a lot
  of very common library functions.  [Bug #14422]
------------------------------------------------------------------------
r62628 | nobu | 2018-03-02 13:36:14 +0900 (Fri, 02 Mar 2018) | 1 line

search winsock libraries explicitly
------------------------------------------------------------------------
r62627 | nobu | 2018-03-02 10:37:53 +0900 (Fri, 02 Mar 2018) | 6 lines

configure.ac: library options to MAINLIBS

* configure.ac (MAINLIBS): moved library options for main program
  and static libruby, and append MAINLIBS to LIBRUBYARG_STATIC, as
  these libraries are not needed for linking to shared libruby.
  [ruby-core:85882] [Bug #14422]
------------------------------------------------------------------------
r62626 | nobu | 2018-03-02 10:16:37 +0900 (Fri, 02 Mar 2018) | 1 line

Makefile.in (ruby.pc): phony target [ci skip]
------------------------------------------------------------------------
r62625 | nobu | 2018-03-02 09:37:28 +0900 (Fri, 02 Mar 2018) | 1 line

configure.ac: fix up r59130
------------------------------------------------------------------------
r62624 | svn | 2018-03-02 07:49:27 +0900 (Fri, 02 Mar 2018) | 1 line

* 2018-03-02
------------------------------------------------------------------------
r62623 | nobu | 2018-03-02 07:49:26 +0900 (Fri, 02 Mar 2018) | 6 lines

MJIT specific flags

Passing options to configure like as `configure MJIT_OPTFLAGS=-O
MJIT_DEBUGFLAGS=-g` overrides options to be used to compile JIT
code, separately from the default options to be used for ruby
itself.
------------------------------------------------------------------------
r62622 | nobu | 2018-03-01 17:26:02 +0900 (Thu, 01 Mar 2018) | 5 lines

compile.c: raise on invalid input

* compile.c (ibf_load_object_unsupported, ibf_load_object_class):
  should raise an exception.  rejection of invalid input is not a
  bug.
------------------------------------------------------------------------
r62621 | nobu | 2018-03-01 16:59:57 +0900 (Thu, 01 Mar 2018) | 5 lines

compile.c: do not truncate VALUE to long

* compile.c (ibf_dump_object_regexp): do not truncate VALUE to
  long.  it makes invalid VALUE on IL32LLP64 platforms where long
  is shorter than VALUE.
------------------------------------------------------------------------
r62620 | nobu | 2018-03-01 13:10:25 +0900 (Thu, 01 Mar 2018) | 5 lines

parse.y: refine assign_in_cond warning

* parse.y (assign_in_cond): refine a warning message for
  assignment of a literal in conditinal expression.
  [ruby-core:85872] [Bug #14562]
------------------------------------------------------------------------
r62619 | nobu | 2018-03-01 12:26:05 +0900 (Thu, 01 Mar 2018) | 1 line

tool/bisect.sh: extracted build part [ci skip]
------------------------------------------------------------------------
r62618 | nobu | 2018-03-01 11:33:15 +0900 (Thu, 01 Mar 2018) | 4 lines

bisect.sh: make srcs in builddir [ci skip]

* tool/bisect.sh: also srcs needs Makefile, must in the build but
  not the source directory.
------------------------------------------------------------------------
r62617 | nobu | 2018-03-01 09:37:47 +0900 (Thu, 01 Mar 2018) | 4 lines

compile.c: fix load_from_binary

* compile.c (ibf_load_iseq_each): realpath may be nil.  follow up
  r59709.  [fix https://github.com/Shopify/bootsnap/issues/132]
------------------------------------------------------------------------
r62616 | svn | 2018-03-01 08:31:43 +0900 (Thu, 01 Mar 2018) | 1 line

* 2018-03-01
------------------------------------------------------------------------
r62615 | nobu | 2018-03-01 08:31:42 +0900 (Thu, 01 Mar 2018) | 5 lines

Revert r61936 "compile.c: use ALLOCV_N"

* compile.c (ibf_dump_object_list): `dump->obj_list` is not fixed
  yet, as new objects are pushed by lbf_dump_object_object.
  fixes crash by buffer overflow.
------------------------------------------------------------------------
r62614 | k0kubun | 2018-02-28 23:31:17 +0900 (Wed, 28 Feb 2018) | 3 lines

NEWS: resurrect ticket number [ci skip]

which was unintentionally dropped at r62612.
------------------------------------------------------------------------
r62613 | nobu | 2018-02-28 22:32:29 +0900 (Wed, 28 Feb 2018) | 3 lines

common.mk: clean timestamp and intermediate header

[ci-skip]
------------------------------------------------------------------------
r62612 | k0kubun | 2018-02-28 21:12:20 +0900 (Wed, 28 Feb 2018) | 8 lines

erb.rb: relax warn level of ERB.new

I changed my mind and thought branching ERB.new in all libraries is too
hard. Code becomes too ugly. I increased the warn level to 2, and the
old initializer will be removed when Ruby 2.5 becomes EOL.
-S option of erb(1) stays in the same policy: will be removed at Ruby 2.7.

NEWS: note about the direction
------------------------------------------------------------------------
r62611 | hsbt | 2018-02-28 20:12:36 +0900 (Wed, 28 Feb 2018) | 1 line

Prefer to use %x instead of backtick.
------------------------------------------------------------------------
r62608 | ko1 | 2018-02-28 16:31:49 +0900 (Wed, 28 Feb 2018) | 6 lines

skip a test if another Thread is running.

* test/ruby/test_time.rb (test_strftime_no_hidden_garbage): this test
  checks no object allocation while specific process, however another
  thread can generate objects.

------------------------------------------------------------------------
r62607 | nobu | 2018-02-28 14:43:53 +0900 (Wed, 28 Feb 2018) | 5 lines

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]
------------------------------------------------------------------------
r62606 | nobu | 2018-02-28 14:17:01 +0900 (Wed, 28 Feb 2018) | 5 lines

file.c: get rid of useless conversion

* file.c (rb_file_s_stat): File.stat does not accept an IO
  object as trying conversion to path name string first.  skip
  conversion to IO and try stat(2) only.
------------------------------------------------------------------------
r62605 | eregon | 2018-02-28 05:45:59 +0900 (Wed, 28 Feb 2018) | 1 line

Update to ruby/spec@51f301d
------------------------------------------------------------------------
r62604 | eregon | 2018-02-28 05:44:57 +0900 (Wed, 28 Feb 2018) | 3 lines

Remove tool/pull-latest-mspec-spec

* It is now part of mspec in spec/mspec/tool/pull-latest-mspec-spec
------------------------------------------------------------------------
r62603 | svn | 2018-02-28 05:21:26 +0900 (Wed, 28 Feb 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62602 | eregon | 2018-02-28 05:21:25 +0900 (Wed, 28 Feb 2018) | 1 line

Update to ruby/spec@cbe855c
------------------------------------------------------------------------
r62601 | svn | 2018-02-28 05:21:02 +0900 (Wed, 28 Feb 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62600 | eregon | 2018-02-28 05:21:01 +0900 (Wed, 28 Feb 2018) | 1 line

Update to ruby/mspec@d287466
------------------------------------------------------------------------
r62599 | svn | 2018-02-28 01:45:10 +0900 (Wed, 28 Feb 2018) | 1 line

* 2018-02-28
------------------------------------------------------------------------
r62598 | mrkn | 2018-02-28 01:45:09 +0900 (Wed, 28 Feb 2018) | 6 lines

Support two `to_r`-responding args in Rational()

* rational.c (nurat_s_convert): call `to_r` to convert non-Numeric
  objects also if argc == 2 in Rational().

* test/ruby/test_rational.rb: add tests.
------------------------------------------------------------------------
r62597 | nobu | 2018-02-27 23:22:57 +0900 (Tue, 27 Feb 2018) | 1 line

common.mk: added missing dependencies on id.h
------------------------------------------------------------------------
r62596 | hsbt | 2018-02-27 23:08:26 +0900 (Tue, 27 Feb 2018) | 4 lines

[EXPERIMENTAL] Support upload option for s3 package hosting.

  Example:
    $ ruby tool/make-snapshot -archname=snapshot -s3=tmp /tmp trunk
------------------------------------------------------------------------
r62595 | nobu | 2018-02-27 22:28:31 +0900 (Tue, 27 Feb 2018) | 5 lines

random.c: Random.extend Formatter

* random.c (InitVM_Random): extend Random itself by Formatter
  module, as well as the `bytes` method used by the module.
  [Feature #4938]
------------------------------------------------------------------------
r62594 | k0kubun | 2018-02-27 20:12:23 +0900 (Tue, 27 Feb 2018) | 3 lines

Refactor ERB version checking for keyword arguments

Improving code like r62590. See r62529 for details.
------------------------------------------------------------------------
r62593 | nobu | 2018-02-27 17:15:27 +0900 (Tue, 27 Feb 2018) | 1 line

defs/id.def: predefine to_f ID
------------------------------------------------------------------------
r62592 | svn | 2018-02-27 10:17:47 +0900 (Tue, 27 Feb 2018) | 1 line

* 2018-02-27
------------------------------------------------------------------------
r62591 | nobu | 2018-02-27 10:17:46 +0900 (Tue, 27 Feb 2018) | 1 line

complex.c: use predefined IDs
------------------------------------------------------------------------
r62590 | k0kubun | 2018-02-26 23:42:39 +0900 (Mon, 26 Feb 2018) | 72 lines

tool/ruby_vm/helpers/dumper.rb: check ERB version

I could not `make` trunk (62585) without this patch.

```
$ make -j4 && make install
        BASERUBY = /home/pocke/.rbenv/shims/ruby --disable=gems
        CC = gcc
        LD = ld
        LDSHARED = gcc -shared
        CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Werror=implicit-int -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=deprecated-declarations -Werror=misleading-indentation -Wno-overlength-strings -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wmissing-noreturn -Wimplicit-fallthrough=0 -Werror=duplicated-cond -Werror=restrict -std=gnu99  -fPIC
        XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -DRUBY_DEVEL=1 -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT
        CPPFLAGS =   -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/10.0.0
        DLDFLAGS = -Wl,--compress-debug-sections=zlib -Wl,-soname,libruby.so.2.6  -fstack-protector
        SOLIBS = -lpthread -lgmp -ldl -lcrypt -lm
        LANG = en_GB.UTF-8
        LC_ALL =
        LC_CTYPE =
gcc (GCC) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

generating opt_sc.inc
generating optunifs.inc
generating insns.inc
generating insns_info.inc
Traceback (most recent call last):
        6: from ./tool/insns2vm.rb:9:in `<main>'
        5: from ./tool/insns2vm.rb:9:in `each'
        4: from ./tool/insns2vm.rb:10:in `block in <main>'
        3: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:98:in `generate'
        2: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:76:in `do_render'
        1: from /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:873:in `result'
/home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError)
make: *** [Makefile:534: opt_sc.inc] Error 1
make: *** Waiting for unfinished jobs....
Traceback (most recent call last):
        6: from ./tool/insns2vm.rb:9:in `<main>'
        5: from ./tool/insns2vm.rb:9:in `each'
        4: from ./tool/insns2vm.rb:10:in `block in <main>'
        3: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:98:in `generate'
        2: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:76:in `do_render'
        1: from /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:873:in `result'
/home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError)
make: *** [Makefile:534: optunifs.inc] Error 1
Traceback (most recent call last):
        6: from ./tool/insns2vm.rb:9:in `<main>'
        5: from ./tool/insns2vm.rb:9:in `each'
        4: from ./tool/insns2vm.rb:10:in `block in <main>'
        3: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:98:in `generate'
        2: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:76:in `do_render'
        1: from /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:873:in `result'
/home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError)
Traceback (most recent call last):
        6: from ./tool/insns2vm.rb:9:in `<main>'
        5: from ./tool/insns2vm.rb:9:in `each'
        4: from ./tool/insns2vm.rb:10:in `block in <main>'
        3: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:98:in `generate'
        2: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:76:in `do_render'
        1: from /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:873:in `result'
/home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError)
make: *** [Makefile:534: insns.inc] Error 1
make: *** [Makefile:534: insns_info.inc] Error 1
```

I guess this issue is same as https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/62531
So I applied the same change to tool/ruby_vm/helpers/dumper.rb also.

close https://github.com/ruby/ruby/pull/1826

Co-authored-by: Masataka Pocke Kuwabara <kuwabara@pocke.me>
------------------------------------------------------------------------
r62589 | nobu | 2018-02-26 23:39:16 +0900 (Mon, 26 Feb 2018) | 1 line

use convert_type_with_id
------------------------------------------------------------------------
r62588 | nobu | 2018-02-26 23:30:39 +0900 (Mon, 26 Feb 2018) | 1 line

use convert_type_with_id
------------------------------------------------------------------------
r62585 | nobu | 2018-02-26 17:37:02 +0900 (Mon, 26 Feb 2018) | 5 lines

Makefile.in: fix portability issue

* Makefile.in (mjit_config.h): Alternative value with $@ and
  printf without argument are not portable, could fail on some
  platforms.
------------------------------------------------------------------------
r62584 | naruse | 2018-02-26 17:01:05 +0900 (Mon, 26 Feb 2018) | 1 line

r62071 is backported into Ruby 2.5 [Bug #14407]
------------------------------------------------------------------------
r62583 | nobu | 2018-02-26 16:57:16 +0900 (Mon, 26 Feb 2018) | 1 line

make-snapshot: added missing options to usage
------------------------------------------------------------------------
r62582 | mrkn | 2018-02-26 16:57:15 +0900 (Mon, 26 Feb 2018) | 11 lines

Use RB_INTEGER_TYPE_P instead of rb_obj_is_kind_of

For checking whether an object is an Integer, because a subclass of
Integer is meaningless in Ruby, RB_INTEGER_TYPE_P is better than
rb_obj_is_kind_of for speed.

* object.c (rb_to_integer): Use RB_INTEGER_TYPE_P instead of rb_obj_is_kind_of.

* object.c (rb_check_to_integer): ditto.

* range.c (range_max): ditto.
------------------------------------------------------------------------
r62581 | mrkn | 2018-02-26 16:31:10 +0900 (Mon, 26 Feb 2018) | 10 lines

Check the result of to_int in Kernel#Integer

[ruby-core:85813] [Bug #14552]

* object.c (rb_convert_to_integer):
  Check the result of to_int in Kernel#Integer

* test/ruby/test_integer.rb: add tests.

* spec/ruby/core/kernel/Integer_spec.rb: fix examples.
------------------------------------------------------------------------
r62580 | svn | 2018-02-26 15:00:10 +0900 (Mon, 26 Feb 2018) | 1 line

* 2018-02-26
------------------------------------------------------------------------
r62579 | nobu | 2018-02-26 15:00:10 +0900 (Mon, 26 Feb 2018) | 4 lines

make-snapshot: exporting ChangLog with git

* tool/make-snapshot (package): export ChangLog file under the
  exported directory.  Git can work only under a git repository.
------------------------------------------------------------------------
r62578 | nobu | 2018-02-26 15:00:09 +0900 (Mon, 26 Feb 2018) | 1 line

make-snapshot: remove -j option from GNUMAKEFLAGS
------------------------------------------------------------------------
r62577 | nobu | 2018-02-26 15:00:08 +0900 (Mon, 26 Feb 2018) | 4 lines

vcs.rb: .git at export

* tool/vcs.rb (VCS::GIT#export): do not remove .git directory.
  should remove it by after_export.
------------------------------------------------------------------------
r62576 | svn | 2018-02-25 22:52:08 +0900 (Sun, 25 Feb 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62575 | eregon | 2018-02-25 22:52:07 +0900 (Sun, 25 Feb 2018) | 12 lines

Add a new #filter alias for #select

* In Enumerable, Enumerator::Lazy, Array, Hash and Set
  [Feature #13784] [ruby-core:82285]
* Share specs for the various #select#select! methods and
  reuse them for #filter/#filter!.
* Add corresponding filter tests for select tests.
* Update NEWS.

[Fix GH-1824]

From: Alexander Patrick <adp90@case.edu>
------------------------------------------------------------------------
r62574 | nobu | 2018-02-25 22:17:35 +0900 (Sun, 25 Feb 2018) | 1 line

date_parse.c, date_strptime.c: ensure symbols static all
------------------------------------------------------------------------
r62573 | nobu | 2018-02-25 13:49:51 +0900 (Sun, 25 Feb 2018) | 1 line

date_core.c: ensure symbols static all
------------------------------------------------------------------------
r62572 | nobu | 2018-02-25 13:28:11 +0900 (Sun, 25 Feb 2018) | 6 lines

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]
------------------------------------------------------------------------
r62571 | nobu | 2018-02-25 12:08:40 +0900 (Sun, 25 Feb 2018) | 1 line

guard before noreturn function
------------------------------------------------------------------------
r62570 | k0kubun | 2018-02-25 11:12:25 +0900 (Sun, 25 Feb 2018) | 8 lines

process.c: guard eargp against GC

`rb_str_append` may trigger GC, and in that case eargp might be GCed.
Probably for protecting it, `RB_GC_GUARD(execarg_obj)` can be seen in
other places.

Hoping to fix:
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/569818
------------------------------------------------------------------------
r62567 | mrkn | 2018-02-25 00:36:09 +0900 (Sun, 25 Feb 2018) | 4 lines

rb_int_powm: call rb_int_pow directly

* bignum.c (rb_int_powm): call rb_int_pow directly instead of calling `**`
  operator.
------------------------------------------------------------------------
r62566 | svn | 2018-02-25 00:06:08 +0900 (Sun, 25 Feb 2018) | 1 line

* 2018-02-25
------------------------------------------------------------------------
r62565 | mrkn | 2018-02-25 00:06:07 +0900 (Sun, 25 Feb 2018) | 1 line

complex.c, rational.c: remove dead code
------------------------------------------------------------------------
r62564 | mrkn | 2018-02-24 23:56:36 +0900 (Sat, 24 Feb 2018) | 3 lines

rational.c: simplify a branch condition

* rational.c (nurat_s_convert): simplify a branch condition.
------------------------------------------------------------------------
r62563 | kazu | 2018-02-24 17:54:19 +0900 (Sat, 24 Feb 2018) | 1 line

lib/erb.rb: Add uplevel to warn
------------------------------------------------------------------------
r62560 | naruse | 2018-02-24 11:58:41 +0900 (Sat, 24 Feb 2018) | 3 lines

Judge ERB version not RUBY_VERSION but ERB.version

On cross compilation, ruby command uses fake RUBY_VERSION.
------------------------------------------------------------------------
r62559 | naruse | 2018-02-24 11:58:39 +0900 (Sat, 24 Feb 2018) | 1 line

On getting changelog, use git-log with --no-notes
------------------------------------------------------------------------
r62558 | nobu | 2018-02-24 11:55:03 +0900 (Sat, 24 Feb 2018) | 1 line

version.h: get rid of duplication
------------------------------------------------------------------------
r62557 | nobu | 2018-02-24 11:48:09 +0900 (Sat, 24 Feb 2018) | 1 line

test for r62555
------------------------------------------------------------------------
r62556 | nobu | 2018-02-24 11:45:12 +0900 (Sat, 24 Feb 2018) | 3 lines

rational.c: removed needless calc

* rational.c (read_num): exp(0) is 1, no need to multiply.
------------------------------------------------------------------------
r62555 | nobu | 2018-02-24 11:08:36 +0900 (Sat, 24 Feb 2018) | 6 lines

rational.c: segfault on Rational exponent

* rational.c (read_num): fix segfault on Rational() with positive
  but less than the length of fractional part exponent.  should be
  negated to convert to divisor which is a reciprocal.
  [ruby-core:85783] [Bug #14547]
------------------------------------------------------------------------
r62553 | nobu | 2018-02-24 10:12:51 +0900 (Sat, 24 Feb 2018) | 9 lines

Improve Array#sample with random documentation

* array.c (rb_ary_sample): Adds examples for the use of the
  optional parameter random for Array#sample and unifies the style
  with the documentation of Array#shuffle.

[Fix GH-1825]

From: Alberto Almagro <alberto.almagro@rakuten.com>
------------------------------------------------------------------------
r62552 | k0kubun | 2018-02-24 10:05:20 +0900 (Sat, 24 Feb 2018) | 4 lines

NEWS: elaborate on JIT for 2.6.0-preview1 [ci skip]

This information is backported from the draft of 2.6.0-preview1 release
note. NEWS for final 2.6.0 release will be different.
------------------------------------------------------------------------
r62551 | nobu | 2018-02-24 10:02:58 +0900 (Sat, 24 Feb 2018) | 7 lines

Fix typo: blcok -> block

Typo in a comment about "evaluator body".

[Fix GH-1824]

From: hkdnet <satoko.itse@gmail.com>
------------------------------------------------------------------------
r62550 | svn | 2018-02-24 09:40:37 +0900 (Sat, 24 Feb 2018) | 1 line

* 2018-02-24
------------------------------------------------------------------------
r62549 | k0kubun | 2018-02-24 09:40:36 +0900 (Sat, 24 Feb 2018) | 1 line

mjit.c: fix deadlock on marking MJIT's ISeq
------------------------------------------------------------------------
r62548 | nobu | 2018-02-23 17:39:03 +0900 (Fri, 23 Feb 2018) | 4 lines

eval_error.c: rb_error_write flags

* eval_error.c (rb_error_write): add highlight and reverse mode
  flags.  defaulted to rb_stderr_tty_p() if Qnil.
------------------------------------------------------------------------
r62547 | nobu | 2018-02-23 17:32:33 +0900 (Fri, 23 Feb 2018) | 6 lines

groups_spec.rb: get rid of limit on macOS

* spec/ruby/core/process/groups_spec.rb: on macOS, getgroups(2)
  has a variant which has no limit but not setgroups(2).  so the
  default groups may exceed the limit.  as the call of setgroups
  is expected to fail here, the content does not matter.
------------------------------------------------------------------------
r62546 | hsbt | 2018-02-23 14:09:11 +0900 (Fri, 23 Feb 2018) | 1 line

Update minitest-5.11.3 on bundled gems.
------------------------------------------------------------------------
r62545 | nobu | 2018-02-23 12:45:55 +0900 (Fri, 23 Feb 2018) | 1 line

Use Process::Tms
------------------------------------------------------------------------
r62544 | nobu | 2018-02-23 11:18:52 +0900 (Fri, 23 Feb 2018) | 1 line

[DOC] missing docs at toplevel
------------------------------------------------------------------------
r62543 | nobu | 2018-02-23 11:16:43 +0900 (Fri, 23 Feb 2018) | 1 line

[DOC] obsolete classes
------------------------------------------------------------------------
r62542 | nobu | 2018-02-23 11:16:42 +0900 (Fri, 23 Feb 2018) | 1 line

[DOC] nodoc internal methods/classes
------------------------------------------------------------------------
r62541 | nobu | 2018-02-23 11:16:41 +0900 (Fri, 23 Feb 2018) | 1 line

[DOC] hide declaration from rdoc
------------------------------------------------------------------------
r62540 | nobu | 2018-02-23 11:16:41 +0900 (Fri, 23 Feb 2018) | 1 line

process.c: deprecated Struct::Tms
------------------------------------------------------------------------
r62536 | eregon | 2018-02-23 00:34:17 +0900 (Fri, 23 Feb 2018) | 1 line

test/ruby/test_rubyoptions.rb: fix typo and only expect +JIT for CRuby
------------------------------------------------------------------------
r62535 | k0kubun | 2018-02-23 00:29:33 +0900 (Fri, 23 Feb 2018) | 1 line

ruby.c: fix typo in r62530
------------------------------------------------------------------------
r62534 | svn | 2018-02-23 00:11:13 +0900 (Fri, 23 Feb 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62533 | k0kubun | 2018-02-23 00:11:12 +0900 (Fri, 23 Feb 2018) | 4 lines

test_rubyoptions.rb: don't test --jit if not supported

test/lib/jit_support.rb: carved out JITSupport
test/ruby/test_jit.rb: ditto
------------------------------------------------------------------------
r62532 | svn | 2018-02-23 00:03:09 +0900 (Fri, 23 Feb 2018) | 1 line

* 2018-02-23
------------------------------------------------------------------------
r62531 | k0kubun | 2018-02-23 00:03:08 +0900 (Fri, 23 Feb 2018) | 18 lines

tool/generic_erb.rb: check ERB version

instead of Ruby's.

When older ERB is installed but Ruby is still 2.6.0, this may cause
error like:

```
Traceback (most recent call last):
    5: from ../src/tool/generic_erb.rb:36:in `<main>'
    4: from ../src/tool/generic_erb.rb:36:in `map'
    3: from ../src/tool/generic_erb.rb:43:in `block in <main>'
    2: from ../src/tool/generic_erb.rb:43:in `block (2 levels) in <main>'
    1: from /opt/local/lib/ruby/2.6.0/erb.rb:873:in `result'
/opt/local/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError)
```

For safety, I changed this to check ERB's version. See also: r62529.
------------------------------------------------------------------------
r62530 | k0kubun | 2018-02-22 23:53:17 +0900 (Thu, 22 Feb 2018) | 34 lines

version.c: show +JIT when --jit is passed

in version output.
version.h: ditto
ruby.c: propagate option for it
common.mk: updated dependency for version.c

mjit.c: overwrites the RUBY_DESCRIPTION to have +JIT when --jit is passed

test/ruby/test_rubyoptions.rb: add test for them

Only `ruby --jit -v` will have "+JIT", but this is intentional.
This may not be convenient for debugging by ticket with `ruby -v`,
but it's convenient for benchmark tools that pass options (--jit)
when showing it. At least such behavior is planned for benchmark_driver.gem
and this behavior is designed for it. Other benchmark tools are
recommended to follow the behavior too if they show version.
RUBY_DESCRIPTION might be useful for it too.

The position of "+JIT" is changed from original proposal because other
platforms like JRuby and TruffleRuby end it with archtecture.
It's made similar to JRuby, but it's upper-cased because Matz made approval
for "+JIT" in the ticket.

Example:
$ ruby -v
ruby 2.6.0dev (2018-02-22 trunk 62529) [x86_64-linux]
$ ruby --jit -v
ruby 2.6.0dev (2018-02-22 trunk 62529) +JIT [x86_64-linux]

After --jit is made default in the future, this output may be removed.
So do not rely on this output if possible.

[Feature #14462]
------------------------------------------------------------------------
r62529 | k0kubun | 2018-02-22 22:28:25 +0900 (Thu, 22 Feb 2018) | 25 lines

erb.rb: deprecate safe_level of ERB.new

Also, as it's in the middle of the list of 4 arguments, 3rd and 4th arguments
(trim_mode, eoutvar) are changed to keyword arguments.
Old ways to specify arguments are deprecated and warned now.

bin/erb: deprecate -S option.

We'll remove all of deprecated ones at Ruby 2.7+.

enc/make_encmake.rb: stopped using deprecated interface
ext/etc/mkconstants.rb: ditto
ext/socket/mkconstants.rb: ditto
sample/ripper/ruby2html.rb: ditto
spec/ruby/library/erb/defmethod/def_erb_method_spec.rb: ditto
spec/ruby/library/erb/new_spec.rb: ditto
test/erb/test_erb.rb: ditto
test/erb/test_erb_command.rb: ditto
tool/generic_erb.rb: ditto
tool/ruby_vm/helpers/dumper.rb: ditto
tool/transcode-tblgen.rb: ditto
lib/rdoc/erbio.rb: ditto
lib/rdoc/generator/darkfish.rb: ditto

[Feature #14256]
------------------------------------------------------------------------
r62528 | nobu | 2018-02-22 21:51:41 +0900 (Thu, 22 Feb 2018) | 6 lines

Fix CMDARG manipulation

* parse.y: Fix CMDARG manipulation. Use CMDARG_P to identify
  keyword_do/keyword_do_block.  [Feature #14506] [Fix GH-1823]

From: Ilya Bylich <ibylich@gmail.com>
------------------------------------------------------------------------
r62526 | nobu | 2018-02-22 16:34:43 +0900 (Thu, 22 Feb 2018) | 5 lines

Ignore rb_mjit_min_header- instead of rb_mjit_header-

[Fix GH-1822]

From: hkdnet <satoko.itse@gmail.com>
------------------------------------------------------------------------
r62525 | nobu | 2018-02-22 16:34:42 +0900 (Thu, 22 Feb 2018) | 5 lines

Ignore /mjit_config.h

[Fix GH-1822]

From: hkdnet <satoko.itse@gmail.com>
------------------------------------------------------------------------
r62524 | nobu | 2018-02-22 14:06:46 +0900 (Thu, 22 Feb 2018) | 1 line

NEWS: fixed unintentional description list [ci skip]
------------------------------------------------------------------------
r62523 | nobu | 2018-02-22 13:55:58 +0900 (Thu, 22 Feb 2018) | 1 line

NEWS: fixed unintentional description list [ci skip]
------------------------------------------------------------------------
r62522 | nobu | 2018-02-22 13:13:02 +0900 (Thu, 22 Feb 2018) | 1 line

NEWS: adjust layout [ci skip]
------------------------------------------------------------------------
r62521 | kou | 2018-02-22 12:33:42 +0900 (Thu, 22 Feb 2018) | 2 lines

Add KeyError, NameError and NoMethodError changes

------------------------------------------------------------------------
r62520 | nobu | 2018-02-22 12:14:39 +0900 (Thu, 22 Feb 2018) | 1 line

NEWS: fixed a typo [ci skip]
------------------------------------------------------------------------
r62519 | nobu | 2018-02-22 10:58:29 +0900 (Thu, 22 Feb 2018) | 4 lines

test_process.rb: assert minimum maxgroups

* test/ruby/test_process.rb (TestProcess#test_maxgroups):
  maxgroups should be one at least.
------------------------------------------------------------------------
r62518 | svn | 2018-02-22 02:06:24 +0900 (Thu, 22 Feb 2018) | 1 line

* 2018-02-22
------------------------------------------------------------------------
r62517 | mame | 2018-02-22 02:06:23 +0900 (Thu, 22 Feb 2018) | 1 line

* NEWS: add NEWS entry about Binding#source_location [Feature #14230]
------------------------------------------------------------------------
r62516 | nobu | 2018-02-21 18:04:48 +0900 (Wed, 21 Feb 2018) | 5 lines

test_process.rb: unlimited getgroups on darwin

* test/ruby/test_process.rb (TestProcess#test_maxgroups): Darwin
  extension of getgroups(2) which is not limited to MAXGROUPS is
  used.
------------------------------------------------------------------------
r62515 | ko1 | 2018-02-21 17:51:49 +0900 (Wed, 21 Feb 2018) | 5 lines

use `--version`.

* benchmark/driver.rb: use `--version` instead of `-v` to get version
  information.

------------------------------------------------------------------------
r62514 | ko1 | 2018-02-21 17:14:51 +0900 (Wed, 21 Feb 2018) | 2 lines

add NEWS entries about [Feature #14318] and [Feature #14330].

------------------------------------------------------------------------
r62513 | hsbt | 2018-02-21 16:12:17 +0900 (Wed, 21 Feb 2018) | 8 lines

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>
------------------------------------------------------------------------
r62512 | hsbt | 2018-02-21 15:31:39 +0900 (Wed, 21 Feb 2018) | 5 lines

Update maintainers of unmaintained libraries.

  [Misc #14211]

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r62508 | nobu | 2018-02-21 14:37:23 +0900 (Wed, 21 Feb 2018) | 4 lines

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]
------------------------------------------------------------------------
r62506 | nobu | 2018-02-21 11:21:10 +0900 (Wed, 21 Feb 2018) | 5 lines

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]
------------------------------------------------------------------------
r62505 | nobu | 2018-02-21 09:55:22 +0900 (Wed, 21 Feb 2018) | 4 lines

vm_insnhelper.c: no insns_info in jit

* vm_insnhelper.c: instructions info are not used in jit source
  code.  resolved a warning by transform_mjit_header.rb.
------------------------------------------------------------------------
r62504 | nobu | 2018-02-21 09:36:29 +0900 (Wed, 21 Feb 2018) | 1 line

Makefile.in (mjit_config.h): fix duplicated output
------------------------------------------------------------------------
r62503 | svn | 2018-02-21 09:17:54 +0900 (Wed, 21 Feb 2018) | 1 line

* 2018-02-21
------------------------------------------------------------------------
r62502 | nobu | 2018-02-21 09:17:54 +0900 (Wed, 21 Feb 2018) | 4 lines

Makefile.in: empty comment

* Makefile.in (mjit_config.h): add an empty comment if no content,
  to tell the empty content explicitly.
------------------------------------------------------------------------
r62500 | nobu | 2018-02-20 19:08:27 +0900 (Tue, 20 Feb 2018) | 7 lines

error.c: bypass Exception.new

* error.c (rb_exc_new, rb_exc_new_str): instantiate exception
  object directly without Exception.new method call.

Redefinition of class method `new` is an outdated style, and
internal exceptions should not be affected by it.
------------------------------------------------------------------------
r62499 | nobu | 2018-02-20 18:39:41 +0900 (Tue, 20 Feb 2018) | 4 lines

mjit.c: separate call from macro

* mjit.c (convert_unit_to_func): separate a function call from a
  macro, which evaluates the argument multiple times.
------------------------------------------------------------------------
r62498 | nobu | 2018-02-20 18:38:55 +0900 (Tue, 20 Feb 2018) | 4 lines

Signature of rb_uint2inum and rb_int2inum

* include/ruby/ruby.h (rb_int2inum, rb_uint2inum): adjust
  declarations.  [ruby-core:83424] [Bug #14036]
------------------------------------------------------------------------
r62497 | nobu | 2018-02-20 18:26:38 +0900 (Tue, 20 Feb 2018) | 4 lines

random.c: Random.bytes

* random.c (random_s_bytes): new method Random.bytes, which is
  equivalent to Random::DEFAULT.bytes.  [Feature #4938]
------------------------------------------------------------------------
r62496 | nobu | 2018-02-20 18:16:34 +0900 (Tue, 20 Feb 2018) | 3 lines

Makefile.in: fix for Solaris

* Makefile.in (mjit_config.h): expand for each words.
------------------------------------------------------------------------
r62495 | normal | 2018-02-20 17:44:38 +0900 (Tue, 20 Feb 2018) | 12 lines

tool/m4/ruby_replace_type.m4: use AC_CHECK_TYPES for HAVE_* macros

AC_CHECK_TYPE (no "S") does not define HAVE_* macros for types,
so use AC_CHECK_TYPES (with "S") instead.  Without this,
HAVE_CLOCKID_T goes undefined and I can't USE_MONOTONIC_COND in
thread_pthread.c :<

Fixes: r62446 (git 673ae0e3c9cefd693ef82f19a6761e147fc6de93)
	("configure.ac: check clockid_t with necessary headers")

* tool/m4/ruby_replace_type.m4: use AC_CHECK_TYPES for HAVE_* macros
  [ruby-core:85659] [Bug #14494]
------------------------------------------------------------------------
r62494 | nobu | 2018-02-20 17:01:44 +0900 (Tue, 20 Feb 2018) | 5 lines

Signature of rb_uint2big and rb_int2big

* include/ruby/ruby.h (rb_uint2big, rb_int2big): declare with
  uintptr_t and intptr_t instead of VALUE and SIGNED_VALUE
  respectively.  [ruby-core:83424] [Bug #14036]
------------------------------------------------------------------------
r62493 | nobu | 2018-02-20 16:51:22 +0900 (Tue, 20 Feb 2018) | 4 lines

mjit.c: fix compile error

* mjit.c (check_tmpdir): W_OK and S_ISDIR may not defined on
  Windows.
------------------------------------------------------------------------
r62492 | nobu | 2018-02-20 14:32:07 +0900 (Tue, 20 Feb 2018) | 5 lines

mjit.c: prefer $TMPDIR and $TMP

* mjit.c (system_tmpdir): prefer `$TMPDIR` and `$TMP` over system
  defulat temporary directory, if exists, writable, and safe.
  [ruby-core:85651] [Bug #14496]
------------------------------------------------------------------------
r62491 | nobu | 2018-02-20 14:32:06 +0900 (Tue, 20 Feb 2018) | 4 lines

mjit.c: dldflags on mingw

* mjit.c (CC_DLDFLAGS_ARGS): default libraries are necessary on
  Windows.
------------------------------------------------------------------------
r62490 | nobu | 2018-02-20 13:05:42 +0900 (Tue, 20 Feb 2018) | 4 lines

mjit.c: fix memory leak

* mjit.c (system_tmpdir): rb_w32_wstr_to_mbstr returns the pointer
  to `malloc`ed region.  allocate with `xmalloc` instead.
------------------------------------------------------------------------
r62489 | nobu | 2018-02-20 12:15:33 +0900 (Tue, 20 Feb 2018) | 5 lines

vm.c: disable dtrace in jit source

* vm.c: include dummy dtrace probes header in jit header.

* vm_insnhelper.c: probes headers are included by vm.c.
------------------------------------------------------------------------
r62488 | nobu | 2018-02-20 11:37:28 +0900 (Tue, 20 Feb 2018) | 4 lines

common.mk: moved macros to mjit_config.h

* Makefile.in, common.mk, win32/Makefile.sub: moved MJIT macros to
  mjit_config.h from XCFLAGS.
------------------------------------------------------------------------
r62487 | svn | 2018-02-20 10:23:24 +0900 (Tue, 20 Feb 2018) | 1 line

* 2018-02-20
------------------------------------------------------------------------
r62486 | nobu | 2018-02-20 10:23:23 +0900 (Tue, 20 Feb 2018) | 1 line

Makefile.in: function to quote for mjit_config.h
------------------------------------------------------------------------
r62485 | normal | 2018-02-19 18:28:56 +0900 (Mon, 19 Feb 2018) | 1 line

thread_pthread.c: spelling ("cancellation")
------------------------------------------------------------------------
r62484 | normal | 2018-02-19 18:28:51 +0900 (Mon, 19 Feb 2018) | 3 lines

thread_pthread.c: fix thread cache for non-monotonic clock

I noticed this because of https://bugs.ruby-lang.org/issues/14494
------------------------------------------------------------------------
r62480 | nobu | 2018-02-19 15:28:03 +0900 (Mon, 19 Feb 2018) | 1 line

mjit.c: fix a typo [ci skip]
------------------------------------------------------------------------
r62479 | nobu | 2018-02-19 10:45:17 +0900 (Mon, 19 Feb 2018) | 8 lines

Escape MINIRUBY in --make-flags to extmk.rb

If MINIRUBY had arguments, which is the case of cross compiling
they wouldn't be parsed correctly and compiling would fail as a RUBY
without arguments would then be present in the Makefile's in ext/*
[ruby-core:85620] [Bug #14486] [Fix GH-1819]

Author:    Carl Horberg <carl.hoerberg@gmail.com>
------------------------------------------------------------------------
r62478 | normal | 2018-02-19 09:30:43 +0900 (Mon, 19 Feb 2018) | 5 lines

thread_pthread.c (native_thread_create): remove needless attrp

Followup-to: r61719 (commit e8f40bd8f83e1b22ef9c22f0e5d7a1fc0b07f94c)
  ("thread_pthread: remove HAVE_PTHREAD_ATTR_INIT ifdefs")
  [ruby-core:84758] [Misc #14342]
------------------------------------------------------------------------
r62477 | normal | 2018-02-19 09:23:00 +0900 (Mon, 19 Feb 2018) | 3 lines

thread_pthread.c (rb_thread_create_mjit_thread): destroy attr

This is required on some platforms to avoid leaks.
------------------------------------------------------------------------
r62476 | normal | 2018-02-19 08:58:35 +0900 (Mon, 19 Feb 2018) | 3 lines

thread_pthread.c (thread cache): destroy cond after unlock

No need to hold a lock while destroying a condition variable.
------------------------------------------------------------------------
r62475 | normal | 2018-02-19 08:58:30 +0900 (Mon, 19 Feb 2018) | 6 lines

thread_pthread.c (rb_thread_create_mjit): set detach before create

This should be slightly cheaper on NPTL as it does not rely on
atomics to set pd->joinid.   We already use pthread_attr_setdetachstate,
so it won't introduce new problems by using a function we did not
use before.
------------------------------------------------------------------------
r62474 | svn | 2018-02-19 06:03:14 +0900 (Mon, 19 Feb 2018) | 1 line

* 2018-02-19
------------------------------------------------------------------------
r62473 | normal | 2018-02-19 06:03:13 +0900 (Mon, 19 Feb 2018) | 5 lines

thread.c: remove redundant USE_SIGALTSTACK #define

thread.c already includes vm_core.h where USE_SIGALTSTACK is
defined, #include it explicitly (eval_intern.h already includes
it)
------------------------------------------------------------------------
r62469 | nobu | 2018-02-18 18:33:21 +0900 (Sun, 18 Feb 2018) | 4 lines

mjit.c: pch file argument

* mjit.c (compile_c_to_so): pass pch file only when using
  "-include-pch" option.
------------------------------------------------------------------------
r62468 | nobu | 2018-02-18 18:23:47 +0900 (Sun, 18 Feb 2018) | 1 line

adjust indent
------------------------------------------------------------------------
r62467 | kazu | 2018-02-18 17:11:50 +0900 (Sun, 18 Feb 2018) | 1 line

README.ja.md: Mac OS X -> macOS [ci skip]
------------------------------------------------------------------------
r62466 | normal | 2018-02-18 16:54:10 +0900 (Sun, 18 Feb 2018) | 13 lines

thread_pthread.c: shorten and fix thread cache implementation

Update to use ccan/list for constant-time delete on expiry and
avoid malloc.  We must also initialize th->thread_id upon thread
reuse so Thread#name= works immediately upon thread creation.

We must also reinitialize the cache mutex and list_head on
fork like we do with GVL and timer thread mutexes.
While we're at it, use monotonic clock for timeout to avoid
system time changes.

"make exam TESTS='-x test_time_tz'" passes with USE_THREAD_CACHE
enabled (but remains off, here).
------------------------------------------------------------------------
r62465 | nobu | 2018-02-18 15:21:28 +0900 (Sun, 18 Feb 2018) | 5 lines

mjit.c: place DLDFLAGS at last

* mjit.c (compile_c_to_so): place DLDFLAGS at last, as compilers
  other than cl.exee don't care the order of flag arguments,
  usually.
------------------------------------------------------------------------
r62464 | nobu | 2018-02-18 14:12:26 +0900 (Sun, 18 Feb 2018) | 1 line

aclocal.m4: remove ruby_check_va_copy.m4
------------------------------------------------------------------------
r62463 | nobu | 2018-02-18 14:10:52 +0900 (Sun, 18 Feb 2018) | 4 lines

mjit.c: no va_copy

* mjit.c (form_args): do not use va_copy, which cannot detect
  appropriate way to simulate when cross compiling.
------------------------------------------------------------------------
r62462 | normal | 2018-02-18 12:00:33 +0900 (Sun, 18 Feb 2018) | 13 lines

thread.c (thread_join_m): handle negative timeouts correctly

Users may subtract and round into negative values when using
Thread#join, so clamp the timeout to zero to avoid infinite/long
timeouts.

Note: other methods such as Kernel#sleep and IO.select will
raise on negative values, but Thread#join is an outlier *shrug*

This restores Ruby 2.5 (and earlier) behavior.

Fixes: r62182 (commit c915390b9530c31b4665aacf27c1adfc114f768e)
       ("thread.c: avoid FP for Thread#join")
------------------------------------------------------------------------
r62461 | normal | 2018-02-18 12:00:28 +0900 (Sun, 18 Feb 2018) | 7 lines

thread.c (double2timespec): adjust to use NULL for infinity

Using:
  strace ruby -e 'Thread.new { sleep }.join(Float::INFINITY)'

Will show a difference in futex() syscall args (not that I'd
ever advocate Float::INFINITY as a Thread#join arg :P)
------------------------------------------------------------------------
r62460 | usa | 2018-02-18 11:51:31 +0900 (Sun, 18 Feb 2018) | 4 lines

Fixed the order of arguments for cl.exe

* mjit.c (compile_c_to_so): `CC_DLDFLAGS_ARGS` must be after `-link` for cl.exe.

------------------------------------------------------------------------
r62459 | normal | 2018-02-18 11:12:23 +0900 (Sun, 18 Feb 2018) | 5 lines

thread_pthread.c (native_cond_timeout): simplify

Rely on getclockofday for CLOCK_MONOTONIC, avoid needless
variables, and rely on overflow protection from timespec_add
instead of coding our own.
------------------------------------------------------------------------
r62458 | normal | 2018-02-18 11:12:18 +0900 (Sun, 18 Feb 2018) | 3 lines

thread.c: stop updating timespec when timeout is unspecified

No need to waste cycles updating timespecs if there's no expiry.
------------------------------------------------------------------------
r62457 | normal | 2018-02-18 11:12:13 +0900 (Sun, 18 Feb 2018) | 3 lines

thread.c (update_timespec): use timespec_update_expire

Rename "end" as a appropriate for readability.
------------------------------------------------------------------------
r62456 | normal | 2018-02-18 09:38:45 +0900 (Sun, 18 Feb 2018) | 3 lines

thread.c: introduce timespec_cmp for timespec comparisons

This hopefully improves readability when comparing timespecs.
------------------------------------------------------------------------
r62455 | normal | 2018-02-18 09:38:40 +0900 (Sun, 18 Feb 2018) | 4 lines

thread.c (timespec_update_expire): improve naming

Naming the constant timespec as "end" should make it more
apparent is is an absolute time.  Update callers, too.
------------------------------------------------------------------------
r62454 | svn | 2018-02-18 09:38:36 +0900 (Sun, 18 Feb 2018) | 1 line

* 2018-02-18
------------------------------------------------------------------------
r62453 | normal | 2018-02-18 09:38:35 +0900 (Sun, 18 Feb 2018) | 4 lines

ext/fiddle/lib/fiddle/pack.rb: pack "void *" properly on 32-bit

Fixes: r62450 (commit 1aaeeb326e754c5c5db83fbf35f780f729a9dfed)
       ("long long is a C99ism")
------------------------------------------------------------------------
r62452 | kazu | 2018-02-17 23:03:52 +0900 (Sat, 17 Feb 2018) | 1 line

Remove unnecessary `[]`s
------------------------------------------------------------------------
r62451 | shyouhei | 2018-02-17 19:04:22 +0900 (Sat, 17 Feb 2018) | 4 lines

a C source code must end with EOL

cf: ISO 9899 section 5.1.1.2

------------------------------------------------------------------------
r62450 | shyouhei | 2018-02-17 18:51:23 +0900 (Sat, 17 Feb 2018) | 5 lines

long long is a C99ism

so SIZEOF_LONG_LONG is not always available.
We have to check its defined?-ness before using.

------------------------------------------------------------------------
r62449 | nobu | 2018-02-17 16:54:52 +0900 (Sat, 17 Feb 2018) | 4 lines

socket.rb: protected connect_internal

* ext/socket/lib/socket.rb (Addrinfo#connect_internal): make
  protected for Addrinfo#connect_to, instead of private and send.
------------------------------------------------------------------------
r62448 | nobu | 2018-02-17 14:52:21 +0900 (Sat, 17 Feb 2018) | 5 lines

LIBRUBY_A with exts

* Makefile.in, win32/Makefile.sub (LIBRUBY_A): link with extension
  libraries if EXTSTATIC is set, so that static-ruby would work
  too.
------------------------------------------------------------------------
r62447 | nobu | 2018-02-17 14:52:20 +0900 (Sat, 17 Feb 2018) | 4 lines

separate PRE_LIBRUBY_UPDATE

* Makefile.in, win32/Makefile.sub (PRE_LIBRUBY_UPDATE): separate
  definitions without miniruby.
------------------------------------------------------------------------
r62446 | nobu | 2018-02-17 14:22:56 +0900 (Sat, 17 Feb 2018) | 1 line

configure.ac: check clockid_t with necessary headers
------------------------------------------------------------------------
r62445 | nobu | 2018-02-17 10:30:05 +0900 (Sat, 17 Feb 2018) | 1 line

prefixed functions exported for mjit
------------------------------------------------------------------------
r62437 | svn | 2018-02-17 01:04:22 +0900 (Sat, 17 Feb 2018) | 1 line

* 2018-02-17
------------------------------------------------------------------------
r62436 | nagachika | 2018-02-17 01:04:21 +0900 (Sat, 17 Feb 2018) | 4 lines

fix regexp literal warning.

test/rubygems/test_gem_server.rb: eliminate duplicated character class warning.
[Bug #14481]
------------------------------------------------------------------------
r62433 | k0kubun | 2018-02-16 23:45:39 +0900 (Fri, 16 Feb 2018) | 236 lines

mjit.c: fix deadlock on class serial increment

This is reported by @hasimo. Fixing a case like this:

 #0  __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
 #1  0x00007fc7bd824dbd in __GI___pthread_mutex_lock (mutex=mutex@entry=0x55946d294440 <mjit_engine_mutex>) at ../nptl/pthread_mutex_lock.c:80               4
 #2  0x000055946cec54d9 in rb_native_mutex_lock (lock=lock@entry=0x55946d294440 <mjit_engine_mutex>) at thread_pthread.c:211
 #3  0x000055946cde10ca in CRITICAL_SECTION_START (msg=0x55946cfb5423 "mjit_gc_start_hook", level=4) at mjit.c:392
 #4  mjit_gc_start_hook () at mjit.c:412
 #5  0x000055946cda0dfe in gc_enter (event=0x55946cfaf91e "gc_rest", objspace=0x55946da51760) at gc.c:6623
 #6  gc_rest (objspace=objspace@entry=0x55946da51760) at gc.c:6515
 #7  0x000055946cd9f1cf in gc_rest (objspace=0x55946da51760) at gc.c:7841
 #8  objspace_malloc_increase (objspace=objspace@entry=0x55946da51760, new_size=<optimized out>, old_size=old_size@entry=0, type=type@entry=MEMOP_TYPE_MALLOC, mem=0x7fc7a4439010) at gc.c:7842
 #9  0x000055946cda1706 in objspace_malloc_fixup (size=<optimized out>, mem=0x7fc7a4439010, objspace=0x55946da51760) at gc.c:7910
 #10 objspace_xmalloc0 (objspace=0x55946da51760, size=<optimized out>, size@entry=3145728) at gc.c:7939
 #11 0x000055946cda3620 in ruby_xmalloc0 (size=3145728) at gc.c:8006
 #12 ruby_xmalloc (size=size@entry=3145728) at gc.c:8015
 #13 0x000055946ce93f4c in st_init_table_with_size (type=0x55946d28da30 <objhash>, size=<optimized out>) at st.c:602
 #14 0x000055946ce94287 in rebuild_table (tab=tab@entry=0x55946db669f0) at st.c:777
 #15 0x000055946ce963f7 in rebuild_table_if_necessary (tab=0x55946db669f0) at st.c:1139
 #16 st_add_direct_with_hash (hash=8577035585096733536, value=20, key=808451, tab=0x55946db669f0) at st.c:1207
 #17 st_update (tab=0x55946db669f0, key=key@entry=808451, func=<optimized out>, arg=140726472841392) at st.c:1512
 #18 0x000055946cda9e27 in tbl_update (optional_arg=<optimized out>, func=<optimized out>, key=<optimized out>, hash=<optimized out>) at hash.c:561
 #19 rb_hash_aset (hash=94095983218480, key=key@entry=808451, val=val@entry=20) at hash.c:1654
 #20 0x000055946cde243a in mjit_add_class_serial (class_serial=class_serial@entry=404225) at mjit.c:1414                    3
 #21 0x000055946cefcfab in rb_next_class_serial () at vm.c:321
 #22 0x000055946cf48324 in class_alloc (klass=<optimized out>, flags=28) at class.c:178
 #23 rb_include_class_new (module=module@entry=94096115733840, super=0) at class.c:820
 #24 0x000055946cf487ac in include_modules_at (klass=klass@entry=94096135960920, c=<optimized out>, module=<optimized out>, module@entry=94096115734160, search_super=search_super@entry=1) at class.c:913
 #25 0x000055946cf48ac8 in rb_include_module (klass=94096135960920, module=module@entry=94096115734160) at class.c:870
 #26 0x000055946cd84993 in rb_mod_append_features (module=94096115734160, include=<optimized out>) at eval.c:1178
 #27 0x000055946cf06829 in vm_call0_cfunc_with_frame (ci=0x7ffd6f6c9a20, cc=0x7ffd6f6c9ba0, argv=0x7ffd6f6c9ba0, calling=0x7ffd6f6c9a30, ec=0x55946da519c8) at vm_eval.c:87
 #28 vm_call0_cfunc (argv=0x7ffd6f6c9ba0, cc=0x7ffd6f6c9ba0, ci=0x7ffd6f6c9a20, calling=0x7ffd6f6c9a30, ec=0x55946da519c8) at vm_eval.c:102
 #29 vm_call0_body (ec=ec@entry=0x55946da519c8, calling=calling@entry=0x7ffd6f6c9ae0, ci=ci@entry=0x7ffd6f6c9ad0, cc=cc@entry=0x7ffd6f6c9b00, argv=argv@entry=0x7ffd6f6c9ba0) at vm_eval.c:133
 #30 0x000055946cf074b2 in vm_call0 (me=<optimized out>, argv=0x7ffd6f6c9ba0, argc=1, id=4849, recv=94096115734160, ec=0x55946da519c8) at vm_eval.c:60
 #31 rb_call0 (ec=0x55946da519c8, recv=94096115734160, mid=4849, mid@entry=94096135960920, argc=argc@entry=1, argv=argv@entry=0x7ffd6f6c9ba0, scope=scope@entry=CALL_FCALL, self=94096135960920) at vm_eval.c:302
 #32 0x000055946cf07b9b in rb_call (scope=CALL_FCALL, argv=0x7ffd6f6c9ba0, argc=1, mid=94096135960920, recv=<optimized out>) at vm_eval.c:595
 #33 rb_funcallv (recv=<optimized out>, mid=mid@entry=4849, argc=argc@entry=1, argv=argv@entry=0x7ffd6f6c9ba0) at vm_eval.c:825
 #34 0x000055946cd848a7 in rb_mod_include (argc=0, argv=0x7fc7bdb4fce8, module=94096135960920) at eval.c:1203
 #35 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x5594710c06b0, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4df00, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #36 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4df00, calling=<optimized out>, ci=0x5594710c06b0, cc=<optimized out>) at vm_insnhelper.c:1944
 #37 0x000055946cf0b5c2 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:779
 #38 0x000055946cf02f4c in vm_exec (ec=ec@entry=0x55946da519c8) at vm.c:1804
 #39 0x000055946cf035fc in invoke_block (captured=0x7ffd6f6ca0a0, opt_pc=<optimized out>, type=<optimized out>, cref=0x559476c23930, self=94096135960920, iseq=0x559471335ee0, ec=0x55946da519c8) at vm.c:1005
 #40 invoke_iseq_block_from_c (ec=0x55946da519c8, captured=0x7ffd6f6ca0a0, self=94096135960920, argc=<optimized out>, argv=<optimized out>, passed_block_handler=0, cref=0x559476c23930, is_lambda=0) at vm.c:1057
 #41 0x000055946cf04520 in invoke_block_from_c_bh (ec=ec@entry=0x55946da519c8, block_handler=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7ffd6f6ca108, cref=<optimized out>, is_lambda=<optimized out>, is_lambda@entry=0, force_blockarg=0, passed_block_handler=0) at vm.c:1075
 #42 0x000055946cf04958 in vm_yield_with_cref (is_lambda=0, cref=<optimized out>, argv=0x7ffd6f6ca108, argc=1, ec=0x55946da519c8) at vm.c:1112
 #43 yield_under (under=94096135960920, self=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7ffd6f6ca108) at vm_eval.c:1572
 #44 0x000055946cf04b12 in rb_mod_module_exec (argc=argc@entry=1, argv=argv@entry=0x7ffd6f6ca108, mod=<optimized out>) at vm_eval.c:1770
 #45 0x000055946ce00fc6 in rb_mod_initialize (module=94096135960920) at object.c:1978
 #46 0x000055946cf06829 in vm_call0_cfunc_with_frame (ci=0x7ffd6f6ca130, cc=0x7fc7bdb4fc98, argv=0x7fc7bdb4fc98, calling=0x7ffd6f6ca140, ec=0x55946da519c8) at vm_eval.c:87
 #47 vm_call0_cfunc (argv=0x7fc7bdb4fc98, cc=0x7fc7bdb4fc98, ci=0x7ffd6f6ca130, calling=0x7ffd6f6ca140, ec=0x55946da519c8) at vm_eval.c:102
 #48 vm_call0_body (ec=ec@entry=0x55946da519c8, calling=calling@entry=0x7ffd6f6ca1f0, ci=ci@entry=0x7ffd6f6ca1e0, cc=cc@entry=0x7ffd6f6ca210, argv=argv@entry=0x7fc7bdb4fc98) at vm_eval.c:133
 #49 0x000055946cf074b2 in vm_call0 (me=<optimized out>, argv=0x7fc7bdb4fc98, argc=0, id=3057, recv=94096135960920, ec=0x55946da519c8) at vm_eval.c:60
 #50 rb_call0 (ec=0x55946da519c8, recv=recv@entry=94096135960920, mid=mid@entry=3057, argc=argc@entry=3057, argv=argv@entry=0x0, scope=scope@entry=CALL_FCALL, self=94095983466120) at vm_eval.c:302
 #51 0x000055946cf07b9b in rb_call (scope=CALL_FCALL, argv=0x0, argc=3057, mid=3057, recv=94096135960920) at vm_eval.c:595
 #52 rb_funcallv (recv=recv@entry=94096135960920, mid=mid@entry=3057, argc=argc@entry=0, argv=argv@entry=0x7fc7bdb4fc98) at vm_eval.c:825
 #53 0x000055946cd89673 in rb_obj_call_init (obj=obj@entry=94096135960920, argc=argc@entry=0, argv=argv@entry=0x7fc7bdb4fc98) at eval.c:1590
 #54 0x000055946ce048a1 in rb_class_s_new (argc=0, argv=0x7fc7bdb4fc98, klass=<optimized out>) at object.c:2153
 #55 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x559471339c80, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4dfa8, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #56 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4dfa8, calling=<optimized out>, ci=0x559471339c80, cc=<optimized out>) at vm_insnhelper.c:1944
 #57 0x000055946cf0cb05 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:716
 #58 0x000055946cf02f4c in vm_exec (ec=ec@entry=0x55946da519c8) at vm.c:1804
 #59 0x000055946cf03274 in invoke_bmethod (ec=ec@entry=0x55946da519c8, iseq=iseq@entry=0x55946f15cbc0, self=self@entry=94096115734640, me=me@entry=0x559475664e28, type=type@entry=572653825, opt_pc=0, captured=0x55947158e8a0) at vm.c:1026
 #60 0x000055946cf03534 in invoke_iseq_block_from_c (ec=0x55946da519c8, captured=0x55947158e8a0, self=94096115734640, argc=<optimized out>, argv=<optimized out>, passed_block_handler=0, cref=0x0, is_lambda=1) at vm.c:1060
 #61 0x000055946cf036ce in invoke_block_from_c_proc (ec=<optimized out>, proc=<optimized out>, self=<optimized out>, argc=1, argv=<optimized out>, passed_block_handler=<optimized out>, is_lambda=<optimized out>) at vm.c:1150
 #62 0x000055946cf03811 in vm_invoke_bmethod (block_handler=<optimized out>, argv=<optimized out>, argc=1, self=<optimized out>, proc=<optimized out>, ec=0x55946da519c8) at vm.c:1175
 #63 vm_call_bmethod_body (ci=<optimized out>, cc=0x55946f625960, argv=<optimized out>, calling=0x7ffd6f6ca9b0, ec=0x55946da519c8) at vm_insnhelper.c:1971
 #64 vm_call_bmethod (ec=0x55946da519c8, cfp=0x7fc7bdc4e0c0, calling=0x7ffd6f6ca9b0, ci=<optimized out>, cc=0x55946f625960) at vm_insnhelper.c:1988
 #65 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4e0c0, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #66 0x000055946cf0e63e in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:797
 #67 0x000055946cf02f4c in vm_exec (ec=ec@entry=0x55946da519c8) at vm.c:1804
 #68 0x000055946cf06767 in vm_call0_body (ec=ec@entry=0x55946da519c8, calling=calling@entry=0x7ffd6f6cad00, ci=ci@entry=0x7ffd6f6cacf0, cc=cc@entry=0x7ffd6f6cad20, argv=argv@entry=0x7ffd6f6cadb0) at vm_eval.c:129
 #69 0x000055946cf074b2 in vm_call0 (me=<optimized out>, argv=0x7ffd6f6cadb0, argc=1, id=3681, recv=94096115734640, ec=0x55946da519c8) at vm_eval.c:60
 #70 rb_call0 (ec=0x55946da519c8, recv=recv@entry=94096115734640, mid=3681, argc=argc@entry=1, argv=argv@entry=0x7ffd6f6cad90, scope=scope@entry=CALL_FCALL, self=94095983452880) at vm_eval.c:302
 #71 0x000055946cf07b9b in rb_call (scope=CALL_FCALL, argv=0x7ffd6f6cad90, argc=1, mid=<optimized out>, recv=94096115734640) at vm_eval.c:595
 #72 rb_funcallv (recv=recv@entry=94096115734640, mid=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7ffd6f6cadb0) at vm_eval.c:825
 #73 0x000055946cf477d2 in rb_class_inherited (super=super@entry=94096115734640, klass=klass@entry=94096135961440) at class.c:625
 #74 0x000055946cf0f796 in vm_declare_class (super=<optimized out>, cbase=94096094868200, flags=<optimized out>, id=847387) at vm_insnhelper.c:3134
 #75 vm_define_class (super=<optimized out>, cbase=<optimized out>, flags=<optimized out>, id=847387) at vm_insnhelper.c:3167
 #76 vm_find_or_create_class_by_id (super=<optimized out>, cbase=<optimized out>, flags=<optimized out>, id=847387) at vm_insnhelper.c:3196
 #77 vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:685
 #78 0x000055946cf02f4c in vm_exec (ec=0x55946da519c8) at vm.c:1804
 #79 0x000055946cf118d1 in rb_iseq_eval (iseq=iseq@entry=0x559471f1b548) at vm.c:2046
 #80 0x000055946cdd2164 in rb_load_internal0 (ec=ec@entry=0x55946da519c8, fname=fname@entry=94096135872160, wrap=wrap@entry=0) at load.c:611
 #81 0x000055946cdd41f1 in rb_require_internal (fname=94096135872400, fname@entry=94096135872440, safe=0) at load.c:992
 #82 0x000055946cdd4493 in rb_require_safe (safe=<optimized out>, fname=94096135872440) at load.c:1038
 #83 rb_f_require (obj=<optimized out>, fname=94096135872440) at load.c:820
 #84 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x5594708700a0, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4e168, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #85 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4e168, calling=<optimized out>, ci=0x5594708700a0, cc=<optimized out>) at vm_insnhelper.c:1944
 #86 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4e168, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #87 0x000055946cf0e63e in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:797
 #88 0x000055946cf02f4c in vm_exec (ec=ec@entry=0x55946da519c8) at vm.c:1804
 #89 0x000055946cf035fc in invoke_block (captured=0x7fc7bdc4e490, opt_pc=<optimized out>, type=<optimized out>, cref=0x0, self=94096096426480, iseq=0x55946e49f0b8, ec=0x55946da519c8) at vm.c:1005
 #90 invoke_iseq_block_from_c (ec=0x55946da519c8, captured=0x7fc7bdc4e490, self=94096096426480, argc=<optimized out>, argv=<optimized out>, passed_block_handler=0, cref=0x0, is_lambda=0) at vm.c:1057
 #91 0x000055946cf04699 in invoke_block_from_c_bh (argc=<optimized out>, passed_block_handler=<optimized out>, cref=<optimized out>, is_lambda=<optimized out>, force_blockarg=<optimized out>, argv=<optimized out>, block_handler=<optimized out>, ec=<optimized out>) at vm.c:1075
 #92 vm_yield (argc=1, argv=0x7ffd6f6cb938, ec=<optimized out>) at vm.c:1120
 #93 rb_yield_0 (argv=0x7ffd6f6cb938, argc=1) at vm_eval.c:980
 #94 rb_yield_1 (val=94096130169040) at vm_eval.c:986
 #95 rb_yield (val=<optimized out>) at vm_eval.c:996
 #96 0x000055946cf2113d in rb_ary_each (ary=94096076222560) at array.c:1820
 #97 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946ed0d090, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4e478, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #98 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4e478, calling=<optimized out>, ci=0x55946ed0d090, cc=<optimized out>) at vm_insnhelper.c:1944
 #99 0x000055946cf0cb05 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:716
 #100 0x000055946cf02f4c in vm_exec (ec=ec@entry=0x55946da519c8) at vm.c:1804
 #101 0x000055946cf035fc in invoke_block (captured=0x7fc7bdc4e500, opt_pc=<optimized out>, type=<optimized out>, cref=0x0, self=94096096426480, iseq=0x55946e49f298, ec=0x55946da519c8) at vm.c:1005
 #102 invoke_iseq_block_from_c (ec=0x55946da519c8, captured=0x7fc7bdc4e500, self=94096096426480, argc=<optimized out>, argv=<optimized out>, passed_block_handler=0, cref=0x0, is_lambda=0) at vm.c:1057
 #103 0x000055946cf04699 in invoke_block_from_c_bh (argc=<optimized out>, passed_block_handler=<optimized out>, cref=<optimized out>, is_lambda=<optimized out>, force_blockarg=<optimized out>, argv=<optimized out>, block_handler=<optimized out>, ec=<optimized out>) at vm.c:1075
 #104 vm_yield (argc=1, argv=0x7ffd6f6cbdf8, ec=<optimized out>) at vm.c:1120
 #105 rb_yield_0 (argv=0x7ffd6f6cbdf8, argc=1) at vm_eval.c:980
 #106 rb_yield_1 (val=94096095502480) at vm_eval.c:986
 #107 rb_yield (val=<optimized out>) at vm_eval.c:996
 #108 0x000055946cf2113d in rb_ary_each (ary=94096095328480) at array.c:1820
 #109 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946e8552a0, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4e4e8, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #110 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4e4e8, calling=<optimized out>, ci=0x55946e8552a0, cc=<optimized out>) at vm_insnhelper.c:1944
 #111 0x000055946cf0cb05 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:716
 #112 0x000055946cf02f4c in vm_exec (ec=ec@entry=0x55946da519c8) at vm.c:1804
 #113 0x000055946cf06767 in vm_call0_body (ec=ec@entry=0x55946da519c8, calling=calling@entry=0x7ffd6f6cc2d0, ci=ci@entry=0x7ffd6f6cc2c0, cc=cc@entry=0x7ffd6f6cc2f0, argv=argv@entry=0x7ffd6f6cc390) at vm_eval.c:129
 #114 0x000055946cf074b2 in vm_call0 (me=<optimized out>, argv=0x7ffd6f6cc390, argc=0, id=135807, recv=94096096186440, ec=0x55946da519c8) at vm_eval.c:60
 #115 rb_call0 (ec=0x55946da519c8, recv=94096096186440, mid=135807, argc=<optimized out>, argv=argv@entry=0x8, scope=scope@entry=CALL_PUBLIC, self=94095993048320) at vm_eval.c:302
 #116 0x000055946cf0a31a in rb_call (scope=CALL_PUBLIC, argv=0x8, argc=<optimized out>, mid=<optimized out>, recv=<optimized out>) at vm_eval.c:595
 #117 rb_funcall_with_block (recv=<optimized out>, mid=<optimized out>, argc=argc@entry=0, argv=argv@entry=0x7ffd6f6cc390, passed_procval=passed_procval@entry=8) at vm_eval.c:857
 #118 0x000055946ceb319c in rb_sym_proc_call (mid=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7ffd6f6cc388, passed_proc=passed_proc@entry=8) at string.c:10480
 #119 0x000055946cf0477c in vm_yield_with_symbol (block_handler=0, argv=0x7ffd6f6cc388, argc=1, symbol=<optimized out>, ec=<optimized out>) at vm_insnhelper.c:2573
 #120 invoke_block_from_c_bh (argc=<optimized out>, passed_block_handler=<optimized out>, cref=<optimized out>, is_lambda=<optimized out>, force_blockarg=<optimized out>, argv=<optimized out>, block_handler=<optimized out>, ec=<optimized out>) at vm.c:1084
 #121 vm_yield (argc=1, argv=0x7ffd6f6cc388, ec=<optimized out>) at vm.c:1120
 #122 rb_yield_0 (argv=0x7ffd6f6cc388, argc=1) at vm_eval.c:980
 #123 rb_yield_1 (val=94096096186440) at vm_eval.c:986
 #124 rb_yield (val=<optimized out>) at vm_eval.c:996
 #125 0x000055946cf2113d in rb_ary_each (ary=94095993048320) at array.c:1820
 #126 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x5594744d8280, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4e590, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #127 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4e590, calling=<optimized out>, ci=0x5594744d8280, cc=<optimized out>) at vm_insnhelper.c:1944
 #128 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4e590, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #129 0x000055946cf0cb05 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:716
 #130 0x000055946cf02f4c in vm_exec (ec=ec@entry=0x55946da519c8) at vm.c:1804
 #131 0x000055946cf035fc in invoke_block (captured=0x7ffd6f6cc8e0, opt_pc=<optimized out>, type=<optimized out>, cref=0x559474604128, self=94096096426480, iseq=0x5594745027e8, ec=0x55946da519c8) at vm.c:1005
 #132 invoke_iseq_block_from_c (ec=0x55946da519c8, captured=0x7ffd6f6cc8e0, self=94096096426480, argc=<optimized out>, argv=<optimized out>, passed_block_handler=0, cref=0x559474604128, is_lambda=0) at vm.c:1057
 #133 0x000055946cf04520 in invoke_block_from_c_bh (ec=ec@entry=0x55946da519c8, block_handler=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fc7bdb4f7f8, cref=<optimized out>, is_lambda=<optimized out>, is_lambda@entry=0, force_blockarg=0, passed_block_handler=0) at vm.c:1075
 #134 0x000055946cf04958 in vm_yield_with_cref (is_lambda=0, cref=<optimized out>, argv=0x7fc7bdb4f7f8, argc=1, ec=0x55946da519c8) at vm.c:1112
 #135 yield_under (under=94096093646040, self=<optimized out>, argc=1, argv=0x7fc7bdb4f7f8) at vm_eval.c:1572
 #136 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946e5cd230, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4e600, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #137 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4e600, calling=<optimized out>, ci=0x55946e5cd230, cc=<optimized out>) at vm_insnhelper.c:1944
 #138 0x000055946cf0cb05 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:716
 #139 0x000055946cf02f4c in vm_exec (ec=ec@entry=0x55946da519c8) at vm.c:1804
 #140 0x000055946cf035fc in invoke_block (captured=0x5594744c4fb0, opt_pc=<optimized out>, type=<optimized out>, cref=0x0, self=94095990659320, iseq=0x55946e192aa0, ec=0x55946da519c8) at vm.c:1005
 #141 invoke_iseq_block_from_c (ec=0x55946da519c8, captured=0x5594744c4fb0, self=94095990659320, argc=<optimized out>, argv=<optimized out>, passed_block_handler=0, cref=0x0, is_lambda=0) at vm.c:1057
 #142 0x000055946cf04699 in invoke_block_from_c_bh (argc=<optimized out>, passed_block_handler=<optimized out>, cref=<optimized out>, is_lambda=<optimized out>, force_blockarg=<optimized out>, argv=<optimized out>, block_handler=<optimized out>, ec=<optimized out>) at vm.c:1075
 #143 vm_yield (argc=1, argv=0x7ffd6f6ccdc8, ec=<optimized out>) at vm.c:1120
 #144 rb_yield_0 (argv=0x7ffd6f6ccdc8, argc=1) at vm_eval.c:980
 #145 rb_yield_1 (val=94096094867920) at vm_eval.c:986
 #146 rb_yield (val=<optimized out>) at vm_eval.c:996
 #147 0x000055946cf2113d in rb_ary_each (ary=94096094867160) at array.c:1820
 #148 0x000055946cf06829 in vm_call0_cfunc_with_frame (ci=0x7ffd6f6cce00, cc=0x7ffd6f6cce70, argv=0x7fc7bdb4f6b8, calling=0x7ffd6f6cce50, ec=0x55946da519c8) at vm_eval.c:87
 #149 vm_call0_cfunc (argv=0x7fc7bdb4f6b8, cc=0x7ffd6f6cce70, ci=0x7ffd6f6cce00, calling=0x7ffd6f6cce50, ec=0x55946da519c8) at vm_eval.c:102
 #150 vm_call0_body (ec=0x55946da519c8, calling=calling@entry=0x7ffd6f6ccec0, ci=ci@entry=0x7ffd6f6cceb0, cc=cc@entry=0x7ffd6f6ccee0, argv=0x7fc7bdb4f6b8) at vm_eval.c:133
 #151 0x000055946cf06c50 in vm_call0 (me=<optimized out>, argv=<optimized out>, argc=<optimized out>, id=<optimized out>, recv=<optimized out>, ec=<optimized out>) at vm_eval.c:60
 #152 rb_vm_call (ec=<optimized out>, recv=<optimized out>, id=<optimized out>, argc=<optimized out>, argv=<optimized out>, me=<optimized out>) at vm_eval.c:209
 #153 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946dba2780, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4e7c0, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #154 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4e7c0, calling=<optimized out>, ci=0x55946dba2780, cc=<optimized out>) at vm_insnhelper.c:1944
 #155 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4e7c0, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #156 0x000055946cf0cb05 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:716
 #157 0x000055946cf02f4c in vm_exec (ec=0x55946da519c8) at vm.c:1804
 #158 0x000055946cf118d1 in rb_iseq_eval (iseq=iseq@entry=0x55946dfed3a8) at vm.c:2046
 #159 0x000055946cdd2164 in rb_load_internal0 (ec=ec@entry=0x55946da519c8, fname=fname@entry=94095988939080, wrap=wrap@entry=0) at load.c:611
 #160 0x000055946cdd41f1 in rb_require_internal (fname=94095988939160, fname@entry=94095988939200, safe=0) at load.c:992
 #161 0x000055946cdd4493 in rb_require_safe (safe=<optimized out>, fname=94095988939200) at load.c:1038
 #162 rb_f_require (obj=<optimized out>, fname=94095988939200) at load.c:820
 #163 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946dffa920, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4e948, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #164 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4e948, calling=<optimized out>, ci=0x55946dffa920, cc=<optimized out>) at vm_insnhelper.c:1944
 #165 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4e948, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #166 0x000055946cf0b5c2 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:779
 #167 0x000055946cf02f4c in vm_exec (ec=0x55946da519c8) at vm.c:1804
 #168 0x000055946cf118d1 in rb_iseq_eval (iseq=iseq@entry=0x55946dfee438) at vm.c:2046
 #169 0x000055946cdd2164 in rb_load_internal0 (ec=ec@entry=0x55946da519c8, fname=fname@entry=94095993039280, wrap=wrap@entry=0) at load.c:611
 #170 0x000055946cdd41f1 in rb_require_internal (fname=fname@entry=94095993043840, safe=0) at load.c:992
 #171 0x000055946cdd4493 in rb_require_safe (safe=<optimized out>, fname=94095993043840) at load.c:1038
 #172 rb_f_require (obj=<optimized out>, fname=94095993043840) at load.c:820
 #173 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946ea12160, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4e9b8, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #174 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4e9b8, calling=<optimized out>, ci=0x55946ea12160, cc=<optimized out>) at vm_insnhelper.c:1944
 #175 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4e9b8, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #176 0x000055946cf0b5c2 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:779
 #177 0x000055946cf02f4c in vm_exec (ec=0x55946da519c8) at vm.c:1804
 #178 0x000055946cf118d1 in rb_iseq_eval (iseq=iseq@entry=0x55946e3d7c48) at vm.c:2046
 #179 0x000055946cdd2164 in rb_load_internal0 (ec=ec@entry=0x55946da519c8, fname=fname@entry=94095988920840, wrap=<optimized out>) at load.c:611
 #180 0x000055946cdd2850 in rb_load_internal (wrap=0, fname=94095988920840) at load.c:642
 #181 rb_f_load (argc=<optimized out>, argv=<optimized out>) at load.c:710
 #182 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946e7c96e0, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4ea28, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #183 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4ea28, calling=<optimized out>, ci=0x55946e7c96e0, cc=<optimized out>) at vm_insnhelper.c:1944
 #184 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4ea28, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #185 0x000055946cf0b5c2 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:779
 #186 0x000055946cf02f4c in vm_exec (ec=ec@entry=0x55946da519c8) at vm.c:1804
 #187 0x000055946cf035fc in invoke_block (captured=0x7fc7bdc4eae8, opt_pc=<optimized out>, type=<optimized out>, cref=0x0, self=94095998891400, iseq=0x55946e4dae10, ec=0x55946da519c8) at vm.c:1005
 #188 invoke_iseq_block_from_c (ec=0x55946da519c8, captured=0x7fc7bdc4eae8, self=94095998891400, argc=<optimized out>, argv=<optimized out>, passed_block_handler=0, cref=0x0, is_lambda=0) at vm.c:1057
 #189 0x000055946cf04699 in invoke_block_from_c_bh (argc=<optimized out>, passed_block_handler=<optimized out>, cref=<optimized out>, is_lambda=<optimized out>, force_blockarg=<optimized out>, argv=<optimized out>, block_handler=<optimized out>, ec=<optimized out>) at vm.c:1075
 #190 vm_yield (argc=1, argv=0x7ffd6f6ce8e8, ec=<optimized out>) at vm.c:1120
 #191 rb_yield_0 (argv=0x7ffd6f6ce8e8, argc=1) at vm_eval.c:980
 #192 rb_yield_1 (val=94095988924840) at vm_eval.c:986
 #193 rb_yield (val=<optimized out>) at vm_eval.c:996
 #194 0x000055946cf2113d in rb_ary_each (ary=94095988920960) at array.c:1820
 #195 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946e421000, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4ead0, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #196 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4ead0, calling=<optimized out>, ci=0x55946e421000, cc=<optimized out>) at vm_insnhelper.c:1944
 #197 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4ead0, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #198 0x000055946cf0cb05 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:716
 #199 0x000055946cf02f4c in vm_exec (ec=0x55946da519c8) at vm.c:1804
 #200 0x000055946cf118d1 in rb_iseq_eval (iseq=iseq@entry=0x55946e35f2c0) at vm.c:2046
 #201 0x000055946cdd2164 in rb_load_internal0 (ec=ec@entry=0x55946da519c8, fname=fname@entry=94095992643280, wrap=<optimized out>) at load.c:611
 #202 0x000055946cdd2850 in rb_load_internal (wrap=0, fname=94095992643280) at load.c:642
 #203 rb_f_load (argc=<optimized out>, argv=<optimized out>) at load.c:710
 #204 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946e24bb20, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4ec58, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #205 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4ec58, calling=<optimized out>, ci=0x55946e24bb20, cc=<optimized out>) at vm_insnhelper.c:1944
 #206 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4ec58, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #207 0x000055946cf0b5c2 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:779
 #208 0x000055946cf02f4c in vm_exec (ec=0x55946da519c8) at vm.c:1804
 #209 0x000055946cf118d1 in rb_iseq_eval (iseq=iseq@entry=0x55946e3a7390) at vm.c:2046
 #210 0x000055946cdd2164 in rb_load_internal0 (ec=ec@entry=0x55946da519c8, fname=fname@entry=94095993616120, wrap=<optimized out>) at load.c:611
 #211 0x000055946cdd2850 in rb_load_internal (wrap=0, fname=94095993616120) at load.c:642
 #212 rb_f_load (argc=<optimized out>, argv=<optimized out>) at load.c:710
 #213 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946e6a00d0, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4ecc8, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #214 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4ecc8, calling=<optimized out>, ci=0x55946e6a00d0, cc=<optimized out>) at vm_insnhelper.c:1944
 #215 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4ecc8, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #216 0x000055946cf0b5c2 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:779
 #217 0x000055946cf02f4c in vm_exec (ec=0x55946da519c8) at vm.c:1804
 #218 0x000055946cf118d1 in rb_iseq_eval (iseq=iseq@entry=0x55946e470100) at vm.c:2046
 #219 0x000055946cdd2164 in rb_load_internal0 (ec=ec@entry=0x55946da519c8, fname=fname@entry=94095993672200, wrap=<optimized out>) at load.c:611
 #220 0x000055946cdd2850 in rb_load_internal (wrap=0, fname=94095993672200) at load.c:642
 #221 rb_f_load (argc=<optimized out>, argv=<optimized out>) at load.c:710
 #222 0x000055946cefb61f in vm_call_cfunc_with_frame (ci=0x55946e3306a0, cc=<optimized out>, calling=<optimized out>, reg_cfp=0x7fc7bdc4efa0, ec=0x55946da519c8) at vm_insnhelper.c:1928
 #223 vm_call_cfunc (ec=0x55946da519c8, reg_cfp=0x7fc7bdc4efa0, calling=<optimized out>, ci=0x55946e3306a0, cc=<optimized out>) at vm_insnhelper.c:1944
 #224 0x000055946cf03ea3 in vm_call_method (ec=0x55946da519c8, cfp=0x7fc7bdc4efa0, calling=<optimized out>, ci=<optimized out>, cc=<optimized out>) at vm_insnhelper.c:2417
 #225 0x000055946cf0b5c2 in vm_exec_core (ec=ec@entry=0x55946da519c8, initial=initial@entry=0) at /tmp/ruby-build.20180216151216.13740/ruby-trunk/insns.def:779
 #226 0x000055946cf02f4c in vm_exec (ec=0x55946da519c8) at vm.c:1804
 #227 0x000055946cf119d5 in rb_iseq_eval_main (iseq=iseq@entry=0x55946e4bbba0) at vm.c:2057
 #228 0x000055946cd83d54 in ruby_exec_internal (n=0x55946e4bbba0) at eval.c:247
 #229 0x000055946cd87fdf in ruby_exec_node (n=0x55946e4bbba0) at eval.c:311
 #230 ruby_run_node (n=<optimized out>) at eval.c:303
 #231 0x000055946cd831bf in main (argc=22, argv=0x7ffd6f6d0148) at ./main.c:42
------------------------------------------------------------------------
r62432 | nobu | 2018-02-16 23:35:06 +0900 (Fri, 16 Feb 2018) | 4 lines

ruby_check_va_copy.m4: for cross compiling

* tool/m4/ruby_check_va_copy.m4 (RUBY_CHECK_VA_COPY): use
  AC_TRY_LINK instead of AC_TRY_RUN for cross compiling.
------------------------------------------------------------------------
r62431 | shyouhei | 2018-02-16 17:51:23 +0900 (Fri, 16 Feb 2018) | 2 lines

add NEWS entry for VM generator renewal [ci skip]

------------------------------------------------------------------------
r62430 | shyouhei | 2018-02-16 17:49:09 +0900 (Fri, 16 Feb 2018) | 2 lines

add casts (cosmetic; just be explicit)

------------------------------------------------------------------------
r62429 | nobu | 2018-02-16 17:39:48 +0900 (Fri, 16 Feb 2018) | 3 lines

no ID cache in Init functions

Init functions are called only once, cache is useless.
------------------------------------------------------------------------
r62424 | hsbt | 2018-02-16 17:08:52 +0900 (Fri, 16 Feb 2018) | 3 lines

Fixed tempfile leak.

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r62423 | svn | 2018-02-16 17:08:07 +0900 (Fri, 16 Feb 2018) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r62422 | hsbt | 2018-02-16 17:08:06 +0900 (Fri, 16 Feb 2018) | 5 lines

Merge RubyGems 2.7.6 from upstream.

  It fixed some security vulnerabilities.

  http://blog.rubygems.org/2018/02/15/2.7.6-released.html
------------------------------------------------------------------------
r62419 | shyouhei | 2018-02-16 11:10:52 +0900 (Fri, 16 Feb 2018) | 2 lines

non-constant aggregate initializer is a C99ism

------------------------------------------------------------------------
r62418 | nobu | 2018-02-16 10:15:35 +0900 (Fri, 16 Feb 2018) | 4 lines

compile.c: keep debug info

* compile.c (iseq_peephole_optimize): keep freezestring insn
  with debug info.  [Bug #14475]
------------------------------------------------------------------------
r62417 | nobu | 2018-02-16 09:54:50 +0900 (Fri, 16 Feb 2018) | 1 line

test_rubyoptions.rb: assert_same to check identity
------------------------------------------------------------------------
r62416 | svn | 2018-02-16 09:49:47 +0900 (Fri, 16 Feb 2018) | 1 line

* 2018-02-16
------------------------------------------------------------------------
r62415 | nobu | 2018-02-16 09:49:46 +0900 (Fri, 16 Feb 2018) | 1 line

test_rubyoptions.rb: show code in failure messages
------------------------------------------------------------------------
r62414 | knu | 2018-02-15 20:16:51 +0900 (Thu, 15 Feb 2018) | 14 lines

Avoid using `@` in macro substitution that confuses FreeBSD make

```
making mjit_config.h
make: Unknown modifier ' '
make: Unclosed variable specification (expecting ')') for "Q" (value "") modifier
/bin/sh: Syntax error: end of file unexpected (expecting "}")
*** Error code 2

Stop.
```

The at sign probably conflicts the `:@temp@string@` modifier syntax
supported by FreeBSD make.
------------------------------------------------------------------------
r62413 | nobu | 2018-02-15 19:00:57 +0900 (Thu, 15 Feb 2018) | 4 lines

Array#values_at optimization

* array.c (rb_ary_values_at): optimization range argument case.
  bulk concatenation than pushing for each element.
------------------------------------------------------------------------
r62412 | nobu | 2018-02-15 15:14:42 +0900 (Thu, 15 Feb 2018) | 1 line

Benchmarks for Array#values_at
------------------------------------------------------------------------
r62411 | mame | 2018-02-15 14:34:20 +0900 (Thu, 15 Feb 2018) | 3 lines

test/io/console/test_io_console.rb (test_oflush): Avoid race condition

Add a ad-hoc wait.  Follows test_ioflush2.
------------------------------------------------------------------------
r62410 | mame | 2018-02-15 10:59:17 +0900 (Thu, 15 Feb 2018) | 4 lines

gc.c: force STACK_GROW_DIRECTION for emscripten

The configure script fails to guess the direction on emscripten.
Perhaps this is because of https://github.com/kripken/emscripten/issues/2093
------------------------------------------------------------------------
r62409 | mame | 2018-02-15 10:59:16 +0900 (Thu, 15 Feb 2018) | 3 lines

thread_pthread.c: Use `getpagesize()` when `pthread_attr_getguardsize` is unavailable

This is also for emscripten.
------------------------------------------------------------------------
r62408 | mame | 2018-02-15 10:59:15 +0900 (Thu, 15 Feb 2018) | 4 lines

configure.ac: Use `pthread_create` to determine if pthread is available

Instead of `pthread_kill`.  This is because emscripten supports
`pthread_create` but not `pthread_kill`.
------------------------------------------------------------------------
r62407 | normal | 2018-02-15 07:35:13 +0900 (Thu, 15 Feb 2018) | 7 lines

compile.c: drop freezestring insn on String#-@

Followup to r62039 and remove the redundant freezestring
insn which was preventing deduplication from String#-@

* compile.c (iseq_peephole_optimize): drop freezestring insn on String#-@
  [ruby-core:85542] [Bug #14475]
------------------------------------------------------------------------
r62406 | normal | 2018-02-15 07:35:08 +0900 (Thu, 15 Feb 2018) | 3 lines

test/ruby/test_optimization.rb: fix compile kwarg

Fixes: r62177 ("compile.c: fix string Range optimization with FSL")
------------------------------------------------------------------------
r62405 | svn | 2018-02-15 03:38:34 +0900 (Thu, 15 Feb 2018) | 1 line

* 2018-02-15
------------------------------------------------------------------------
r62404 | tenderlove | 2018-02-15 03:38:33 +0900 (Thu, 15 Feb 2018) | 9 lines

load.c: reduce memory usage of loaded_features_index

Use integer hashsum instead of string as a key in loaded_features_index.
Do not use ruby strings for substring operation, just plain pointer
and length.

[ruby-core:53688]

Co-authored-by: Sokolov Yura aka funny_falcon <funny.falcon@gmail.com>
------------------------------------------------------------------------
r62403 | k0kubun | 2018-02-14 23:09:32 +0900 (Wed, 14 Feb 2018) | 8 lines

appveyor.yml: refactor r62402

We have good feature to share common configuration between branches:
https://www.appveyor.com/docs/branches/#sharing-common-configuration-between-branches
Let's try this.

By the way, the intention of r62402 was excluding PR notifications while
it wasn't written in the commit message.
------------------------------------------------------------------------
r62402 | k0kubun | 2018-02-14 21:34:49 +0900 (Wed, 14 Feb 2018) | 8 lines

appveyor.yml: notify slack only for trunk

Using conditional build configuration.
https://www.appveyor.com/docs/branches/#conditional-build-configuration

This copy-pasting is so ugly, but AppVeyor doesn't have a feature to
filter notification based on branch.
https://github.com/appveyor/ci/issues/272
------------------------------------------------------------------------
r62401 | nobu | 2018-02-14 14:11:02 +0900 (Wed, 14 Feb 2018) | 6 lines

mjit.h: compare as pointer

* mjit.c (mjit_get_iseq_func), mjit.h (mjit_exec): do not compare
  a pointer as shorter type.  by loosing the precision, different
  values can result in "equal" wrongly.  enum type is an alias of
  `int`, and is often shorter than a pointer type nowadays.
------------------------------------------------------------------------
r62400 | ko1 | 2018-02-14 10:50:59 +0900 (Wed, 14 Feb 2018) | 1 line

skip "TestException#test_thread_signal_location" as a known bug [Bug #14474]
------------------------------------------------------------------------
r62399 | svn | 2018-02-14 00:58:39 +0900 (Wed, 14 Feb 2018) | 1 line

* 2018-02-14
------------------------------------------------------------------------
r62398 | k0kubun | 2018-02-14 00:58:38 +0900 (Wed, 14 Feb 2018) | 138 lines

mjit_compile.inc.erb: replace opt_key insn

with opt_send_without_block insn if call cache has valid ISeq.
If the receiver is not optimized target of opt_key (i.e. Hash or Array),
it triggers JIT cancel and it would be slow.

This change allows JIT to drop the check for Hash/Array and continue to
execute JIT even if the receiver is not Hash or Array.

See the following benchmark results. It's not improved so much, but it
would be effective when we achieve Ruby method inlining in
_mjit_compile_send.erb.

* Micro benchmark

Given the following bench.rb,

```
class HashWithIndifferentAccess < Hash
  def []=(key, value)
    super(key.to_s, value)
  end

  def [](key)
    super(key.to_s)
  end
end

indhash = HashWithIndifferentAccess.new
indhash[:foo] = 'bar'
key = 'foo'

100000000.times do
  indhash[key]
end
```

** before

```
$ time ./ruby --disable-gems --jit-verbose=1 /tmp/bench.rb
JIT success (31.4ms): block in <main>@/tmp/bench.rb:15 -> /tmp/_ruby_mjit_p18206u0.c
JIT success (669.3ms): []@/tmp/bench.rb:6 -> /tmp/_ruby_mjit_p18206u1.c
Successful MJIT finish
./ruby --disable-gems --jit-verbose=1 /tmp/bench.rb  12.21s user 0.04s system 107% cpu 11.394 total
```

** after

```
$ time ./ruby --disable-gems --jit-verbose=1 /tmp/bench.rb
JIT success (41.0ms): block in <main>@/tmp/bench.rb:15 -> /tmp/_ruby_mjit_p17293u0.c
JIT success (679.0ms): []@/tmp/bench.rb:6 -> /tmp/_ruby_mjit_p17293u1.c
Successful MJIT finish
./ruby --disable-gems --jit-verbose=1 /tmp/bench.rb  11.54s user 0.06s system 108% cpu 10.726 total
```

The execution time is shortened.

* optcarrot benchmark

Optcarrot has no room to be improved by this change. Almost nothing is changed.

fps: 59.54 (before) -> 59.51 (after)

* discourse benchmark

I expected this to be improved a little, but it isn't too.

** before (JIT)

```
categories_admin:
  50: 12
  75: 13
  90: 14
  99: 22
home_admin:
  50: 12
  75: 13
  90: 16
  99: 22
topic_admin:
  50: 12
  75: 13
  90: 15
  99: 21
categories:
  50: 18
  75: 19
  90: 23
  99: 27
home:
  50: 3
  75: 4
  90: 4
  99: 12
topic:
  50: 11
  75: 11
  90: 14
  99: 20
```

** after (JIT)

```
categories_admin:
  50: 12
  75: 12
  90: 16
  99: 24
home_admin:
  50: 12
  75: 12
  90: 14
  99: 21
topic_admin:
  50: 12
  75: 13
  90: 16
  99: 21
categories:
  50: 17
  75: 18
  90: 23
  99: 32
home:
  50: 3
  75: 4
  90: 4
  99: 10
topic:
  50: 11
  75: 12
  90: 13
  99: 20
```
------------------------------------------------------------------------
r62397 | nobu | 2018-02-13 22:29:57 +0900 (Tue, 13 Feb 2018) | 8 lines

Fixing some minimal formating on enum.c examples

This will fix the formatting shown on detect|find and revese_arch
generated by RDoc.

[Fix GH-1816]

From: Espartaco Palma <esparta@gmail.com>
------------------------------------------------------------------------
r62396 | normal | 2018-02-13 19:02:07 +0900 (Tue, 13 Feb 2018) | 35 lines

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>
------------------------------------------------------------------------
r62395 | nobu | 2018-02-13 18:36:35 +0900 (Tue, 13 Feb 2018) | 5 lines

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]
------------------------------------------------------------------------
r62394 | nobu | 2018-02-13 18:34:43 +0900 (Tue, 13 Feb 2018) | 7 lines

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]
------------------------------------------------------------------------
r62393 | usa | 2018-02-13 18:34:37 +0900 (Tue, 13 Feb 2018) | 5 lines

revert r62392

check the declaration of `rb_autoloading_value()` in vm_core.h and the call in
vm_insnhelper.c, and retry it.

------------------------------------------------------------------------
r62392 | nobu | 2018-02-13 18:11:02 +0900 (Tue, 13 Feb 2018) | 5 lines

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]
------------------------------------------------------------------------
r62391 | mame | 2018-02-13 16:42:51 +0900 (Tue, 13 Feb 2018) | 1 line

process.c (try_with_sh): fix the wrong number of arguments
------------------------------------------------------------------------
r62390 | kazu | 2018-02-13 09:03:18 +0900 (Tue, 13 Feb 2018) | 1 line

xmalloc never returns NULL
------------------------------------------------------------------------
r62389 | svn | 2018-02-13 00:25:59 +0900 (Tue, 13 Feb 2018) | 1 line

* 2018-02-13
------------------------------------------------------------------------
r62388 | k0kubun | 2018-02-13 00:25:58 +0900 (Tue, 13 Feb 2018) | 18 lines

vm_insnhelper.c: inline array aref with integer

internal.h: define inlinable rb_ary_entry_internal.

array.c: use rb_ary_entry_internal.

* Benchmark
ruby --jit mame/optcarrot/bin/optcarrot --benchmark mame/optcarrot/examples/Lan_Master.nes

** Before

checksum: 59662
fps: 58.095175012159686

** After

fps: 59.874751599221526
checksum: 59662
------------------------------------------------------------------------
r62387 | k0kubun | 2018-02-12 18:05:12 +0900 (Mon, 12 Feb 2018) | 3 lines

insns.def: remove unnecessary sp motion

This seems obsoleted after r62087.
------------------------------------------------------------------------
r62386 | nobu | 2018-02-12 18:02:30 +0900 (Mon, 12 Feb 2018) | 1 line

use <<- instead of <<~ for older baseruby
------------------------------------------------------------------------
r62385 | k0kubun | 2018-02-12 17:09:25 +0900 (Mon, 12 Feb 2018) | 3 lines

Makefile.in: drop obsoleted debug output

mjit_config.h errors are already fixed.
------------------------------------------------------------------------
r62384 | k0kubun | 2018-02-12 16:27:48 +0900 (Mon, 12 Feb 2018) | 8 lines

_mjit_compile_insn_body.erb: refactor

renamed from tool/ruby_vm/views/_mjit_compile_insn_line.erb.
Basically this file should handle everything about macro on JIT.

_mjit_compile_insn.erb: follow the refactoring

common.mk: follow the rename
------------------------------------------------------------------------
r62383 | k0kubun | 2018-02-12 15:54:25 +0900 (Mon, 12 Feb 2018) | 9 lines

_mjit_compile_insn_line.erb: carve out macro expansion

in _mjit_compile_insn.erb to this file. As I'm going to add macro
expansions later, I want to separate such complex things from whole insn
compilation.

_mjit_compile_insn.erb: _mjit_compile_insn_line.erb part was removed.

common.mk: updated build system for them.
------------------------------------------------------------------------
r62382 | k0kubun | 2018-02-12 14:04:24 +0900 (Mon, 12 Feb 2018) | 5 lines

mjit.c: print JIT failure

mjit_compile.inc.erb: show unsupported insn name on --jit-verbose=1 too.
Also, removed osboleted workaround. Now some insn-related functions are
declared with MAYBE_UNUSED.
------------------------------------------------------------------------
r62381 | k0kubun | 2018-02-12 13:35:16 +0900 (Mon, 12 Feb 2018) | 1 line

test_jit.rb: prettify script in message
------------------------------------------------------------------------
r62380 | k0kubun | 2018-02-12 13:00:45 +0900 (Mon, 12 Feb 2018) | 3 lines

test_jit.rb: explicitly skip for unsupported ones

MSP-Greg watches this metrics and this would be helpful for him.
------------------------------------------------------------------------
r62379 | nobu | 2018-02-12 12:39:18 +0900 (Mon, 12 Feb 2018) | 5 lines

no --jit-cc

* ruby.c (setup_mjit_options): removed --jit-cc option, since
  mjit header is affected by generated config.h which depends on
  the given compiler, so it cannot work with different compilers.
------------------------------------------------------------------------
r62378 | nobu | 2018-02-12 12:33:00 +0900 (Mon, 12 Feb 2018) | 1 line

test_jit.rb: split test_compile_insns
------------------------------------------------------------------------
r62377 | svn | 2018-02-12 10:00:30 +0900 (Mon, 12 Feb 2018) | 1 line

* 2018-02-12
------------------------------------------------------------------------
r62376 | k0kubun | 2018-02-12 10:00:30 +0900 (Mon, 12 Feb 2018) | 51 lines

mjit_compile.c: fix invalid suffix on MinGW

This commit fixes following error.

$ RUBY_FORCE_TEST_JIT=1 ./ruby -I. -Ilib -Itest/lib --disable-gems test/ruby/test_jit.rb
Run options:

 # Running tests:

Environment variable changed: TestJIT#test_compile_insns : "TEMP" changed : "C:\\msys64\\tmp" -> "C:\\Users\\k0kubun\\AppData\\Local\\Temp"
Environment variable changed: TestJIT#test_compile_insns : "TMP" changed : "C:\\msys64\\tmp" -> "C:\\Users\\k0kubun\\AppData\\Local\\Temp"
Environment variable changed: TestJIT#test_compile_insns : "temp" deleted
Environment variable changed: TestJIT#test_compile_insns : "tmp" deleted

  1) Failure:
TestJIT#test_jit_output [test/ruby/test_jit.rb:360]:
Expected /^JIT success \(\d+\.\dms\): block in <main>@-e:1 -> .+_ruby_mjit_p\d+u\d+\.c$/ to match "C:/Users/k0kubun/AppData/Local/temp/_ruby_mjit_p920u0.c: In function '_mjit0':\n" +
"C:/Users/k0kubun/AppData/Local/temp/_ruby_mjit_p920u0.c:11:61: error: invalid suffix \"CD6900\" on integer constant\n" +
"     static const VALUE *const original_body_iseq = (VALUE *)0000000004CD6900;\n" +
"                                                             ^~~~~~~~~~~~~~~~\n" +
"compilation terminated due to -Wfatal-errors.\n" +
"Successful MJIT finish\n".

  2) Failure:
TestJIT#test_compile_insns [test/ruby/test_jit.rb:19]:
Expected 1 times of JIT success, but succeeded 0 times.

script:
```
p proc { nil rescue true }.call
```

stderr:
```
C:/Users/k0kubun/AppData/Local/temp/_ruby_mjit_p10628u0.c: In function '_mjit0':
C:/Users/k0kubun/AppData/Local/temp/_ruby_mjit_p10628u0.c:11:61: error: invalid suffix "D05F10" on integer constant
     static const VALUE *const original_body_iseq = (VALUE *)0000000004D05F10;
                                                             ^~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
Successful MJIT finish

```

.
<1> expected but was
<0>.

Finished tests in 3.028989s, 0.6603 tests/s, 1.9809 assertions/s.
2 tests, 6 assertions, 2 failures, 0 errors, 0 skips

ruby -v: ruby 2.6.0dev (2018-02-11 trunk 62375) [x64-mingw32]
------------------------------------------------------------------------
r62375 | k0kubun | 2018-02-11 23:38:54 +0900 (Sun, 11 Feb 2018) | 15 lines

Makefile.in: prevent from building `"",` macro

Loop removal in r62373 caused the CI failure like:
https://travis-ci.org/ruby/ruby/builds/340136977

mjit_config.h was:
  #ifndef RUBY_MJIT_CONFIG_H
  #define RUBY_MJIT_CONFIG_H 1
  #define MJIT_CC_COMMON  "gcc",
  #define MJIT_CFLAGS  "-w",
  #define MJIT_OPTFLAGS  "-O3",
  #define MJIT_DEBUGFLAGS  "-ggdb3",
  #define MJIT_LDSHARED  "gcc", "-shared",
  #define MJIT_DLDFLAGS  "",
  #endif /* RUBY_MJIT_CONFIG_H */
------------------------------------------------------------------------
r62374 | k0kubun | 2018-02-11 23:18:38 +0900 (Sun, 11 Feb 2018) | 3 lines

Makefile.in: debug mjit_config.h again

Somehow r62373 is failing on travis...
------------------------------------------------------------------------
r62373 | nobu | 2018-02-11 23:01:52 +0900 (Sun, 11 Feb 2018) | 4 lines

Makefile.in: use "%s"

* Makefile.in (mjit_config.h): use "%s" not to interprete % in
  arguments.  and `set` and `loop` are not needed.
------------------------------------------------------------------------
r62372 | k0kubun | 2018-02-11 22:46:54 +0900 (Sun, 11 Feb 2018) | 4 lines

Makefile.in: use printf

`echo -n` is sometimes not available.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180211T132503Z.log.html.gz#miniruby
------------------------------------------------------------------------
r62371 | k0kubun | 2018-02-11 21:50:23 +0900 (Sun, 11 Feb 2018) | 7 lines

Makefile.in: define macro in one line

Having macro definition in multiple definitions makes compiler error
output hard to read, like the commit message of r62367.

Probably build failures will be fixed by r62370, but let me simplify the
mjit_config.h content for future debugging.
------------------------------------------------------------------------
r62370 | nobu | 2018-02-11 21:40:28 +0900 (Sun, 11 Feb 2018) | 1 line

mjit_config.h: moved backslashs outside quotes
------------------------------------------------------------------------
r62369 | k0kubun | 2018-02-11 21:28:10 +0900 (Sun, 11 Feb 2018) | 5 lines

mjit.c: some flags are no longer for GCC

Obviously they are for clang. For simplicity, just inlined them.

Also another obsoleted commant was removed.
------------------------------------------------------------------------
r62368 | k0kubun | 2018-02-11 21:21:13 +0900 (Sun, 11 Feb 2018) | 20 lines

_mjit_compile_send.erb: resolve warnings on clang

/var/folders/tp/g1f_46nj7md_d5_j799rfb140000gn/T//_ruby_mjit_p17396u162.c:2920:143: warning: incompatible integer
      to pointer conversion passing 'long' to parameter of type 'const VALUE *' (aka 'const unsigned long *')
      [-Wint-conversion]
  ...| VM_ENV_FLAG_LOCAL, calling.recv, calling.block_handler, 0x7fc14ceee660, 0x7fc14c870c00, argv + 0, 2, 3);
                                                                               ^~~~~~~~~~~~~~
/Users/k0kubun/.rbenv/versions/ruby-svn/include/ruby-2.6.0/x86_64-darwin16/rb_mjit_min_header-2.6.0.h:21299:21: note:
      passing argument to parameter 'pc' here
       const VALUE *pc,
                    ^
/var/folders/tp/g1f_46nj7md_d5_j799rfb140000gn/T//_ruby_mjit_p17396u162.c:3073:31: warning: incompatible integer
      to pointer conversion passing 'long' to parameter of type 'const rb_iseq_t *' (aka
      'const struct rb_iseq_struct *') [-Wint-conversion]
            vm_push_frame(ec, 0x7fc14c87d290, VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL, calling.recv, ca...
                              ^~~~~~~~~~~~~~
/Users/k0kubun/.rbenv/versions/ruby-svn/include/ruby-2.6.0/x86_64-darwin16/rb_mjit_min_header-2.6.0.h:21294:25: note:
      passing argument to parameter 'iseq' here
       const rb_iseq_t *iseq,
                        ^
------------------------------------------------------------------------
r62367 | k0kubun | 2018-02-11 21:04:48 +0900 (Sun, 11 Feb 2018) | 37 lines

Makefile.in: add output to debug rubyci

build failure.

From current output, I can't know what's wrong from current error log.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos7/ruby-trunk/log/20180211T110003Z.log.html.gz#miniruby

compiling mjit.c
mjit.c:573:1: error: stray '\' in program
 static const char *const CC_DEBUG_ARGS[] = {MJIT_DEBUGFLAGS NULL};
 ^
mjit.c:573:1: error: stray '\' in program
mjit.c:574:1: error: stray '\' in program
 static const char *const CC_OPTIMIZE_ARGS[] = {MJIT_OPTFLAGS NULL};
 ^
mjit.c:574:1: error: stray '\' in program
mjit.c:584:5: error: stray '\' in program
     MJIT_CC_COMMON MJIT_CFLAGS GCC_PIC_FLAGS
     ^
mjit.c:584:5: error: stray '\' in program
mjit.c:584:5: error: stray '\' in program
mjit.c:584:5: error: stray '\' in program
mjit.c:588:1: error: stray '\' in program
 static const char *const CC_LDSHARED_ARGS[] = {MJIT_LDSHARED GCC_PIC_FLAGS NULL};
 ^
mjit.c:588:1: error: stray '\' in program
mjit.c:588:1: error: stray '\' in program
mjit.c:589:1: error: stray '\' in program
 static const char *const CC_DLDFLAGS_ARGS[] = {MJIT_DLDFLAGS NULL};
 ^
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
gmake: *** [mjit.o] Error 1
exit 2
------------------------------------------------------------------------
r62366 | nobu | 2018-02-11 18:00:44 +0900 (Sun, 11 Feb 2018) | 1 line

win32/Makefile.sub: fix typo, missing comma
------------------------------------------------------------------------
r62365 | nobu | 2018-02-11 17:57:22 +0900 (Sun, 11 Feb 2018) | 1 line

mjit.c: alwasy -fPIC flag to gcc
------------------------------------------------------------------------
r62364 | k0kubun | 2018-02-11 16:35:48 +0900 (Sun, 11 Feb 2018) | 3 lines

appveyor.yml: finish notification test

Now it succeeds to notify. Notifying all CI success would be noisy.
------------------------------------------------------------------------
r62363 | k0kubun | 2018-02-11 16:28:03 +0900 (Sun, 11 Feb 2018) | 4 lines

appveyor.yml: encrypt config with ruby's account

Currently it's encrypted with k0kubun's account and the notification is
failing.
------------------------------------------------------------------------
r62362 | nobu | 2018-02-11 16:10:37 +0900 (Sun, 11 Feb 2018) | 1 line

mjit_config.h: include trailing comma for empty list
------------------------------------------------------------------------
r62361 | k0kubun | 2018-02-11 15:33:45 +0900 (Sun, 11 Feb 2018) | 4 lines

.travis.yml: resurrect notification to #commits

I heard at least Shibata-san sees the channel for the notification.
But I want #alets to have all CI failure notifications too.
------------------------------------------------------------------------
r62360 | k0kubun | 2018-02-11 15:03:21 +0900 (Sun, 11 Feb 2018) | 1 line

appveyor.yml: send AppVeyor slack notification
------------------------------------------------------------------------
r62359 | k0kubun | 2018-02-11 14:49:37 +0900 (Sun, 11 Feb 2018) | 3 lines

.travis.yml: send notification to #alerts

instead of #commits.
------------------------------------------------------------------------
r62358 | k0kubun | 2018-02-11 14:32:17 +0900 (Sun, 11 Feb 2018) | 1 line

NEWS: note about --jit [ci skip]
------------------------------------------------------------------------
r62357 | k0kubun | 2018-02-11 14:29:13 +0900 (Sun, 11 Feb 2018) | 3 lines

common.mk: add comments about r62355 [ci skip]

transform_mjit_header.rb: ditto
------------------------------------------------------------------------
r62356 | nobu | 2018-02-11 13:54:15 +0900 (Sun, 11 Feb 2018) | 6 lines

mjit_config.h: more macros

* Makefie.in, win32/Makefile.sub: add more macros for compiler to
  mjit_config.h.

* mjit.c: unification VC and GCC in progress.
------------------------------------------------------------------------
r62355 | k0kubun | 2018-02-11 13:20:32 +0900 (Sun, 11 Feb 2018) | 13 lines

common.mk: define MJIT_HEADER earlier

so that other predefined macros won't be removed by
`MJITHeader.remove_predefined_macros!`.

Currently macro like -DVM_CHECK_MODE=2 is removed when it's passed in
configure. But it is needed during JIT compilation.

gc.c: export rb_obj_info to let JIT succeed with VM_CHECK_MODE=2.

```
MJIT warning: failure in loading code from '/tmp/_ruby_mjit_p15631u0.so': /tmp/_ruby_mjit_p15631u0.so: undefined symbol: rb_obj_info
```
------------------------------------------------------------------------
r62354 | nobu | 2018-02-11 11:41:50 +0900 (Sun, 11 Feb 2018) | 4 lines

_mjit_compile_insn.erb: comment_id

* tool/ruby_vm/views/_mjit_compile_insn.erb: comment ID of
  constant, calling method, and Symbol literal.
------------------------------------------------------------------------
r62353 | nobu | 2018-02-11 11:41:49 +0900 (Sun, 11 Feb 2018) | 1 line

_mjit_compile_{insn,send}.erb: suppress warnings
------------------------------------------------------------------------
r62352 | nobu | 2018-02-11 10:01:09 +0900 (Sun, 11 Feb 2018) | 4 lines

Makefile.sub: cpp out for older VC

* win32/Makefile.sub (CPPOUTFLAG, MJIT_HEADER_FLAGS): -Fi option
  is available since VC 10.  redirect stdout on older versions.
------------------------------------------------------------------------
r62351 | nobu | 2018-02-11 09:19:03 +0900 (Sun, 11 Feb 2018) | 5 lines

_mjit_compile_send.erb: PRI_SERIALT_PREFIX

* tool/ruby_vm/views/_mjit_compile_send.erb: `printf` modifier for
  `rb_serial_t` which may not be `long long`, and '%ll' may not be
  supported.
------------------------------------------------------------------------
r62350 | nobu | 2018-02-11 01:54:47 +0900 (Sun, 11 Feb 2018) | 6 lines

insns.def: cache nil const

* insns.def (getinlinecache): Qnil is a valid value as a constant.
  this can be observable when accessing a deprecated constant
  which is nil.  non-nil constant is warned just once for each
  location, but every time if it is nil.
------------------------------------------------------------------------
r62349 | svn | 2018-02-11 01:09:56 +0900 (Sun, 11 Feb 2018) | 1 line

* 2018-02-11
------------------------------------------------------------------------
r62348 | k0kubun | 2018-02-11 01:09:55 +0900 (Sun, 11 Feb 2018) | 5 lines

test_jit.rb: cover most insn compilations

test_compile_insns has only basic tests to improve coverage.

Other severer tests should be added with different names.
------------------------------------------------------------------------
r62347 | nobu | 2018-02-10 19:07:41 +0900 (Sat, 10 Feb 2018) | 1 line

mjit_config.h: show content if verbose
------------------------------------------------------------------------
r62346 | nobu | 2018-02-10 19:07:40 +0900 (Sat, 10 Feb 2018) | 1 line

mjit.c: constified command arguments
------------------------------------------------------------------------
r62345 | nobu | 2018-02-10 15:42:35 +0900 (Sat, 10 Feb 2018) | 1 line

vcs.rb: dryrun: option of GIT::SVN#commit
------------------------------------------------------------------------
r62344 | nobu | 2018-02-10 15:38:18 +0900 (Sat, 10 Feb 2018) | 1 line

select each files for architectures
------------------------------------------------------------------------
r62343 | nobu | 2018-02-10 15:22:38 +0900 (Sat, 10 Feb 2018) | 8 lines

mjit_config.h

* Makefie.in, win32/Makefile.sub: make mjit_config.h from
  configured variables, including necessary options, e.g., `-m32`
  for 32bit binary on 64bit platform.

* mjit.c: always use configured CC command.  as config.h depends
  on the compiler, different compilers cannot work.
------------------------------------------------------------------------
r62342 | ktsj | 2018-02-10 15:02:37 +0900 (Sat, 10 Feb 2018) | 1 line

.gdbinit (print_lineno): support a succinct bitvector implementation [ci skip]
------------------------------------------------------------------------
r62341 | nobu | 2018-02-10 10:55:47 +0900 (Sat, 10 Feb 2018) | 1 line

mjit.c: replaced magic numbers
------------------------------------------------------------------------
r62340 | nobu | 2018-02-10 10:28:51 +0900 (Sat, 10 Feb 2018) | 4 lines

mjit_compile.c: original_body_iseq

* mjit_compile.c (mjit_compile): name the original iseq pointer to
  eliminate magic numbers.
------------------------------------------------------------------------
r62339 | nobu | 2018-02-10 10:23:47 +0900 (Sat, 10 Feb 2018) | 1 line

mjit.c: chomp suffix first
------------------------------------------------------------------------
r62338 | nobu | 2018-02-10 10:07:04 +0900 (Sat, 10 Feb 2018) | 4 lines

mjit.c: binary mode

* mjit.c (convert_unit_to_func): write source code in binary
  mode.  not conversion is needed.
------------------------------------------------------------------------
r62337 | usa | 2018-02-10 00:28:09 +0900 (Sat, 10 Feb 2018) | 6 lines

append_str don't look the length of string

	* mjit.c (compile_c_to_so): use append_str2() and pass the length of
	  so_name.  append_str() uses the size of the 2nd argument, not the
	  length of it.

------------------------------------------------------------------------
r62336 | svn | 2018-02-10 00:21:19 +0900 (Sat, 10 Feb 2018) | 1 line

* 2018-02-10
------------------------------------------------------------------------
r62335 | nobu | 2018-02-10 00:21:19 +0900 (Sat, 10 Feb 2018) | 4 lines

mjit.c: set umask

* mjit.c (start_process): set umask so other users cannot access
  generated files.
------------------------------------------------------------------------
r62334 | nobu | 2018-02-10 00:21:18 +0900 (Sat, 10 Feb 2018) | 4 lines

mjit.c: exclusively create

* mjit.c (convert_unit_to_func): create new file exclusively.
  overwriting existing file could cause security issues.
------------------------------------------------------------------------
r62333 | nobu | 2018-02-09 23:09:58 +0900 (Fri, 09 Feb 2018) | 4 lines

compile.c: popped hash

* compile.c (compile_array): skip creating new hash if preceeding
  elements are popped all.  [ruby-core:85486] [Bug #14459]
------------------------------------------------------------------------
r62332 | k0kubun | 2018-02-09 22:14:17 +0900 (Fri, 09 Feb 2018) | 3 lines

transform_mjit_header.rb: fix typo in r62326

Today's AIX CI failed due to this... :innocent:
------------------------------------------------------------------------
r62331 | nobu | 2018-02-09 12:51:57 +0900 (Fri, 09 Feb 2018) | 5 lines

Makefile.sub: MESSAGE_BEGIN/END redirection

* win32/Makefile.sub (MESSAGE_BEGIN, MESSAGE_END): group the whole
  `for` command, to redirect all lines but not overwrite line by
  line.
------------------------------------------------------------------------
r62330 | nobu | 2018-02-09 12:37:38 +0900 (Fri, 09 Feb 2018) | 3 lines

Makefile.in: removed duplicate SET_LC_MESSAGES

[ci skip]
------------------------------------------------------------------------
r62329 | nobu | 2018-02-09 12:15:21 +0900 (Fri, 09 Feb 2018) | 1 line

debug_counter.h: include __FILE__ to recurse
------------------------------------------------------------------------
r62328 | nobu | 2018-02-09 12:15:20 +0900 (Fri, 09 Feb 2018) | 4 lines

sprintf.c: overflow check

* sprintf.c (ruby_do_vsnprintf): pathologically, get rid of
  negative value when the result length exceeds INT_MAX.
------------------------------------------------------------------------
r62327 | k0kubun | 2018-02-09 09:32:55 +0900 (Fri, 09 Feb 2018) | 7 lines

.travis.yml: force to execute JIT test on Travis

test_jit.rb: with environment variable RUBY_FORCE_TEST_JIT, we can force
to test JIT availability.

I wanted to have such CI, but Travis was the only option which I can
modify easily.
------------------------------------------------------------------------
r62326 | k0kubun | 2018-02-09 09:00:27 +0900 (Fri, 09 Feb 2018) | 7 lines

transform_mjit_header.rb: pass -std=c99 for AIX gcc

I heard `error: conflicting types for 'restrict'` can be solved by
adding `-std=c99`.

Ideally we should use the same cflags which are used to compile vm.c,
but let me try this and see what happens on AIX.
------------------------------------------------------------------------
r62325 | usa | 2018-02-09 03:51:33 +0900 (Fri, 09 Feb 2018) | 8 lines

refoctoring

* mjit.c (compile_c_to_so): refactored.

* mjit.c (init_header_filename): xmalloc never returns NULL.

* mjit.c (init_header_filename): report the filename of the header if failed.

------------------------------------------------------------------------
r62324 | usa | 2018-02-09 03:48:25 +0900 (Fri, 09 Feb 2018) | 4 lines

missing macro definition

* win32/Makefile.sub (RUBY_VERSION_NAME): used in this file but not defined.

------------------------------------------------------------------------
r62323 | nobu | 2018-02-09 00:47:24 +0900 (Fri, 09 Feb 2018) | 1 line

mjit.c: rb_w32_system_tmpdir is not in headers
------------------------------------------------------------------------
r62322 | nobu | 2018-02-09 00:46:11 +0900 (Fri, 09 Feb 2018) | 3 lines

mjit.c: revert r62316 partially

* mjit.c (compile_c_to_so): libs is not constant on Windows.
------------------------------------------------------------------------
r62321 | nobu | 2018-02-09 00:22:54 +0900 (Fri, 09 Feb 2018) | 5 lines

Fix compile error when USE_COPY_FILE_RANGE is defined but not USE_SENDFILE

io.c: Variable and label definition are necessary in both cases.

From: Lars Kanis <lars@greiz-reinsdorf.de>
------------------------------------------------------------------------
r62320 | nobu | 2018-02-09 00:19:32 +0900 (Fri, 09 Feb 2018) | 6 lines

MJIT header for multiarch

* configure.ac: MJIT_HEADER_INSTALL_DIR to rubyarchhdrdir to
  support multiarch.

* Makefile.in (MJIT_HEADER_INSTALL_DIR): configured by multiarch.
------------------------------------------------------------------------
r62319 | nobu | 2018-02-09 00:19:01 +0900 (Fri, 09 Feb 2018) | 1 line

mkconfig.rb: hide MJIT configurations
------------------------------------------------------------------------
r62318 | nobu | 2018-02-09 00:00:28 +0900 (Fri, 09 Feb 2018) | 5 lines

mjit.c: ruby_version from version.c

* mjit.c (init_header_filename): get version name from the
  particular global variable, not from the macro in version.h.
  to get rid of re-compilation for each revision.
------------------------------------------------------------------------
r62317 | svn | 2018-02-09 00:00:28 +0900 (Fri, 09 Feb 2018) | 1 line

* 2018-02-09
------------------------------------------------------------------------
r62316 | nobu | 2018-02-09 00:00:27 +0900 (Fri, 09 Feb 2018) | 4 lines

mjit.c: argument arrays

* mjit.c (compile_c_to_so): constified constat array and make
  variable arrays local.
------------------------------------------------------------------------
r62315 | nobu | 2018-02-08 23:59:31 +0900 (Thu, 08 Feb 2018) | 1 line

gmake.mk: tool/ifchange needs miniruby
------------------------------------------------------------------------
r62314 | k0kubun | 2018-02-08 22:56:32 +0900 (Thu, 08 Feb 2018) | 7 lines

test_jit.rb: don't force to test --jit-wait

for platforms which can't use JIT. Such platforms can time out with
eval_with_jit.

http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/509911
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/509904
------------------------------------------------------------------------
r62313 | k0kubun | 2018-02-08 22:54:37 +0900 (Thu, 08 Feb 2018) | 12 lines

Export some missing symbols for MJIT

tool/ruby_vm/views/_insn_name_info.erb: on Linux, rb_vm_insn_name_offset
was needed to compile with --jit-debug (Usually --jit-debug requires
more symbols than the situation without --jit-debug because -O2 skips
some functions to compile).

vm.c: when running transform_mjit_header.rb with --jit-wait,
rb_source_location_cstr was repoted to be missing.

string.c: ditto, for rb_str_eql
numeric.c: ditto, for rb_float_eql
------------------------------------------------------------------------
r62312 | k0kubun | 2018-02-08 22:40:47 +0900 (Thu, 08 Feb 2018) | 3 lines

test_jit.rb: fix typo

This is notified by zns-san.
------------------------------------------------------------------------
r62311 | k0kubun | 2018-02-08 22:01:43 +0900 (Thu, 08 Feb 2018) | 3 lines

test_jit.rb: add forgotten check

I was going to check this in r62310...
------------------------------------------------------------------------
r62310 | k0kubun | 2018-02-08 21:58:27 +0900 (Thu, 08 Feb 2018) | 1 line

test_jit.rb: check JIT support more conservatively
------------------------------------------------------------------------
r62309 | k0kubun | 2018-02-08 21:43:09 +0900 (Thu, 08 Feb 2018) | 6 lines

test_jit.rb: remove unnecessary require

At first I was going to check the name of `RbConfig::CONFIG['CC']` and
use shellwords for it, but I decided not to do so.

Thus removing obsoleted require in r62307.
------------------------------------------------------------------------
r62308 | svn | 2018-02-08 21:40:34 +0900 (Thu, 08 Feb 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62307 | k0kubun | 2018-02-08 21:40:33 +0900 (Thu, 08 Feb 2018) | 4 lines

test_jit.rb: try to test JIT again

This commit reverts r62297, revising the check if JIT is supported or
not.
------------------------------------------------------------------------
r62306 | nobu | 2018-02-08 17:09:49 +0900 (Thu, 08 Feb 2018) | 1 line

internal.h: moved ruby_null_device declaration
------------------------------------------------------------------------
r62305 | nobu | 2018-02-08 16:49:42 +0900 (Thu, 08 Feb 2018) | 4 lines

thread.c: suppress a warning

* thread.c (do_select): initialize timespec variable to suppress a
  false positive maybe-uninitialized warning by gcc 7 and 8.
------------------------------------------------------------------------
r62304 | nobu | 2018-02-08 16:49:41 +0900 (Thu, 08 Feb 2018) | 1 line

common.mk: add dependencies and timestamp
------------------------------------------------------------------------
r62303 | usa | 2018-02-08 16:34:41 +0900 (Thu, 08 Feb 2018) | 2 lines

revert r62302 and force to define the version constant

------------------------------------------------------------------------
r62302 | usa | 2018-02-08 16:23:21 +0900 (Thu, 08 Feb 2018) | 2 lines

no need to set bundled bundler unless Gem::USE_BUNDLER_FOR_GEMDEPS

------------------------------------------------------------------------
r62301 | nobu | 2018-02-08 16:14:52 +0900 (Thu, 08 Feb 2018) | 4 lines

test_gem_commands_setup_command.rb: BUNDLER_VERS

* test/rubygems/test_gem_commands_setup_command.rb: run bundled
  gem command, instead of installed one.
------------------------------------------------------------------------
r62300 | nobu | 2018-02-08 11:08:27 +0900 (Thu, 08 Feb 2018) | 1 line

ifchange: --debug option
------------------------------------------------------------------------
r62299 | nobu | 2018-02-08 11:08:26 +0900 (Thu, 08 Feb 2018) | 4 lines

ifchange.bat: --color option

* win32/ifchange.bat: added --color option for the compatibility
  with tool/ifchange.  do nothing right now.
------------------------------------------------------------------------
r62298 | nobu | 2018-02-08 11:00:21 +0900 (Thu, 08 Feb 2018) | 1 line

mjit.c: make filename in allocated buffer
------------------------------------------------------------------------
r62297 | k0kubun | 2018-02-08 09:55:33 +0900 (Thu, 08 Feb 2018) | 85 lines

revert r62291 for now

While some of CIs are succeeding and the test succeeds on my laptop,
some other CIs are failing. As I don't have time to fix it until I come
back to home, reverting this for now.

Failures:
https://rubyci.org/logs/www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20180208T000401Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20180207T201706Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu1604/ruby-trunk/log/20180207T183004Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/gentoo/ruby-trunk/log/20180207T213004Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos6/ruby-trunk/log/20180207T213003Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/fedora25/ruby-trunk/log/20180207T213003Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/fedora26/ruby-trunk/log/20180207T213003Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/opensuseleap/ruby-trunk/log/20180207T213001Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel_zlinux/ruby-trunk/log/20180207T223303Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/osx1011/ruby-trunk/log/20180207T234501Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/osx1012/ruby-trunk/log/20180207T234501Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-trunk/log/20180207T210002Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20180207T231805Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20180207T232403Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20180207T171914Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180207T232503Z.fail.html.gz
https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20180207T172813Z.fail.html.gz

http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506100
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506114
http://ci.rvm.jp/results/trunk_clang_40@silicon-docker/506119
http://ci.rvm.jp/results/trunk_clang_39@silicon-docker/506170
http://ci.rvm.jp/results/trunk-nopara@silicon-docker/506176
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506192
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506202
http://ci.rvm.jp/results/trunk_clang_39@silicon-docker/506244
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506271
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506280
http://ci.rvm.jp/results/trunk-nopara@silicon-docker/506323
http://ci.rvm.jp/results/trunk_clang_50@silicon-docker/506325
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506342
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506354
http://ci.rvm.jp/results/trunk_clang_39@silicon-docker/506385
http://ci.rvm.jp/results/trunk_clang_40@silicon-docker/506389
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506409
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506425
http://ci.rvm.jp/results/trunk_clang_40@silicon-docker/506471
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506484
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506495
http://ci.rvm.jp/results/trunk-test@x2/506524
http://ci.rvm.jp/results/trunk-vm-asserts@silicon-docker/506547
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506556
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506579
http://ci.rvm.jp/results/trunk-nopara@silicon-docker/506582
http://ci.rvm.jp/results/trunk_clang_50@silicon-docker/506634
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506638
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506663
http://ci.rvm.jp/results/trunk-test@frontier/506690
http://ci.rvm.jp/results/trunk_clang_40@silicon-docker/506718
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506728
http://ci.rvm.jp/results/trunk-nopara@silicon-docker/506752
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506754
http://ci.rvm.jp/results/trunk-gc-asserts@silicon-docker/506782
http://ci.rvm.jp/results/trunk_clang_38@silicon-docker/506799
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506816
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506835
http://ci.rvm.jp/results/trunk-nopara@silicon-docker/506879
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506903
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/506920
http://ci.rvm.jp/results/trunk-test@frontier/506955
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/506994
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/507012
http://ci.rvm.jp/results/trunk-vm-asserts@silicon-docker/507036
http://ci.rvm.jp/results/trunk_clang_40@silicon-docker/507037
http://ci.rvm.jp/results/trunk-nopara@silicon-docker/507053
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/507081
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/507097
http://ci.rvm.jp/results/trunk_clang_40@silicon-docker/507136
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/507165
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/507178
http://ci.rvm.jp/results/trunk-nopara@silicon-docker/507180
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/507257
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/507268
http://ci.rvm.jp/results/trunk-gc-asserts@silicon-docker/507303
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/507342
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/507355
http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/507434
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/507448
------------------------------------------------------------------------
r62296 | k0kubun | 2018-02-08 01:56:59 +0900 (Thu, 08 Feb 2018) | 12 lines

error.c: export rb_assert_failure

to test JIT with `VM_CHECK_MODE=1`

It's failing on CI which enables VM_CHECK_MODE.

:   1)
: TestJIT#test_jit [/home/ko1/ruby/src/trunk-vm-asserts/test/ruby/test_jit.rb:10]:
: Expected 1 times of JIT success, but succeeded 0 times.
:   2)
: TestJIT#test_jit_output [/home/ko1/ruby/src/trunk-vm-asserts/test/ruby/test_jit.rb:18]:
: Expected /^JIT success \(\d+\.\dms\): block in <main>@-e:1 -> .+_ruby_mjit_p\d+u\d+\.c$/ to match "MJIT warning: failure in loading code from '/tmp/_ruby_mjit_p9896u0.so': /tmp/_ruby_mjit
------------------------------------------------------------------------
r62295 | k0kubun | 2018-02-08 01:39:17 +0900 (Thu, 08 Feb 2018) | 3 lines

.travis.yml: try `make install` to test JIT

If header is not available, JIT won't be tested.
------------------------------------------------------------------------
r62294 | k0kubun | 2018-02-08 01:28:17 +0900 (Thu, 08 Feb 2018) | 1 line

test_jit.rb: make JIT count test optional
------------------------------------------------------------------------
r62293 | svn | 2018-02-08 01:15:22 +0900 (Thu, 08 Feb 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62292 | svn | 2018-02-08 01:15:22 +0900 (Thu, 08 Feb 2018) | 1 line

* 2018-02-08
------------------------------------------------------------------------
r62291 | k0kubun | 2018-02-08 01:15:21 +0900 (Thu, 08 Feb 2018) | 1 line

test_jit.rb: add initial test for JIT
------------------------------------------------------------------------
r62290 | k0kubun | 2018-02-07 23:25:03 +0900 (Wed, 07 Feb 2018) | 7 lines

transform_mjit_header.rb: very verbose error log

for debugging AIX..... I have no idea why AIX's gcc is failing to
transform MJIT header....

Today's CI output:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180207T113303Z.log.html.gz#make
------------------------------------------------------------------------
r62289 | nobu | 2018-02-07 23:13:57 +0900 (Wed, 07 Feb 2018) | 1 line

 mjit.c: untabified [ci skip]
------------------------------------------------------------------------
r62288 | k0kubun | 2018-02-07 23:08:24 +0900 (Wed, 07 Feb 2018) | 7 lines

mjit.c: fix -Wdiscarded-qualifiers warning

../mjit.c: In function 'system_tmpdir':
../mjit.c:1231:9: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  tmpdir = "/tmp";
         ^
../mjit.c: At top level:
------------------------------------------------------------------------
r62287 | k0kubun | 2018-02-07 23:01:51 +0900 (Wed, 07 Feb 2018) | 5 lines

transform_mjit_header.rb: apply Regexp.escape

to prevent future breakage

Following up r62285
------------------------------------------------------------------------
r62286 | kazu | 2018-02-07 22:57:07 +0900 (Wed, 07 Feb 2018) | 1 line

Remove redundant RTEST
------------------------------------------------------------------------
r62285 | k0kubun | 2018-02-07 22:48:48 +0900 (Wed, 07 Feb 2018) | 16 lines

transform_mjit_header.rb: ignore unsupported cc

to generate MJIT header.

Even if we can't build MJIT header, Ruby's build should success. And
compilers which are not explicitly supported are likely to fail to
transform MJIT header.

Also you can pass only gcc or clang to --jit-cc=xxx for now. Thus
generating header does never make sense.

So I decided to conservatively give up MJIT header generation.
But please feel free to add your favorite compiler's macro if you think
it's working. (Another workaround is passing -D__GNUC__ :p)

[Bug #14447] [Bug #14446]
------------------------------------------------------------------------
r62284 | nobu | 2018-02-07 22:45:14 +0900 (Wed, 07 Feb 2018) | 1 line

defs/gmake.mk: make universal mjit_min_header link
------------------------------------------------------------------------
r62283 | nobu | 2018-02-07 22:41:32 +0900 (Wed, 07 Feb 2018) | 4 lines

mjit.c: system_tmpdir

* mjit.c (system_tmpdir): use system provided temporary directory,
  and TMPDIR as well as mktemp(1), before TMP and "/tmp".
------------------------------------------------------------------------
r62282 | k0kubun | 2018-02-07 22:27:42 +0900 (Wed, 07 Feb 2018) | 4 lines

.gitignore: ignore min header for in-place build

In some revision, the build directory of minimized header is changed,
and then it's no longer ignored.
------------------------------------------------------------------------
r62281 | nobu | 2018-02-07 22:26:09 +0900 (Wed, 07 Feb 2018) | 10 lines

mjit.c: fix buffer overflow

* mjit.c (sprint_uniq_filename): get rid of silent buffer
  overflow.

* mjit.c (get_uniq_filename, convert_unit_to_func): allocate
  enough buffer before formatting.

* mjit.c (convert_unit_to_func): use DLEXT instead of hard coded
  extension.
------------------------------------------------------------------------
r62280 | k0kubun | 2018-02-07 20:44:36 +0900 (Wed, 07 Feb 2018) | 7 lines

mjit.c: windows should include fcntl.h too

Fixing build failure on mswin by r62279

mjit.c
../mjit.c(1137) : error C2065: 'O_RDONLY' : undeclared identifier
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\cl.EXE"' : return code '0x2'
------------------------------------------------------------------------
r62279 | nobu | 2018-02-07 17:14:15 +0900 (Wed, 07 Feb 2018) | 4 lines

mjit.c: FD instead of FILE

* mjit.c (init_header_filename): just FD instead of FILE to check
  file is accessible.
------------------------------------------------------------------------
r62278 | nobu | 2018-02-07 16:48:24 +0900 (Wed, 07 Feb 2018) | 1 line

mjit.c: fd is no longer valid after fclose
------------------------------------------------------------------------
r62277 | nobu | 2018-02-07 16:29:02 +0900 (Wed, 07 Feb 2018) | 1 line

mjit.c: fix declaration of ruby_null_device
------------------------------------------------------------------------
r62276 | nobu | 2018-02-07 15:49:32 +0900 (Wed, 07 Feb 2018) | 4 lines

thread.c: int32_t instead of suseconds_t

* thread.c (timeval_for): cast to int32_t instead of suseconds_t,
  which is not defined non-POSIX platforms.
------------------------------------------------------------------------
r62275 | nobu | 2018-02-07 15:14:56 +0900 (Wed, 07 Feb 2018) | 7 lines

fix up r62272

* thread.c (timeval_for): tv_usec is suseconds_t which may be
  smaller than long.

* thread_pthread.c (native_cond_timeout): ret is now used in
  CLOCK_MONOTONIC case only.
------------------------------------------------------------------------
r62274 | usa | 2018-02-07 13:04:33 +0900 (Wed, 07 Feb 2018) | 7 lines

remove declaration of ruby_engine from internal.h

	* internal.h (ruby_engine): remove declaration of ruby_engine because
	  it's declared at ruby/version.h.

	* ruby.c: include ruby/version.h for ruby_engine.

------------------------------------------------------------------------
r62273 | usa | 2018-02-07 12:21:28 +0900 (Wed, 07 Feb 2018) | 6 lines

mjit mswin support (WIP)

	* mjit.c (compile_c_to_so): fixed broken xfree position.

	* mjit.c (init_header_filename): refactored.

------------------------------------------------------------------------
r62272 | normal | 2018-02-07 10:57:14 +0900 (Wed, 07 Feb 2018) | 13 lines

thread.c: favor timespec internally

This results in fewer conversion on common modern systems with
support for clock_gettime, pthread_cond_timedwait and ppoll.
gettimeofday is declared obsolete by POSIX.1-2008, so it is yet
another reason to move away from it.  This also appears to result
in the reduction of compatibility code required for dealing
with inconsistent implementations of "struct timeval".tv_sec

In the future, this will also result in fewer conversions for
kqueue and pselect if we elect to use them.

[ruby-core:85416] [Feature #14452]
------------------------------------------------------------------------
r62271 | marcandre | 2018-02-07 08:52:30 +0900 (Wed, 07 Feb 2018) | 8 lines

lib/ostruct.rb: Use `FrozenError` instead of `RuntimeError`.

Patch by Yuuji Yaginuma. [Fixes GH-1808]

In other classes, `FrozenError` will be raised if change the frozen
object.
In order to match the behavior, I think that `FrozenError` should
use in `OpenStruct`.
------------------------------------------------------------------------
r62270 | marcandre | 2018-02-07 08:47:49 +0900 (Wed, 07 Feb 2018) | 1 line

lib/matrix.rb: Document deprecated methods [#12032] [doc] [ci-skip]
------------------------------------------------------------------------
r62269 | nobu | 2018-02-07 08:40:20 +0900 (Wed, 07 Feb 2018) | 1 line

common.mk: can't rescue NotImplementedError by default
------------------------------------------------------------------------
r62268 | nobu | 2018-02-07 08:40:19 +0900 (Wed, 07 Feb 2018) | 1 line

share ruby_null_device
------------------------------------------------------------------------
r62267 | usa | 2018-02-07 03:59:18 +0900 (Wed, 07 Feb 2018) | 11 lines

mjit mswin support (WIP)

* win32/Makefile.sub (LIBRUBYARG_SHARED): define for MJIT because it is used in
  common.mk.

* mjit.c (make_pch): skip temporary for mswin.

* mjit.c (compile_c_to_so, init_header_filename, mjit_init): mswin support.

* mjig_compile.c (mjit_compile): ditto.

------------------------------------------------------------------------
r62266 | k0kubun | 2018-02-07 01:57:46 +0900 (Wed, 07 Feb 2018) | 3 lines

mjit.c: make null device portable

for future mswin support
------------------------------------------------------------------------
r62265 | k0kubun | 2018-02-07 01:16:25 +0900 (Wed, 07 Feb 2018) | 3 lines

mjit.c: prefix "_ruby" to precompiled header too

for consistency and to clarify who created it.
------------------------------------------------------------------------
r62264 | k0kubun | 2018-02-07 01:03:14 +0900 (Wed, 07 Feb 2018) | 3 lines

ruby.c: add MJIT_FORCE_ENABLE macro

to always enable MJIT for testing.
------------------------------------------------------------------------
r62263 | nobu | 2018-02-07 01:03:11 +0900 (Wed, 07 Feb 2018) | 1 line

common.mk: clean mjit headers by clean-local
------------------------------------------------------------------------
r62262 | nobu | 2018-02-07 01:03:10 +0900 (Wed, 07 Feb 2018) | 1 line

mjit.c: try installed header only
------------------------------------------------------------------------
r62261 | nobu | 2018-02-07 00:55:12 +0900 (Wed, 07 Feb 2018) | 5 lines

moved MJIT_CPPFLAGS

* Makefile.in, win32/Makefile.sub (XCFLAGS): moved MJIT_CPPFLAGS
  from CPPFLAGS.  MJIT_CPPFLAGS is only for mjit.c, unused in
  extension libraries.
------------------------------------------------------------------------
r62260 | nobu | 2018-02-07 00:31:10 +0900 (Wed, 07 Feb 2018) | 1 line

common.mk: link or copy MJIT_MIN_HEADER under include
------------------------------------------------------------------------
r62259 | svn | 2018-02-07 00:19:11 +0900 (Wed, 07 Feb 2018) | 1 line

* 2018-02-07
------------------------------------------------------------------------
r62258 | k0kubun | 2018-02-07 00:19:10 +0900 (Wed, 07 Feb 2018) | 3 lines

mjit.c: handle fopen error

[Bug #14441]
------------------------------------------------------------------------
r62257 | k0kubun | 2018-02-06 23:58:12 +0900 (Tue, 06 Feb 2018) | 3 lines

transform_mjit_header.rb: resurrect `exit false`

which was just unintentionally dropped at r62252.
------------------------------------------------------------------------
r62256 | nobu | 2018-02-06 23:45:11 +0900 (Tue, 06 Feb 2018) | 4 lines

common.mk: MJIT_CPPFLAGS

* common.mk (MJIT_CPPFLAGS): moved common definition flags for
  mjit compilation.
------------------------------------------------------------------------
r62255 | k0kubun | 2018-02-06 23:27:15 +0900 (Tue, 06 Feb 2018) | 7 lines

mjit_compile.c: fix inconsistent indentation

and style of generated code.

I've used 2-space indentation at first but at some moment I started to
use insns.def contents for generated code. So the 4-space indentation
was introduced. But it does no longer make sense.
------------------------------------------------------------------------
r62254 | k0kubun | 2018-02-06 23:07:57 +0900 (Tue, 06 Feb 2018) | 6 lines

mjit_compile.c: share the definition of macros

(IS_ARGS_SPLAT, IS_ARGS_KEYWORD) with vm_args.c.

vm_args.c: share them with mjit_compile.c.
vm_insnhelper.h: get those definitions, with CALLER_SETUP_ARG too
------------------------------------------------------------------------
r62253 | kazu | 2018-02-06 22:58:04 +0900 (Tue, 06 Feb 2018) | 4 lines

Fix wrong comment

`ruby_strdup` does not return NULL.
[ci skip]
------------------------------------------------------------------------
r62252 | k0kubun | 2018-02-06 22:47:02 +0900 (Tue, 06 Feb 2018) | 14 lines

transform_mjit_header.rb: add output for debug

AIX's header build is failing like:

./miniruby -I./lib -I. -I.ext/common  ./tool/transform_mjit_header.rb "/usr/bin/gcc " rb_mjit_header.h .ext/include/powerpc-aix7.1.3.0/rb_mjit_min_header-2.6.0.h
error in initial header file:
/home/odaira/chkbuild/tmp/build/20180206T113302Z/tmp/20180206-15335556-aaiego.c:19:59: error: conflicting types for 'restrict'
 extern size_t fread(void *restrict, size_t, size_t, FILE *restrict);
                                                           ^

https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180206T113302Z.log.html.gz#make

It's so hard to know the cause from current output. Let me add debug
output and see tomorrow's CI result.
------------------------------------------------------------------------
r62251 | nobu | 2018-02-06 22:23:25 +0900 (Tue, 06 Feb 2018) | 1 line

mjit.c: suppress unused-value warning
------------------------------------------------------------------------
r62250 | kazu | 2018-02-06 21:40:41 +0900 (Tue, 06 Feb 2018) | 3 lines

Remove unused capture

Because `Regexp#to_s` add `(?-mix:)`, it is not unnecessary.
------------------------------------------------------------------------
r62249 | nobu | 2018-02-06 19:36:03 +0900 (Tue, 06 Feb 2018) | 1 line

mjit.c: fixed missing variable
------------------------------------------------------------------------
r62248 | nobu | 2018-02-06 19:30:53 +0900 (Tue, 06 Feb 2018) | 5 lines

mjit.c: build dir prefix

* mjit.c (init_header_filename): prepend basedir to header build
  dir too, so that the header can be found when running not in the
  build directory.
------------------------------------------------------------------------
r62247 | nobu | 2018-02-06 17:00:17 +0900 (Tue, 06 Feb 2018) | 1 line

configure.ac: removed unnecessary pushdef/popdef
------------------------------------------------------------------------
r62246 | nobu | 2018-02-06 16:42:44 +0900 (Tue, 06 Feb 2018) | 4 lines

test_gem_util.rb: fix broken test

* test/rubygems/test_gem_util.rb: no guarantee that tmpdir is
  always underneath the root directory at all.
------------------------------------------------------------------------
r62245 | nobu | 2018-02-06 12:19:42 +0900 (Tue, 06 Feb 2018) | 7 lines

mjit headers for universal binary

* common.mk (MJIT_HEADER, MJIT_MIN_HEADER): added hook to separate
  intermediate headers per archs.

* defs/gmake.mk: build mjit headers per -arch options, and then
  merge the headers with `#ifdef`s.
------------------------------------------------------------------------
r62244 | hsbt | 2018-02-06 11:58:35 +0900 (Tue, 06 Feb 2018) | 3 lines

Merge RubyGems-2.7.5 from upstream.

  Please see its details: http://blog.rubygems.org/2018/02/06/2.7.5-released.html
------------------------------------------------------------------------
r62243 | shyouhei | 2018-02-06 11:08:13 +0900 (Tue, 06 Feb 2018) | 12 lines

deal with aclocal(1)

This commit updates files so that aclocal.m4 generated by aclocal(1)
works well with our configure.ac

	* ac_checking.m4: merged back to configure.ac because
	  aclocal(1) cannot handle this macro.

	* ruby_append_options.m4: no longer used.

	* ruby_check_va_copy.m4: define using AC_DEFUN so that
	  aclocal(1) can find this macro.
------------------------------------------------------------------------
r62242 | nobu | 2018-02-06 10:42:38 +0900 (Tue, 06 Feb 2018) | 5 lines

thread_pthread.c: cast inside rb_thread_create_mjit_thread

* thread_pthread.c (rb_thread_create_mjit_thread): cast
  worker_func pointer to void pointer inside.  adjusted to the
  declaration in mjit.c and the definition in thread_win32.c.
------------------------------------------------------------------------
r62241 | nobu | 2018-02-06 10:42:37 +0900 (Tue, 06 Feb 2018) | 1 line

mjit.c: use ruby_strdup as get_string
------------------------------------------------------------------------
r62240 | nobu | 2018-02-06 09:47:19 +0900 (Tue, 06 Feb 2018) | 5 lines

common.mk: ARCH_FLAG to mjit headers

* common.mk (rb_mjit_header.h, rb_mjit_min_header.h): $(ARCH_FLAG)
  is necessary to compile for non-default architecture, e.g.,
  32bit build on 64bit platform.
------------------------------------------------------------------------
r62239 | k0kubun | 2018-02-06 02:00:43 +0900 (Tue, 06 Feb 2018) | 23 lines

mjit.c: fix MinGW warning by r62221

mjit.c: In function 'worker':
mjit.c:126:64: warning: passing argument 1 of '_InterlockedExchangePointer' from incompatible pointer type [-Wincompatible-pointer-types]
 #  define MJIT_ATOMIC_SET(var, val) InterlockedExchangePointer(&(var), val)
                                                                ^
mjit.c:828:17: note: in expansion of macro 'MJIT_ATOMIC_SET'
                 MJIT_ATOMIC_SET(node->unit->iseq->body->jit_func, func);
                 ^
In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/winnt.h:27:0,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/minwindef.h:163,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/windef.h:8,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:69,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/winsock2.h:23,
                 from ./include/ruby/win32.h:41,
                 from ./include/ruby/defines.h:250,
                 from ./include/ruby/ruby.h:29,
                 from ./include/ruby.h:33,
                 from internal.h:15,
                 from mjit.c:76:
C:/msys64/mingw64/x86_64-w64-mingw32/include/psdk_inc/intrin-impl.h:1420:7: note: expected 'void * volatile*' but argument is of type 'VALUE (**)(struct rb_execution_context_struct *, struct rb_control_frame_struct *) {aka long long unsigned int (**)(struct rb_execution_context_struct *, struct rb_control_frame_struct *)}'
 void *_InterlockedExchangePointer(void *volatile *Target,void *Value) {
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------------------------------------------------
r62238 | k0kubun | 2018-02-06 01:51:12 +0900 (Tue, 06 Feb 2018) | 14 lines

mjit.c: determine prefix of MJIT header at runtime

so that MJIT can work if Ruby is distributed as prebuilt binary.

Now mjit_init() depends on the internal const TMP_RUBY_PREFIX which is
only available after ruby_init_loadpath_safe() (L1608) and before
ruby_init_prelude() (L1681). So the place of mjit_init() is moved.

Makefile.in: Removed static prefix from MJIT_HEADER_ISNTALL_DIR macro.
And this removes the unused LIBRUBY_LIBDIR macro as well.
win32/Makefile.sub: ditto.

Patch by: Lars Kanis <lars@greiz-reinsdorf.de>
[Bug #14445]
------------------------------------------------------------------------
r62237 | k0kubun | 2018-02-06 00:49:32 +0900 (Tue, 06 Feb 2018) | 6 lines

vm_insnhelper.c: prefix rb_ to simple_iseq_p

which is started to be used by mjit_compile.c in r62197.

Related to r62235, this intends to transform the function to static.
Of course we shouldn't pollute the namespace anyway.
------------------------------------------------------------------------
r62236 | svn | 2018-02-06 00:39:56 +0900 (Tue, 06 Feb 2018) | 1 line

* 2018-02-06
------------------------------------------------------------------------
r62235 | k0kubun | 2018-02-06 00:39:55 +0900 (Tue, 06 Feb 2018) | 5 lines

transform_mjit_header.rb: restrict transformation

to whitelisted patterns. This fix is for NetBSD.

[Bug #14439]
------------------------------------------------------------------------
r62232 | nobu | 2018-02-05 22:58:48 +0900 (Mon, 05 Feb 2018) | 1 line

transform_mjit_header.rb: same command after error
------------------------------------------------------------------------
r62231 | k0kubun | 2018-02-05 22:24:00 +0900 (Mon, 05 Feb 2018) | 12 lines

tool/downloader.rb: retry SocketError

I would like to stabilize RubyCI.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/fedora26/ruby-trunk/log/20180205T123003Z.fail.html.gz

downloading did_you_mean-1.2.0.gem ... /home/hsbt/chkbuild/tmp/build/20180205T123003Z/tmp/ruby-snapshot20180205-23226-3201ha/ruby-2.6.0-r62226/tool/downloader.rb:212:in `rescue in download': failed to download did_you_mean-1.2.0.gem (RuntimeError)
SocketError: Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Name or service not known): https://rubygems.org/downloads/did_you_mean-1.2.0.gem
	from /home/hsbt/chkbuild/tmp/build/20180205T123003Z/tmp/ruby-snapshot20180205-23226-3201ha/ruby-2.6.0-r62226/tool/downloader.rb:123:in `download'
	from /home/hsbt/chkbuild/tmp/build/20180205T123003Z/tmp/ruby-snapshot20180205-23226-3201ha/ruby-2.6.0-r62226/tool/downloader.rb:66:in `download'
	from -e:4:in `<main>'
make[1]: *** [Makefile:1685: update-gems] Error 1
------------------------------------------------------------------------
r62230 | k0kubun | 2018-02-05 21:57:24 +0900 (Mon, 05 Feb 2018) | 8 lines

mjit.c: prefer using --jit-cc=clang if __clang__

is defined.  This is basically for OpenBSD.

Failure on using the compiler which is
not used for Ruby compilation is not supported.

[Bug #14440]
------------------------------------------------------------------------
r62229 | kazu | 2018-02-05 21:34:37 +0900 (Mon, 05 Feb 2018) | 1 line

Fix undefined behavior
------------------------------------------------------------------------
r62228 | kazu | 2018-02-05 21:34:35 +0900 (Mon, 05 Feb 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r62227 | k0kubun | 2018-02-05 21:33:36 +0900 (Mon, 05 Feb 2018) | 20 lines

mjit.c: try changing the order of includes

Hoping to fix the AIX's build failure like:

In file included from ./include/ruby/defines.h:139:0,
                 from ./include/ruby/ruby.h:29,
                 from ./include/ruby.h:33,
                 from internal.h:15,
                 from mjit.c:81:
/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.8.1/include-fixed/unistd.h:939:14: error: conflicting types for 'ftruncate64'
  extern int  ftruncate64(int, off64_t);
              ^
In file included from ./include/ruby/defines.h:139:0,
                 from ./include/ruby/ruby.h:29,
                 from ./include/ruby.h:33,
                 from internal.h:15,
                 from mjit.c:81:
/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/4.8.1/include-fixed/unistd.h:937:14: note: previous declaration of 'ftruncate64' was here
  extern int  ftruncate(int, off_t);
              ^
------------------------------------------------------------------------
r62226 | k0kubun | 2018-02-05 21:19:38 +0900 (Mon, 05 Feb 2018) | 6 lines

transform_mjit_header.rb: check initial code

separating the macros. Applying the kept macros to code which is already
affected by the macros may cause errors in initial code.

This is hopefully the final fix for icc build failure.
------------------------------------------------------------------------
r62225 | k0kubun | 2018-02-05 21:05:04 +0900 (Mon, 05 Feb 2018) | 6 lines

transform_mjit_header.rb: remove predefined macros

semi-automatically.

This is basically for icc's __DATE__, __TIME__, and many other families.
It causes an error by predefined macro redefinition.
------------------------------------------------------------------------
r62224 | shyouhei | 2018-02-05 14:22:22 +0900 (Mon, 05 Feb 2018) | 1 line

need shell's escape instead of M4's.
------------------------------------------------------------------------
r62223 | nobu | 2018-02-05 13:58:07 +0900 (Mon, 05 Feb 2018) | 4 lines

Makefile.sub: va_copy in old version

* win32/Makefile.sub: va_copy is available since VS12 (VC 18.00).
  simple copy same as VC1 19.00.
------------------------------------------------------------------------
r62222 | nobu | 2018-02-05 13:58:04 +0900 (Mon, 05 Feb 2018) | 4 lines

transform_mjit_header.rb: no extra CRs

* tool/transform_mjit_header.rb (MJITHeader.check_code!): open
  temporary file in binary mode too, not to include extra CRs.
------------------------------------------------------------------------
r62221 | shyouhei | 2018-02-05 13:17:44 +0900 (Mon, 05 Feb 2018) | 5 lines

assigning void* to a function pointer is a POSIXism

No implicit cast is defined between these types.  Should be explicit.
Also, NULL is defined to be ((void*)0) so not usable as a function
pointer value.
------------------------------------------------------------------------
r62220 | shyouhei | 2018-02-05 13:07:25 +0900 (Mon, 05 Feb 2018) | 3 lines

va_copy is a C99ism

Should provide appropriate fallback implementation.
------------------------------------------------------------------------
r62219 | shyouhei | 2018-02-05 13:02:55 +0900 (Mon, 05 Feb 2018) | 1 line

comma at the end of enum is a C99ism
------------------------------------------------------------------------
r62218 | nobu | 2018-02-05 12:19:39 +0900 (Mon, 05 Feb 2018) | 1 line

vcs.rb: no meaningless splat
------------------------------------------------------------------------
r62217 | nobu | 2018-02-05 12:19:39 +0900 (Mon, 05 Feb 2018) | 4 lines

vcs.rb: for old ruby

* tool/vcs.rb (DebugSystem#system): pop option hash for old
  version ruby which does not support `system` options.
------------------------------------------------------------------------
r62216 | nobu | 2018-02-05 11:07:49 +0900 (Mon, 05 Feb 2018) | 1 line

transform_mjit_header.rb: take program name from $0
------------------------------------------------------------------------
r62215 | nobu | 2018-02-05 11:02:23 +0900 (Mon, 05 Feb 2018) | 4 lines

transform_mjit_header.rb: read/write in binmode

* tool/transform_mjit_header.rb: read and write as ASCII-8BIT to
  make single-byte-optimizable always.
------------------------------------------------------------------------
r62214 | nobu | 2018-02-05 09:52:45 +0900 (Mon, 05 Feb 2018) | 4 lines

transform_mjit_header.rb: separate macro and code

* tool/transform_mjit_header.rb (separate_macro_and_code): return
  macro and code separately as the name, and concat before output.
------------------------------------------------------------------------
r62213 | nobu | 2018-02-05 09:52:20 +0900 (Mon, 05 Feb 2018) | 4 lines

transform_mjit_header.rb: scan by regexp

* tool/transform_mjit_header.rb (find_decl): scan by regexp
  instead of char-by-char loop.  return nil when finished.
------------------------------------------------------------------------
r62212 | kazu | 2018-02-05 09:09:09 +0900 (Mon, 05 Feb 2018) | 1 line

Use system option instead of shell redirect
------------------------------------------------------------------------
r62211 | k0kubun | 2018-02-05 00:40:06 +0900 (Mon, 05 Feb 2018) | 15 lines

mjit.c: define __EXTENSIONS__ earlier

Another try of r62204 and r62192.

As far as I can see from solaris's signal.h and sys/procset.h, the only
possibility that causes the following error would be that sys/procset.h
is included without __EXTENSIONS__ and signal.h included it again but it
doesn't define procset_t.  Let's define __EXTENSIONS__ from first.

---
In file included from vm_core.h:87:0,
                 from mjit.c:85:
/usr/include/signal.h:77:29: error: unknown type name 'procset_t'
 extern int sigsendset(const procset_t *, int);
                             ^
------------------------------------------------------------------------
r62210 | nobu | 2018-02-05 00:34:38 +0900 (Mon, 05 Feb 2018) | 3 lines

MINIRUBY dependency

* common.mk ($(MJIT_MIN_HEADER)): add dependency for $(MINIRUBY).
------------------------------------------------------------------------
r62209 | nobu | 2018-02-05 00:23:37 +0900 (Mon, 05 Feb 2018) | 4 lines

use MINIRUBY

* common.mk ($(MJIT_MIN_HEADER)): use $(MINIRUBY) at build time.
  $(BASERUBY) may not be available.
------------------------------------------------------------------------
r62208 | nobu | 2018-02-05 00:17:44 +0900 (Mon, 05 Feb 2018) | 6 lines

common.mk: CPPOUTFLAG

* common.mk (rb_mjit_header.h): use $(CPPOUTFLAG).

* win32/Makefile.sub (CPPOUTFLAG): needs -Fi to let cl.exe name
  preprocessed file, instead of -Fo.
------------------------------------------------------------------------
r62207 | svn | 2018-02-05 00:05:38 +0900 (Mon, 05 Feb 2018) | 1 line

* 2018-02-05
------------------------------------------------------------------------
r62206 | k0kubun | 2018-02-05 00:05:37 +0900 (Mon, 05 Feb 2018) | 7 lines

common.mk: use vm.i as the temporary filename

because `cl -P vm.c` always produces vm.i regardless of -o XXX and
currently mswin build is failing.

Fixing r62202. If this commit does not work, I'll revert this and
r62202.
------------------------------------------------------------------------
r62205 | nobu | 2018-02-04 22:51:02 +0900 (Sun, 04 Feb 2018) | 5 lines

transform_mjit_header.rb: refactor messages and exit

* tool/transform_mjit_header.rb: print non-error messages to
  STDOUT instead of STDERR.  exit with false or abort instead of
  exit 1.
------------------------------------------------------------------------
r62204 | k0kubun | 2018-02-04 22:49:38 +0900 (Sun, 04 Feb 2018) | 9 lines

mjit.c: another try for fixing solaris build

Reverted r62192 and added another try.
I prepared Solaris environment but I couldn't reproduce the RubyCI build
failure. So I'm testing on trunk.

I found the following article and it fixed the same problem with passing
`-D__EXTENSIONS__`. So this commit defines `__EXTENSIONS__` for Solaris.
https://bitbucket.org/ged/ruby-pg/issues/236/compile-error-usr-include-signalh-92-1
------------------------------------------------------------------------
r62203 | nobu | 2018-02-04 22:47:07 +0900 (Sun, 04 Feb 2018) | 1 line

common.mk: phony target mjit-headers
------------------------------------------------------------------------
r62202 | nobu | 2018-02-04 22:43:06 +0900 (Sun, 04 Feb 2018) | 4 lines

common.mk: rb_mjit_header.h

* common.mk (rb_mjit_header.h): moved from Makefile.in and
  win32/Makefile.sub.
------------------------------------------------------------------------
r62201 | nobu | 2018-02-04 22:33:13 +0900 (Sun, 04 Feb 2018) | 4 lines

Makefile.sub: CFLAGS_NO_ARCH

* win32/Makefile.sub: split CFLAGS into CFLAGS_NO_ARCH and
  ARCH_FLAG, as well as Makefile.in.
------------------------------------------------------------------------
r62200 | k0kubun | 2018-02-04 22:15:28 +0900 (Sun, 04 Feb 2018) | 5 lines

vm.c: feedback control frame size change

to VM_ASSERT. r62197 is adding bp.

I'll try to remove bp, but let's pass CI which enables assertion.
------------------------------------------------------------------------
r62199 | nobu | 2018-02-04 22:12:57 +0900 (Sun, 04 Feb 2018) | 5 lines

match whole word

* tool/transform_mjit_header.rb: add word boundary anchors and
  match whole word to get rid of false `static` declarations,
  e.g., rb_str_new_static.
------------------------------------------------------------------------
r62198 | kazu | 2018-02-04 20:59:19 +0900 (Sun, 04 Feb 2018) | 1 line

Fix typos and remove redundant `/#{}/`
------------------------------------------------------------------------
r62197 | k0kubun | 2018-02-04 20:22:28 +0900 (Sun, 04 Feb 2018) | 213 lines

mjit_compile.c: merge initial JIT compiler

which has been developed by Takashi Kokubun <takashikkbn@gmail> as
YARV-MJIT. Many of its bugs are fixed by wanabe <s.wanabe@gmail.com>.

This JIT compiler is designed to be a safe migration path to introduce
JIT compiler to MRI. So this commit does not include any bytecode
changes or dynamic instruction modifications, which are done in original
MJIT.

This commit even strips off some aggressive optimizations from
YARV-MJIT, and thus it's slower than YARV-MJIT too. But it's still
fairly faster than Ruby 2.5 in some benchmarks (attached below).

Note that this JIT compiler passes `make test`, `make test-all`, `make
test-spec` without JIT, and even with JIT. Not only it's perfectly safe
with JIT disabled because it does not replace VM instructions unlike
MJIT, but also with JIT enabled it stably runs Ruby applications
including Rails applications.

I'm expecting this version as just "initial" JIT compiler. I have many
optimization ideas which are skipped for initial merging, and you may
easily replace this JIT compiler with a faster one by just replacing
mjit_compile.c. `mjit_compile` interface is designed for the purpose.

common.mk: update dependencies for mjit_compile.c.

internal.h: declare `rb_vm_insn_addr2insn` for MJIT.

vm.c: exclude some definitions if `-DMJIT_HEADER` is provided to
compiler. This avoids to include some functions which take a long time
to compile, e.g. vm_exec_core. Some of the purpose is achieved in
transform_mjit_header.rb (see `IGNORED_FUNCTIONS`) but others are
manually resolved for now. Load mjit_helper.h for MJIT header.
mjit_helper.h: New. This is a file used only by JIT-ed code. I'll
refactor `mjit_call_cfunc` later.
vm_eval.c: add some #ifdef switches to skip compiling some functions
like Init_vm_eval.

win32/mkexports.rb: export thread/ec functions, which are used by MJIT.

include/ruby/defines.h: add MJIT_FUNC_EXPORTED macro alis to clarify
that a function is exported only for MJIT.

array.c: export a function used by MJIT.
bignum.c: ditto.
class.c: ditto.
compile.c: ditto.
error.c: ditto.
gc.c: ditto.
hash.c: ditto.
iseq.c: ditto.
numeric.c: ditto.
object.c: ditto.
proc.c: ditto.
re.c: ditto.
st.c: ditto.
string.c: ditto.
thread.c: ditto.
variable.c: ditto.
vm_backtrace.c: ditto.
vm_insnhelper.c: ditto.
vm_method.c: ditto.

I would like to improve maintainability of function exports, but I
believe this way is acceptable as initial merging if we clarify the
new exports are for MJIT (so that we can use them as TODO list to fix)
and add unit tests to detect unresolved symbols.
I'll add unit tests of JIT compilations in succeeding commits.

Author: Takashi Kokubun <takashikkbn@gmail.com>
Contributor: wanabe <s.wanabe@gmail.com>

Part of [Feature #14235]

---

* Known issues
  * Code generated by gcc is faster than clang. The benchmark may be worse
    in macOS. Following benchmark result is provided by gcc w/ Linux.
  * Performance is decreased when Google Chrome is running
  * JIT can work on MinGW, but it doesn't improve performance at least
    in short running benchmark.
  * Currently it doesn't perform well with Rails. We'll try to fix this
    before release.

---

* Benchmark reslts

Benchmarked with:
Intel 4.0GHz i7-4790K with 16GB memory under x86-64 Ubuntu 8 Cores

- 2.0.0-p0: Ruby 2.0.0-p0
- r62186: Ruby trunk (early 2.6.0), before MJIT changes
- JIT off: On this commit, but without `--jit` option
- JIT on: On this commit, and with `--jit` option

** Optcarrot fps

Benchmark: https://github.com/mame/optcarrot

|         |2.0.0-p0 |r62186   |JIT off  |JIT on   |
|:--------|:--------|:--------|:--------|:--------|
|fps      |37.32    |51.46    |51.31    |58.88    |
|vs 2.0.0 |1.00x    |1.38x    |1.37x    |1.58x    |

** MJIT benchmarks

Benchmark: https://github.com/benchmark-driver/mjit-benchmarks
(Original: https://github.com/vnmakarov/ruby/tree/rtl_mjit_branch/MJIT-benchmarks)

|           |2.0.0-p0 |r62186   |JIT off  |JIT on   |
|:----------|:--------|:--------|:--------|:--------|
|aread      |1.00     |1.09     |1.07     |2.19     |
|aref       |1.00     |1.13     |1.11     |2.22     |
|aset       |1.00     |1.50     |1.45     |2.64     |
|awrite     |1.00     |1.17     |1.13     |2.20     |
|call       |1.00     |1.29     |1.26     |2.02     |
|const2     |1.00     |1.10     |1.10     |2.19     |
|const      |1.00     |1.11     |1.10     |2.19     |
|fannk      |1.00     |1.04     |1.02     |1.00     |
|fib        |1.00     |1.32     |1.31     |1.84     |
|ivread     |1.00     |1.13     |1.12     |2.43     |
|ivwrite    |1.00     |1.23     |1.21     |2.40     |
|mandelbrot |1.00     |1.13     |1.16     |1.28     |
|meteor     |1.00     |2.97     |2.92     |3.17     |
|nbody      |1.00     |1.17     |1.15     |1.49     |
|nest-ntimes|1.00     |1.22     |1.20     |1.39     |
|nest-while |1.00     |1.10     |1.10     |1.37     |
|norm       |1.00     |1.18     |1.16     |1.24     |
|nsvb       |1.00     |1.16     |1.16     |1.17     |
|red-black  |1.00     |1.02     |0.99     |1.12     |
|sieve      |1.00     |1.30     |1.28     |1.62     |
|trees      |1.00     |1.14     |1.13     |1.19     |
|while      |1.00     |1.12     |1.11     |2.41     |

** Discourse's script/bench.rb

Benchmark: https://github.com/discourse/discourse/blob/v1.8.7/script/bench.rb

NOTE: Rails performance was somehow a little degraded with JIT for now.
We should fix this.
(At least I know opt_aref is performing badly in JIT and I have an idea
 to fix it. Please wait for the fix.)

*** JIT off
Your Results: (note for timings- percentile is first, duration is second in millisecs)

categories_admin:
  50: 17
  75: 18
  90: 22
  99: 29
home_admin:
  50: 21
  75: 21
  90: 27
  99: 40
topic_admin:
  50: 17
  75: 18
  90: 22
  99: 32
categories:
  50: 35
  75: 41
  90: 43
  99: 77
home:
  50: 39
  75: 46
  90: 49
  99: 95
topic:
  50: 46
  75: 52
  90: 56
  99: 101

*** JIT on
Your Results: (note for timings- percentile is first, duration is second in millisecs)

categories_admin:
  50: 19
  75: 21
  90: 25
  99: 33
home_admin:
  50: 24
  75: 26
  90: 30
  99: 35
topic_admin:
  50: 19
  75: 20
  90: 25
  99: 30
categories:
  50: 40
  75: 44
  90: 48
  99: 76
home:
  50: 42
  75: 48
  90: 51
  99: 89
topic:
  50: 49
  75: 55
  90: 58
  99: 99
------------------------------------------------------------------------
r62196 | k0kubun | 2018-02-04 18:48:44 +0900 (Sun, 04 Feb 2018) | 4 lines

Makefile.in: use CFLAGS_NO_ARCH for cpp

Using $(CFLAGS) breaks the build when multiple `-arch` options are
given. Then we should omit arch flags.
------------------------------------------------------------------------
r62195 | nobu | 2018-02-04 18:34:16 +0900 (Sun, 04 Feb 2018) | 4 lines

common.mk: MJIT_MIN_HEADER

* common.mk ($(MJIT_MIN_HEADER)): moved duplicate recipe from
  Makefile.in and win32/Makefile.sub.
------------------------------------------------------------------------
r62194 | nobu | 2018-02-04 18:13:19 +0900 (Sun, 04 Feb 2018) | 4 lines

use ifchange tool for rb_mjit_header.h

* Makefile.in, win32/Makefile.sub (rb_mjit_header.h): use ifchange
  tool.  cmp command is not available on Windows.
------------------------------------------------------------------------
r62193 | k0kubun | 2018-02-04 17:24:58 +0900 (Sun, 04 Feb 2018) | 14 lines

mjit.c: use InterlockedExchangePointer

for Windows, if it's available.

Before this commit, Windows builds printed following warnings.
mjit.c
../mjit.c(802) : warning C4047: 'function' : 'volatile LONG *' differs in levels of indirection from 'void **'
../mjit.c(802) : warning C4024: '_InterlockedExchange' : different types for formal and actual parameter 1
../mjit.c(802) : warning C4047: 'function' : 'LONG' differs in levels of indirection from 'void *'
../mjit.c(802) : warning C4024: '_InterlockedExchange' : different types for formal and actual parameter 2

ATOMIC_SET is using InterlockedExchange which takes LONG as its value.
As InterlockedExchangePointer takes PVOID, we should use this to set
function pointer atomically.
------------------------------------------------------------------------
r62192 | k0kubun | 2018-02-04 16:52:54 +0900 (Sun, 04 Feb 2018) | 18 lines

mjit.c: try to fix Solaris build failure

In file included from vm_core.h:87:0,
                 from mjit.c:81:
/usr/include/signal.h:71:29: error: unknown type name 'procset_t'
 extern int sigsendset(const procset_t *, int);
                             ^
In file included from mjit.c:81:0:
vm_core.h:90:16: error: '_SIGMAX' undeclared here (not in a function)
 # define NSIG (_SIGMAX + 1)      /* For QNX */
                ^
vm_core.h:93:19: note: in expansion of macro 'NSIG'
 #define RUBY_NSIG NSIG

Errors come from vm_core.h. But obviously I don't touch those parts.
So I guess we need something before vm_core.h.
I included internal.h before vm_core.h so that the situation becomes the
same as cont.c.
------------------------------------------------------------------------
r62191 | k0kubun | 2018-02-04 16:43:20 +0900 (Sun, 04 Feb 2018) | 8 lines

mjit.c: try porting va_copy

for non C99 conforming environments.

The behavior of this macro is undefined, but I heard this works on many
architectures. Let me check the Ruby CI result with this change.
(My Windows environment has only Visual Studio 2015 and va_copy is
provided in it...)
------------------------------------------------------------------------
r62190 | svn | 2018-02-04 15:58:11 +0900 (Sun, 04 Feb 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62189 | k0kubun | 2018-02-04 15:58:09 +0900 (Sun, 04 Feb 2018) | 104 lines

mjit.c: merge MJIT infrastructure

that allows to JIT-compile Ruby methods by generating C code and
using C compiler.  See the first comment of mjit.c to know what this
file does.

mjit.c is authored by Vladimir Makarov <vmakarov@redhat.com>.
After he invented great method JIT infrastructure for MRI as MJIT,
Lars Kanis <lars@greiz-reinsdorf.de> sent the patch to support MinGW
in MJIT. In addition to merging it, I ported pthread to Windows native
threads. Now this MJIT infrastructure can be compiled on Visual Studio.

This commit simplifies mjit.c to decrease code at initial merge. For
example, this commit does not provide multiple JIT threads support.
We can resurrect them later if we really want them, but I wanted to minimize
diff to make it easier to review this patch.

`/tmp/_mjitXXX` file is renamed to `/tmp/_ruby_mjitXXX` because non-Ruby
developers may not know the name "mjit" and the file name should make
sure it's from Ruby and not from some harmful programs.  TODO: it may be
better to store this to some temporary directory which Ruby is already using
by Tempfile, if it's not bad for performance.

mjit.h: New. It has `mjit_exec` interface similar to `vm_exec`, which is
for triggering MJIT. This drops interface for AOT compared to the original
MJIT.

Makefile.in: define macros to let MJIT know the path of MJIT header.
Probably we can refactor this to reduce the number of macros (TODO).
win32/Makefile.sub: ditto.

common.mk: compile mjit.o and mjit_compile.o. Unlike original MJIT, this
commit separates MJIT infrastructure and JIT compiler code as independent
object files. As initial patch is NOT going to have ultra-fast JIT compiler,
it's likely to replace JIT compiler, e.g. original MJIT's compiler or some
future JIT impelementations which are not public now.

inits.c: define MJIT module. This is added because `MJIT.enabled?` was
necessary for testing.
test/lib/zombie_hunter.rb: skip if `MJIT.enabled?`. Obviously this
wouldn't work with current code when JIT is enabled.
test/ruby/test_io.rb: skip this too. This would make no sense with MJIT.

ruby.c: define MJIT CLI options. As major difference from original MJIT,
"-j:l"/"--jit:llvm" are renamed to "--jit-cc" because I want to support
not only gcc/clang but also cl.exe (Visual Studio) in the future. But it
takes only "--jit-cc=gcc", "--jit-cc=clang" for now. And only long "--jit"
options are allowed since some Ruby committers preferred it at Ruby
developers Meeting on January, and some of options are renamed.
This file also triggers to initialize MJIT thread and variables.
eval.c: finalize MJIT worker thread and variables.
test/ruby/test_rubyoptions.rb: fix number of CLI options for --jit.

thread_pthread.c: change for pthread abstraction in MJIT. Prefix rb_ for
functions which are used by other files.
thread_win32.c: ditto, for Windows.  Those pthread porting is one of major
works that YARV-MJIT created, which is my fork of MJIT, in Feature 14235.
thread.c: follow rb_ prefix changes

vm.c: trigger MJIT call on VM invocation. Also trigger `mjit_mark` to avoid
SEGV by race between JIT and GC of ISeq. The improvement was provided by
wanabe <s.wanabe@gmail.com>.
In JIT compiler I created and am going to add in my next commit, I found
that having `mjit_exec` after `vm_loop_start:` is harmful because the
JIT-ed function doesn't proceed other ISeqs on RESTORE_REGS of leave insn.
Executing non-FINISH frame is unexpected for my JIT compiler and
`exception_handler` triggers executions of such ISeqs. So `mjit_exec`
here should be executed only when it directly comes from `vm_exec` call.
`RubyVM::MJIT` module and `.enabled?` method is added so that we can skip
some tests which don't expect JIT threads or compiler file descriptors.

vm_insnhelper.h: trigger MJIT on method calls during VM execution.

vm_core.h: add fields required for mjit.c. `bp` must be `cfp[6]` because
rb_control_frame_struct is likely to be casted to another struct. The
last position is the safest place to add the new field.
vm_insnhelper.c: save initial value of cfp->ep as cfp->bp. This is an
optimization which are done in both MJIT and YARV-MJIT. So this change
is added in this commit. Calculating bp from ep is a little heavy work,
so bp is kind of cache for it.

iseq.c: notify ISeq GC to MJIT. We should know which iseq in MJIT queue
is GCed to avoid SEGV.  TODO: unload some GCed units in some safe way.

gc.c: add hooks so that MJIT can wait GC, and vice versa. Simultaneous
JIT and GC executions may cause SEGV and so we should synchronize them.

cont.c: save continuation information in MJIT worker. As MJIT shouldn't
unload JIT-ed code which is being used, MJIT wants to know full list of
saved execution contexts for continuation and detect ISeqs in use.

mjit_compile.c: added empty JIT compiler so that you can reuse this commit
to build your own JIT compiler. This commit tries to compile ISeqs but
all of them are considered as not supported in this commit. So you can't
use JIT compiler in this commit yet while we added --jit option now.

Patch author: Vladimir Makarov <vmakarov@redhat.com>.

Contributors:
Takashi Kokubun <takashikkbn@gmail.com>.
wanabe <s.wanabe@gmail.com>.
Lars Kanis <lars@greiz-reinsdorf.de>.

Part of Feature 12589 and 14235.
------------------------------------------------------------------------
r62188 | svn | 2018-02-04 14:49:22 +0900 (Sun, 04 Feb 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62187 | k0kubun | 2018-02-04 14:49:21 +0900 (Sun, 04 Feb 2018) | 34 lines

common.mk: install a single header file for JIT

compilation which is created by transforming a preprocessed vm.c.
This file will be used by JIT compiler's generated code which we are
going to have from succeeding commits.

Makefile.in: generate MJIT header for UNIX environments.
win32/Makefile.sub: generate MJIT header for mswin environments.
At initial merge, we're going to support only MinGW for Windows. So the
header installed by this file won't be used for short term, but we'll
add mswin support in a half year or so, for sure.

tool/transform_mjit_header.rb: New. This script was originally written as
minimize_mjit_header.rb by Vladimir N. Makarov <vmakarov@redhat.com> for
Feature 12589.
Then I refactored a little so that it can conform CodeClimate CI which is
currently set for Ruby's GitHub repository, and fixed some bugs and ported
it to work on Windows.

Also, as original minimize_mjit_header.rb takes too long time to run,
this is modified to skip minimization step because having *static*
unused definitions does not waste compilation time on -O2 since compiler
can skip to compile unused static functions. So this does no longer
"minimize" the header and is renamed.

This header installation does NOT include a header to automatically
export symbols used by MJIT. That's because original MJIT code was
failing to export symbols in the import header in macOS environment.
But I would like to have the functionality for maintainability in the
future. I'll manually export things but it would be just an intemediate
solution.

Patch by: Vladimir N. Makarov <vmakarov@redhat.com>
Part of: Feature 12589 and 14235.
------------------------------------------------------------------------
r62186 | nobu | 2018-02-04 10:31:48 +0900 (Sun, 04 Feb 2018) | 1 line

thread.c: timespec_for is used only if poll() is used
------------------------------------------------------------------------
r62184 | normal | 2018-02-04 07:24:17 +0900 (Sun, 04 Feb 2018) | 3 lines

thread.c (thread_join_m): avoid NUM2TIMET for Bignum

Bignums exceed the range of time_t (or long).
------------------------------------------------------------------------
r62183 | normal | 2018-02-04 04:59:21 +0900 (Sun, 04 Feb 2018) | 4 lines

thread.c: avoid FP in C-API time calculations

FP arithmetic can lose precision in some cases leading to
premature wakeup and wasting CPU cycles.
------------------------------------------------------------------------
r62182 | normal | 2018-02-04 04:59:16 +0900 (Sun, 04 Feb 2018) | 6 lines

thread.c: avoid FP for Thread#join

FP arithmetic can lose precision in some cases leading to
premature wakeup and wasting CPU cycles.

Convert to use timeval_* functions for now.
------------------------------------------------------------------------
r62181 | normal | 2018-02-04 04:59:11 +0900 (Sun, 04 Feb 2018) | 3 lines

thread.c: extract timeval_sub from timeval_update_expire

It can be useful on its own.
------------------------------------------------------------------------
r62180 | svn | 2018-02-04 04:59:06 +0900 (Sun, 04 Feb 2018) | 1 line

* 2018-02-04
------------------------------------------------------------------------
r62179 | normal | 2018-02-04 04:59:05 +0900 (Sun, 04 Feb 2018) | 4 lines

thread.c (rb_thread_terminate_all): eliminate double2timeval call

No point for a fixed 1s value, and I plan on eliminating double
timeouts from internal API.
------------------------------------------------------------------------
r62178 | nobu | 2018-02-03 16:30:39 +0900 (Sat, 03 Feb 2018) | 3 lines

parse.y: named backslash

* parse.y: named backslash to show unexpected character.
------------------------------------------------------------------------
r62177 | normal | 2018-02-03 16:25:21 +0900 (Sat, 03 Feb 2018) | 4 lines

compile.c: fix string Range optimization with FSL

The optimization in [Feature #13355] needs to be detected
differently to work with "frozen_string_literal: true"
------------------------------------------------------------------------
r62176 | nobu | 2018-02-03 16:21:58 +0900 (Sat, 03 Feb 2018) | 1 line

parse.y: use lex_goto_eol to skip to EOL
------------------------------------------------------------------------
r62175 | nobu | 2018-02-03 12:50:28 +0900 (Sat, 03 Feb 2018) | 4 lines

process.c: command_name encoding

* process.c (rb_exec_fillarg): share subsequence of argv_buf for
  command_name, and copy the encoding from the command string.
------------------------------------------------------------------------
r62170 | nobu | 2018-02-03 10:57:00 +0900 (Sat, 03 Feb 2018) | 1 line

backward.h: adjusted NORETURN declaration
------------------------------------------------------------------------
r62169 | nobu | 2018-02-03 08:25:42 +0900 (Sat, 03 Feb 2018) | 1 line

eval.c: get rid of format-zero-length warning
------------------------------------------------------------------------
r62168 | nobu | 2018-02-03 01:44:22 +0900 (Sat, 03 Feb 2018) | 1 line

test_system.rb: tests without shell
------------------------------------------------------------------------
r62167 | nobu | 2018-02-03 01:39:16 +0900 (Sat, 03 Feb 2018) | 1 line

test_system.rb: exit by abort for portability
------------------------------------------------------------------------
r62166 | nobu | 2018-02-03 01:14:21 +0900 (Sat, 03 Feb 2018) | 1 line

process.c: split pst_message_status from pst_message
------------------------------------------------------------------------
r62165 | nobu | 2018-02-03 01:10:17 +0900 (Sat, 03 Feb 2018) | 1 line

process.c: reduce intermediate string
------------------------------------------------------------------------
r62164 | nobu | 2018-02-03 01:02:03 +0900 (Sat, 03 Feb 2018) | 1 line

backward.h: rb_mod_const_missing is internal function
------------------------------------------------------------------------
r62163 | svn | 2018-02-03 00:16:23 +0900 (Sat, 03 Feb 2018) | 1 line

* 2018-02-03
------------------------------------------------------------------------
r62162 | nobu | 2018-02-03 00:16:22 +0900 (Sat, 03 Feb 2018) | 4 lines

eval.c: unnecessary argument

* eval.c (rb_interrupt): removed unnecessary convertsion specifier
  and an empty string.
------------------------------------------------------------------------
r62161 | nobu | 2018-02-02 22:29:23 +0900 (Fri, 02 Feb 2018) | 1 line

variable.c: removed old warning
------------------------------------------------------------------------
r62160 | kazu | 2018-02-02 20:21:12 +0900 (Fri, 02 Feb 2018) | 3 lines

Fix test

Followup to r62158
------------------------------------------------------------------------
r62159 | kazu | 2018-02-02 20:03:23 +0900 (Fri, 02 Feb 2018) | 5 lines

Fix call-seq of NameError.new

`NameError.new(1,2,3)` raises
`wrong number of arguments (given 2, expected 0..1) (ArgumentError)`
in `StrandardError#initialize`, so NameError can't accept 3 or more arguments.
------------------------------------------------------------------------
r62158 | kazu | 2018-02-02 20:03:22 +0900 (Fri, 02 Feb 2018) | 4 lines

Use more verbose status in error messages

of `system` with `exception: true` like `Process::Status#inspect`
[Feature #14386] [ruby-core:85013]
------------------------------------------------------------------------
r62157 | nobu | 2018-02-02 17:30:57 +0900 (Fri, 02 Feb 2018) | 4 lines

io.c: unused assignments

* io.c (fptr_finalize_flush): removed unused assignments.  if
  noraise, err is never used after set.
------------------------------------------------------------------------
r62156 | svn | 2018-02-02 14:44:14 +0900 (Fri, 02 Feb 2018) | 1 line

* 2018-02-02
------------------------------------------------------------------------
r62155 | nobu | 2018-02-02 14:44:13 +0900 (Fri, 02 Feb 2018) | 1 line

io.c: hoisted out io_fd_check_closed
------------------------------------------------------------------------
r62154 | normal | 2018-02-01 18:20:38 +0900 (Thu, 01 Feb 2018) | 5 lines

array.c: remove rb_ary_frozen_p / Array#frozen?

This is redundant since r15206 /
ffe425ecaaa2a3f813e1d540e20e2179bce44302 as we no longer lock
the array during sort.  Instead, fall back to Object#frozen?
------------------------------------------------------------------------
r62153 | hsbt | 2018-02-01 18:07:16 +0900 (Thu, 01 Feb 2018) | 4 lines

Add test for Forwardable#def_delegator with r55366.

  Patch by @aycabta
  [Bug #12837][ruby-core:77611]
------------------------------------------------------------------------
r62152 | normal | 2018-02-01 17:59:27 +0900 (Thu, 01 Feb 2018) | 11 lines

ccan/list: sync with upstream

This brings us up-to-date with ccan/list
5dbd87b876434dd703dfcc30cb0503118aac2076
git://git.ozlabs.org/~ccan/ccan

This is a combination of 3 commits from ccan:

    list: add parens to gaurd macro args in LIST_INIT
    ccan/list: Add list_empty_nocheck
    list: trivial: fix typos in list_for_each_off's documentation
------------------------------------------------------------------------
r62151 | nobu | 2018-02-01 12:55:55 +0900 (Thu, 01 Feb 2018) | 6 lines

ruby.h: relax rb_funcall(obj, id, 0, 0) case only

* include/ruby/ruby.h (rb_varargs_argc_valid_p): relax rb_funcall
  check on extra args only if argc == 0, for the compatibility
  with wrong code which is probably confused with rb_funcallv.
  [Bug #14425]
------------------------------------------------------------------------
r62150 | nobu | 2018-02-01 11:56:28 +0900 (Thu, 01 Feb 2018) | 4 lines

win32.c: EPIPE for ERROR_NO_DATA

* win32/win32.c (rb_w32_write): writing to closed pipe fails with
  ERROR_NO_DATA but msvcrt maps it to EINVAL.  map it to EPIPE.
------------------------------------------------------------------------
r62149 | hsbt | 2018-02-01 09:25:18 +0900 (Thu, 01 Feb 2018) | 1 line

Fixed duplicated typo for `the the`.
------------------------------------------------------------------------
r62147 | nobu | 2018-02-01 02:35:27 +0900 (Thu, 01 Feb 2018) | 1 line

io.c: fix comparison subject
------------------------------------------------------------------------
r62146 | svn | 2018-02-01 02:26:21 +0900 (Thu, 01 Feb 2018) | 1 line

* 2018-02-01
------------------------------------------------------------------------
r62145 | nobu | 2018-02-01 02:26:20 +0900 (Thu, 01 Feb 2018) | 4 lines

io.c: fix fptr_copy_finalizer

* io.c (fptr_copy_finalizer): fix inverted condition.  if
  finalizer does not change, pipe_list should not change too.
------------------------------------------------------------------------
r62123 | nobu | 2018-01-31 17:17:16 +0900 (Wed, 31 Jan 2018) | 5 lines

io.c: fptr_copy_finalizer

* io.c (fptr_copy_finalizer): remove fptr from pipe_list when pipe
  became ordinary file, to fix access after free.  to be finalized
  by pipe_finalize and being in pipe_list must match.
------------------------------------------------------------------------
r62122 | hsbt | 2018-01-31 15:41:10 +0900 (Wed, 31 Jan 2018) | 1 line

Update csv maintainers.
------------------------------------------------------------------------
r62121 | nobu | 2018-01-31 13:24:57 +0900 (Wed, 31 Jan 2018) | 4 lines

io.c: pipe_register_fptr

* io.c (pipe_register_fptr): get rid of double registration which
  causes access after free and segfault.
------------------------------------------------------------------------
r62120 | nobu | 2018-01-31 13:02:18 +0900 (Wed, 31 Jan 2018) | 4 lines

io.c: simplified pipe_del_fptr

* io.c (pipe_del_fptr): merged code for the case fptr is first to
  the loop for the rest.
------------------------------------------------------------------------
r62119 | nobu | 2018-01-31 13:02:17 +0900 (Wed, 31 Jan 2018) | 1 line

trick ruby-mode.el by heredocs
------------------------------------------------------------------------
r62118 | kazu | 2018-01-31 09:19:33 +0900 (Wed, 31 Jan 2018) | 1 line

Fix wrong function names in rb_bug messages [ci skip]
------------------------------------------------------------------------
r62117 | svn | 2018-01-31 08:55:50 +0900 (Wed, 31 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62116 | normal | 2018-01-31 08:55:49 +0900 (Wed, 31 Jan 2018) | 12 lines

ruby.h: relax rb_funcall check on extra args for clang

clang 5.+ (tested clang 7.0.0) seems to be attempting division-by-zero
and giving a very large number for static args to rb_funcall.

* include/ruby/ruby.h (rb_varargs_bad_length): relax check for clang
* ext/-test-/funcall/funcall.c: renamed from passing_block.c
  define extra_args_name function
* test/-ext-/funcall/test_funcall.rb: new test
  [ruby-core:85266] [Bug #14425]

From: Eric Wong <e@80x24.org>
------------------------------------------------------------------------
r62115 | normal | 2018-01-31 04:35:12 +0900 (Wed, 31 Jan 2018) | 6 lines

proc: fix super_method segfault after bind

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

From: Eric Wong <e@80x24.org>
------------------------------------------------------------------------
r62114 | svn | 2018-01-31 03:32:41 +0900 (Wed, 31 Jan 2018) | 1 line

* 2018-01-31
------------------------------------------------------------------------
r62113 | normal | 2018-01-31 03:32:40 +0900 (Wed, 31 Jan 2018) | 8 lines

net/http: fix documentation for HTTP connection reuse

Thanks to Paul Kuruvilla <rohitpaulk@gmail.com> for the patch

* lib/net/http.rb: fix documentation for HTTP connection reuse
  [ruby-core:84815] [Bug #14349]

From: Paul Kuruvilla <rohitpaulk@gmail.com>
------------------------------------------------------------------------
r62112 | kazu | 2018-01-30 21:13:47 +0900 (Tue, 30 Jan 2018) | 2 lines

Remove empty directories [ci skip]

------------------------------------------------------------------------
r62111 | usa | 2018-01-30 21:03:28 +0900 (Tue, 30 Jan 2018) | 5 lines

simply show BASERUBY itself

* common.mk (showflags): simply show `BASERUBY` itself, because nmake does not
  supports backquote notation.

------------------------------------------------------------------------
r62110 | nobu | 2018-01-30 20:12:21 +0900 (Tue, 30 Jan 2018) | 4 lines

setup.mak: discard BASERUBY output

* win32/setup.mak: discard output from BASERUBY command, even if
  it contains multiple commands.
------------------------------------------------------------------------
r62109 | naruse | 2018-01-30 16:34:06 +0900 (Tue, 30 Jan 2018) | 1 line

support ruby 1.9.3
------------------------------------------------------------------------
r62108 | hsbt | 2018-01-30 16:08:53 +0900 (Tue, 30 Jan 2018) | 3 lines

[DOC] Refinements on modules are allowed

From: Leo Correa <lcorr005@gmail.com>
------------------------------------------------------------------------
r62107 | nobu | 2018-01-30 14:48:28 +0900 (Tue, 30 Jan 2018) | 6 lines

force fixable

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

* rational.c (nurat_hash): ditto.
------------------------------------------------------------------------
r62106 | hsbt | 2018-01-30 14:43:42 +0900 (Tue, 30 Jan 2018) | 17 lines

ia64: update ia64-specific code to use execution context

This change follows commit 837fd5e494731d7d44786f29e7d6e8c27029806f
in '#ifdef __ia64' branches.

Noticed as a build failure by John Paul Adrian Glaubitz:

```
  cont.c:502:50: error: 'rb_thread_t {aka struct rb_thread_struct}'
    has no member named 'machine'
       size = cont->machine.register_stack_size =
           th->machine.register_stack_end - th->machine.register_stack_start;
               ^~
```

The change is trivial: update 'th->machine' usage to 'th->ec->machine'.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
------------------------------------------------------------------------
r62105 | nobu | 2018-01-30 13:17:32 +0900 (Tue, 30 Jan 2018) | 1 line

vcs.rb: checkout the current branch before rebase
------------------------------------------------------------------------
r62104 | nobu | 2018-01-30 12:57:54 +0900 (Tue, 30 Jan 2018) | 1 line

common.mk: added minimum dependencies of incs
------------------------------------------------------------------------
r62103 | nobu | 2018-01-30 12:21:52 +0900 (Tue, 30 Jan 2018) | 8 lines

bare_instructions.rb: sp_inc is signed

* tool/ruby_vm/models/bare_instructions.rb (predefine_attributes):
  `sp_inc` attribute which may return negative values must be
  signed `rb_snum_t`, to be signed-expanded at type promotion.

* vm_insnhelper.h (ADJ_SP): removed the workaround for platforms
  where rb_num_t is wider than int.
------------------------------------------------------------------------
r62102 | ko1 | 2018-01-30 11:21:59 +0900 (Tue, 30 Jan 2018) | 1 line

skip EINVAL on unsupported platform
------------------------------------------------------------------------
r62101 | nobu | 2018-01-30 11:20:02 +0900 (Tue, 30 Jan 2018) | 5 lines

vcs.rb: fix errors

* tool/vcs.rb (DebugSystem#system): fix undefined local variable
  error.  as system doesn't accept `exception:` option before 2.6,
  remove it from `opts`.
------------------------------------------------------------------------
r62100 | nobu | 2018-01-30 11:08:30 +0900 (Tue, 30 Jan 2018) | 3 lines

iseq.c: internal lvar name

* iseq.c (local_var_name): name internal local variables as `?N`.
------------------------------------------------------------------------
r62099 | normal | 2018-01-30 09:22:22 +0900 (Tue, 30 Jan 2018) | 7 lines

net/pop: make modified strings mutable

Thanks to Michael Zimmerman for the bug report

* lib/net/pop.rb: make modified strings mutable
  [ruby-core:85210] [Bug #14416]
* test/net/pop/test_pop.rb: new test
------------------------------------------------------------------------
r62098 | naruse | 2018-01-30 02:12:07 +0900 (Tue, 30 Jan 2018) | 1 line

show BASERUBY's version on `make showflags`
------------------------------------------------------------------------
r62097 | naruse | 2018-01-30 02:05:41 +0900 (Tue, 30 Jan 2018) | 1 line

Suport ruby 1.9.3
------------------------------------------------------------------------
r62094 | eregon | 2018-01-30 01:08:16 +0900 (Tue, 30 Jan 2018) | 1 line

Update to ruby/spec@83063a3
------------------------------------------------------------------------
r62093 | svn | 2018-01-30 01:07:36 +0900 (Tue, 30 Jan 2018) | 1 line

* 2018-01-30
------------------------------------------------------------------------
r62092 | eregon | 2018-01-30 01:07:35 +0900 (Tue, 30 Jan 2018) | 1 line

Update to ruby/mspec@5d49a6c
------------------------------------------------------------------------
r62091 | mame | 2018-01-29 17:40:22 +0900 (Mon, 29 Jan 2018) | 8 lines

string.c (rb_str_format_m): Fix the example code of the doc

Change `%08x` to `%016x` because of two reasons:

* `%016x` demonstrates that we can use two or more digits here.
* Currently, many people uses 64-bit environment.
  (I'm unsure if object_id is a good example here, though...)
I'm unsure if
------------------------------------------------------------------------
r62090 | shyouhei | 2018-01-29 17:11:02 +0900 (Mon, 29 Jan 2018) | 2 lines

redefinition of a typedef is a C11ism

------------------------------------------------------------------------
r62089 | shyouhei | 2018-01-29 16:15:08 +0900 (Mon, 29 Jan 2018) | 66 lines

eliminate CALL_SIMPLE_METHOD

Arrange operands of several opt_something insns so that jumps to
opt_send_without_block can be applied to them. This makes it
possible to eliminate CALL_SIMPLE_METHOD macro at all.  Results
in binary size of vm_exec_core to change from 27,008 bytes to
26,016 bytes on my machine. [close GH-1779]

Note however that PC can point somewhere non-instruction now.

-----------------------------------------------------------
benchmark results:
minimum results in each 3 measurements.
Execution time (sec)
name    before  after
so_ackermann     0.450  0.426
so_array         0.789  0.824
so_binary_trees  5.760  5.635
so_concatenate   3.594  3.508
so_count_words   0.211  0.196
so_exception     0.256  0.244
so_fannkuch      1.049  1.044
so_fasta         1.485  1.472
so_k_nucleotide  1.195  1.216
so_lists         0.517  0.513
so_mandelbrot    2.264  2.394
so_matrix        0.501  0.468
so_meteor_contest        2.987  2.912
so_nbody         1.307  1.289
so_nested_loop   0.908  0.925
so_nsieve        1.679  1.614
so_nsieve_bits   2.131  2.092
so_object        0.620  0.625
so_partial_sums  1.623  1.675
so_pidigits      1.135  1.190
so_random        0.357  0.321
so_reverse_complement    0.619  0.583
so_sieve         0.493  0.496
so_spectralnorm  1.749  1.737

Speedup ratio: compare with the result of `before' (greater is better)
name    after
so_ackermann    1.057
so_array        0.958
so_binary_trees 1.022
so_concatenate  1.024
so_count_words  1.077
so_exception    1.049
so_fannkuch     1.004
so_fasta        1.009
so_k_nucleotide 0.983
so_lists        1.007
so_mandelbrot   0.946
so_matrix       1.072
so_meteor_contest       1.026
so_nbody        1.013
so_nested_loop  0.982
so_nsieve       1.040
so_nsieve_bits  1.018
so_object       0.992
so_partial_sums 0.969
so_pidigits     0.954
so_random       1.111
so_reverse_complement   1.062
so_sieve        0.994
so_spectralnorm 1.007
------------------------------------------------------------------------
r62088 | shyouhei | 2018-01-29 16:04:50 +0900 (Mon, 29 Jan 2018) | 66 lines

s/CALL_SIMPLE_METHOD/DISPATCH_ORIGINAL_INSN/

Now that DISPATCH_ORIGINAL_INSN is introduced, we can replace
CALL_SIMPLE_METHOD with DISPATCH_ORIGINAL_INSN. These two macros
differ in size very much and results in this big difference in
compiled binary size. This changeset reduces the size of
vm_exec_core from 32,352 bytes to 27,008 bytes on my machine.  As
a result it yields slightly better performance.
Closes [GH-1779].

-----------------------------------------------------------
benchmark results:
minimum results in each 3 measurements.
Execution time (sec)
name    before  after
so_ackermann     0.484  0.454
so_array         0.837  0.779
so_binary_trees  5.928  5.801
so_concatenate   3.473  3.543
so_count_words   0.201  0.222
so_exception     0.255  0.252
so_fannkuch      1.080  1.019
so_fasta         1.459  1.463
so_k_nucleotide  1.218  1.180
so_lists         0.499  0.484
so_mandelbrot    2.189  2.324
so_matrix        0.510  0.496
so_meteor_contest        3.025  2.925
so_nbody         1.319  1.273
so_nested_loop   0.941  0.932
so_nsieve        1.806  1.647
so_nsieve_bits   2.151  2.078
so_object        0.632  0.621
so_partial_sums  1.560  1.632
so_pidigits      1.190  1.183
so_random        0.333  0.353
so_reverse_complement    0.604  0.586
so_sieve         0.521  0.481
so_spectralnorm  1.774  1.722

Speedup ratio: compare with the result of `before' (greater is better)
name    after
so_ackermann    1.065
so_array        1.075
so_binary_trees 1.022
so_concatenate  0.980
so_count_words  0.903
so_exception    1.009
so_fannkuch     1.059
so_fasta        0.997
so_k_nucleotide 1.032
so_lists        1.032
so_mandelbrot   0.942
so_matrix       1.028
so_meteor_contest       1.034
so_nbody        1.036
so_nested_loop  1.009
so_nsieve       1.097
so_nsieve_bits  1.035
so_object       1.018
so_partial_sums 0.956
so_pidigits     1.006
so_random       0.943
so_reverse_complement   1.032
so_sieve        1.083
so_spectralnorm 1.030
------------------------------------------------------------------------
r62087 | shyouhei | 2018-01-29 15:56:56 +0900 (Mon, 29 Jan 2018) | 32 lines

also use sp_inc in vm core

Now that sp_inc attributes are officially provided as inline
functions. Why not use them directly from the vm core, not just
by the compiler. By doing so, it is now possible for us to
optimize stack manipulations. We can now know exactly how many
words of stack space an instruction consumes before it actually
does. This changeset deletes some lines from insns.def because
they are no longer needed.  As a result it reduces the size of
vm_exec_core function from 32,400 bytes to 32,352 bytes on my
machine.

It seems it does not affect performance:

-----------------------------------------------------------
benchmark results:
minimum results in each 3 measurements.
Execution time (sec)
name    before  after
loop_for         1.093  1.061
loop_generator   1.156  1.152
loop_times       0.982  0.974
loop_whileloop   0.549  0.587
loop_whileloop2  0.115  0.121

Speedup ratio: compare with the result of `before' (greater is better)
name    after
loop_for        1.030
loop_generator  1.003
loop_times      1.008
loop_whileloop  0.935
loop_whileloop2 0.949
------------------------------------------------------------------------
r62086 | nobu | 2018-01-29 15:54:22 +0900 (Mon, 29 Jan 2018) | 6 lines

ruby.c: no VARIABLE_LIBPATH

* ruby.c (ruby_init_loadpath_safe): removed code using fixed size
  path buffer.  relative load path is supported only on platforms
  where dladdr is available, or on Windows, so !VARIABLE_LIBPATH
  code is not used.
------------------------------------------------------------------------
r62085 | shyouhei | 2018-01-29 15:47:05 +0900 (Mon, 29 Jan 2018) | 6 lines

extensive use of instruction attributes

Instead of using magic numbers, let us define a series of attributes
and use them from the VM core.  Proper function declarations makes
these attributes inlined in most modern compilers.  On my machine
exact same binary is generated with or without this changeset.
------------------------------------------------------------------------
r62084 | svn | 2018-01-29 06:57:39 +0900 (Mon, 29 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r62083 | normal | 2018-01-29 06:57:38 +0900 (Mon, 29 Jan 2018) | 8 lines

doc/signals.rdoc: new document work-in-progress

We need a longer document to inform users of caveats
related to Signal.trap usage.  This is still incomplete,
and we can fill in and edit other bits as needed.

* doc/signals.rdoc: new document
  [ruby-core:85107] [Misc #14222]
------------------------------------------------------------------------
r62082 | svn | 2018-01-29 06:07:14 +0900 (Mon, 29 Jan 2018) | 1 line

* 2018-01-29
------------------------------------------------------------------------
r62081 | normal | 2018-01-29 06:07:13 +0900 (Mon, 29 Jan 2018) | 23 lines

uri/common: reduce allocations and retained objects

Thanks to Sam Saffron for this patch, it shows
a nice reduction which affects many web applications:

  require 'memory_profiler'

  MemoryProfiler.report do
    require 'uri'
  end.pretty_print

Before:

Total allocated: 986643 bytes (15159 objects)
Total retained:  246370 bytes (2532 objects)

After:

Total allocated: 926903 bytes (13665 objects)
Total retained:  208570 bytes (1587 objects)

* lib/uri/common.rb: reduce allocations and retained objects
  [ruby-core:85161] [Feature #14410]
------------------------------------------------------------------------
r62080 | nobu | 2018-01-28 23:16:48 +0900 (Sun, 28 Jan 2018) | 1 line

method.h: VM_METHOD_TYPE_MINIMUM_BITS
------------------------------------------------------------------------
r62079 | nobu | 2018-01-28 23:05:39 +0900 (Sun, 28 Jan 2018) | 1 line

parse.y (parser_append_options): shorter alias LOC
------------------------------------------------------------------------
r62078 | nobu | 2018-01-28 19:35:28 +0900 (Sun, 28 Jan 2018) | 4 lines

method.h: BITFIELD in rb_method_definition_t

* method.h (rb_method_definition_struct): use BITFIELD for
  rb_method_type_t.
------------------------------------------------------------------------
r62077 | normal | 2018-01-28 06:04:42 +0900 (Sun, 28 Jan 2018) | 7 lines

internal.h: add BITFIELD macro to aid C99 users

I plan to use this macro to pack other enums in the VM.

* internal.h: add BITFIELD macro
* method.h: use BITFIELD for rb_method_visibility_t
  [ruby-core:85074] [Misc #14395]
------------------------------------------------------------------------
r62076 | svn | 2018-01-28 06:04:37 +0900 (Sun, 28 Jan 2018) | 1 line

* 2018-01-28
------------------------------------------------------------------------
r62075 | normal | 2018-01-28 06:04:36 +0900 (Sun, 28 Jan 2018) | 10 lines

vm_core: use "int" for living_thread_num

We treat this as "int" through the vm_living_thread_num API
anyways, and "pid_t" is still 32-bits with glibc on 64-bit
platforms.  I expect it'll be a long time before anybody needs
more than 2 billion native threads.  For now, let's save one
cacheline on x86-64 (as reported by pahole(1)):

	before:  size: 1288, cachelines: 21, members: 45
	 after:  size: 1280, cachelines: 20, members: 45
------------------------------------------------------------------------
r62074 | k0kubun | 2018-01-27 22:50:28 +0900 (Sat, 27 Jan 2018) | 3 lines

insns.def: [DOC] update supported attributes [ci skip]

which are changed at r62051.
------------------------------------------------------------------------
r62073 | nobu | 2018-01-27 19:41:43 +0900 (Sat, 27 Jan 2018) | 5 lines

compile.c: try to convert in massign `for`

* compile.c (compile_for_masgn): try to convert to an Array if an
  element of massign `for` is not an Array.
  [ruby-core:84931] [Bug #14374]
------------------------------------------------------------------------
r62072 | nobu | 2018-01-27 18:27:47 +0900 (Sat, 27 Jan 2018) | 4 lines

array.c: rb_check_to_array

* array.c (rb_check_to_array): conversion to array by to_a method.
  returns nil if not possible.
------------------------------------------------------------------------
r62071 | nobu | 2018-01-27 15:12:09 +0900 (Sat, 27 Jan 2018) | 7 lines

defined? returns nil for toplevel constant lookup

* variable.c (rb_const_defined_0): toplevel constant lookup has
  been removed, should return nil too.
  [ruby-core:85142] [Bug #14407] [Fix GH-1800]

From: Gonzalo <grzuy0@gmail.com>
------------------------------------------------------------------------
r62070 | nobu | 2018-01-27 15:11:23 +0900 (Sat, 27 Jan 2018) | 1 line

vcs.rb: prepend DebugSystem to VCS
------------------------------------------------------------------------
r62069 | nobu | 2018-01-27 14:35:47 +0900 (Sat, 27 Jan 2018) | 4 lines

vm_insnhelper.c: avoid intermediate array

* vm_insnhelper.c (vm_expandarray): get rid of creating
  intermediate Array object when conversion failed.
------------------------------------------------------------------------
r62068 | k0kubun | 2018-01-27 13:14:29 +0900 (Sat, 27 Jan 2018) | 6 lines

bare_instructions.rb: show class name on inspect

as it's helpful for debugging.

I'm not sure what's the good output for RubyVM::TraceInstructions, so I
left it as it is.
------------------------------------------------------------------------
r62067 | kazu | 2018-01-27 13:14:26 +0900 (Sat, 27 Jan 2018) | 4 lines

Fix duplicated HAVE_NAN

And remove redundant `HAVE_*` macros,
and use `USE_RB_*` macros instead.
------------------------------------------------------------------------
r62066 | k0kubun | 2018-01-27 11:14:20 +0900 (Sat, 27 Jan 2018) | 1 line

insns2vm.rb: add missing word to help
------------------------------------------------------------------------
r62065 | k0kubun | 2018-01-27 11:14:20 +0900 (Sat, 27 Jan 2018) | 5 lines

insns2vm.rb: make #generate_parser private

which is only used by #router.

To make it private, we need to stop defining them on top-level.
------------------------------------------------------------------------
r62064 | k0kubun | 2018-01-27 10:59:08 +0900 (Sat, 27 Jan 2018) | 12 lines

dumper.rb: stop getting --destdir option value

via current directory. It's kind of a global state and fragile to
implementation changes in other places, and how the `Dir.getwd` is set
is not obvious from just reading around `RubyVM::Dumper#initialize` if
it depends on the global state.

tool/ruby_vm/controllers/application_controller.rb: explicitly pass
destdir to RubyVM::Dumper.

tool/ruby_vm/scripts/insns2vm.rb: explicitly pass destdir parsed from
optparse.
------------------------------------------------------------------------
r62063 | k0kubun | 2018-01-27 10:28:21 +0900 (Sat, 27 Jan 2018) | 4 lines

win32/Makefile.sub: fix typo

Other places are using RT_VER. So I guess this is correct.
Currently AppVeyor CI is failing and I want to fix that.
------------------------------------------------------------------------
r62062 | svn | 2018-01-27 01:38:39 +0900 (Sat, 27 Jan 2018) | 1 line

* 2018-01-27
------------------------------------------------------------------------
r62061 | usa | 2018-01-27 01:38:38 +0900 (Sat, 27 Jan 2018) | 5 lines

need to declare the prototype of nan() if missing

* include/ruby/missing.h (nan): need to declare the prototype of nan() if
  missing.

------------------------------------------------------------------------
r62060 | nobu | 2018-01-26 22:38:00 +0900 (Fri, 26 Jan 2018) | 1 line

vcs.rb: old version cannot refine modules
------------------------------------------------------------------------
r62059 | nobu | 2018-01-26 22:34:09 +0900 (Fri, 26 Jan 2018) | 4 lines

vcs.rb: dcommit for each commit

svn to git bridge on ci.ruby-lang.org sometimes stalls when
dcommitting some commits at once.
------------------------------------------------------------------------
r62058 | nobu | 2018-01-26 22:27:56 +0900 (Fri, 26 Jan 2018) | 1 line

vcs.rb: debug print in system method
------------------------------------------------------------------------
r62057 | nobu | 2018-01-26 19:55:47 +0900 (Fri, 26 Jan 2018) | 7 lines

error.c: receiver kwarg

* error.c (name_err_initialize_options): NameError#initialize
  accepts receiver.  [Feature #14313]

* error.c (nometh_err_initialize_options): pass keyword arguments
  to the super method.
------------------------------------------------------------------------
r62056 | nobu | 2018-01-26 19:55:46 +0900 (Fri, 26 Jan 2018) | 4 lines

test_exception.rb: NameError.new NoMethodError.new

* test/ruby/test_exception.rb: added tests for NameError.new, and
  NoMethodError.new including priv argument.
------------------------------------------------------------------------
r62055 | nobu | 2018-01-26 19:55:45 +0900 (Fri, 26 Jan 2018) | 4 lines

error.c: [DOC] NoMethodError.new [ci skip]

* error.c (nometh_err_initialize): [RDOC] added missing optional
  argument priv.
------------------------------------------------------------------------
r62054 | nobu | 2018-01-26 19:55:45 +0900 (Fri, 26 Jan 2018) | 5 lines

error.c: copy keyword arguments

* error.c (rb_key_err_new): pass arguments all arguments to the
  super method, except for keyword arguments copied to instance
  variables.  [Feature #14313]
------------------------------------------------------------------------
r62053 | nobu | 2018-01-26 15:41:13 +0900 (Fri, 26 Jan 2018) | 5 lines

error.c: KeyError missing keyword arguments

* error.c (key_err_initialize): leave attributes for missing
  keyword arguments unset, so accessors can tell if it is missing
  or explicit nil.  [Feature #14313]
------------------------------------------------------------------------
r62052 | shyouhei | 2018-01-26 15:30:59 +0900 (Fri, 26 Jan 2018) | 5 lines

treat PC for gc events

ADD_PCs moved. That didn't change vast majority of event hooks
because vm_traece() has been placed before ADD_PC. However for GC
events the situation is different. We have to take care.
------------------------------------------------------------------------
r62051 | shyouhei | 2018-01-26 15:30:58 +0900 (Fri, 26 Jan 2018) | 66 lines

move ADD_PC around to optimize PC manipluiations

This commit introduces new attribute handles_flame and if that is
_not_ the case, places ADD_PC right after INC_SP.  This improves
locality of PC manipulations to prevents unnecessary register spill-
outs. As a result, it reduces the size of vm_exec_core from 32,688
bytes to 32,384 bytes on my machine.

Speedup is very faint, but certain.

-----------------------------------------------------------
benchmark results:
minimum results in each 3 measurements.
Execution time (sec)
name    before  after
so_ackermann     0.476  0.464
so_array         0.742  0.728
so_binary_trees  5.493  5.466
so_concatenate   3.619  3.395
so_count_words   0.190  0.184
so_exception     0.249  0.239
so_fannkuch      0.994  0.953
so_fasta         1.369  1.374
so_k_nucleotide  1.111  1.111
so_lists         0.470  0.481
so_mandelbrot    2.059  2.050
so_matrix        0.466  0.465
so_meteor_contest        2.712  2.781
so_nbody         1.154  1.204
so_nested_loop   0.852  0.846
so_nsieve        1.636  1.623
so_nsieve_bits   2.073  2.039
so_object        0.616  0.584
so_partial_sums  1.464  1.481
so_pidigits      1.075  1.082
so_random        0.321  0.317
so_reverse_complement    0.555  0.558
so_sieve         0.495  0.490
so_spectralnorm  1.634  1.627

Speedup ratio: compare with the result of `before' (greater is better)
name    after
so_ackermann    1.025
so_array        1.019
so_binary_trees 1.005
so_concatenate  1.066
so_count_words  1.030
so_exception    1.040
so_fannkuch     1.043
so_fasta        0.996
so_k_nucleotide 1.000
so_lists        0.978
so_mandelbrot   1.004
so_matrix       1.001
so_meteor_contest       0.975
so_nbody        0.959
so_nested_loop  1.007
so_nsieve       1.008
so_nsieve_bits  1.017
so_object       1.056
so_partial_sums 0.989
so_pidigits     0.994
so_random       1.014
so_reverse_complement   0.996
so_sieve        1.010
so_spectralnorm 1.004
------------------------------------------------------------------------
r62050 | nobu | 2018-01-26 14:34:18 +0900 (Fri, 26 Jan 2018) | 2 lines

error.c: use already initialized IDs
[Feature #14313]
------------------------------------------------------------------------
r62049 | kou | 2018-01-26 13:51:14 +0900 (Fri, 26 Jan 2018) | 3 lines

KeyError#initialize accepts receiver and key.
[Feature #14313][ruby-core:84626]

------------------------------------------------------------------------
r62048 | hsbt | 2018-01-26 12:54:55 +0900 (Fri, 26 Jan 2018) | 5 lines

Removed workaround Travis CI.

  Revert r61209, r61210

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r62047 | nobu | 2018-01-26 12:41:04 +0900 (Fri, 26 Jan 2018) | 1 line

optparse.rb: froze string literals
------------------------------------------------------------------------
r62046 | nobu | 2018-01-26 12:13:33 +0900 (Fri, 26 Jan 2018) | 1 line

ignore external library sources [ci skip]
------------------------------------------------------------------------
r62045 | nobu | 2018-01-26 12:13:32 +0900 (Fri, 26 Jan 2018) | 1 line

ext/psych/.gitignore: removed stale file [ci skip]
------------------------------------------------------------------------
r62044 | mrkn | 2018-01-26 11:01:47 +0900 (Fri, 26 Jan 2018) | 3 lines

Fix rubyspec against the change in Hash#transform_keys!

[Bug #14380] [ruby-core:84951]
------------------------------------------------------------------------
r62043 | svn | 2018-01-26 10:33:46 +0900 (Fri, 26 Jan 2018) | 1 line

* 2018-01-26
------------------------------------------------------------------------
r62042 | mrkn | 2018-01-26 10:33:45 +0900 (Fri, 26 Jan 2018) | 8 lines

hash.c: support key swapping in Hash#transform_keys!

* hash.c (rb_hash_transform_keys_bang): support key swapping in
  Hash#transform_keys!
  [Bug #14380] [ruby-core:84951]

* test/ruby/test_hash.rb (test_transform_keys_bang):
  add assertions for this change
------------------------------------------------------------------------
r62041 | nobu | 2018-01-25 22:22:36 +0900 (Thu, 25 Jan 2018) | 5 lines

compile.c: check mid

* compile.c (iseq_peephole_optimize): check that method ID is +@.
  fix up r62039.
  http://d.hatena.ne.jp/nagachika/20180125/ruby_trunk_changes_62025_62039#r62039
------------------------------------------------------------------------
r62040 | nobu | 2018-01-25 22:10:14 +0900 (Thu, 25 Jan 2018) | 5 lines

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].
------------------------------------------------------------------------
r62039 | nobu | 2018-01-25 21:00:00 +0900 (Thu, 25 Jan 2018) | 4 lines

compile.c: unnecessary freezing

* compile.c (iseq_peephole_optimize): get rid of freezing
  dynamically created string to be duplicated immediately.
------------------------------------------------------------------------
r62038 | nobu | 2018-01-25 20:21:47 +0900 (Thu, 25 Jan 2018) | 4 lines

openssl/buffering.rb: no RS when output

* ext/openssl/lib/openssl/buffering.rb (do_write, puts): output
  methods should not be affected by the input record separator.
------------------------------------------------------------------------
r62037 | eregon | 2018-01-25 18:50:41 +0900 (Thu, 25 Jan 2018) | 1 line

Group related File.umask specs together
------------------------------------------------------------------------
r62036 | eregon | 2018-01-25 18:50:29 +0900 (Thu, 25 Jan 2018) | 5 lines

Remove specs trying arbitrary values for chmod and umask

* Instead assert that too large values raise RangeError.
* [Bug #14375] [ruby-core:84933]
* See https://github.com/ruby/ruby/pull/1797
------------------------------------------------------------------------
r62035 | nobu | 2018-01-25 10:48:41 +0900 (Thu, 25 Jan 2018) | 5 lines

optparse.rb: literal newline

* lib/optparse.rb (OptionParser#summarize): use literal newline to
  join option summaries as IO#puts does, not the special gloval
  variable $/.
------------------------------------------------------------------------
r62034 | ko1 | 2018-01-25 09:42:08 +0900 (Thu, 25 Jan 2018) | 1 line

revert r62032 because it refers to a undefined variable
------------------------------------------------------------------------
r62033 | kazu | 2018-01-25 09:11:52 +0900 (Thu, 25 Jan 2018) | 4 lines

.editorconfig: Use spaces instead of tab except Makefiles

ref [Bug #14246]
[ci skip]
------------------------------------------------------------------------
r62032 | nobu | 2018-01-25 08:17:20 +0900 (Thu, 25 Jan 2018) | 5 lines

optparse.rb: literal newline

* lib/optparse.rb (OptionParser#summarize): use literal newline to
  join option summaries as IO#puts does, not the special gloval
  variable $/.
------------------------------------------------------------------------
r62031 | normal | 2018-01-25 07:40:01 +0900 (Thu, 25 Jan 2018) | 4 lines

vm.c: remove unnecessary branch

th->altstack is never NULL, and even if it were, POSIX
stipulates free(3) on NULL to be a no-op.
------------------------------------------------------------------------
r62030 | normal | 2018-01-25 07:39:56 +0900 (Thu, 25 Jan 2018) | 4 lines

load.c: use fstring instead of OBJ_FREEZE

These strings already exist (or will exist soon) in the fstring
table, so avoid the duplicate, sooner.
------------------------------------------------------------------------
r62029 | normal | 2018-01-25 06:07:14 +0900 (Thu, 25 Jan 2018) | 38 lines

ruby/ruby.h: remove unnecessary exports from C-API

Needlessly exporting can reduce performance locally and increase
binary size.

Increasing the footprint of our C-API larger is also detrimental
to our development as it encourages tighter coupling with our
internals; making it harder for us to preserve compatibility.

If some parts of the core codebase needs access to globals,
internal.h should be used instead of anything in include/ruby/*.

"Urabe, Shyouhei" <shyouhei@ruby-lang.org> wrote:
> On Thu, Jan 18, 2018 at 7:33 PM, Eric Wong <normalperson@yhbt.net> wrote:
> > shyouhei@ruby-lang.org wrote:
> >>   https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61908
> >>
> >>     export rb_mFConst
> >
> > Why are we exporting all these and making the public C-API bigger?
> > If anything, we should make these static.  Thanks.
>
> No concrete reason, except they have already been externed in 2.5.
> These variables had lacked declarations so far, which resulted in their
> visibility to be that of extern. The commit is just confirming the status quo.
>
> I'm not against to turn them into static.

This reverts changes from r61910, r61909, r61908, r61907, and r61906.

* transcode.c (rb_eUndefinedConversionError): make static
  (rb_eInvalidByteSequenceError): ditto
  (rb_eConverterNotFoundError): ditto
* process.c (rb_mProcGID, rb_mProcUid, rb_mProcID_Syscall): ditto
* file.c (rb_mFConst): ditto
* error.c (rb_mWarning, rb_cWarningBuffer): ditto
* enumerator.c (rb_cLazy): ditto
  [Misc #14381]
------------------------------------------------------------------------
r62028 | svn | 2018-01-25 05:50:30 +0900 (Thu, 25 Jan 2018) | 1 line

* 2018-01-25
------------------------------------------------------------------------
r62027 | normal | 2018-01-25 05:50:29 +0900 (Thu, 25 Jan 2018) | 1 line

ruby.c (open_load_file): avoid shadowing variable for errno
------------------------------------------------------------------------
r62026 | k0kubun | 2018-01-24 23:31:40 +0900 (Wed, 24 Jan 2018) | 3 lines

system_spec.rb: add RubySpec for r62025

NEWS: added an entry for `exception: true` option.
------------------------------------------------------------------------
r62025 | k0kubun | 2018-01-24 23:11:25 +0900 (Wed, 24 Jan 2018) | 5 lines

process.c: add :exception option to Kernel.#system

to raise error when it fails.

[Feature 14386] [GH-1795]
------------------------------------------------------------------------
r62024 | nobu | 2018-01-24 17:25:36 +0900 (Wed, 24 Jan 2018) | 5 lines

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]
------------------------------------------------------------------------
r62022 | nobu | 2018-01-24 16:15:55 +0900 (Wed, 24 Jan 2018) | 4 lines

dir.c: Dir#each_child

* dir.c (dir_each_child_m): new instance methods Dir#each_child
  and Dir#children.  [Feature #13969]
------------------------------------------------------------------------
r62021 | nobu | 2018-01-24 15:32:46 +0900 (Wed, 24 Jan 2018) | 1 line

NEWS: [Feature #14223] [ci skip]
------------------------------------------------------------------------
r62020 | nobu | 2018-01-24 15:25:02 +0900 (Wed, 24 Jan 2018) | 5 lines

vm_args.c: to_proc refinements

* vm_args.c (vm_to_proc): enable #to_proc by refinements at Proc
  passing as a block.  patched by osyo (manga osyo).
  [Feature #14223]
------------------------------------------------------------------------
r62019 | yui-knk | 2018-01-24 09:12:53 +0900 (Wed, 24 Jan 2018) | 1 line

Fix a typo
------------------------------------------------------------------------
r62018 | kazu | 2018-01-24 09:03:51 +0900 (Wed, 24 Jan 2018) | 4 lines

Add documentation for the Kernel#warn :uplevel keyword

[ruby-core:84574] [Bug #14264]
Author:    Jeremy Evans <code@jeremyevans.net>
------------------------------------------------------------------------
r62017 | nobu | 2018-01-24 00:31:22 +0900 (Wed, 24 Jan 2018) | 5 lines

init.c: encode socket error message

* ext/socket/init.c (rsock_raise_socket_error): on Windows, encode
  error messages from wide characters to the default encodings.
  [ruby-core:84972] [Bug #14384]
------------------------------------------------------------------------
r62016 | svn | 2018-01-24 00:31:22 +0900 (Wed, 24 Jan 2018) | 1 line

* 2018-01-24
------------------------------------------------------------------------
r62015 | nobu | 2018-01-24 00:31:21 +0900 (Wed, 24 Jan 2018) | 4 lines

getaddrinfo.c: ai_errlist

* ext/socket/getaddrinfo.c (ai_errlist): used only if gai_strerror
  is missing.
------------------------------------------------------------------------
r62014 | nobu | 2018-01-23 23:17:25 +0900 (Tue, 23 Jan 2018) | 1 line

parse.y: fix yytokentype function declarations
------------------------------------------------------------------------
r62013 | nobu | 2018-01-23 12:53:34 +0900 (Tue, 23 Jan 2018) | 1 line

parse.y: added implicit parser_params argument
------------------------------------------------------------------------
r62012 | nobu | 2018-01-23 12:37:21 +0900 (Tue, 23 Jan 2018) | 1 line

parse.y: added new_strterm wrapper
------------------------------------------------------------------------
r62011 | nobu | 2018-01-23 11:31:42 +0900 (Tue, 23 Jan 2018) | 3 lines

parse.y: concat dedented heredoc

* parse.y (heredoc_dedent): concat literal strings after dedented.
------------------------------------------------------------------------
r62010 | svn | 2018-01-23 11:23:19 +0900 (Tue, 23 Jan 2018) | 1 line

* 2018-01-23
------------------------------------------------------------------------
r62009 | nobu | 2018-01-23 11:23:18 +0900 (Tue, 23 Jan 2018) | 1 line

parse.y: removed implicit parser_params macros
------------------------------------------------------------------------
r62008 | kazu | 2018-01-22 22:09:37 +0900 (Mon, 22 Jan 2018) | 1 line

use predefined IDs
------------------------------------------------------------------------
r62007 | nobu | 2018-01-22 21:34:51 +0900 (Mon, 22 Jan 2018) | 4 lines

mkmf.rb: ignore linker warnings

* lib/mkmf.rb (try_ldflags): ignore linker warnings.  they cause
  unexpected failures on OpenBSD.  [ruby-core:78827] [Bug #13069]
------------------------------------------------------------------------
r62006 | normal | 2018-01-22 12:04:26 +0900 (Mon, 22 Jan 2018) | 4 lines

time.c (num_exact): use predefined IDs

No need to waste space on "to_r" and "to_int" which are
predefined in defs/id.def
------------------------------------------------------------------------
r62005 | normal | 2018-01-22 09:40:11 +0900 (Mon, 22 Jan 2018) | 4 lines

time.c: constify compat_* tables

compat_common_month_table and compat_leap_month_table should
not be writable.
------------------------------------------------------------------------
r62004 | svn | 2018-01-22 00:26:20 +0900 (Mon, 22 Jan 2018) | 1 line

* 2018-01-22
------------------------------------------------------------------------
r62003 | nobu | 2018-01-22 00:26:20 +0900 (Mon, 22 Jan 2018) | 1 line

parse.y: expand tokp macro
------------------------------------------------------------------------
r62002 | nobu | 2018-01-22 00:26:19 +0900 (Mon, 22 Jan 2018) | 1 line

parse.y: add EXPR_NONE
------------------------------------------------------------------------
r62001 | nobu | 2018-01-21 18:59:45 +0900 (Sun, 21 Jan 2018) | 5 lines

keywords: shrink struct kwtable

* defs/keywords (struct kwtable): shrink since members do not
  exceed 16bit.  lex_state needs to be int (or enum lex_state_e)
  when EXPR_MAX_STATE reaches it.
------------------------------------------------------------------------
r62000 | nobu | 2018-01-21 16:44:25 +0900 (Sun, 21 Jan 2018) | 5 lines

parse.y: fix state after left brace

* parse.y (parser_yylex): as well as `tLBRACE_ARG` (expr block),
  `tLBRACE` (primary block) also does not accept a label.  only
  hash brace accepts a label.
------------------------------------------------------------------------
r61999 | nobu | 2018-01-21 16:44:24 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: revert trace message to lex_state
------------------------------------------------------------------------
r61998 | nobu | 2018-01-21 16:44:24 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: use enum yytokentype
------------------------------------------------------------------------
r61997 | nobu | 2018-01-21 16:44:23 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: parser_token_value_print for yydebug
------------------------------------------------------------------------
r61996 | kazu | 2018-01-21 11:24:26 +0900 (Sun, 21 Jan 2018) | 1 line

Fix missing m4_include at r61982
------------------------------------------------------------------------
r61995 | normal | 2018-01-21 07:07:36 +0900 (Sun, 21 Jan 2018) | 7 lines

load.c: use rb_warning directly

This removes the last dependency on rb_mWarning outside of
error.c and allows future commits to mark it static.

Yes, I expect this to slow down the emitting of a warning
message in a cold code path slightly :P
------------------------------------------------------------------------
r61994 | mame | 2018-01-21 02:52:51 +0900 (Sun, 21 Jan 2018) | 3 lines

ext/ripper/tools/dsl.rb: Use String#sub instead of delete_suffix

It fails when baseruby is old.
------------------------------------------------------------------------
r61993 | mame | 2018-01-21 02:52:50 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: Remove unneeded macro nd_set_line
------------------------------------------------------------------------
r61992 | mame | 2018-01-21 02:45:25 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: Remove double meaning of new_qcall/new_command_qcall
------------------------------------------------------------------------
r61991 | mame | 2018-01-21 02:45:24 +0900 (Sun, 21 Jan 2018) | 7 lines

ext/ripper/tools/dsl.rb: Serialize dispatch calls

To avoid the unspecified behavior (the evaluation order of arguments).
In `$$ = foo(bar(), baz());`, it is unspecified which `bar` or `baz` is
called earlier.

This commit changes the code to `v1=bar(); v2=baz(); $$ = foo();`.
------------------------------------------------------------------------
r61990 | mame | 2018-01-21 01:21:29 +0900 (Sun, 21 Jan 2018) | 14 lines

parse.y: rewrite excessed_comma process

Currently, parser.y includes core parser and Ripper parser obscurity.
In addition, *some* Ripper code uses the result of the core parser,
which make it difficult to separate the two parsers.

I want to simplify this, not by separating the two parsers, but by
making *all* Ripper actions follows the core parser actions.
In other words, all the core parser actions run always even in Ripper,
and after that, Ripper-specific actions run.

For tha sake, in principle, I want to put `/*% ripper: ... %*/` in the
end of actions.
Anyway, it is too dirty to put it within expressions, IMO.
------------------------------------------------------------------------
r61989 | mame | 2018-01-21 01:21:28 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: Remove macros that are no longer used
------------------------------------------------------------------------
r61988 | mame | 2018-01-21 01:21:26 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: Remove double meaning of new_op_assign, etc.
------------------------------------------------------------------------
r61987 | mame | 2018-01-21 01:21:25 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: Remove double meaning of new_xstring/new_string1
------------------------------------------------------------------------
r61986 | mame | 2018-01-21 01:21:23 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: remove double meaning of new_brace_body/new_do_body
------------------------------------------------------------------------
r61985 | svn | 2018-01-21 01:21:21 +0900 (Sun, 21 Jan 2018) | 1 line

* 2018-01-21
------------------------------------------------------------------------
r61984 | mame | 2018-01-21 01:21:20 +0900 (Sun, 21 Jan 2018) | 1 line

parse.y: remove double meaning of const_path_field/top_const_field
------------------------------------------------------------------------
r61983 | shyouhei | 2018-01-20 16:14:59 +0900 (Sat, 20 Jan 2018) | 4 lines

Emacs friendliness [ci skip]

Just add comment by:
sed -i $'1i\\\n# -*- Autoconf -*-' tool/m4/*.m4
------------------------------------------------------------------------
r61982 | shyouhei | 2018-01-20 16:05:26 +0900 (Sat, 20 Jan 2018) | 5 lines

set AC_CONFIG_MACRO_DIRS [close GH-1793]

We do not use aclocal(1) by default. But in case users do so,
AC_CONFIG_MACRO_DIRS help them reconstruct the same contents as
this commit includes.
------------------------------------------------------------------------
r61981 | shyouhei | 2018-01-20 16:05:25 +0900 (Sat, 20 Jan 2018) | 5 lines

refactor split configure.ac into files

This does not (yet) change anything. The generated configure file
is the identical to previous one (except several empty lines added
and deleted).
------------------------------------------------------------------------
r61980 | nobu | 2018-01-20 15:49:30 +0900 (Sat, 20 Jan 2018) | 3 lines

Makefile.sub: missing/nan.obj

* win32/Makefile.sub (MISSING): nan() is available since msvcrr120.
------------------------------------------------------------------------
r61979 | mame | 2018-01-20 15:11:21 +0900 (Sat, 20 Jan 2018) | 14 lines

parse.y: Remove unneeded var_field_1 trick

I thought this trick was needed because the result of var_field was
passed to different arguments, as follows:

```
$1 = var_field(p, $1);
$$ = backref_assign_error(p, $1, $1, &@$);
```

Currently the DSL supports that one result is passed to one argument.

However, after the refactoring, I found that `backref_assign_error`
uses only one `$1`.
------------------------------------------------------------------------
r61978 | nobu | 2018-01-20 14:58:06 +0900 (Sat, 20 Jan 2018) | 5 lines

parse.y: dot_or_colon as id

* parse.y (dot_or_colon): made type of `dot_or_colon` and EXPR_DOT
  tokens to <id> and set those IDs at tokenization.  type cast at
  primary in ripper is no longer needed.
------------------------------------------------------------------------
r61977 | nobu | 2018-01-20 14:47:59 +0900 (Sat, 20 Jan 2018) | 5 lines

parse.y: moved excessed_comma

* parse.y (block_param): embed excessed_comma event result in
  place of rest argument, instead of dispatching with the whole
  parameters.
------------------------------------------------------------------------
r61976 | nobu | 2018-01-20 14:39:03 +0900 (Sat, 20 Jan 2018) | 4 lines

dsl.rb: p

* ext/ripper/tools/dsl.rb (DSL#initialize): define `p` for `struct
  parser_params *p`.
------------------------------------------------------------------------
r61975 | nobu | 2018-01-20 14:39:02 +0900 (Sat, 20 Jan 2018) | 4 lines

dsl.rb: ID constants

* ext/ripper/tools/dsl.rb (DSL#method_missing): expand ID
  constnats without parentheses.
------------------------------------------------------------------------
r61974 | nobu | 2018-01-20 14:39:01 +0900 (Sat, 20 Jan 2018) | 4 lines

dsl.rb: const_missing

* ext/ripper/tools/dsl.rb (DSL.const_missing): define to expand
  Qnil and Qundef as-is.
------------------------------------------------------------------------
r61973 | nobu | 2018-01-20 14:39:00 +0900 (Sat, 20 Jan 2018) | 4 lines

dsl.rb: indent

* ext/ripper/tools/dsl.rb (DSL#generate): indent after surrounding
  by braces.
------------------------------------------------------------------------
r61972 | shyouhei | 2018-01-20 13:18:09 +0900 (Sat, 20 Jan 2018) | 2 lines

[ci skip] tabify

------------------------------------------------------------------------
r61971 | shyouhei | 2018-01-20 12:16:59 +0900 (Sat, 20 Jan 2018) | 6 lines

add missing/nan.c

instead of scattering #ifdef HAVE_NANF here and there define our
own nan() unless defined elsewhere.


------------------------------------------------------------------------
r61970 | nobu | 2018-01-20 10:24:15 +0900 (Sat, 20 Jan 2018) | 1 line

parse.y (yycompile0): check if accepted
------------------------------------------------------------------------
r61969 | naruse | 2018-01-20 03:55:32 +0900 (Sat, 20 Jan 2018) | 1 line

r61950 changes mode_t to ushort on FreeBSD and Darwin
------------------------------------------------------------------------
r61968 | mame | 2018-01-20 02:29:27 +0900 (Sat, 20 Jan 2018) | 1 line

parse.y (assignable): Remove macro hell
------------------------------------------------------------------------
r61967 | mame | 2018-01-20 02:06:56 +0900 (Sat, 20 Jan 2018) | 1 line

parse.y: Split the path of assignable to Ripper/Parser
------------------------------------------------------------------------
r61966 | mame | 2018-01-20 01:28:23 +0900 (Sat, 20 Jan 2018) | 1 line

parse.y: Remove double meaning of node_assign
------------------------------------------------------------------------
r61965 | mame | 2018-01-20 01:24:07 +0900 (Sat, 20 Jan 2018) | 1 line

parse.y: Remove double meaning of backref_assign_error
------------------------------------------------------------------------
r61964 | mame | 2018-01-20 00:43:42 +0900 (Sat, 20 Jan 2018) | 3 lines

parse.y: Remove unneeded type decls for Ripper

I think that they are not used.
------------------------------------------------------------------------
r61963 | svn | 2018-01-20 00:22:37 +0900 (Sat, 20 Jan 2018) | 1 line

* 2018-01-20
------------------------------------------------------------------------
r61962 | mame | 2018-01-20 00:22:36 +0900 (Sat, 20 Jan 2018) | 5 lines

parse.y: swap `foo!` and `foo` in Ripper DSL

`foo!(...)` means Ripper event, and `foo(...)` means C function/macro
call.  This is for fail-safe; if I forget `!` accidentally, it would
fail to compile, instead of wrongly adding a new Ripper event.
------------------------------------------------------------------------
r61961 | nobu | 2018-01-19 23:50:55 +0900 (Fri, 19 Jan 2018) | 4 lines

test_io.rb: avoid OOM

* test/ruby/test_io.rb (TestIO#test_copy_stream_socket7): reduce
  memory usage so the worker process will not die by OOM.
------------------------------------------------------------------------
r61960 | nobu | 2018-01-19 22:41:44 +0900 (Fri, 19 Jan 2018) | 4 lines

parse.y: assign to $$

* parse.y (command): assign to $$.  should not rely upon
  undocumented behavior.
------------------------------------------------------------------------
r61959 | mame | 2018-01-19 22:36:03 +0900 (Fri, 19 Jan 2018) | 3 lines

parse.y: fix up r61957, too

My apologies!
------------------------------------------------------------------------
r61958 | nobu | 2018-01-19 22:25:49 +0900 (Fri, 19 Jan 2018) | 1 line

parse.y: fix up r61957
------------------------------------------------------------------------
r61957 | mame | 2018-01-19 22:11:11 +0900 (Fri, 19 Jan 2018) | 4 lines

parse.y: Allows Ripper DSL to embed C function calls as `foo!`

Instead of `_foo`.  This makes it useful to do word boundary search of
the editor.
------------------------------------------------------------------------
r61956 | kazu | 2018-01-19 21:15:56 +0900 (Fri, 19 Jan 2018) | 3 lines

Fix warning

``lib/net/protocol.rb:214: warning: `*' interpreted as argument prefix``
------------------------------------------------------------------------
r61955 | mame | 2018-01-19 20:10:39 +0900 (Fri, 19 Jan 2018) | 1 line

parse.y: Remove new_command
------------------------------------------------------------------------
r61954 | mame | 2018-01-19 20:10:30 +0900 (Fri, 19 Jan 2018) | 3 lines

ext/ripper/tools/preproc.rb: Remove `/*%c%` handling

It was replaced with `/*% ripper[brace]: ... %*/`
------------------------------------------------------------------------
r61953 | svn | 2018-01-19 19:48:09 +0900 (Fri, 19 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r61952 | mame | 2018-01-19 19:48:08 +0900 (Fri, 19 Jan 2018) | 16 lines

ext/ripper: Introduce a simple DSL for ripper.y code generation

Currently, parse.y actions are hard to read and write because the code
has double meaning (for core parser and for ripper).  I think that, if
it is easy to write ripper's code shortly and simply, the double meaning
trick is not needed.

For the sake, this change adds a simple DSL for ripper's code.  For
example, in parse.y, we can write:

    /*% ripper: stmts_add(stmts_new, void_stmt) %*/

instead of:

    $$ = dispatch2(stmts_add, dispatch0(stmts_new),
                   dispatch0(void_stmt));
------------------------------------------------------------------------
r61951 | mame | 2018-01-19 19:26:12 +0900 (Fri, 19 Jan 2018) | 3 lines

parse.y: Fix excessed_comma event

I believe that the assignment to `$$` was just forgotten.
------------------------------------------------------------------------
r61950 | shyouhei | 2018-01-19 18:12:06 +0900 (Fri, 19 Jan 2018) | 6 lines

there is no guarantee that mode_t is as wide as int

POSIX only defines mode_t to be "an integer typea", and in fact
MacOS defines it to be uint16_t.  We didn't have NUM2USHORT before
so it did not make sense but now that we have it.  Why not check
apptopriately.
------------------------------------------------------------------------
r61949 | shyouhei | 2018-01-19 17:17:56 +0900 (Fri, 19 Jan 2018) | 4 lines

don't abuse RSTRING_PTR (2nd try)

r61827, r61947 was about to fix this. The proper way to allocate
memory region is called ALLOCV_N.
------------------------------------------------------------------------
r61948 | shyouhei | 2018-01-19 16:16:54 +0900 (Fri, 19 Jan 2018) | 4 lines

svn merge -c -61947 .

Previous commit fails in CI.

------------------------------------------------------------------------
r61947 | shyouhei | 2018-01-19 16:07:49 +0900 (Fri, 19 Jan 2018) | 4 lines

don't abuse RSTRING_PTR

r61827 was about to fix this. The proper way to allocate memory
region is called ALLOCV_N.
------------------------------------------------------------------------
r61946 | shyouhei | 2018-01-19 14:18:18 +0900 (Fri, 19 Jan 2018) | 3 lines

there is no such thing like 0 in enum defined_type

introduce new enum for it.
------------------------------------------------------------------------
r61945 | nobu | 2018-01-19 13:23:59 +0900 (Fri, 19 Jan 2018) | 6 lines

vm_args.c: fix KW_SPECIFIED_BITS_MAX

* vm_args.c (KW_SPECIFIED_BITS_MAX): subtracted 1bit for
  FIXNUM_FLAG.  [ruby-core:84921] [Bug #14373]

* vm_insnhelper.c (vm_check_keyword): unsigned for bit operation.
------------------------------------------------------------------------
r61944 | shyouhei | 2018-01-19 12:59:13 +0900 (Fri, 19 Jan 2018) | 4 lines

avoid goto

gcc -Wjump-misses-init warns this goto.  That is a false alert.
However why on earth do we need to use goto here?
------------------------------------------------------------------------
r61943 | shyouhei | 2018-01-19 12:57:53 +0900 (Fri, 19 Jan 2018) | 1 line

ruby_gc_debug_indent needed only when RUBY_MARK_FREE_DEBUG
------------------------------------------------------------------------
r61942 | shyouhei | 2018-01-19 12:55:16 +0900 (Fri, 19 Jan 2018) | 1 line

st_hashtype_num marked as static
------------------------------------------------------------------------
r61941 | shyouhei | 2018-01-19 12:19:58 +0900 (Fri, 19 Jan 2018) | 1 line

variable succ_index_table never actually used
------------------------------------------------------------------------
r61940 | nobu | 2018-01-19 12:09:24 +0900 (Fri, 19 Jan 2018) | 7 lines

vm_insnhelper.c: fix many keyword arguments

* vm_insnhelper.c (vm_check_keyword): if the index exceeds the
  width of unspecified bits, that argument is specified.
  `unspecified_bits` still be a fixnum if the actual arguments do
  not exceed the limit, regardless the formal parameters size.
  [ruby-core:84921] [Bug #14373]
------------------------------------------------------------------------
r61939 | nobu | 2018-01-19 11:36:32 +0900 (Fri, 19 Jan 2018) | 4 lines

vm_insnhelper.c: should invert unspecified flag

* vm_insnhelper.c (vm_check_keyword): invert unspecified value
  flag as `checkkeyword` result.  fix up r58390.
------------------------------------------------------------------------
r61938 | shyouhei | 2018-01-19 10:45:36 +0900 (Fri, 19 Jan 2018) | 7 lines

INFINITY is float. That of double is HUGE_VAL.

It seems HUGE_VAL is already used. Why not eliminate INTINITY.
NAN is also float. That of double is called nan(). This is also
fixed.

Signed-off-by: Urabe, Shyouhei <shyouhei@ruby-lang.org>
------------------------------------------------------------------------
r61937 | svn | 2018-01-19 00:48:56 +0900 (Fri, 19 Jan 2018) | 1 line

* 2018-01-19
------------------------------------------------------------------------
r61936 | nobu | 2018-01-19 00:48:55 +0900 (Fri, 19 Jan 2018) | 4 lines

compile.c: use ALLOCV_N

* compile.c (ibf_dump_object_list): allocate known-size array by
  ALLOCV_N instead of rb_ary_tmp_new.
------------------------------------------------------------------------
r61935 | kazu | 2018-01-18 21:54:24 +0900 (Thu, 18 Jan 2018) | 3 lines

Use already casted variable

r61883
------------------------------------------------------------------------
r61934 | kazu | 2018-01-18 21:54:18 +0900 (Thu, 18 Jan 2018) | 1 line

[DOC] Add `Array#{append,prepend}` to call-seq [ci skip]
------------------------------------------------------------------------
r61933 | hsbt | 2018-01-18 20:44:10 +0900 (Thu, 18 Jan 2018) | 4 lines

Fix typos.

  * rememberd -> remembered
  * refered -> referred
------------------------------------------------------------------------
r61932 | nobu | 2018-01-18 20:34:36 +0900 (Thu, 18 Jan 2018) | 1 line

marked as NORETURN
------------------------------------------------------------------------
r61931 | shyouhei | 2018-01-18 18:44:52 +0900 (Thu, 18 Jan 2018) | 1 line

rb_global_tbl marked as static
------------------------------------------------------------------------
r61930 | shyouhei | 2018-01-18 18:44:51 +0900 (Thu, 18 Jan 2018) | 1 line

rb_parser_lex_state_names marked as static
------------------------------------------------------------------------
r61929 | shyouhei | 2018-01-18 18:44:50 +0900 (Thu, 18 Jan 2018) | 1 line

usage analysis functions marke as static
------------------------------------------------------------------------
r61928 | shyouhei | 2018-01-18 18:44:49 +0900 (Thu, 18 Jan 2018) | 1 line

vm_super_outside marked as NORETURN
------------------------------------------------------------------------
r61927 | shyouhei | 2018-01-18 18:44:48 +0900 (Thu, 18 Jan 2018) | 1 line

vm_stackoverflow marked as NORETURN
------------------------------------------------------------------------
r61926 | shyouhei | 2018-01-18 18:44:47 +0900 (Thu, 18 Jan 2018) | 1 line

raise_closed_queue_error marked as NORETURN
------------------------------------------------------------------------
r61925 | shyouhei | 2018-01-18 18:44:46 +0900 (Thu, 18 Jan 2018) | 1 line

rb_threadptr_to_kill marked as NORETURN
------------------------------------------------------------------------
r61924 | shyouhei | 2018-01-18 18:44:45 +0900 (Thu, 18 Jan 2018) | 1 line

sigill marked as NORETURN
------------------------------------------------------------------------
r61923 | shyouhei | 2018-01-18 18:44:45 +0900 (Thu, 18 Jan 2018) | 1 line

ruby_abort marked as NORETURN
------------------------------------------------------------------------
r61922 | shyouhei | 2018-01-18 18:44:44 +0900 (Thu, 18 Jan 2018) | 1 line

sigsegv marked as NORETURN
------------------------------------------------------------------------
r61921 | shyouhei | 2018-01-18 18:44:43 +0900 (Thu, 18 Jan 2018) | 1 line

sigbus marked as NORETURN
------------------------------------------------------------------------
r61920 | shyouhei | 2018-01-18 18:44:42 +0900 (Thu, 18 Jan 2018) | 1 line

rb_reg_raise_str marked as NORETURN
------------------------------------------------------------------------
r61919 | shyouhei | 2018-01-18 18:44:41 +0900 (Thu, 18 Jan 2018) | 1 line

rb_enc_reg_raise marked as NORETURN
------------------------------------------------------------------------
r61918 | shyouhei | 2018-01-18 18:44:41 +0900 (Thu, 18 Jan 2018) | 1 line

rb_reg_enc_error marked as NORETURN
------------------------------------------------------------------------
r61917 | shyouhei | 2018-01-18 18:44:40 +0900 (Thu, 18 Jan 2018) | 1 line

rb_reg_raise marked as NORETURN
------------------------------------------------------------------------
r61916 | shyouhei | 2018-01-18 18:44:39 +0900 (Thu, 18 Jan 2018) | 1 line

num_funcall_op_1_recursion marked as NORETURN
------------------------------------------------------------------------
r61915 | shyouhei | 2018-01-18 18:44:39 +0900 (Thu, 18 Jan 2018) | 1 line

long_toobig marked as NORETURN
------------------------------------------------------------------------
r61914 | shyouhei | 2018-01-18 18:44:38 +0900 (Thu, 18 Jan 2018) | 1 line

dir_closed marked as NORETURN
------------------------------------------------------------------------
r61913 | shyouhei | 2018-01-18 18:44:37 +0900 (Thu, 18 Jan 2018) | 1 line

ibf_dump_object_unsupported marked as NORETURN
------------------------------------------------------------------------
r61912 | shyouhei | 2018-01-18 18:44:36 +0900 (Thu, 18 Jan 2018) | 3 lines

-Wmissing-noreturn

This is the -Wsuggest-attribute=noreturn equivalent option for clang.
------------------------------------------------------------------------
r61911 | shyouhei | 2018-01-18 18:44:36 +0900 (Thu, 18 Jan 2018) | 1 line

merge extern declarations into internal.h
------------------------------------------------------------------------
r61910 | shyouhei | 2018-01-18 18:44:35 +0900 (Thu, 18 Jan 2018) | 1 line

export transcode exceptions
------------------------------------------------------------------------
r61909 | shyouhei | 2018-01-18 18:44:34 +0900 (Thu, 18 Jan 2018) | 1 line

export rb_mProcGID, rb_mProcUid, rb_mProcID_Syscall
------------------------------------------------------------------------
r61908 | shyouhei | 2018-01-18 18:44:34 +0900 (Thu, 18 Jan 2018) | 1 line

export rb_mFConst
------------------------------------------------------------------------
r61907 | shyouhei | 2018-01-18 18:44:33 +0900 (Thu, 18 Jan 2018) | 1 line

export ruby_mWarning
------------------------------------------------------------------------
r61906 | shyouhei | 2018-01-18 18:44:32 +0900 (Thu, 18 Jan 2018) | 1 line

export rb_cLazy
------------------------------------------------------------------------
r61905 | shyouhei | 2018-01-18 18:44:32 +0900 (Thu, 18 Jan 2018) | 1 line

sort lines
------------------------------------------------------------------------
r61904 | nobu | 2018-01-18 16:59:03 +0900 (Thu, 18 Jan 2018) | 4 lines

vm_eval.c: for auto-indent

* vm_eval.c (rb_type_str): moved `case`s and semicolons so auto
  indentation works.
------------------------------------------------------------------------
r61903 | nobu | 2018-01-18 16:53:26 +0900 (Thu, 18 Jan 2018) | 5 lines

eval_intern.h: duplicate check

* eval_intern.h (pass_passed_block_handler): remove duplicate
  check.  vm_block_handler_verify() is called in the successive
  function call.
------------------------------------------------------------------------
r61902 | naruse | 2018-01-18 12:53:46 +0900 (Thu, 18 Jan 2018) | 1 line

extend timeout more
------------------------------------------------------------------------
r61901 | nobu | 2018-01-18 12:37:08 +0900 (Thu, 18 Jan 2018) | 3 lines

parse.y: no longer undef assignable

* parse.y (assignable): no longer needs to undef since r61899.
------------------------------------------------------------------------
r61900 | nobu | 2018-01-18 12:29:12 +0900 (Thu, 18 Jan 2018) | 1 line

parse.y: fix overflow
------------------------------------------------------------------------
r61899 | nobu | 2018-01-18 12:25:20 +0900 (Thu, 18 Jan 2018) | 4 lines

parse.y: REQUIRED_KEYWORD

* parse.y (REQUIRED_KEYWORD): special argument for required
  keyword argument, for core and ripper.
------------------------------------------------------------------------
r61898 | nobu | 2018-01-18 12:09:39 +0900 (Thu, 18 Jan 2018) | 6 lines

resolv.rb: NUL hosts

* lib/resolv.rb (Resolv::Hosts::DefaultFileName): fallback to NUL
  device when Win32::Resolv.get_hosts_path() returned nil, to get
  rid of TypeError in lazy_initialize.
  [ruby-core:84907] [Bug #14369]  [Fix GH-1791]
------------------------------------------------------------------------
r61897 | nobu | 2018-01-18 11:44:50 +0900 (Thu, 18 Jan 2018) | 4 lines

resolv: use safe navigation operator

* lib/resolv.rb (each_address): use safe navigation operator to
  avoid extra hash lookups, as well as each_name since r56890.
------------------------------------------------------------------------
r61896 | nobu | 2018-01-18 10:27:45 +0900 (Thu, 18 Jan 2018) | 4 lines

marshal.c: initialize keywords

* marshal.c (r_object0): initialize `keywords` and removed
  `keyword_init` flag, to get rid of maybe-uninitialized warning.
------------------------------------------------------------------------
r61895 | nobu | 2018-01-18 10:10:22 +0900 (Thu, 18 Jan 2018) | 4 lines

win32/resolv.rb: call rb_w32_osid

* ext/win32/lib/win32/resolv.rb: call rb_w32_osid instead of
  direct GetVersionExA API.
------------------------------------------------------------------------
r61894 | normal | 2018-01-18 09:52:01 +0900 (Thu, 18 Jan 2018) | 3 lines

logger: use safe navigation operator

Saves a few hundred bytes of bytecode in a frequently loaded module.
------------------------------------------------------------------------
r61893 | naruse | 2018-01-18 03:08:58 +0900 (Thu, 18 Jan 2018) | 4 lines

include ruby/ruby.h before ruby.io.h

It breaks AIX build:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180117T113303Z.log.html.gz
------------------------------------------------------------------------
r61892 | naruse | 2018-01-18 03:02:47 +0900 (Thu, 18 Jan 2018) | 1 line

extend timeout
------------------------------------------------------------------------
r61891 | svn | 2018-01-18 00:28:38 +0900 (Thu, 18 Jan 2018) | 1 line

* 2018-01-18
------------------------------------------------------------------------
r61890 | nobu | 2018-01-18 00:28:37 +0900 (Thu, 18 Jan 2018) | 6 lines

iseq.c: dump as non-trace instructions

* iseq.c (iseq_data_to_ary): when OPT_CALL_THREADED_CODE is used,
  iseq_encoded is overwritten by instructions with trace and the
  original_iseq is not stored.  convert these instructions to the
  original instructions as external representation.
------------------------------------------------------------------------
r61889 | hsbt | 2018-01-17 22:15:13 +0900 (Wed, 17 Jan 2018) | 5 lines

Fix typos.

 * node.c: strucutre -> structure
 * random.c: acquried -> acquired
 * thread.c: accross -> across
------------------------------------------------------------------------
r61888 | nobu | 2018-01-17 20:22:14 +0900 (Wed, 17 Jan 2018) | 4 lines

process.c: get_clk_tck fallback

* process.c (get_clk_tck): prefer CLK_TCK over older HZ, next to
  _SC_CLK_TCK.
------------------------------------------------------------------------
r61887 | nobu | 2018-01-17 20:16:24 +0900 (Wed, 17 Jan 2018) | 6 lines

process.c: remove useless cast

* process.c (get_clk_tck): remove useless cast, implicitly cast to
  long again.

* process.c (rb_proc_times): cast explicitly.
------------------------------------------------------------------------
r61886 | nobu | 2018-01-17 20:12:31 +0900 (Wed, 17 Jan 2018) | 4 lines

common.mk: ripper.c recipe

* common.mk (ripper.c): strip nmake-style VPATH from depend file,
  as well as mkmf.rb does.
------------------------------------------------------------------------
r61885 | mame | 2018-01-17 19:17:16 +0900 (Wed, 17 Jan 2018) | 1 line

ext/ripper/depend: Try to fix the path of id.h
------------------------------------------------------------------------
r61884 | nobu | 2018-01-17 15:38:08 +0900 (Wed, 17 Jan 2018) | 4 lines

test_ast.rb: no base directory name

* test/-ext-/ast/test_ast.rb: exclude base directory name from
  test method names.
------------------------------------------------------------------------
r61883 | nobu | 2018-01-17 15:23:57 +0900 (Wed, 17 Jan 2018) | 1 line

iseq.c: flatten TS_NUM operand conditions
------------------------------------------------------------------------
r61882 | nobu | 2018-01-17 15:05:37 +0900 (Wed, 17 Jan 2018) | 1 line

parse.y: refine negate_lit_gen error message
------------------------------------------------------------------------
r61881 | normal | 2018-01-17 14:03:43 +0900 (Wed, 17 Jan 2018) | 3 lines

time.c: use "unsigned int" for bitfields

Followup to r61870
------------------------------------------------------------------------
r61880 | nobu | 2018-01-17 13:25:39 +0900 (Wed, 17 Jan 2018) | 1 line

ripper.c: depends on preproc.rb
------------------------------------------------------------------------
r61879 | mame | 2018-01-17 00:12:15 +0900 (Wed, 17 Jan 2018) | 1 line

parse.y: Refactor for-statement generation
------------------------------------------------------------------------
r61878 | mame | 2018-01-17 00:12:11 +0900 (Wed, 17 Jan 2018) | 1 line

parse.y (new_args_tail): Use human-friendly variable names
------------------------------------------------------------------------
r61877 | svn | 2018-01-17 00:12:10 +0900 (Wed, 17 Jan 2018) | 1 line

* 2018-01-17
------------------------------------------------------------------------
r61876 | mame | 2018-01-17 00:12:09 +0900 (Wed, 17 Jan 2018) | 1 line

node.c: Separately allocate a struct having flexible array
------------------------------------------------------------------------
r61875 | shyouhei | 2018-01-16 18:21:07 +0900 (Tue, 16 Jan 2018) | 5 lines

nested flexible array member is a GCCism

This is NG. The ISO C section 6.7.2.1 explicitly states that
structs having flexible array members "shall not be a member
of a structure or an element of an array."
------------------------------------------------------------------------
r61874 | shyouhei | 2018-01-16 17:35:33 +0900 (Tue, 16 Jan 2018) | 5 lines

-Wno-overlength-strings

as per https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/Assumptions
we are officially giving up 509 characters limit of C string
literal length.
------------------------------------------------------------------------
r61873 | nobu | 2018-01-16 17:21:40 +0900 (Tue, 16 Jan 2018) | 1 line

parse.y: unified local_push argument
------------------------------------------------------------------------
r61872 | nobu | 2018-01-16 17:05:57 +0900 (Tue, 16 Jan 2018) | 4 lines

parse.y: simplified compstmt

* parse.y (top_compstmt, compstmt): unified void_stmts with
  ripper.
------------------------------------------------------------------------
r61871 | mame | 2018-01-16 16:24:53 +0900 (Tue, 16 Jan 2018) | 6 lines

node.c: Stop double meaning of NODE_FOR by introducing NODE_FOR_MASGN

NODE_FOR was used both for "for"-statement itself and for
multi-assignment of for-statement (for x, y, in...end).
This change separates the two purposes, NODE_FOR for the former, and
newly introduced NODE_FOR_MASGN for the latter.
------------------------------------------------------------------------
r61870 | normal | 2018-01-16 15:36:05 +0900 (Tue, 16 Jan 2018) | 9 lines

timev.h: just use "unsigned int" for bitfields

There's no point in having separate types depending on C dialect
when using bitfields, "unsigned int" bitfields are bitfields
anywhere.

Note: we also have test_memsize in test_time.rb in case
users of other platforms want to enable size assertions
if they don't trust their compiler.
------------------------------------------------------------------------
r61869 | ngoto | 2018-01-16 14:49:01 +0900 (Tue, 16 Jan 2018) | 8 lines

fix macro argument names inconsistency

* include/ruby/defines.h (RUBY_ALIGNAS): Fix macro definition.
  Fix compile error with Fujitsu C Compiler (fcc) on Solaris.

* include/ruby/defines.h (RUBY_ALIGNOF): Fix macro argument name.
  Fix compile error with fcc and Oracle Solaris Studio 12.4 on Solaris.

------------------------------------------------------------------------
r61868 | mame | 2018-01-16 14:27:20 +0900 (Tue, 16 Jan 2018) | 1 line

parse.y (expr_value_do): factor out COND_PUSH->expr_value->do->COND_POP
------------------------------------------------------------------------
r61867 | nobu | 2018-01-16 12:16:17 +0900 (Tue, 16 Jan 2018) | 1 line

parse.y: removed PARSER_ARG macro
------------------------------------------------------------------------
r61866 | nobu | 2018-01-16 12:16:15 +0900 (Tue, 16 Jan 2018) | 3 lines

parse.y: expand tokadd_mbchar

* parse.y (tokadd_mbchar): renamed and expand callers with p.
------------------------------------------------------------------------
r61865 | shyouhei | 2018-01-16 12:09:53 +0900 (Tue, 16 Jan 2018) | 4 lines

sizeof(uintptr_t) != sizeof(uintptr_t *)

Reported by mame.  Thanks.

------------------------------------------------------------------------
r61864 | mame | 2018-01-16 11:27:58 +0900 (Tue, 16 Jan 2018) | 1 line

parse.y: set location of nodes that lexer generates
------------------------------------------------------------------------
r61863 | mame | 2018-01-16 11:00:16 +0900 (Tue, 16 Jan 2018) | 1 line

parse.y: set location of string/literals in the lexer instead of actions
------------------------------------------------------------------------
r61862 | mame | 2018-01-16 10:43:25 +0900 (Tue, 16 Jan 2018) | 4 lines

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.
------------------------------------------------------------------------
r61861 | mame | 2018-01-16 10:32:58 +0900 (Tue, 16 Jan 2018) | 1 line

parse.y (symbol_append): Added to factor out `%i[]` and `%I[]`
------------------------------------------------------------------------
r61860 | svn | 2018-01-16 08:43:18 +0900 (Tue, 16 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r61859 | yui-knk | 2018-01-16 08:43:17 +0900 (Tue, 16 Jan 2018) | 13 lines

Add tests for Node code locations

* test/-ext-/ast/test_ast.rb: Add tests for Node
  code locations. This file tests

  1. There are no Node whose code location is default
     value (#test_not_cared)

  2. There are no Node whose children's code locations
     exceed parent's code location (#test_ranges)

* ext/-test-/ast/ast.c, ext/-test-/ast/extconf.rb:
  Define AST module to help tests.
------------------------------------------------------------------------
r61858 | mame | 2018-01-16 01:12:34 +0900 (Tue, 16 Jan 2018) | 1 line

parse.y: Removes unneeded Ripper/Parser guards
------------------------------------------------------------------------
r61857 | svn | 2018-01-16 00:04:58 +0900 (Tue, 16 Jan 2018) | 1 line

* 2018-01-16
------------------------------------------------------------------------
r61856 | mame | 2018-01-16 00:04:57 +0900 (Tue, 16 Jan 2018) | 4 lines

parse.y (new_command_qcall): Receives a block (optional)

There were four cases that uses new_command_qcall and then
method_add_block.  This change factors out the four rules.
------------------------------------------------------------------------
r61855 | mame | 2018-01-15 23:01:16 +0900 (Mon, 15 Jan 2018) | 3 lines

test/ruby/test_syntax.rb (test_command_with_cmd_brace_block): Added

The bison rules were not covered.
------------------------------------------------------------------------
r61853 | nobu | 2018-01-15 21:25:24 +0900 (Mon, 15 Jan 2018) | 4 lines

test_console_attr.rb: fix test

* test/-ext-/win32/test_console_attr.rb (reverse_video): fix test
  when reverse video is set.
------------------------------------------------------------------------
r61852 | hsbt | 2018-01-15 21:00:06 +0900 (Mon, 15 Jan 2018) | 3 lines

Fix a typo.

  * gc.c: beacuse -> because.
------------------------------------------------------------------------
r61851 | hsbt | 2018-01-15 19:09:00 +0900 (Mon, 15 Jan 2018) | 3 lines

Fix a typo.

  * win32/win32.c: wrok -> work
------------------------------------------------------------------------
r61850 | mame | 2018-01-15 17:54:25 +0900 (Mon, 15 Jan 2018) | 3 lines

parse.y: Removes unreachable warnings

tIDENTIFIER is now always a local id (except fname).
------------------------------------------------------------------------
r61849 | mame | 2018-01-15 17:54:24 +0900 (Mon, 15 Jan 2018) | 3 lines

parse.y: Removes unneeded NULL checks

Nowadays, there are less rules whose return value is NULL.
------------------------------------------------------------------------
r61848 | mame | 2018-01-15 16:54:24 +0900 (Mon, 15 Jan 2018) | 3 lines

parse.y: Remove unneeded NULL check

There are many usages assuming that bodystmt always returns non-null.
------------------------------------------------------------------------
r61847 | mame | 2018-01-15 16:39:47 +0900 (Mon, 15 Jan 2018) | 1 line

parse.y (last_arg_append, rest_arg_append): factor out the code clones
------------------------------------------------------------------------
r61846 | shyouhei | 2018-01-15 16:32:48 +0900 (Mon, 15 Jan 2018) | 4 lines

__declspec(align(#)) does not take sizeof()

same as r61833

------------------------------------------------------------------------
r61845 | shyouhei | 2018-01-15 16:30:43 +0900 (Mon, 15 Jan 2018) | 2 lines

ruby_aligned_char no longer needed.

------------------------------------------------------------------------
r61844 | nobu | 2018-01-15 16:01:08 +0900 (Mon, 15 Jan 2018) | 4 lines

raddrinfo.c: fix parse_numeric_port

* ext/socket/raddrinfo.c (parse_numeric_port): necessary
  regardless of GETADDRINFO_EMU.
------------------------------------------------------------------------
r61843 | shyouhei | 2018-01-15 15:47:56 +0900 (Mon, 15 Jan 2018) | 5 lines

take alignof instead of sizeof

win32ole.c includes ALLOCA_N(struct myCPINFOEX, 1).  On such case
it is not a wise idea to align to the size of that struct.

------------------------------------------------------------------------
r61842 | mame | 2018-01-15 15:25:43 +0900 (Mon, 15 Jan 2018) | 1 line

parse.y (new_ary_op_assign): Factor out the typical code clone
------------------------------------------------------------------------
r61841 | mame | 2018-01-15 15:25:42 +0900 (Mon, 15 Jan 2018) | 3 lines

parse.y: Fix a bug of `obj[42, &blk] ||= foo bar`

Follow up of r28123 (!)
------------------------------------------------------------------------
r61840 | mame | 2018-01-15 15:25:41 +0900 (Mon, 15 Jan 2018) | 1 line

parse.y (begin_block): Factor out BEGIN {} process.
------------------------------------------------------------------------
r61839 | shyouhei | 2018-01-15 14:51:46 +0900 (Mon, 15 Jan 2018) | 4 lines

also blacklist gcc 4.9 for  __builtin_alloca_with_align

Reports show that gcc (Raspbian 4.9.2-10) 4.9.2 fails here.

------------------------------------------------------------------------
r61838 | nobu | 2018-01-15 14:27:11 +0900 (Mon, 15 Jan 2018) | 1 line

tool/ruby_vm/models/attribute.rb: void for empty arguments
------------------------------------------------------------------------
r61837 | mame | 2018-01-15 14:17:18 +0900 (Mon, 15 Jan 2018) | 4 lines

parse.y: Remove unused code comment blocks

The code fragments were commented out in YARV merge era.
I believe that it will be never needed in near future.
------------------------------------------------------------------------
r61836 | shyouhei | 2018-01-15 13:36:09 +0900 (Mon, 15 Jan 2018) | 4 lines

disable __builtin_alloca_with_align for GCC 4.8

It seems to be a false positive that the configure detects this
undocumented function to be available on the compiler.
------------------------------------------------------------------------
r61835 | shyouhei | 2018-01-15 13:36:09 +0900 (Mon, 15 Jan 2018) | 6 lines

give up RSTRING_PTR() being VALUE-aligned

rb_setup_fake_str() can take arbitrary char* address, typicalluy
C string literals.  These arguments have no guarantee of
alignment at all.  It was not a wise idea for me to think
RSTRING_PTR can be aligned.
------------------------------------------------------------------------
r61834 | shyouhei | 2018-01-15 13:36:08 +0900 (Mon, 15 Jan 2018) | 1 line

sorry, this hunk was a garbage. [ci skip]
------------------------------------------------------------------------
r61833 | shyouhei | 2018-01-15 11:59:18 +0900 (Mon, 15 Jan 2018) | 4 lines

__declspec(align(#)) does not take sizeof()

Use compile-time constant expression instead.

------------------------------------------------------------------------
r61832 | nobu | 2018-01-15 11:39:32 +0900 (Mon, 15 Jan 2018) | 6 lines

more ytab.sed fixes

* tool/ytab.sed: fix for more old bison which does not support %lex-param
  at yydestruct (missed at the previous commit).
  define yy_stack_print macro to add `p` argument instead of
  replacement at callers.
------------------------------------------------------------------------
r61831 | shyouhei | 2018-01-15 11:35:20 +0900 (Mon, 15 Jan 2018) | 5 lines

more support for NORETURN

Before this NORETURN was checked only for __attribute__ or __declspec,
but nowadays other ways are there to tell compilers that a function
never returns.  Take them into account.
------------------------------------------------------------------------
r61830 | shyouhei | 2018-01-15 11:35:19 +0900 (Mon, 15 Jan 2018) | 6 lines

__builtin_alloca_with_align for optimal memory access

ALLOCA_N takes type arugment.  It is natural that the returned
value to be used as an array of type, thus type-aligned.
Luckily GCC has a builtin to tell compiler such alignment info.
This should generate beter instructions.
------------------------------------------------------------------------
r61829 | shyouhei | 2018-01-15 11:35:18 +0900 (Mon, 15 Jan 2018) | 3 lines

__builtin_assume_aligned for *(foo *) casts

These casts are guarded. Must be safe to assume alignments.
------------------------------------------------------------------------
r61828 | shyouhei | 2018-01-15 11:35:17 +0900 (Mon, 15 Jan 2018) | 3 lines

__alignof__ to take alignment of a type

C11 and C++11 has this feature so why not use it when available.
------------------------------------------------------------------------
r61827 | shyouhei | 2018-01-15 11:35:16 +0900 (Mon, 15 Jan 2018) | 13 lines

__attibute__((__aligned__)) for RSTRING_PTR()

For instance array.c:rb_ary_product() uses RSTRING_PTR() as an
array of int. So to avoid misaligned memory access RSTRING_PTR()
must at least be sizeof(int)-aligned.  However the type of
RSTRING_PTR() is char*, which of course can expect alignment as
much as 1.  This is a problem.

The reality is, there is no misaligned memory access because the
memory region behind RSTRING_PTR() is allocated using malloc().
Memory regions returned from malloc() are always aligned
appropriately.  So let's tell the compiler about this information.
It seems GCC, clang, and MSVC have such feature.
------------------------------------------------------------------------
r61826 | nobu | 2018-01-15 11:23:24 +0900 (Mon, 15 Jan 2018) | 6 lines

more ytab.sed fixes

* tool/ytab.sed: `p` is too short to distinguish alone from other
  names.  fix for more old bison which does not support %lex-param
  at yydestruct.  add `p` argument to non-prototype declaration of
  yy_stack_print.
------------------------------------------------------------------------
r61825 | svn | 2018-01-15 09:45:26 +0900 (Mon, 15 Jan 2018) | 1 line

* 2018-01-15
------------------------------------------------------------------------
r61824 | mame | 2018-01-15 09:45:26 +0900 (Mon, 15 Jan 2018) | 3 lines

tool/ytab.sed: Support some old bison implementations

At least, I confirmed bison 2.3 (because macOS uses the version).
------------------------------------------------------------------------
r61823 | mame | 2018-01-14 23:44:46 +0900 (Sun, 14 Jan 2018) | 1 line

parse.y (parser_heredoc_dedent): Removed
------------------------------------------------------------------------
r61822 | nobu | 2018-01-14 23:28:10 +0900 (Sun, 14 Jan 2018) | 4 lines

parse.y: yydebug

* parse.y (yydebug): define to disable a global variable and get
  rid of linker error when static linked ext.
------------------------------------------------------------------------
r61821 | mame | 2018-01-14 23:17:25 +0900 (Sun, 14 Jan 2018) | 4 lines

parse.y: Remove unused a macro "FIXME"

I don't know what it was, but seems that it has been already fixed since
r12117.
------------------------------------------------------------------------
r61820 | nobu | 2018-01-14 23:14:51 +0900 (Sun, 14 Jan 2018) | 1 line

parse.y: ripper no longer uses rb_discard_node
------------------------------------------------------------------------
r61819 | mame | 2018-01-14 23:09:41 +0900 (Sun, 14 Jan 2018) | 5 lines

parse.y: Remove a code for old yacc

The current parse.y won't compile with yacc since it depends on many
bison's extensions.  Also, configure.ac does not have a check for yacc,
so the macro OLD_YACC is no longer used.
------------------------------------------------------------------------
r61818 | mame | 2018-01-14 22:51:44 +0900 (Sun, 14 Jan 2018) | 10 lines

parse.y: Remove almost all *_gen macros by passing parser_params explicitly

In parse.y many functions were suffixed "_gen" and had companion macros
to pass struct parser_params implicitly, which made parse.c bigger and
more obscure.

This change expands and removes almost all "*_gen" macros.  This
requires explicit passing of struct parser_params, i.e., we need to
write "foo(p, ..)" instead of "foo(..)".  However, it is just extra
three letters.  I believe that this is easier to understand.
------------------------------------------------------------------------
r61817 | mame | 2018-01-14 22:51:41 +0900 (Sun, 14 Jan 2018) | 5 lines

parse.y: Expand global-like accessor macros for struct parser_params

For example, `lex_strterm` is expanded to `p->lex.strterm`.
I believe that this expansion make the code straightforward.
They look not so annoying because "parser" was renamed to "p".
------------------------------------------------------------------------
r61816 | mame | 2018-01-14 22:51:38 +0900 (Sun, 14 Jan 2018) | 1 line

parse.y: Use "p" for the variable of struct parser_params consistently
------------------------------------------------------------------------
r61815 | mame | 2018-01-14 22:51:35 +0900 (Sun, 14 Jan 2018) | 5 lines

parse.y: Avoid "p" as a variable name

Because I want to use the name "p" for struct parser_params through
parse.c.  This change renames "p" to "ptr", "paren", etc. depending upon
the context.
------------------------------------------------------------------------
r61814 | nobu | 2018-01-14 20:19:18 +0900 (Sun, 14 Jan 2018) | 1 line

exclude flexible array size with old compilers
------------------------------------------------------------------------
r61813 | svn | 2018-01-14 11:44:54 +0900 (Sun, 14 Jan 2018) | 1 line

* 2018-01-14
------------------------------------------------------------------------
r61812 | normal | 2018-01-14 11:44:53 +0900 (Sun, 14 Jan 2018) | 52 lines

net/http: use writev for HTTP chunked request bodies

This reduces both user and system CPU time for large
uploads with dynamically-generated request bodies.

              user     system      total        real
before:   0.393334   1.580000   1.973334 (  1.971066)
after:    0.223334   0.976666   1.200000 (  1.198514)

------
require 'socket'
require 'net/http'
require 'benchmark'
nr = 1024 * 1024 * 1024
s = TCPServer.new('127.0.0.1', 0)
addr = s.addr
at_exit { Process.waitall }
fork do
  c = s.accept
  # not exactly accurate but fast
  IO.copy_stream(c, '/dev/null', nr + 500000)
  begin
    buf = c.readpartial(16384)
    tmp = ''
    until buf.end_with?(-"0\r\n\r\n")
      buf << c.readpartial(16384, tmp)
    end
  rescue EOFError
  end
  c.write "HTTP/1.1 201 Created\r\nConnection:close\r\n\r\n"
  c.close
end
r, w = IO.pipe
fork do
  r.close
  IO.copy_stream('/dev/zero', w, nr)
  w.close
end
w.close
Net::HTTP.start(addr[3], addr[1]) do |http|
  put = Net::HTTP::Put.new('/dev0/foo')
  put['Content-Type'] = 'application/content-type'
  put['Transfer-Encoding'] = 'chunked'
  put.body_stream = r
  puts(Benchmark.measure { http.request(put) })
end
------

* lib/net/http/generic_request.rb (write): use multi-arg write
* lib/net/protocol.rb (write): support multi-arg
  (write0): ditto
  [ruby-core:84845] [Feature #14339]
------------------------------------------------------------------------
r61811 | mame | 2018-01-13 22:08:05 +0900 (Sat, 13 Jan 2018) | 1 line

string.c (struct mapping_buffer): Use FLEX_ARY_LEN
------------------------------------------------------------------------
r61810 | mame | 2018-01-13 22:00:14 +0900 (Sat, 13 Jan 2018) | 1 line

compile.c (struct ibf_object_*): Use FLEX_ARY_LEN
------------------------------------------------------------------------
r61809 | mame | 2018-01-13 22:00:11 +0900 (Sat, 13 Jan 2018) | 3 lines

compile.c (struct ibf_id_entry): Just removed.

It looked unused.
------------------------------------------------------------------------
r61808 | mame | 2018-01-13 21:44:17 +0900 (Sat, 13 Jan 2018) | 1 line

iseq.h (struct iseq_catch_table_entry, iseq_compile_data_storage): Use FLEX_ARY_LEN
------------------------------------------------------------------------
r61807 | mame | 2018-01-13 21:25:15 +0900 (Sat, 13 Jan 2018) | 1 line

file.c (struct apply_arg): Use FLEX_ARY_LEN
------------------------------------------------------------------------
r61806 | mame | 2018-01-13 21:17:42 +0900 (Sat, 13 Jan 2018) | 1 line

variable.c (struct gen_ivtbl): Use FLEX_ARY_LEN.
------------------------------------------------------------------------
r61805 | mame | 2018-01-13 21:09:24 +0900 (Sat, 13 Jan 2018) | 1 line

node.c (node_buffer_elem_t): Use FLEX_ARY_LEN
------------------------------------------------------------------------
r61804 | mame | 2018-01-13 20:45:25 +0900 (Sat, 13 Jan 2018) | 3 lines

internal.h (FLEX_ARY_LEN): Add a macro to define a flexible array

Also, use it in iseq.c.
------------------------------------------------------------------------
r61803 | hsbt | 2018-01-13 20:10:08 +0900 (Sat, 13 Jan 2018) | 3 lines

Fix a typo.

  configure.ac: delcares -> declares.
------------------------------------------------------------------------
r61802 | shyouhei | 2018-01-13 19:47:33 +0900 (Sat, 13 Jan 2018) | 3 lines

__VA_ARGS__ is a C99ism

give up CALL_ATTRIBUTE macro.
------------------------------------------------------------------------
r61801 | shyouhei | 2018-01-13 19:47:32 +0900 (Sat, 13 Jan 2018) | 1 line

flexible array member is a C99ism
------------------------------------------------------------------------
r61800 | nobu | 2018-01-13 18:23:40 +0900 (Sat, 13 Jan 2018) | 10 lines

Update dependencies

* common.mk: enc/unicode.$(OBJEXT) depends on onigmo.h via
  oniguruma.h.

* common.mk: dependencies of *prelude.$(OBJEXT) are defined for
  each generated C sources.

* enc/depend: casefold.h and name2ctype.h are located under
  $(UNICODE_HDR_DIR).
------------------------------------------------------------------------
r61799 | kazu | 2018-01-13 09:30:01 +0900 (Sat, 13 Jan 2018) | 1 line

Update dependencies using `tool/update-deps`
------------------------------------------------------------------------
r61798 | svn | 2018-01-13 00:59:27 +0900 (Sat, 13 Jan 2018) | 1 line

* 2018-01-13
------------------------------------------------------------------------
r61797 | mame | 2018-01-13 00:59:26 +0900 (Sat, 13 Jan 2018) | 3 lines

parse.y: Remove meaningless ifndef guards

Because the part of the code is already within `#ifndef RIPPER`.
------------------------------------------------------------------------
r61796 | mame | 2018-01-12 23:25:31 +0900 (Fri, 12 Jan 2018) | 5 lines

parse.y (token_info_push, token_info_pop): Refactoring

* remove unused argument len
* factor out initialization code of token_info
* make the condition of "mismatched indentations" warning easy to understand
------------------------------------------------------------------------
r61795 | mame | 2018-01-12 23:25:28 +0900 (Fri, 12 Jan 2018) | 1 line

parse.y (token_info_push, token_info_pop): Use code_location
------------------------------------------------------------------------
r61794 | shyouhei | 2018-01-12 22:25:03 +0900 (Fri, 12 Jan 2018) | 5 lines

suppress warning for VC12

It says "warning C4146: unary minus operator applied
to unsigned type, result still unsigned"

------------------------------------------------------------------------
r61793 | mame | 2018-01-12 22:22:20 +0900 (Fri, 12 Jan 2018) | 3 lines

parse.y: Remove unneeded dependence on pointer representatin

A simple comparison is enough in this case
------------------------------------------------------------------------
r61792 | shyouhei | 2018-01-12 22:14:53 +0900 (Fri, 12 Jan 2018) | 7 lines

merge revision: 61746

`signed` is required for Rasbian (x86_64).

* tool/ruby_vm/views/_insn_stack_increase.erb: specify `signed` explicitly
  for systems which use `unsigned` for `char` type.

------------------------------------------------------------------------
r61791 | hsbt | 2018-01-12 22:05:09 +0900 (Fri, 12 Jan 2018) | 3 lines

Fix a typo.

  * template/unicode_norm_gen.tmpl: ouput -> output
------------------------------------------------------------------------
r61790 | normal | 2018-01-12 18:31:22 +0900 (Fri, 12 Jan 2018) | 4 lines

sample/iseq_loader: use File.open instead of Kernel#open

This makes auditing for inadvertant command execution
easier.
------------------------------------------------------------------------
r61789 | normal | 2018-01-12 18:31:17 +0900 (Fri, 12 Jan 2018) | 1 line

sample/iseq_loader.rb: spelling fix
------------------------------------------------------------------------
r61788 | hsbt | 2018-01-12 18:07:47 +0900 (Fri, 12 Jan 2018) | 4 lines

Fixed typos.

  * sample/trick2013/kinaba/remarks.markdown: algorthim -> algorithm
  * sample/trick2015/ksk_1/remarks.markdown: Limination -> Limitation
------------------------------------------------------------------------
r61787 | shyouhei | 2018-01-12 17:38:12 +0900 (Fri, 12 Jan 2018) | 4 lines

tool/ruby_vm support for pre-2.0 BASERUBY

This was not requested :) but actually easier than the previous
so I just did it anyway.
------------------------------------------------------------------------
r61786 | shyouhei | 2018-01-12 17:38:11 +0900 (Fri, 12 Jan 2018) | 3 lines

tool/ruby_vm support for pre-2.1 BASERUBY

as requested by devs, support for BASERUBY prior to 2.1
------------------------------------------------------------------------
r61785 | shyouhei | 2018-01-12 17:38:10 +0900 (Fri, 12 Jan 2018) | 3 lines

tool/ruby_vm support for pre-2.3 BASERUBY

as requested by devs, support for BASERUBY prior to 2.3
------------------------------------------------------------------------
r61784 | shyouhei | 2018-01-12 17:38:09 +0900 (Fri, 12 Jan 2018) | 20 lines

delete tool/instruction.rb (2nd try)

Previous commit changed insns.def format. Now is the time for its
generators. In doing so I chose to modernize the system, not just
patch.  My attempt includes

- extensive use of Onigumo regular expressions
- split from one big file (instruction.rb) into separated MVC
- partial view

Also, let me take this opportunity to kill old unused features
such as

- stack caching
- minsns / yasmdata which are never seriously used
- yarvarch document generation (moved to doc/)
- vast majority of unused arguments to insns2vm.rb

This commit generates VM source codes that cleanly compile, and
the generated binary passes tests.  At least for me.
------------------------------------------------------------------------
r61783 | shyouhei | 2018-01-12 17:38:08 +0900 (Fri, 12 Jan 2018) | 1 line

[ci skip] add comments about file format (2nd try)
------------------------------------------------------------------------
r61782 | shyouhei | 2018-01-12 17:38:07 +0900 (Fri, 12 Jan 2018) | 4 lines

new insns.def format (2nd try)

- Gave up @j comments
- Room for sp_inc to be a proper grammer element
------------------------------------------------------------------------
r61781 | kazu | 2018-01-12 09:16:59 +0900 (Fri, 12 Jan 2018) | 3 lines

Add `103 Early Hints` to `Net::HTTP::STATUS_CODES` [ci skip]

Update by `ruby lib/net/http/status.rb | sponge lib/net/http/status.rb`
------------------------------------------------------------------------
r61780 | kazu | 2018-01-12 09:16:56 +0900 (Fri, 12 Jan 2018) | 1 line

doc/NEWS-2.5.0: `step` is not `Integer#step` but `Numeric#step` [ci skip]
------------------------------------------------------------------------
r61779 | normal | 2018-01-12 09:15:28 +0900 (Fri, 12 Jan 2018) | 4 lines

thread.c (thread_cleanup_func): document small leak

It's minor, I haven't analyzed how fixable it is, but we should
at least note it, here.
------------------------------------------------------------------------
r61778 | naruse | 2018-01-12 04:41:49 +0900 (Fri, 12 Jan 2018) | 1 line

fix for IPv6 env
------------------------------------------------------------------------
r61777 | stomar | 2018-01-12 04:37:25 +0900 (Fri, 12 Jan 2018) | 1 line

NEWS: Matrix#antisymmetric?
------------------------------------------------------------------------
r61776 | svn | 2018-01-12 04:36:31 +0900 (Fri, 12 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r61775 | stomar | 2018-01-12 04:36:30 +0900 (Fri, 12 Jan 2018) | 6 lines

matrix.rb: add Matrix#antisymmetric?

* lib/matrix.rb: add Matrix#antisymmetric?.
  Proposed by Yilo (@yiloo). Patch by Marcus Stollsteimer (@stomar).
  [Fix GH-1788]
* spec/ruby/library/matrix/antisymmetric_spec.rb: add specs.
------------------------------------------------------------------------
r61774 | naruse | 2018-01-12 03:26:49 +0900 (Fri, 12 Jan 2018) | 3 lines

Mock fetching data from real DNS [Feature #14340]

This test just tests MDNS#each_address method.
------------------------------------------------------------------------
r61773 | svn | 2018-01-12 00:54:14 +0900 (Fri, 12 Jan 2018) | 1 line

* 2018-01-12
------------------------------------------------------------------------
r61772 | mame | 2018-01-12 00:54:13 +0900 (Fri, 12 Jan 2018) | 7 lines

parse.y: Remove LEXPOP hack

cmdarg_stack became inconsistent state due to look-ahead, and LEXPOP
hack smoothed over the inconsistency.

This commit fixes the inconsisitent state itself, and removes LEXPOP
hack.
------------------------------------------------------------------------
r61771 | kazu | 2018-01-11 22:56:05 +0900 (Thu, 11 Jan 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r61770 | kazu | 2018-01-11 22:56:04 +0900 (Thu, 11 Jan 2018) | 1 line

Fix indent and use as skipped message instead of comment
------------------------------------------------------------------------
r61769 | mame | 2018-01-11 22:42:18 +0900 (Thu, 11 Jan 2018) | 1 line

parse.y: disentangle the lexer handling of ')', ']', and '}'
------------------------------------------------------------------------
r61768 | mame | 2018-01-11 22:42:15 +0900 (Thu, 11 Jan 2018) | 1 line

parse.y: simplify and add a comment for paren_nest and lpar_beg
------------------------------------------------------------------------
r61767 | nobu | 2018-01-11 17:34:55 +0900 (Thu, 11 Jan 2018) | 3 lines

iseq.c: child iseq encoding

* iseq.c (iseq_inspect): preserve the encoding of child iseqs.
------------------------------------------------------------------------
r61766 | nobu | 2018-01-11 17:26:21 +0900 (Thu, 11 Jan 2018) | 5 lines

vm_insnhelper.c: search in the indexing order

* vm_insnhelper.c (vm_opt_newarray_max, vm_opt_newarray_min):
  search in the indexing order, as well as usual methods.
  [ruby-core:84821] [Bug #14350]
------------------------------------------------------------------------
r61765 | mame | 2018-01-11 13:25:33 +0900 (Thu, 11 Jan 2018) | 1 line

parse.y: add a simple comment for COND_* and CMDARG_*
------------------------------------------------------------------------
r61764 | mame | 2018-01-11 12:23:50 +0900 (Thu, 11 Jan 2018) | 3 lines

parse.y (local_push_gen): Rewrite the condition of "unused var" warning

It was unnecessarily too complex, IMO.
------------------------------------------------------------------------
r61763 | svn | 2018-01-11 00:44:52 +0900 (Thu, 11 Jan 2018) | 1 line

* 2018-01-11
------------------------------------------------------------------------
r61762 | k0kubun | 2018-01-11 00:44:52 +0900 (Thu, 11 Jan 2018) | 12 lines

tool/downloader.rb: retry against Errno::ETIMEDOUT

instead of Errno::ECONNREFUSED.

As I commented in r61498, at that moment I was not sure if the actual
exception is really `Errno::ECONNREFUSED` or not.

In https://ci.appveyor.com/project/ruby/ruby/build/1.0.6974, I could
confirm that the download can fail with `Errno::ETIMEDOUT`. So I want to
retry that.

Let's add `Errno::ECONNREFUSED` too if it fails with the exception.
------------------------------------------------------------------------
r61761 | hsbt | 2018-01-10 23:13:06 +0900 (Wed, 10 Jan 2018) | 4 lines

Fix typos.

 * doc/contributors.rdoc: pathces -> patches.
 * doc/syntax/refinements.rdoc: exmaple -> example.
------------------------------------------------------------------------
r61760 | mame | 2018-01-10 22:30:25 +0900 (Wed, 10 Jan 2018) | 4 lines

spec/: skip some specs so that no failure occurs in root privilege

Follow up of r61757,  This change makes `sudo make test-spec` pass on my
machine.
------------------------------------------------------------------------
r61759 | mame | 2018-01-10 22:30:22 +0900 (Wed, 10 Jan 2018) | 9 lines

spec/ruby/library/etc/getlogin_spec.rb: Use `logname` as an expected result

It had used `id -un`, but it is not always equal to `Etc.getlogin`.
`id` returns the current user of the process, and `Etc.getlogin` returns
the user name logged in on the controlling terminal of the process.

This change uses `logname` by default.  `id` remains as a fallback since
there seem to be some platforms where `logname` is not available:
https://github.com/ruby/spec/commit/49576b417ca3704cfb8271d2545c06c076c10cbc
------------------------------------------------------------------------
r61758 | mame | 2018-01-10 19:39:09 +0900 (Wed, 10 Jan 2018) | 9 lines

skip some tests so that no failure occurs in root privilege

Some tests had failed on `sudo make test-all`, mainly because root can
access any files regardless of permission.  This change adds `skip`
guards into such tests.

Note that almost all tests in which `skip` guards is added, already have
"windows" guard.  This is because there is no support to avoid read
access by owner on Windows.
------------------------------------------------------------------------
r61757 | mame | 2018-01-10 14:57:15 +0900 (Wed, 10 Jan 2018) | 3 lines

iseq.c: Succinct bitvector now supports 32-bit machine

Second try of succinct bitvector.
------------------------------------------------------------------------
r61756 | usa | 2018-01-10 12:54:02 +0900 (Wed, 10 Jan 2018) | 5 lines

should cause preprocess error as other cases

* string.c (NONASCII_MASK): should cause preprocess error immediately if the
  compiler does not satisfy our assumptions.

------------------------------------------------------------------------
r61755 | shyouhei | 2018-01-10 10:53:24 +0900 (Wed, 10 Jan 2018) | 4 lines

merge revisions 61753:61750 61747:61740 61737:61728

Revert all the VM generator rewrites; requested by naruse

------------------------------------------------------------------------
r61754 | normal | 2018-01-10 10:07:27 +0900 (Wed, 10 Jan 2018) | 8 lines

dir.c: pass flags to openat(2) correctly

Flags are 3rd argument of openat(2) while the 4th argument
(mode_t) is unnecessary for our uses.  This bug exists since
Ruby 2.5 from r58860 and was discoverd by strace.

* dir.c (nogvl_opendir_at): use openat correctly
  [Feature #13056] [Feature #14346]
------------------------------------------------------------------------
r61753 | svn | 2018-01-10 10:00:23 +0900 (Wed, 10 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r61752 | hsbt | 2018-01-10 10:00:21 +0900 (Wed, 10 Jan 2018) | 4 lines

Fixed typos.

  * tool/ruby_vm/loaders/opt_operand_def.rb: grammer -> grammar
  * tool/ruby_vm/scripts/insns2vm.rb: beginnig -> beginning
------------------------------------------------------------------------
r61751 | kazu | 2018-01-10 09:01:31 +0900 (Wed, 10 Jan 2018) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r61750 | normal | 2018-01-10 08:47:19 +0900 (Wed, 10 Jan 2018) | 4 lines

thread_pthread.c: remove dead code around "get_stack_of"

"get_stack_of" was only in a proposed patch for [Feature #8793]
https://bugs.ruby-lang.org/issues/8793 and never applied.
------------------------------------------------------------------------
r61749 | normal | 2018-01-10 07:59:58 +0900 (Wed, 10 Jan 2018) | 3 lines

thread.c: threadptr_pending_interrupt_active_p is static

It's not used elsewhere.
------------------------------------------------------------------------
r61748 | ko1 | 2018-01-10 02:09:23 +0900 (Wed, 10 Jan 2018) | 5 lines

use binary search for insns_info.

* vm_core.h (VM_INSN_INFO_TABLE_IMPL): use 1 (binary search)
  because 2 (succinct bitvector) doesn't work on Rasbian (x86_64).

------------------------------------------------------------------------
r61747 | svn | 2018-01-10 01:27:51 +0900 (Wed, 10 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r61746 | ko1 | 2018-01-10 01:27:50 +0900 (Wed, 10 Jan 2018) | 5 lines

`signed` is required for Rasbian (x86_64).

* tool/ruby_vm/views/_insn_stack_increase.erb: specify `signed` explicitly
  for systems which use `unsigned` for `char` type.

------------------------------------------------------------------------
r61745 | svn | 2018-01-10 00:47:54 +0900 (Wed, 10 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r61744 | naruse | 2018-01-10 00:47:53 +0900 (Wed, 10 Jan 2018) | 1 line

grep_v is ruby 2.3 feature
------------------------------------------------------------------------
r61743 | svn | 2018-01-10 00:41:11 +0900 (Wed, 10 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r61742 | svn | 2018-01-10 00:41:11 +0900 (Wed, 10 Jan 2018) | 1 line

* 2018-01-10
------------------------------------------------------------------------
r61741 | naruse | 2018-01-10 00:41:10 +0900 (Wed, 10 Jan 2018) | 3 lines

Here document <<~ is Ruby 2.3 feature

baseruby should support wider ruby versions
------------------------------------------------------------------------
r61740 | mame | 2018-01-09 23:11:39 +0900 (Tue, 09 Jan 2018) | 1 line

iseq.c: Add explicit casts from long to int (to pass compile on clang)
------------------------------------------------------------------------
r61739 | mame | 2018-01-09 23:05:23 +0900 (Tue, 09 Jan 2018) | 1 line

iseq.c: Add a succinct bitvector implementation for insn_info_table
------------------------------------------------------------------------
r61738 | mame | 2018-01-09 23:05:21 +0900 (Tue, 09 Jan 2018) | 1 line

iseq.c (iseq_data_to_ary): Avoid direct use of insns_info.positions
------------------------------------------------------------------------
r61737 | svn | 2018-01-09 22:30:39 +0900 (Tue, 09 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r61736 | shyouhei | 2018-01-09 22:30:35 +0900 (Tue, 09 Jan 2018) | 1 line

insns_info.inc.tmpl: share large tablese
------------------------------------------------------------------------
r61735 | shyouhei | 2018-01-09 22:30:34 +0900 (Tue, 09 Jan 2018) | 4 lines

insns_info.inc: position independent

* template/insns_info.inc.tmpl (insn_name_info): make position
  independent for large strings.
------------------------------------------------------------------------
r61734 | shyouhei | 2018-01-09 22:30:33 +0900 (Tue, 09 Jan 2018) | 1 line

comma at the end of enum is a C99ism.
------------------------------------------------------------------------
r61733 | shyouhei | 2018-01-09 22:30:31 +0900 (Tue, 09 Jan 2018) | 20 lines

delete tool/instruction.rb

Previous commit changed insns.def format. Now is the time for its
generators. In doing so I chose to modernize the system, not just
patch.  My attempt includes

- extensive use of Onigumo regular expressions
- split from one big file (instruction.rb) into separated MVC
- partial view

Also, let me take this opportunity to kill old unused features
such as

- stack caching
- minsns / yasmdata which are never seriously used
- yarvarch document generation (moved to doc/)
- vast majority of unused arguments to insns2vm.rb

This commit generates VM source codes that cleanly compile, and
the generated binary passes tests.  At least for me.
------------------------------------------------------------------------
r61732 | svn | 2018-01-09 22:30:30 +0900 (Tue, 09 Jan 2018) | 1 line

* properties.
------------------------------------------------------------------------
r61731 | svn | 2018-01-09 22:30:30 +0900 (Tue, 09 Jan 2018) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r61730 | shyouhei | 2018-01-09 22:30:29 +0900 (Tue, 09 Jan 2018) | 1 line

[ci skip] add comments about file format
------------------------------------------------------------------------
r61729 | shyouhei | 2018-01-09 22:30:28 +0900 (Tue, 09 Jan 2018) | 4 lines

new insns.def format

- Gave up @j comments
- Room for sp_inc to be a proper grammer element
------------------------------------------------------------------------
r61728 | shyouhei | 2018-01-09 22:30:27 +0900 (Tue, 09 Jan 2018) | 1 line

rb_num_t happen to be unsigned; introduce signed variant
------------------------------------------------------------------------
r61727 | mame | 2018-01-09 22:04:24 +0900 (Tue, 09 Jan 2018) | 4 lines

parse.y: insane syntax too (class definition in cond)

This change partially reverts r61724 and take another approach:
exploiting struct local_vars to backup the cond_stack state.
------------------------------------------------------------------------
r61726 | kazu | 2018-01-09 21:35:54 +0900 (Tue, 09 Jan 2018) | 1 line

Fix indent [ci skip]
------------------------------------------------------------------------
r61725 | kazu | 2018-01-09 21:35:12 +0900 (Tue, 09 Jan 2018) | 3 lines

Include ruby/{io,encoding}.h before internal.h

because of r61712 and r61713
------------------------------------------------------------------------
r61724 | nobu | 2018-01-09 21:33:38 +0900 (Tue, 09 Jan 2018) | 4 lines

parse.y: insane syntax

* parse.y (primary): save/restore COND and CMDARG stacks at method
  definition, to distinguish do_block and do_cond properly.
------------------------------------------------------------------------
r61723 | nobu | 2018-01-09 21:26:23 +0900 (Tue, 09 Jan 2018) | 4 lines

insns_info.inc.tmpl: split rb_vm_insn_name_info

* template/insns_info.inc.tmpl (rb_vm_insn_name_info): split
  instruction names pool not to exceed C90 limit.
------------------------------------------------------------------------
r61722 | nobu | 2018-01-09 20:52:17 +0900 (Tue, 09 Jan 2018) | 5 lines

thread_pthread.c: round stack size

* thread_pthread.c (rb_thread_create_timer_thread): round up
  additional stack size to PTHREAD_STACK_MIN, to get rid of
  EINVAL at pthread_attr_setstacksize().
------------------------------------------------------------------------
r61721 | mame | 2018-01-09 17:45:35 +0900 (Tue, 09 Jan 2018) | 8 lines

Rename code_range to code_location

Because the name "code_range" is ambiguous with encoding's.
Abbreviations ("crange", and "cr") are also renamed to "loc".

The traditional "code_location" (a pair of lineno and column) is
renamed to "code_position".  Abbreviations are also renamed
(first_loc to beg_pos, and last_loc to end_pos).
------------------------------------------------------------------------
r61720 | normal | 2018-01-09 17:26:43 +0900 (Tue, 09 Jan 2018) | 9 lines

thread_pthread: remove checks for pthread_cond*_init

These were added for NaCL support in r36022, and we dropped NaCL
in r60374.

IMHO, any pthreads implementation without these basic functions
is not worth the time to support.

[ruby-core:84758] [Misc #14342]
------------------------------------------------------------------------
r61719 | normal | 2018-01-09 17:26:38 +0900 (Tue, 09 Jan 2018) | 7 lines

thread_pthread: remove HAVE_PTHREAD_ATTR_INIT ifdefs

ifdefs make code confusing for my easily-confused mind :<
These were added for NaCL support in r36022, and we dropped NaCL
in r60374.  There are more #ifdefs to remove...

[ruby-core:84758] [Misc #14342]
------------------------------------------------------------------------
r61718 | mame | 2018-01-09 17:05:40 +0900 (Tue, 09 Jan 2018) | 1 line

bootstraptest/test_fork.rb: Stop too restrict NPROC test temporarily
------------------------------------------------------------------------
r61717 | mame | 2018-01-09 16:33:38 +0900 (Tue, 09 Jan 2018) | 3 lines

Fix the position of VM_ASSERT for "pthread_create failed for time"

Fix r61706.  Thank you, Eric Wong. [ruby-core:84756]
------------------------------------------------------------------------
r61716 | normal | 2018-01-09 16:15:44 +0900 (Tue, 09 Jan 2018) | 4 lines

thread_pthread: more diagnostics around timer thread creation failures

However, I don't think EAGAIN on pthread_create can really
be fixed in our code.  I suspect test machines are overloaded.
------------------------------------------------------------------------
r61715 | nobu | 2018-01-09 15:55:55 +0900 (Tue, 09 Jan 2018) | 1 line

update dependencies
------------------------------------------------------------------------
r61714 | nobu | 2018-01-09 15:55:54 +0900 (Tue, 09 Jan 2018) | 5 lines

update-deps: strip -j option

* update-deps: strip -j option from ENV['GNUMAKEFLAGS'], not
  dirstack to get confused by intermingled entering/leaveing
  directory messages.
------------------------------------------------------------------------
r61713 | nobu | 2018-01-09 15:24:11 +0900 (Tue, 09 Jan 2018) | 1 line

internal.h: remove dependecy on ruby/encoding.h
------------------------------------------------------------------------
r61712 | nobu | 2018-01-09 15:24:10 +0900 (Tue, 09 Jan 2018) | 1 line

internal.h: remove dependecy on ruby/io.h
------------------------------------------------------------------------
r61711 | mame | 2018-01-09 15:17:21 +0900 (Tue, 09 Jan 2018) | 12 lines

compile.c (iseq_compile_each0): remove irrelevant tracecoverage

This change removes tracecoverage instructions on a line that has any
NODE but is non-significant, such as, just one literal.

This fixes the following failure that occurs only when coverage is
enabled:

  1) Failure:
TestISeq#test_to_a_lines [.../ruby/test/ruby/test_iseq.rb:56]:
<[3, 4, 7, 9]> expected but was
<[3, 4, 5, 6, 7, 8, 9]>.
------------------------------------------------------------------------
r61710 | mame | 2018-01-09 14:19:18 +0900 (Tue, 09 Jan 2018) | 3 lines

Allow `-> do rescue; end` as well as `proc do rescue; end`

https://twitter.com/takiuchi/status/950593389963051008
------------------------------------------------------------------------
r61709 | mame | 2018-01-09 14:03:03 +0900 (Tue, 09 Jan 2018) | 4 lines

parse.y: Remove redefinition of malloc

Because the purpose is now unsure (maybe, to support very old bison?).
If an issue occurs, it should be resurrected with explicit comment.
------------------------------------------------------------------------
r61708 | mame | 2018-01-09 13:27:26 +0900 (Tue, 09 Jan 2018) | 1 line

parse.y: PARSER_DEBUG is no longer used
------------------------------------------------------------------------
r61707 | mame | 2018-01-09 12:48:26 +0900 (Tue, 09 Jan 2018) | 3 lines

parse.y: Remove meaningless ifndef guards

Because the part of the code is already within `#ifndef RIPPER`.
------------------------------------------------------------------------
r61706 | mame | 2018-01-09 12:47:22 +0900 (Tue, 09 Jan 2018) | 5 lines

Explicit failure in VM_CHECK_MODE when failing to create timer thread

"warning: pthread_create failed for timer: Resource temporarily
unavailable, scheduling broken" still occurs randomly.  This change will
allow us to debug the issue.
------------------------------------------------------------------------
r61705 | nobu | 2018-01-09 12:37:36 +0900 (Tue, 09 Jan 2018) | 1 line

common.mk (srcs_vpath): renamed for nmake
------------------------------------------------------------------------
r61704 | normal | 2018-01-09 11:45:03 +0900 (Tue, 09 Jan 2018) | 12 lines

use predefined ids in a few more places

Saves a little space on x86:

   text	   data	    bss	    dec	    hex	filename
3684110	  11968	  34240	3730318	 38eb8e	ruby.before
3684086	  11968	  34240	3730294	 38eb76	ruby.after

* enumerator.c: include id.h, define aliases
  (Init_Enumeerator): remove unnecessary rb_intern calls
* gc.c (should_be_callable): use idCall
* vm.c (Init_VM): ditto
------------------------------------------------------------------------
r61703 | nobu | 2018-01-09 11:10:58 +0900 (Tue, 09 Jan 2018) | 4 lines

gmake.mk: update srcdir files

* defs/gmake.mk (commit): update source files under the sources
  directory after commit.
------------------------------------------------------------------------
r61702 | nobu | 2018-01-09 10:56:05 +0900 (Tue, 09 Jan 2018) | 1 line

parse.y: set ID to yylval ID instead of token
------------------------------------------------------------------------
r61701 | mame | 2018-01-09 10:49:40 +0900 (Tue, 09 Jan 2018) | 3 lines

parse.y: Remove special handling of tOROP and tANDOP

The complexity is no longer considered necessary.
------------------------------------------------------------------------
r61700 | ktsj | 2018-01-09 10:46:07 +0900 (Tue, 09 Jan 2018) | 3 lines

.gdbinit (print_lineno): follow up changes in r61534, r61536

insns_info was refactored.
------------------------------------------------------------------------
r61699 | nobu | 2018-01-09 10:10:15 +0900 (Tue, 09 Jan 2018) | 1 line

parse.y: use change_shortcut_operator_id
------------------------------------------------------------------------
r61698 | nobu | 2018-01-09 09:25:27 +0900 (Tue, 09 Jan 2018) | 1 line

wrap statement expression with __extension__
------------------------------------------------------------------------
r61697 | yui-knk | 2018-01-09 09:19:51 +0900 (Tue, 09 Jan 2018) | 6 lines

parse.y: Remove duplicated nd_line set

* parse.y: These nodes are created with `@$` locations.
  Start position of `@$` is same as start position of `@1`.
  And NEW_XXX macros set first_loc.lineno of a passed
  code range to nd_line. So these nd_set_line are not needed.
------------------------------------------------------------------------
r61696 | nobu | 2018-01-09 09:06:00 +0900 (Tue, 09 Jan 2018) | 1 line

constified
------------------------------------------------------------------------
r61695 | nobu | 2018-01-09 08:35:36 +0900 (Tue, 09 Jan 2018) | 4 lines

vm.c: remove extra ifdef

* vm.c (rb_execution_context_mark): VM_ASSERT works only if
  VM_CHECK_MODE > 0.
------------------------------------------------------------------------
r61694 | ko1 | 2018-01-09 01:06:33 +0900 (Tue, 09 Jan 2018) | 10 lines

use `getblockparamproxy` to pass blocks.

* compile.c (setup_args): use `getblockparamproxy` (`rb_block_param_proxy`)
  to represent a block parameter passing.

* vm_args.c (vm_caller_setup_arg_block): check `rb_block_param_proxy`
  instead of using `VM_CALL_ARGS_BLOCKARG_BLOCKPARAM` call flag.

* vm_core.h (VM_CALL_ARGS_BLOCKARG_BLOCKPARAM): removed.

------------------------------------------------------------------------
r61693 | ko1 | 2018-01-09 01:00:38 +0900 (Tue, 09 Jan 2018) | 5 lines

fix a bug only on assertion.

* vm.c (rb_execution_context_mark): check escaped directly
  to skip assertions. Not sure why there is an inconsistency.

------------------------------------------------------------------------
r61692 | svn | 2018-01-09 00:27:57 +0900 (Tue, 09 Jan 2018) | 1 line

* 2018-01-09
------------------------------------------------------------------------
r61691 | ko1 | 2018-01-09 00:27:56 +0900 (Tue, 09 Jan 2018) | 7 lines

fix mark miss of Env (which is pointed by prev_ep).

* vm.c (rb_execution_context_mark): r61624 and r61659 introduce marking miss
  bug for Env objects as a prev_ep which is contained by Proc objects because
  Proc objects can be collected when they should be living and Env objects
  will collected unexpectedly. This patch solves this problem.

------------------------------------------------------------------------
r61690 | mame | 2018-01-08 21:56:58 +0900 (Mon, 08 Jan 2018) | 10 lines

parse.y: Make consistent with the terms about code ranges and locations

"loc" was ambiguous; it might refer both a location and a code range.
This change uses "loc" for a location, and "crange" or "cr" for a code
range.

A location (abbr. loc) is a point in a program and consists of line
number and column number.  A code range (abbr. crange and cr) is a range
within a program and consists of a pair of locations which is the first
and the last.
------------------------------------------------------------------------
r61689 | yui-knk | 2018-01-08 21:39:58 +0900 (Mon, 08 Jan 2018) | 1 line

parse.y (remove_duplicate_keys): Remove a not used argument
------------------------------------------------------------------------
r61688 | mame | 2018-01-08 21:30:35 +0900 (Mon, 08 Jan 2018) | 1 line

parse.y: Factor out code fragments that merges two code ranges
------------------------------------------------------------------------
r61687 | yui-knk | 2018-01-08 21:23:56 +0900 (Mon, 08 Jan 2018) | 1 line

parse.y (block_append_gen): Remove a not used argument
------------------------------------------------------------------------
r61686 | yui-knk | 2018-01-08 21:23:53 +0900 (Mon, 08 Jan 2018) | 28 lines

parse.y: Use nd_loc of head and tail

* parse.y (block_append_gen): Use nd_loc of
  head(tail) when create NEW_BLOCK of head(tail).

  e.g. The locations of the NODE_BLOCK is fixed:

  ```
  BEGIN {
    :a
  }

  BEGIN {
    :b
  }
  ```

  * Before

  ```
  NODE_BLOCK (line: 5, code_range: (5,0)-(7,1))
  ```

  * After

  ```
  NODE_BLOCK (line: 1, code_range: (1,0)-(7,1))
  ```
------------------------------------------------------------------------
r61685 | yui-knk | 2018-01-08 20:50:35 +0900 (Mon, 08 Jan 2018) | 16 lines

parse.y: Fix the lineno of nd_set_line

* parse.y: Follow up of r61676. r61676 removed
  ruby_sourceline from some actions. When stop to
  use lineno of "n th" symbol, it's better to
  use last location's lineno of "n-1 th" symbol.

  e.g.

  ```
  primary : k_begin {} bodystmt k_end
  ```

  Before r61676 we use lineno of `@2` (ruby_sourceline).
  In this case, last location's lineno of `k_begin` (`@1`)
  is suitable.
------------------------------------------------------------------------
r61684 | normal | 2018-01-08 19:23:27 +0900 (Mon, 08 Jan 2018) | 50 lines

net/http: clear compressed chunk after decompression

We no longer need the compressed data once the inflate block is
called; so clear it ASAP to reduce memory overhead.  This is a
small chunk, so it only saves a few hundred kilobytes with the
script below.

before:        RssAnon:     5976 kB
 after:        RssAnon:     5564 kB
------
require 'net/http'
require 'zlib'
response_gz = ARGV.shift or abort "#$0 TEMPORARY_FILE"

 # pre-create response since compressing is slower than decompressing
unless File.readable?(response_gz)
  nr = 16384 * 2
  buf = ((0..255).map(&:chr).join * 128)
  File.open(response_gz, 'wb') do |fp|
    gzip = Zlib::GzipWriter.new(fp)
    nr.times { gzip.write(buf) }
    gzip.close
  end
  buf.clear
end
response_gz = File.open(response_gz)

s = TCPServer.new('127.0.0.1', 0)
pid = fork do
  c = s.accept
  c.readpartial(16384).clear
  c.write("HTTP/1.1 200 OK\r\n" \
          "Content-Length: #{response_gz.stat.size}\r\n" \
          "Content-Encoding: gzip\r\n" \
          "Accept-Ranges: bytes\r\n" \
          "\r\n")
  IO.copy_stream(response_gz, c)
  c.close
end

addr = s.addr
Net::HTTP.start(addr[3], addr[1]) do |http|
  http.request_get(-'/') do |res|
    res.read_body(&:clear)
  end
end
puts File.readlines(-'/proc/self/status').grep(/RssAnon/)[0]
Process.waitpid2(pid)
------
* lib/net/http/response.rb (inflate_adapter): clear compressed_chunk
------------------------------------------------------------------------
r61683 | hsbt | 2018-01-08 19:12:41 +0900 (Mon, 08 Jan 2018) | 1 line

Update minitest-5.11.1
------------------------------------------------------------------------
r61682 | mame | 2018-01-08 18:39:01 +0900 (Mon, 08 Jan 2018) | 4 lines

parse.y: Remove dispose_string

I think that recycling the delimiter string objects doesn't pay its
complexity.
------------------------------------------------------------------------
r61681 | nobu | 2018-01-08 18:11:26 +0900 (Mon, 08 Jan 2018) | 4 lines

vm_insnhelper.c: vm_invoke_block_opt_call

* vm_insnhelper.c (vm_invoke_block_opt_call): renamed with sliding
  arguments.
------------------------------------------------------------------------
r61680 | nobu | 2018-01-08 18:04:07 +0900 (Mon, 08 Jan 2018) | 12 lines

vm.c: respect redefinition of Proc#call

* vm.c (vm_redefinition_check_method_type): hoist out method
  definition type to check redefinition.

* vm.c (rb_vm_check_redefinition_opt_method): should check
  optimized method too.

* vm.c (vm_init_redefined_flag): check Proc#call.

* vm_insnhelper.c (vm_call_opt_block_call): search proper method
  if redefined.  [Bug #14335]
------------------------------------------------------------------------
r61679 | kazu | 2018-01-08 17:12:04 +0900 (Mon, 08 Jan 2018) | 1 line

Add parens [ci skip]
------------------------------------------------------------------------
r61678 | nobu | 2018-01-08 15:55:12 +0900 (Mon, 08 Jan 2018) | 1 line

node.c: show newline node mark
------------------------------------------------------------------------
r61677 | mame | 2018-01-08 15:54:55 +0900 (Mon, 08 Jan 2018) | 3 lines

parse.y: Use last_loc.lineno instead of ruby_sourceline

State-less way is better.
------------------------------------------------------------------------
r61676 | mame | 2018-01-08 15:30:53 +0900 (Mon, 08 Jan 2018) | 3 lines

parse.y: Remove `$<num>$ = ruby_sourceline` hacks

Instead, use bison's lineno.
------------------------------------------------------------------------
r61675 | nobu | 2018-01-08 14:17:09 +0900 (Mon, 08 Jan 2018) | 3 lines

compile.c: compile_case2 branch

* compile.c (compile_case2): compile as a branch condition.
------------------------------------------------------------------------
r61674 | nobu | 2018-01-08 14:17:08 +0900 (Mon, 08 Jan 2018) | 1 line

parse.y: constified NULL_LOC
------------------------------------------------------------------------
r61673 | mrkn | 2018-01-08 13:35:20 +0900 (Mon, 08 Jan 2018) | 1 line

doc/NEWS-2.5.0: Time.at is a class method
------------------------------------------------------------------------
r61672 | mame | 2018-01-08 12:22:13 +0900 (Mon, 08 Jan 2018) | 1 line

parse.y: Factor out special handling of a short-cut operator id
------------------------------------------------------------------------
r61671 | yui-knk | 2018-01-08 11:38:21 +0900 (Mon, 08 Jan 2018) | 3 lines

parse.y: Remove duplicated nd_loc set

* parse.y: nd_loc is set by NEW_CASE2/NEW_WHEN
------------------------------------------------------------------------
r61670 | mame | 2018-01-08 11:36:12 +0900 (Mon, 08 Jan 2018) | 1 line

parse.y: Embed simple wrapper functions for NEW_NODEs
------------------------------------------------------------------------
r61669 | yui-knk | 2018-01-08 11:24:18 +0900 (Mon, 08 Jan 2018) | 4 lines

parse.y: Make NULL_LOC to be internal

* parse.y (NULL_LOC): We will create NODEs only
  inside of parse.y, so make NULL_LOC to be internal.
------------------------------------------------------------------------
r61668 | mame | 2018-01-08 11:19:47 +0900 (Mon, 08 Jan 2018) | 3 lines

parse.y: Remove unneeded wrapper functions for NEW_NODEs

Just refactoring.
------------------------------------------------------------------------
r61667 | mame | 2018-01-08 10:49:00 +0900 (Mon, 08 Jan 2018) | 9 lines

parse.y: set bison's first_loc.lineno to nd_line by default

This change initializes nd_line, lineno of each node, by default, by
using the first line number of code range that bison tracks, instead of
extracting from lexer state.
The lexer state basically provides only the last line number of code
range, so many hacks are used to approximate the first line number.  The
hacks have been introduced on demand, or very ad-hocly.  I think this
change will make it possible to remove most of the hacks.
------------------------------------------------------------------------
r61666 | mame | 2018-01-08 10:29:35 +0900 (Mon, 08 Jan 2018) | 3 lines

parse.y: make all NEW_NODE macros receive location

This looks a big change, but just for refactoring.
------------------------------------------------------------------------
r61665 | normal | 2018-01-08 10:11:38 +0900 (Mon, 08 Jan 2018) | 47 lines

zlib: reduce garbage on Zlib::GzipReader#readpartial

For garbage-concious users who use the `outbuf' argument of
`readpartial' to supply a destination buffer, this provides
a drastic reduction in garbage when inflating large inputs
in a streaming fashion.

This results in a anonymous RSS reduction in the reader
similar to the reduction in the writer from r61631.

Results using the test script from r61631
<https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61631>

Before:

        writer   7.359999   0.000000   7.359999 (  7.360639)
        writer RssAnon:     4040 kB
        reader   6.346667   0.070000   6.416667 (  7.387654)
        reader RssAnon:    98272 kB

After:

        writer   7.309999   0.000000   7.309999 (  7.310651)
        writer RssAnon:	    4048 kB
        reader   6.146666   0.003333   6.149999 (  7.334868)
        reader RssAnon:	    4300 kB

* ext/zlib/zlib.c (struct read_raw_arg): new struct
  (gzfile_read_raw_partial): use read_raw_arg
  (gzfile_read_raw_rescue): ditto
  (gzfile_read_raw): accept outbuf, use read_raw_arg
  (gzfile_read_raw_ensure): accept outbuf
  (gzfile_read_header): ditto
  (gzfile_check_footer): ditto
  (gzfile_read_more): ditto
  (gzfile_read_raw_until_zero): adjust for changes
  (gzfile_fill): ditto
  (gzfile_readpartial): ditto
  (gzfile_read_all): ditto
  (gzfile_getc): ditto
  (gzfile_reader_end_run): ditto
  (gzfile_reader_get_unused): ditto
  (rb_gzreader_initialize): ditto
  (gzreader_skip_linebreaks): ditto
  (gzreader_gets): ditto
  (zlib_gunzip_run): ditto
  [ruby-core:84660] [Feature #14319]
------------------------------------------------------------------------
r61664 | normal | 2018-01-08 10:11:33 +0900 (Mon, 08 Jan 2018) | 51 lines

open-uri: clear string after buffering

Since r58846 (in Ruby 2.5), it is safe to clear the string
yielded to Net::HTTPResponse#read_body methods.  This
reduces malloc garbage (anonymous RSS) using the Linux-only
script below:

before:  user     system      total        real
      0.030000   0.250000   0.280000 (  0.280511)
    RssAnon:	   60240 kB

 after:  user     system      total        real
      0.050000   0.223333   0.273333 (  0.273118)
    RssAnon:	    6676 kB

------
  # warning this script requires 1G free space for buffering
require 'open-uri'
require 'socket'
require 'benchmark'

s = TCPServer.new('127.0.0.1', 0)
len = 1024 * 1024 * 1024
buf = ((0..255).map(&:chr).join * 128)
nr = len / buf.size
pid = fork do
  c = s.accept
  c.readpartial(16384).clear
  c.write("HTTP/1.1 200 OK\r\n" \
	  "Content-Length: #{len}\r\n" \
          "Content-Type: application/octet-stream\r\n" \
          "\r\n")
  buf.freeze # speeds up IO#write slightly
  nr.times { c.write(buf) }
  c.close
end

addr = s.addr
open("http://#{addr[3]}:#{addr[1]}/", "rb") do |fp|
  bm = Benchmark.measure do
    while fp.read(16384, buf)
    end
  end
  puts bm
end
puts File.readlines("/proc/#$$/status").grep(/RssAnon/)[0]
Process.waitpid2(pid)
------

* lib/open-uri.rb: clear string yielded by Net::HTTPResponse#read_body
  [ruby-core:84662] [Feature #14320]
------------------------------------------------------------------------
r61663 | normal | 2018-01-08 09:34:47 +0900 (Mon, 08 Jan 2018) | 41 lines

net/protocol: read directly into rbuf if it's empty

There's no need to allocate a temporary string when @rbuf is
empty, we can use it as the read_nonblock destination buffer to
save both allocation overhead and avoid a later memcpy.

This results in a halving user CPU time and tiny memory
reduction with the script below:

             user     system      total        real
before   0.603333   0.539999   1.143332 (  1.143347)
       RssAnon:     5624 kB

after    0.283334   0.560000   0.843334 (  0.846072)
       RssAnon:     5592 kB

------
require 'net/http'
require 'benchmark'
s = TCPServer.new('127.0.0.1', 0)
len = 1024 * 1024 * 1024 * 2
pid = fork do
  c = s.accept
  c.readpartial(16384).clear
  c.send("HTTP/1.0 200 OK\r\nContent-Length: #{len}\r\n\r\n", Socket::MSG_MORE)
  IO.copy_stream('/dev/zero', c, len)
  c.close
end

addr = s.addr
Net::HTTP.start(addr[3], addr[1]) do |http|
  http.request_get('/') do |res|
    puts(Benchmark.measure { res.read_body(&:clear) })
  end
end
puts File.readlines("/proc/self/status").grep(/RssAnon/)[0]
Process.waitpid2(pid)
------

* lib/net/protocol.rb (rbuf_fill): avoid allocation if rbuf is empty
  [ruby-core:84678] [Feature #14326]
------------------------------------------------------------------------
r61662 | normal | 2018-01-08 09:34:42 +0900 (Mon, 08 Jan 2018) | 7 lines

net/protocol: use binary string buffers

Not an encoding expert, but this seems necessary for the next
change.  All of the IO#read, IO#read_nonblock and related
methods will return a binary string when given a length
argument; so anything appended to these buffers via <<
will be binary.
------------------------------------------------------------------------
r61659 | ko1 | 2018-01-08 04:18:49 +0900 (Mon, 08 Jan 2018) | 19 lines

Speedup `block.call` [Feature #14330]

* insns.def (getblockparamproxy): introduce new instruction to return
  the `rb_block_param_proxy` object if possible. This object responds
  to `call` method and invoke given block (completely similar to `yield`).

* method.h (OPTIMIZED_METHOD_TYPE_BLOCK_CALL): add new optimized call type
  which is for `rb_block_param_proxy.cal`.

* vm_insnhelper.c (vm_call_method_each_type): ditto.

* vm_insnhelper.c (vm_call_opt_block_call): ditto.

* vm_core.h (BOP_CALL, PROC_REDEFINED_OP_FLAG): add check for `Proc#call`
  redefinition.

* compile.c (iseq_compile_each0): compile to use new insn
  `getblockparamproxy` for method call.

------------------------------------------------------------------------
r61658 | stomar | 2018-01-08 02:49:46 +0900 (Mon, 08 Jan 2018) | 1 line

lib/scanf.rb: [DOC] fix typos
------------------------------------------------------------------------
r61657 | svn | 2018-01-08 02:47:54 +0900 (Mon, 08 Jan 2018) | 1 line

* 2018-01-08
------------------------------------------------------------------------
r61656 | stomar | 2018-01-08 02:47:53 +0900 (Mon, 08 Jan 2018) | 1 line

doc/NEWS-2.5.0: improve language
------------------------------------------------------------------------
r61655 | mame | 2018-01-07 21:55:10 +0900 (Sun, 07 Jan 2018) | 1 line

node.c: fix SEGV of `->(a:){}` when --dump=parsetree
------------------------------------------------------------------------
r61654 | nobu | 2018-01-07 20:51:30 +0900 (Sun, 07 Jan 2018) | 1 line

parse.y: do not overwrite case_body position
------------------------------------------------------------------------
r61653 | nobu | 2018-01-07 20:51:29 +0900 (Sun, 07 Jan 2018) | 1 line

parse.y: set case_body line position to args
------------------------------------------------------------------------
r61652 | nobu | 2018-01-07 18:44:34 +0900 (Sun, 07 Jan 2018) | 1 line

parse.y: removed unused macro new_command_call
------------------------------------------------------------------------
r61651 | nobu | 2018-01-07 18:36:48 +0900 (Sun, 07 Jan 2018) | 3 lines

parse.y: nd_line of new_qcall

* parse.y (new_qcall): set nd_line to the method name location.
------------------------------------------------------------------------
r61650 | nobu | 2018-01-07 14:38:37 +0900 (Sun, 07 Jan 2018) | 5 lines

eval_error.c: reset in each line

* eval_error.c (print_errinfo): reset in each line, so that
  Exception#full_message ends with a newline and puts will not
  print an extra newline.
------------------------------------------------------------------------
r61649 | nobu | 2018-01-07 13:57:04 +0900 (Sun, 07 Jan 2018) | 4 lines

eval_error.c: concat directly

* eval_error.c (write_warn, write_warn2): get rid of unnecessary
  intermediate string objects, concat directly.
------------------------------------------------------------------------
r61648 | nobu | 2018-01-07 13:23:55 +0900 (Sun, 07 Jan 2018) | 4 lines

test_exception.rb: fix message

* test/ruby/test_exception.rb (test_full_message): fix method name
  in a message.
------------------------------------------------------------------------
r61647 | nobu | 2018-01-07 13:16:31 +0900 (Sun, 07 Jan 2018) | 4 lines

eval_error.c: renamed an argument

* eval_error.c (print_errinfo): renamed argument `colored` as
  `highlight`, as it does not use colors.
------------------------------------------------------------------------
r61646 | nobu | 2018-01-07 13:10:06 +0900 (Sun, 07 Jan 2018) | 4 lines

io.c: rb_stderr_to_original_p

* io.c (rb_stderr_to_original_p): hoist out the condition to write
  messages to the stderr FD directly.
------------------------------------------------------------------------
r61645 | hsbt | 2018-01-07 12:14:19 +0900 (Sun, 07 Jan 2018) | 3 lines

Added bundler for `test-bundled-gems` dependency.

  rake, did_you_mean, test-unit depends on bundler.
------------------------------------------------------------------------
r61644 | nobu | 2018-01-07 12:10:00 +0900 (Sun, 07 Jan 2018) | 4 lines

prelude.rb: eliminate a private constant

* prelude.rb (Thread.exclusive): eliminate a private constant,
  MUTEX_FOR_THREAD_EXCLUSIVE.
------------------------------------------------------------------------
r61643 | nobu | 2018-01-07 11:49:27 +0900 (Sun, 07 Jan 2018) | 3 lines

extmk.rb: exclude recursively

* ext/extmk.rb: exclude extension libraries recursively.
------------------------------------------------------------------------
r61642 | svn | 2018-01-07 10:20:11 +0900 (Sun, 07 Jan 2018) | 1 line

* 2018-01-07
------------------------------------------------------------------------
r61641 | mrkn | 2018-01-07 10:20:10 +0900 (Sun, 07 Jan 2018) | 3 lines

doc/NEWS-2.5.0: Fix the description of backtrace format change

* The backtrace format change is affected by $stderr, but not STDERR.
------------------------------------------------------------------------
r61640 | normal | 2018-01-06 18:23:43 +0900 (Sat, 06 Jan 2018) | 4 lines

Revert "net/protocol: use binary string buffers"

Oops, not ready, yet (will work on this tomorrow :x).
This reverts commit r61638
------------------------------------------------------------------------
r61639 | normal | 2018-01-06 18:21:35 +0900 (Sat, 06 Jan 2018) | 11 lines

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]
------------------------------------------------------------------------
r61638 | normal | 2018-01-06 18:21:12 +0900 (Sat, 06 Jan 2018) | 4 lines

net/protocol: use binary string buffers

Not an encoding expert, but this seems necessary for the next
change.
------------------------------------------------------------------------
r61637 | nobu | 2018-01-06 18:01:02 +0900 (Sat, 06 Jan 2018) | 5 lines

test_process.rb: skip not-found groups

* test/ruby/test_process.rb (test_execopts_gid): under some
  network configuration (maybe with Open Directory but
  disconnected temporarily), some groups may fail to find.
------------------------------------------------------------------------
r61636 | nobu | 2018-01-06 17:44:17 +0900 (Sat, 06 Jan 2018) | 4 lines

string.c: out-of-bounds access

* string.c (rb_str_enumerate_lines): fix out-of-bounds access when
  record separator is longer than the last element.  [Bug #14257]
------------------------------------------------------------------------
r61635 | kazu | 2018-01-06 13:55:07 +0900 (Sat, 06 Jan 2018) | 3 lines

Update Status Code

see https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
------------------------------------------------------------------------
r61634 | kazu | 2018-01-06 13:55:06 +0900 (Sat, 06 Jan 2018) | 3 lines

Add 103 Early Hints

see https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
------------------------------------------------------------------------
r61633 | kazu | 2018-01-06 13:55:05 +0900 (Sat, 06 Jan 2018) | 1 line

Specify frozen_string_literal: true
------------------------------------------------------------------------
r61632 | normal | 2018-01-06 06:14:19 +0900 (Sat, 06 Jan 2018) | 10 lines

io.c: clear Strings we create for IO.copy_stream

While we can't recycle strings after giving them rb_funcall*,
we can reduce their malloc overhead by resizing them to zero.
This only affects cases where either `src' or `dst' is a non-IO
object and either `copy_length' is passed or there is
pre-existing data in the read buffer.

* io.c (copy_stream_fallback_body): clear when done with `copy_length'
  (copy_stream_body): clear when done with pre-existing read buffer
------------------------------------------------------------------------
r61631 | normal | 2018-01-06 05:48:55 +0900 (Sat, 06 Jan 2018) | 76 lines

zlib: reduce garbage on gzip writes (deflate)

Zlib::GzipWriter generated large amounts of garbage from
(struct zstream).input.  Reuse the .input field when it is
hidden, and recycle it when its lifetime is over.  This change
alone reduced memory usage of the writer from 90MB to 4.5MB.

For the detached buffer of compressed data used by
gzfile_write_raw, we can only clear the string (not recycle it)
since user code may hold references to it (but the data would be
clobbered, anyways).  This reduced memory usage slightly by
around 0.5MB (because it's smaller compressed data).

Combined, these changes reduce the anonymous RSS memory of a
dedicated writer process from over 90MB to under 4MB.

before:

    #      user     system      total        real

    writer   7.823332   0.053333   7.876665 (  7.881464)
    writer RssAnon:    92944 kB
    reader   6.969999   0.076666   7.046665 (  7.906377)
    reader RssAnon:   109820 kB

after:

    writer   7.359999   0.000000   7.359999 (  7.360639)
    writer RssAnon:     4040 kB
    reader   6.346667   0.070000   6.416667 (  7.387654)
    reader RssAnon:    98272 kB

Script used:
-------
require 'zlib'
require 'benchmark'
nr = 16384 * 2

def stats(pfx, bm)
  str = "#{bm}#{File.readlines("/proc/#$$/status").grep(/^RssAnon:/)[0]}"
  puts str.gsub!(/^/m, pfx)
end

rd, wr = IO.pipe
pid = fork do
  buf = ((0..255).map(&:chr).join * 128).freeze
  rd.close
  gzip = Zlib::GzipWriter.new(wr)
  bm = Benchmark.measure do
    nr.times { gzip.write(buf) }
    gzip.close
    wr.close
  end
  stats('writer ', bm)
end

wr.close
buf = ''
gunzip = Zlib::GzipReader.new(rd)
n = 0
bm = Benchmark.measure do
  begin
    gunzip.readpartial(16384, buf)
    n += buf.size
  rescue EOFError
    break
  end while true
end
stats('reader ', bm)
Process.waitall
-------
* ext/zlib/zlib.c (zstream_discard_input): reuse or recycle hidden input
  (zstream_reset_input): clear hidden input
  (zstream_run): detach input and recycle after use
  (gzfile_write_raw): clear buffer after write
  [ruby-core:84638] [Feature #14315]
------------------------------------------------------------------------
r61627 | naruse | 2018-01-06 05:38:02 +0900 (Sat, 06 Jan 2018) | 1 line

Extend timeout of test_clear_unreachable_keyword_args
------------------------------------------------------------------------
r61626 | naruse | 2018-01-06 05:36:46 +0900 (Sat, 06 Jan 2018) | 3 lines

Show how many seconds it timeouts

By this we can easily extend timeout.
------------------------------------------------------------------------
r61625 | naruse | 2018-01-06 04:24:48 +0900 (Sat, 06 Jan 2018) | 1 line

extend timeout to 15 seconds for ARMv8 environment
------------------------------------------------------------------------
r61624 | ko1 | 2018-01-06 02:51:10 +0900 (Sat, 06 Jan 2018) | 11 lines

Speedup `Proc#call` [Feature #14318]

* vm_insnhelper.c (vm_call_opt_call): do same process of `yield` instead of
  invoking `Proc`.

* vm_insnhelper.c (vm_invoke_block): invoke given block handler instead of
  using a block handler in the current frame.
  Also do not check blcok handler here (caller should check it).

* insns.def (invokeblock): catch up this fix.

------------------------------------------------------------------------
r61623 | mame | 2018-01-06 01:04:02 +0900 (Sat, 06 Jan 2018) | 1 line

parse.y: Use nd_set_loc instead of direct modification to nd_loc
------------------------------------------------------------------------
r61622 | mame | 2018-01-06 01:04:00 +0900 (Sat, 06 Jan 2018) | 3 lines

parse.y: Remove unneeded code

Because block_append sets prelude->nd_loc.
------------------------------------------------------------------------
r61621 | mame | 2018-01-06 00:44:03 +0900 (Sat, 06 Jan 2018) | 3 lines

parse.y: make method_add_block accept location

Also, use method_add_block instead of direct modification to nd_iter.
------------------------------------------------------------------------
r61620 | svn | 2018-01-06 00:16:43 +0900 (Sat, 06 Jan 2018) | 1 line

* 2018-01-06
------------------------------------------------------------------------
r61619 | mame | 2018-01-06 00:16:42 +0900 (Sat, 06 Jan 2018) | 1 line

node_h (NEW_DEFN): remove unused argument
------------------------------------------------------------------------
r61618 | nobu | 2018-01-05 23:23:23 +0900 (Fri, 05 Jan 2018) | 6 lines

compile.c: fix stack consistency error

* compile.c (iseq_peephole_optimize): fix stack consistency error
  from return in loop, by adding extra `pop` when replacing `jump`
  with `leave`, which is never reached but needed to adjust sp
  calculation.  [ruby-core:84589] [Bug #14273]
------------------------------------------------------------------------
r61617 | nobu | 2018-01-05 23:23:22 +0900 (Fri, 05 Jan 2018) | 4 lines

compile.c: remove more unreachable chunk

* compile.c (remove_unreachable_chunk): remove beyond labels to be
  removed.
------------------------------------------------------------------------
r61616 | k0kubun | 2018-01-05 20:44:31 +0900 (Fri, 05 Jan 2018) | 9 lines

marshal.c: allow marshalling keyword_init struct

struct.c: define rb_struct_s_keyword_init to shared with marshal.c

internal.h: add the declaration to be used by marshal.c

test/ruby/test_marshal.rb: add test for Bug#14314

[Feature #14314] [ruby-core:84629]
------------------------------------------------------------------------
r61615 | mame | 2018-01-05 20:39:27 +0900 (Fri, 05 Jan 2018) | 1 line

node.c: factor out the part of operator output into F_OPERATOR
------------------------------------------------------------------------
r61614 | mame | 2018-01-05 20:39:25 +0900 (Fri, 05 Jan 2018) | 3 lines

node.c: remove unused macro F_OPTION

Follow up of r61610
------------------------------------------------------------------------
r61613 | mame | 2018-01-05 19:46:24 +0900 (Fri, 05 Jan 2018) | 1 line

node.c (NODE_OP_CDECL): fix a typo bug.
------------------------------------------------------------------------
r61612 | normal | 2018-01-05 19:30:40 +0900 (Fri, 05 Jan 2018) | 5 lines

zlib: remove redundant rb_obj_reveal

No need to reveal strings freshly created with rb_str_new.

* ext/zlib/zlib.c (zstream_detach_input): remove redundant call
------------------------------------------------------------------------
r61611 | normal | 2018-01-05 18:41:21 +0900 (Fri, 05 Jan 2018) | 11 lines

tool/rbinstall.rb: allow owner to have write permissions

Denying write permissions to the owner seems wrong.

Oddly, this problem only manifests in the "ruby_2_4" branch when
installing bundled gems (rake and friends).  It does not happen
with "ruby_2_3", or "trunk", so it might be related to RubyGems
changes.

* tool/rbinstall.rb: set umask to 022
  [ruby-core:84420] [Bug #14227]
------------------------------------------------------------------------
r61610 | mame | 2018-01-05 17:59:23 +0900 (Fri, 05 Jan 2018) | 8 lines

node.h: remove NODE_PRELUDE

NODE_PRELUDE contains a `BEGIN` node, a main node, and compile_option.
This node is assumed that it must be located immediately under the root
NODE_SCOPE, but this strange assumption is not so good, IMO.

This change removes the assumtion; it integrates the former two nodes by
block_append, and moves compile_option into rb_ast_body_t.
------------------------------------------------------------------------
r61609 | mame | 2018-01-05 17:59:22 +0900 (Fri, 05 Jan 2018) | 1 line

make rb_iseq_new* accept rb_ast_body_t instead of NODE*
------------------------------------------------------------------------
r61608 | mame | 2018-01-05 17:59:20 +0900 (Fri, 05 Jan 2018) | 1 line

node.h: define rb_ast_body_t and restructure rb_ast_t
------------------------------------------------------------------------
r61607 | mame | 2018-01-05 16:47:51 +0900 (Fri, 05 Jan 2018) | 1 line

node.c: constify NODE* arguments in node.c
------------------------------------------------------------------------
r61606 | ko1 | 2018-01-05 16:25:55 +0900 (Fri, 05 Jan 2018) | 2 lines

* insns.def (invokeblock): `calling->recv` is not used.

------------------------------------------------------------------------
r61605 | hsbt | 2018-01-05 15:18:57 +0900 (Fri, 05 Jan 2018) | 1 line

Try to fix Travis CI configuration.
------------------------------------------------------------------------
r61604 | mame | 2018-01-05 14:27:25 +0900 (Fri, 05 Jan 2018) | 1 line

parse.y: refactor out ast generation code of two rb_parser_compile_*
------------------------------------------------------------------------
r61603 | ko1 | 2018-01-05 11:25:26 +0900 (Fri, 05 Jan 2018) | 7 lines

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.

------------------------------------------------------------------------
r61602 | normal | 2018-01-05 11:22:23 +0900 (Fri, 05 Jan 2018) | 44 lines

net/protocol: optimize large read case

There are several places where rbuf_consume is called with
@rbuf.size as its length arg; simplify that case by avoiding
the slow String#slice! operation in favor of a lightweight
replacement.

The following script exhibits reduced memory usage and
runtimes using the time(1) command:

	2.9s =>  2.6s
	70MB => 12 MB

---------
require 'net/http'
require 'digest/md5'
Thread.abort_on_exception = true
s = TCPServer.new('127.0.0.1', 0)
len = 1024 * 1024 * 1024
th = Thread.new do
  c = s.accept
  c.readpartial(16384)
  c.write("HTTP/1.0 200 OK\r\nContent-Length: #{len}\r\n\r\n")
  IO.copy_stream('/dev/zero', c, len)
  c.close
end

addr = s.addr
Net::HTTP.start(addr[3], addr[1]) do |http|
  http.request_get('/') do |res|
    dig = Digest::MD5.new
    res.read_body { |buf|
      dig.update(buf)
      # String#clear is important to reduce malloc overhead,
      # but most Ruby programmers don't do this :<
      buf.clear
    }
    puts dig.hexdigest
  end
end
----------

* lib/net/protocol (rbuf_consume): optimize for @rbuf.size == len
  [Feature #14268]
------------------------------------------------------------------------
r61601 | mame | 2018-01-05 09:49:41 +0900 (Fri, 05 Jan 2018) | 6 lines

Refactor ISEQ_TYPE_DEFINED_GUARD out

This commit removes ISEQ_TYPE_DEFINED_GUARD because it is no longer
needed.  And this introduces ISEQ_TYPE_PLAIN which means that the iseq
does nothing special but just wrap an expression.  Currently, this is
used for once execution: `/foo#{ bar }baz/o`.
------------------------------------------------------------------------
r61600 | svn | 2018-01-05 09:49:41 +0900 (Fri, 05 Jan 2018) | 1 line

* 2018-01-05
------------------------------------------------------------------------
r61599 | mame | 2018-01-05 09:49:40 +0900 (Fri, 05 Jan 2018) | 4 lines

compile.c: refactoring of defined? exception handler

This commit removes tmp_node trick to create a special exception handler
for `defined?`.
------------------------------------------------------------------------
r61598 | mame | 2018-01-04 21:56:49 +0900 (Thu, 04 Jan 2018) | 8 lines

test/ruby/test_io.rb: relax RLIMIT_NPROC for invocation of ruby

This limit seems to be too restrict.  It sometimes produces the
following warning when running `make test-all`:
```
TestIO#test_close_on_exec<main>: warning: pthread_create failed for
timer: Resource temporarily unavailable, scheduling broken
```
------------------------------------------------------------------------
r61597 | mame | 2018-01-04 21:47:22 +0900 (Thu, 04 Jan 2018) | 1 line

node.h: add NODE_ONCE instead of reuse of NODE_SCOPE
------------------------------------------------------------------------
r61596 | shyouhei | 2018-01-04 16:51:19 +0900 (Thu, 04 Jan 2018) | 1 line

suppress warnings for long string literals
------------------------------------------------------------------------
r61595 | shyouhei | 2018-01-04 16:51:18 +0900 (Thu, 04 Jan 2018) | 3 lines

define NO_LONG_LONG appropriately

as documented above.
------------------------------------------------------------------------
r61594 | shyouhei | 2018-01-04 16:51:17 +0900 (Thu, 04 Jan 2018) | 7 lines

ULL suffix is a C99ism

Don't assume long long == 8 bytes.

If you can assume C99, there are macros named UINT64_C and
such for appropriate integer literal suffixes.
If you can't, no way but do a bitwise or.
------------------------------------------------------------------------
r61593 | shyouhei | 2018-01-04 16:51:16 +0900 (Thu, 04 Jan 2018) | 3 lines

ULL suffix is a C99ism

... and why not just use ~0 instead?
------------------------------------------------------------------------
r61592 | mame | 2018-01-04 16:07:49 +0900 (Thu, 04 Jan 2018) | 3 lines

iseq.c: Refactor out rb_iseq_new_ifunc from rb_iseq_new_with_opt

It is too error-prone to pass IMEMO_IFUNC object as NODE*.
------------------------------------------------------------------------
r61591 | mame | 2018-01-04 13:44:16 +0900 (Thu, 04 Jan 2018) | 1 line

iseq.c (rb_iseq_new_with_opt): handle the case where node is imemo_func
------------------------------------------------------------------------
r61590 | nobu | 2018-01-04 10:46:01 +0900 (Thu, 04 Jan 2018) | 1 line

insns_info.inc.tmpl: share large tablese
------------------------------------------------------------------------
r61589 | nobu | 2018-01-04 10:30:20 +0900 (Thu, 04 Jan 2018) | 4 lines

insns_info.inc: position independent

* template/insns_info.inc.tmpl (insn_name_info): make position
  independent for large strings.
------------------------------------------------------------------------
r61588 | nobu | 2018-01-04 09:44:40 +0900 (Thu, 04 Jan 2018) | 5 lines

Fix doc typo in Symbol#to_proc [Fix GH-1785]

[ci skip]

From: Dimitris Zorbas <dimitrisplusplus@gmail.com>
------------------------------------------------------------------------
r61587 | nobu | 2018-01-04 09:26:51 +0900 (Thu, 04 Jan 2018) | 4 lines

compile.c: next label

* compile.c (compile_next): label for jump to the end of block is
  removable.
------------------------------------------------------------------------
r61586 | nobu | 2018-01-04 09:26:50 +0900 (Thu, 04 Jan 2018) | 4 lines

test_iseq_load.rb: set location

* test/-ext-/iseq_load/test_iseq_load.rb (assert_iseq_roundtrip):
  set path and line number from callers.
------------------------------------------------------------------------
r61585 | svn | 2018-01-04 08:05:03 +0900 (Thu, 04 Jan 2018) | 1 line

* 2018-01-04
------------------------------------------------------------------------
r61584 | nobu | 2018-01-04 08:05:02 +0900 (Thu, 04 Jan 2018) | 7 lines

compile.c: fix disasm dump

* compile.c (DECL_ANCHOR): initialize as anchor type, which is not
  a valid iseq element.

* compile.c (BADINSN_DUMP): dump from the first element, excluding
  the anchor itself.
------------------------------------------------------------------------
r61578 | nobu | 2018-01-03 22:58:27 +0900 (Wed, 03 Jan 2018) | 4 lines

compile.c: label sp

* compile.c (dump_disasm_list_with_cursor): show stack depth for
  each label.
------------------------------------------------------------------------
r61577 | nobu | 2018-01-03 18:19:11 +0900 (Wed, 03 Jan 2018) | 4 lines

dln.c: dln_incompatible_library_p

* dln.c (dln_incompatible_library_p): renamed as the error message
  with dln prefix, since it is not bound to xmalloc restrictively.
------------------------------------------------------------------------
r61576 | nobu | 2018-01-03 18:05:18 +0900 (Wed, 03 Jan 2018) | 4 lines

dln.c: xmalloc_mismatch_p with dlopen

* dln.c (xmalloc_mismatch_p): define only when using dlopen,
  otherwise dlsym is not available too, and should be used then.
------------------------------------------------------------------------
r61575 | shyouhei | 2018-01-03 10:43:17 +0900 (Wed, 03 Jan 2018) | 3 lines

delete extra #undef [ci skip]

Sorry, this was a garbage.
------------------------------------------------------------------------
r61574 | normal | 2018-01-03 06:51:59 +0900 (Wed, 03 Jan 2018) | 14 lines

variable.c: fix autoload stack space regression

r61560 ("offsetof(type, foo.bar) is (arguably) a GCCism")
introduced 16 bytes of stack overhead on 64-bit systems.
Remove that overhead and cast, instead.  While we're at it,
restore the "waitq" name to clarify the purpose of the field.

(This is one unfortunate consequence of the CC0 ccan/list.h
 implementation compared to the *GPL ones in glibc/urcu/linux)

* variable.c (struct autoload_state): remove head field, clarify naming
  (autoload_reset): cast and adjust
  (autoload_sleep_done): ditto
  (rb_autoload_load): ditto
------------------------------------------------------------------------
r61573 | normal | 2018-01-03 06:23:47 +0900 (Wed, 03 Jan 2018) | 6 lines

thread_pthread.c: use container_of

It's easier to read this macro from ccan than open-coding pointer
arithmetic.

thread_pthread.c (ubf_wakeup_all_threads): use container_of
------------------------------------------------------------------------
r61572 | svn | 2018-01-03 00:29:59 +0900 (Wed, 03 Jan 2018) | 1 line

* 2018-01-03
------------------------------------------------------------------------
r61571 | ko1 | 2018-01-03 00:29:58 +0900 (Wed, 03 Jan 2018) | 9 lines

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.

------------------------------------------------------------------------
r61570 | shyouhei | 2018-01-02 15:46:40 +0900 (Tue, 02 Jan 2018) | 1 line

include missing header
------------------------------------------------------------------------
r61569 | shyouhei | 2018-01-02 15:42:05 +0900 (Tue, 02 Jan 2018) | 73 lines

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)
------------------------------------------------------------------------
r61568 | shyouhei | 2018-01-02 15:42:04 +0900 (Tue, 02 Jan 2018) | 80 lines

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)
------------------------------------------------------------------------
r61567 | shyouhei | 2018-01-02 15:42:03 +0900 (Tue, 02 Jan 2018) | 3 lines

fix uninitialized variable

Likewise this can easily be noticed if you read the warnings.
------------------------------------------------------------------------
r61566 | shyouhei | 2018-01-02 15:42:02 +0900 (Tue, 02 Jan 2018) | 50 lines

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)
------------------------------------------------------------------------
r61565 | shyouhei | 2018-01-02 15:42:01 +0900 (Tue, 02 Jan 2018) | 48 lines

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)
------------------------------------------------------------------------
r61564 | shyouhei | 2018-01-02 15:42:00 +0900 (Tue, 02 Jan 2018) | 47 lines

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)
------------------------------------------------------------------------
r61563 | shyouhei | 2018-01-02 15:41:59 +0900 (Tue, 02 Jan 2018) | 46 lines

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)
------------------------------------------------------------------------
r61562 | shyouhei | 2018-01-02 15:41:58 +0900 (Tue, 02 Jan 2018) | 37 lines

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)
------------------------------------------------------------------------
r61561 | shyouhei | 2018-01-02 15:41:57 +0900 (Tue, 02 Jan 2018) | 5 lines

fix memory leak (FOUND BY A COMPILER WARNING)

Confusion of argument order ignores this st_free_table.
Results in garbaged table not GCed.
Easily noticable when you read the compiper warnings.
------------------------------------------------------------------------
r61560 | shyouhei | 2018-01-02 15:41:56 +0900 (Tue, 02 Jan 2018) | 15 lines

offsetof(type, foo.bar) is (arguably) a GCCism

TL;DR see http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2031.htm

Suppose we have:

struct X {
  struct Y {
    z_t z;
  } y;
} x;

then, you _cant_ infer offsetof(struct X, y.z). The ISO C99 section
7.17 says nothing about such situation. At least clang warns this
being an extension to the language (-Wextended-offsetof).
------------------------------------------------------------------------
r61559 | shyouhei | 2018-01-02 15:41:55 +0900 (Tue, 02 Jan 2018) | 4 lines

comparing function pointer versus void* is a GCCism

However dlsym() requires such feature so this function is non-
portable by nature.  Cannot but suppress warning.
------------------------------------------------------------------------
r61558 | shyouhei | 2018-01-02 15:41:54 +0900 (Tue, 02 Jan 2018) | 1 line

label as lvalue is a GCCism
------------------------------------------------------------------------
r61557 | shyouhei | 2018-01-02 15:41:53 +0900 (Tue, 02 Jan 2018) | 3 lines

statement experssion is a GCCism

should mark as such.
------------------------------------------------------------------------
r61556 | shyouhei | 2018-01-02 15:41:52 +0900 (Tue, 02 Jan 2018) | 1 line

enum value grater than int is a GCCism
------------------------------------------------------------------------
r61555 | shyouhei | 2018-01-02 15:41:51 +0900 (Tue, 02 Jan 2018) | 1 line

_Static_assert is a C11ism
------------------------------------------------------------------------
r61554 | shyouhei | 2018-01-02 15:41:50 +0900 (Tue, 02 Jan 2018) | 4 lines

bit-fields other than int is a C99ism

To be precise C90 says "A bit-field may have type int, unsigned
int, or signed int". It is clear that char or enum are NG.
------------------------------------------------------------------------
r61553 | shyouhei | 2018-01-02 15:41:49 +0900 (Tue, 02 Jan 2018) | 8 lines

initializer paren-string `{("str")}` is a C99ism

First, `"str"` is a string constant but `("str")` is not.  It is a
random expression whose type happen to be const char*.  Second,
non-constant initializer element is forbidden in C90.  Mixture of
these two results in the fact that `{("str")}` is a C99ism.

Just delete the parens and everything goes well.
------------------------------------------------------------------------
r61552 | shyouhei | 2018-01-02 15:41:49 +0900 (Tue, 02 Jan 2018) | 1 line

string literal longer than 509 characters is a C99ism
------------------------------------------------------------------------
r61551 | shyouhei | 2018-01-02 15:41:48 +0900 (Tue, 02 Jan 2018) | 1 line

flexible array member is a C99ism
------------------------------------------------------------------------
r61550 | shyouhei | 2018-01-02 15:41:47 +0900 (Tue, 02 Jan 2018) | 1 line

long long is a C99ism
------------------------------------------------------------------------
r61549 | shyouhei | 2018-01-02 15:41:46 +0900 (Tue, 02 Jan 2018) | 1 line

comma at the end of enum is a C99ism
------------------------------------------------------------------------
r61548 | shyouhei | 2018-01-02 15:41:45 +0900 (Tue, 02 Jan 2018) | 1 line

__VA_ARGS__ is a C99ism
------------------------------------------------------------------------
r61547 | shyouhei | 2018-01-02 15:41:44 +0900 (Tue, 02 Jan 2018) | 3 lines

long long is a C99sim

Don't assume 8-bytes integers == "long long".
------------------------------------------------------------------------
r61546 | shyouhei | 2018-01-02 15:41:43 +0900 (Tue, 02 Jan 2018) | 3 lines

string literal longer than 509 characters is a C99ism

Should avoid such thing.
------------------------------------------------------------------------
r61545 | shyouhei | 2018-01-02 15:41:43 +0900 (Tue, 02 Jan 2018) | 3 lines

"%z" printf format specifier is a C99ism

PRIxSIZE is also.  But shimmed in ruby.h
------------------------------------------------------------------------
r61544 | shyouhei | 2018-01-02 15:41:42 +0900 (Tue, 02 Jan 2018) | 1 line

int (*)(void) is incompatible with void*
------------------------------------------------------------------------
r61543 | shyouhei | 2018-01-02 15:41:41 +0900 (Tue, 02 Jan 2018) | 3 lines

rb_insn_func_t is incompatible with void*

Why not just use void* ?
------------------------------------------------------------------------
r61542 | shyouhei | 2018-01-02 15:41:40 +0900 (Tue, 02 Jan 2018) | 4 lines

explicit cast to void* required for %p

These functions take variadic arguments so no automatic type
promotion is expected.  You have to do it by hand.
------------------------------------------------------------------------
r61541 | shyouhei | 2018-01-02 15:41:39 +0900 (Tue, 02 Jan 2018) | 6 lines

suppress warning for clang

In this function, "volatile" is specified twice in macro-expanded
`VAR_INITIALIZED(cont)` part.  That is a problem in fact.  However
I don't want to touch this line because it is already a messy
workaround for clang SEGV.  Let me just ignore.
------------------------------------------------------------------------
r61540 | nobu | 2018-01-02 13:24:32 +0900 (Tue, 02 Jan 2018) | 3 lines

parse.y: fix typo

* parse.y (singleton): fix typo, show the expression.
------------------------------------------------------------------------
r61539 | svn | 2018-01-02 12:00:15 +0900 (Tue, 02 Jan 2018) | 1 line

* 2018-01-02
------------------------------------------------------------------------
r61538 | nobu | 2018-01-02 12:00:13 +0900 (Tue, 02 Jan 2018) | 4 lines

parse.y: code end position

* parse.y (parser_yyerror): use the given location as the end of
  erred code, instead of the current position.
------------------------------------------------------------------------
r61537 | mame | 2018-01-01 22:18:55 +0900 (Mon, 01 Jan 2018) | 5 lines

vm_core.h: make the algorithm of get_insn_info selectable

Currently, VM_INSN_INFO_TABLE_IMPL == 0 means linear search, and
VM_INSN_INFO_TABLE_IMPL == 1 means binary search.  I plan to add
succinct bitvector algorithm later.
------------------------------------------------------------------------
r61536 | mame | 2018-01-01 21:51:21 +0900 (Mon, 01 Jan 2018) | 7 lines

iseq.h: Extract position array from iseq_insn_info_entry

This makes TracePoint a bit fast by reducing cache misses of
`get_insn_info_binary_search`.

Also, I plan to use succinct bitvector algorithm for `get_insn_info`
instead of binary search.  This change will make it easy.
------------------------------------------------------------------------
r61535 | mame | 2018-01-01 18:30:06 +0900 (Mon, 01 Jan 2018) | 3 lines

iseq.c: fix build error when VM_CHECK_MODE is enabled

Follow up of r61534.  Sorry.
------------------------------------------------------------------------
r61534 | mame | 2018-01-01 18:16:27 +0900 (Mon, 01 Jan 2018) | 4 lines

vm_core.h: refactoring of insns_info

This factors rb_iseq_constant_body#insns_info and #insns_info_size to
struct iseq_insn_info.
------------------------------------------------------------------------
r61533 | nobu | 2018-01-01 10:04:50 +0900 (Mon, 01 Jan 2018) | 1 line

parse.y: highlight yyerror
------------------------------------------------------------------------
r61532 | kazu | 2018-01-01 09:13:54 +0900 (Mon, 01 Jan 2018) | 1 line

[DOC] doc/NEWS-2.5.0: remove trailing comma [ci skip]
------------------------------------------------------------------------
r61531 | hsbt | 2018-01-01 08:29:59 +0900 (Mon, 01 Jan 2018) | 3 lines

Removed debug code. It is inconsistency in rubygems upsteream.

  Revert r58657, r58660, r58692, r58723.
------------------------------------------------------------------------
r61530 | nobu | 2018-01-01 00:05:26 +0900 (Mon, 01 Jan 2018) | 3 lines

parse.y: yyerror1

* parse.y (yyerror1): pass location to parser_yyerror.
------------------------------------------------------------------------
r61529 | svn | 2018-01-01 00:00:24 +0900 (Mon, 01 Jan 2018) | 1 line

* 2018-01-01
------------------------------------------------------------------------
r61528 | nobu | 2018-01-01 00:00:23 +0900 (Mon, 01 Jan 2018) | 4 lines

parse.y: yylloc at yyerror

* parse.y (parser_yyerror): consider the case first_loc and
  last_loc point different lines.
------------------------------------------------------------------------
r61527 | nobu | 2017-12-31 22:15:52 +0900 (Sun, 31 Dec 2017) | 4 lines

error.c: limit depth

* error.c (rb_warn_m): limit backtrace depth to reduce objects to
  be created but not used.
------------------------------------------------------------------------
r61526 | nobu | 2017-12-31 22:12:47 +0900 (Sun, 31 Dec 2017) | 3 lines

test_exception.rb: more assertions

[ruby-core:84568] [Bug #14262]
------------------------------------------------------------------------
r61525 | nobu | 2017-12-31 22:01:55 +0900 (Sun, 31 Dec 2017) | 4 lines

error.c: negative uplevel

* error.c (rb_warn_m): negative uplevel is not allowed.
  [ruby-core:84568] [Bug #14262]
------------------------------------------------------------------------
r61524 | nobu | 2017-12-31 21:21:53 +0900 (Sun, 31 Dec 2017) | 5 lines

prelude.c.tmpl: get rid of warnings on old gcc

* template/prelude.c.tmpl: ignore missing-field-initializers on
  old gcc, e.g. 4.4, which does not support pushing/popping
  diagnostics.
------------------------------------------------------------------------
r61523 | nobu | 2017-12-31 20:25:38 +0900 (Sun, 31 Dec 2017) | 4 lines

parse.y: assignable_error

* parse.y (assignable_gen): should return valid NODE always even
  on errors.  [ruby-core:84565] [Bug #14261]
------------------------------------------------------------------------
r61522 | nobu | 2017-12-31 15:53:04 +0900 (Sun, 31 Dec 2017) | 3 lines

parse.y: yylloc at yyerror

* parse.y (parser_yyerror): utilize the location given by bison.
------------------------------------------------------------------------
r61521 | ko1 | 2017-12-31 09:06:34 +0900 (Sun, 31 Dec 2017) | 13 lines

fix reset order.

* lib/rdoc/test_case.rb (setup): call `RDoc::Markup::PreProcess.reset`
  at the end of `setup` method.
  `RDoc::RDoc.new` requires `rdoc/generator/darkfish`
  and requires `rdoc/tom_doc.rb` at last. It add post_proecssor
  (at `add_post_processor`) and it fails
  `TestRDocMarkupPreProcess#test_class_post_process`.
  This issue occured only with sorted tests by alphabetical order.
  `make test-all TESTS='rdoc/test_rdoc_markup_pre_process.rb --test-order=alpha`)
  We can observe this failure with parallel test only a few times.


------------------------------------------------------------------------
r61520 | ko1 | 2017-12-31 08:06:39 +0900 (Sun, 31 Dec 2017) | 4 lines

increase test timeout.

* test/ruby/test_thread.rb (test_signal_at_join): increase timeout.

------------------------------------------------------------------------
r61519 | svn | 2017-12-31 01:38:23 +0900 (Sun, 31 Dec 2017) | 1 line

* 2017-12-31
------------------------------------------------------------------------
r61518 | ngoto | 2017-12-31 01:38:22 +0900 (Sun, 31 Dec 2017) | 8 lines

bit fields treating negative values should be declared as signed int

* internal.h (struct vm_ifunc_argc): Bit fields are unsigned by default.
  For storing nagative values to bit fields, they must be declated as
  signed int. Fix multiple test failure observed by 32-bit binaries
  compiled with Oracle Developer Studio (Solaris Studio) 12.x on
  Solaris 10 on sparc architecture. [Bug #14260]

------------------------------------------------------------------------
r61517 | mrkn | 2017-12-30 23:50:15 +0900 (Sat, 30 Dec 2017) | 6 lines

numeric.c: Fix Integer#pow with a large Fixnum modulo

* numeric.c: Fix Integer#pow with a large Fixnum modulo
  [Bug #14259] [ruby-core:84562]

* test/ruby/test_numeric.rb: add assertions for reproducing this bug.
------------------------------------------------------------------------
r61516 | nobu | 2017-12-30 21:10:43 +0900 (Sat, 30 Dec 2017) | 1 line

drb: use \A and \z
------------------------------------------------------------------------
r61515 | svn | 2017-12-30 09:00:24 +0900 (Sat, 30 Dec 2017) | 1 line

* 2017-12-30
------------------------------------------------------------------------
r61514 | normal | 2017-12-30 09:00:23 +0900 (Sat, 30 Dec 2017) | 10 lines

hash literal deduplicates like Hash#[]=

From: Eric Wong <e@80x24.org>

* hash.c (rb_hash_key_str): new function
  (hash_aset_str): use rb_hash_key_str
* internal.h: add rb_hash_key_str
* st.c (st_stringify): use rb_hash_key_str
* test/ruby/test_hash.rb (test_NEWHASH_fstring_key): dynamic key
  [ruby-core:84554] [Feature #14258]
------------------------------------------------------------------------
r61513 | nobu | 2017-12-29 21:19:03 +0900 (Fri, 29 Dec 2017) | 6 lines

string.c: chomp rs at the end

* string.c (rb_str_enumerate_lines): should chomp record separator
  only, but not a newline, at the end of the receiver as well as
  middle, if the separator is given.
  [ruby-core:84552] [Bug #14257]
------------------------------------------------------------------------
r61512 | normal | 2017-12-29 15:47:29 +0900 (Fri, 29 Dec 2017) | 6 lines

test/ruby/test_hash: minor test cleanup

Prep work for proposed behavior change:
https://bugs.ruby-lang.org/issues/14225

* test/ruby/test_hash.rb (test_tainted_string_key): assert_predicate
------------------------------------------------------------------------
r61511 | svn | 2017-12-29 05:09:25 +0900 (Fri, 29 Dec 2017) | 1 line

* 2017-12-29
------------------------------------------------------------------------
r61510 | ko1 | 2017-12-29 05:09:24 +0900 (Fri, 29 Dec 2017) | 84 lines

`$SAFE` as a process global state. [Feature #14250]

* vm_core.h (rb_vm_t): move `rb_execution_context_t::safe_level` to
  `rb_vm_t::safe_level_` because `$SAFE` is a process (VM) global state.

* vm_core.h (rb_proc_t): remove `rb_proc_t::safe_level` because `Proc`
  objects don't need to keep `$SAFE` at the creation.
  Also make `is_from_method` and `is_lambda` as 1 bit fields.

* cont.c (cont_restore_thread): no need to keep `$SAFE` for Continuation.

* eval.c (ruby_cleanup): use `rb_set_safe_level_force()` instead of access
  `vm->safe_level_` directly.

* eval_jump.c: End procs `END{}` doesn't keep `$SAFE`.

* proc.c (proc_dup): removed and introduce `rb_proc_dup` in vm.c.

* safe.c (rb_set_safe_level): don't check `$SAFE` 1 -> 0 changes.

* safe.c (safe_setter): use `rb_set_safe_level()`.

* thread.c (rb_thread_safe_level): `Thread#safe_level` returns `$SAFE`.
  It should be obsolete.

* transcode.c (load_transcoder_entry): `rb_safe_level()` only returns
  0 or 1 so that this check is not needed.

* vm.c (vm_proc_create_from_captured): don't need to keep `$SAFE` for Proc.

* vm.c (rb_proc_create): renamed to `proc_create`.

* vm.c (rb_proc_dup): moved from proc.c.

* vm.c (vm_invoke_proc): do not need to set and restore `$SAFE`
  for `Proc#call`.

* vm_eval.c (rb_eval_cmd): rename a local variable to represent clearer
  meaning.

* lib/drb/drb.rb: restore `$SAFE`.

* lib/erb.rb: restore `$SAFE`, too.

* test/lib/leakchecker.rb: check `$SAFE == 0` at the end of tests.

* test/rubygems/test_gem.rb: do not set `$SAFE = 1`.

* bootstraptest/test_proc.rb: catch up this change.

* spec/ruby/optional/capi/string_spec.rb: ditto.

* test/bigdecimal/test_bigdecimal.rb: ditto.

* test/fiddle/test_func.rb: ditto.

* test/fiddle/test_handle.rb: ditto.

* test/net/imap/test_imap_response_parser.rb: ditto.

* test/pathname/test_pathname.rb: ditto.

* test/readline/test_readline.rb: ditto.

* test/ruby/test_file.rb: ditto.

* test/ruby/test_optimization.rb: ditto.

* test/ruby/test_proc.rb: ditto.

* test/ruby/test_require.rb: ditto.

* test/ruby/test_thread.rb: ditto.

* test/rubygems/test_gem_specification.rb: ditto.

* test/test_tempfile.rb: ditto.

* test/test_tmpdir.rb: ditto.

* test/win32ole/test_win32ole.rb: ditto.

* test/win32ole/test_win32ole_event.rb: ditto.

------------------------------------------------------------------------
r61509 | nobu | 2017-12-28 17:28:42 +0900 (Thu, 28 Dec 2017) | 4 lines

proc.c: empty iseq names

* proc.c (proc_binding): unified the name and realpath of an empty
  iseq.
------------------------------------------------------------------------
r61508 | k0kubun | 2017-12-28 14:07:16 +0900 (Thu, 28 Dec 2017) | 3 lines

erb.rb: let's remove constant deprecated at 2.5

(r59497).
------------------------------------------------------------------------
r61507 | kazu | 2017-12-28 09:00:05 +0900 (Thu, 28 Dec 2017) | 3 lines

Fix KeyError#{key,receiver} of Thread#fetch

[ruby-core:84508] [Bug #14247]
------------------------------------------------------------------------
r61506 | normal | 2017-12-28 08:40:43 +0900 (Thu, 28 Dec 2017) | 5 lines

remove empty spec/rubyspec directory

* spec/rubyspec: remove empty directory trees
  [ruby-core:84533]

------------------------------------------------------------------------
r61505 | eregon | 2017-12-28 06:18:20 +0900 (Thu, 28 Dec 2017) | 1 line

Update to ruby/spec@b95d7ed
------------------------------------------------------------------------
r61504 | eregon | 2017-12-28 01:12:47 +0900 (Thu, 28 Dec 2017) | 1 line

Update to ruby/spec@0fe33ac
------------------------------------------------------------------------
r61503 | svn | 2017-12-28 01:12:19 +0900 (Thu, 28 Dec 2017) | 1 line

* 2017-12-28
------------------------------------------------------------------------
r61502 | eregon | 2017-12-28 01:12:18 +0900 (Thu, 28 Dec 2017) | 1 line

Update to ruby/mspec@5f563e4
------------------------------------------------------------------------
r61501 | ko1 | 2017-12-27 23:50:49 +0900 (Wed, 27 Dec 2017) | 8 lines

fix concurrent test.

* test/rubygems/test_require.rb (test_concurrent_require):
  Synchronizations should be in ensure clause. Sometimes
  `require` fails (not sure why) and latch is not released.
  Such case introduces unlimited awaiting.
  This patch soleve this problem.

------------------------------------------------------------------------
r61500 | nobu | 2017-12-27 23:07:49 +0900 (Wed, 27 Dec 2017) | 6 lines

fix fd mask detection on os x

This was broken in r59440 (3215b27a9abd8de793cf517f32d8901fd421eb1c)
[Bug #14248]

From: Stefan Kaes <skaes@railsexpress.de>
------------------------------------------------------------------------
r61499 | k0kubun | 2017-12-27 22:35:25 +0900 (Wed, 27 Dec 2017) | 5 lines

tool/downloader.rb: don't suppress exception

on the end of retry failure.

Fixed mistake in r61498
------------------------------------------------------------------------
r61498 | k0kubun | 2017-12-27 22:32:59 +0900 (Wed, 27 Dec 2017) | 8 lines

tool/downloader.rb: retry downloads

because it's randomly failing on CI like
https://ci.appveyor.com/project/ruby/ruby/build/1.0.6724

Actually I'm not sure whether the exception class is Errno::ECONNREFUSED
or not. Please change the rescued exception to the correct one if it's
wrong. I changed to log exception class too in this commit.
------------------------------------------------------------------------
r61497 | k0kubun | 2017-12-27 21:40:03 +0900 (Wed, 27 Dec 2017) | 12 lines

erb.rb: preserve the behavior for invalid syntax

comment. Fix regression at r58948.

I even don't want to deprecate it because deprecation needs to lex all
embedded Ruby script using Ripper and it would be slow.  So Let me just
keep this behavior of Ruby 2.4. No change is the best compatibility.

This commit stopped using String#-@ because it's harmful for "ambiguous
first argument" warning if we really want to maintain this behavior.

[Bug #14243]
------------------------------------------------------------------------
r61495 | nobu | 2017-12-27 16:28:32 +0900 (Wed, 27 Dec 2017) | 4 lines

spec_helper.rb: libruby.so iff enable-shared

* spec/ruby/optional/capi/spec_helper.rb (compile_extension):
  search libruby.so only when enable-shared.
------------------------------------------------------------------------
r61494 | nobu | 2017-12-27 12:00:30 +0900 (Wed, 27 Dec 2017) | 1 line

vm_eval.c: expanded eval_string
------------------------------------------------------------------------
r61493 | nobu | 2017-12-27 11:55:16 +0900 (Wed, 27 Dec 2017) | 4 lines

vm_eval.c: split eval_string_with_cref

* vm_eval.c (eval_string_with_cref): split into cref and scope
  modes, which are exclusive.
------------------------------------------------------------------------
r61492 | nobu | 2017-12-27 11:55:15 +0900 (Wed, 27 Dec 2017) | 4 lines

vm_eval.c: refactor eval_make_iseq

* vm_eval.c (eval_make_iseq): moved preparations of location and
  debug print.
------------------------------------------------------------------------
r61491 | nobu | 2017-12-27 10:58:18 +0900 (Wed, 27 Dec 2017) | 5 lines

spec_helper.rb: must find libruby.so

* spec/ruby/optional/capi/spec_helper.rb (compile_extension): if
  libruby.so should have been built but is not found, fail early.
  get mtime of the library just once.
------------------------------------------------------------------------
r61490 | nobu | 2017-12-27 10:26:22 +0900 (Wed, 27 Dec 2017) | 4 lines

fake.rb: set libdir

* tool/fake.rb: set "libdir" to build directory too, so that
  spec/ruby/optional/capi/spec_helper.rb can find libruby_so.
------------------------------------------------------------------------
r61489 | svn | 2017-12-27 09:04:30 +0900 (Wed, 27 Dec 2017) | 1 line

* 2017-12-27
------------------------------------------------------------------------
r61488 | kazu | 2017-12-27 09:04:30 +0900 (Wed, 27 Dec 2017) | 1 line

[DOC] Fix typos in downcase [ci skip]
------------------------------------------------------------------------
r61487 | kazu | 2017-12-26 20:36:07 +0900 (Tue, 26 Dec 2017) | 2 lines

Add NEWS for Ruby 2.6.0

------------------------------------------------------------------------
r61486 | kazu | 2017-12-26 20:35:48 +0900 (Tue, 26 Dec 2017) | 2 lines

Move from NEWS to doc/NEWS-2.5.0

------------------------------------------------------------------------
r61485 | nobu | 2017-12-26 19:40:48 +0900 (Tue, 26 Dec 2017) | 1 line

test_proc.rb: remove duplicate test_source_location
------------------------------------------------------------------------
r61484 | nobu | 2017-12-26 19:32:58 +0900 (Tue, 26 Dec 2017) | 6 lines

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]
------------------------------------------------------------------------
r61483 | nobu | 2017-12-26 19:10:41 +0900 (Tue, 26 Dec 2017) | 5 lines

parse.y: warning for locations

* parse.y (gettable_gen): warn for __FILE__/__LINE__ when eval
  with binding only.  promote use of Binding#source_location
  instead.
------------------------------------------------------------------------
r61482 | nobu | 2017-12-26 18:05:28 +0900 (Tue, 26 Dec 2017) | 5 lines

vm_eval.c: strange message in eval

* vm_eval.c (eval_string_with_cref): remove unnecessary location
  from exception backtrace in eval.
  [ruby-core:84434] [Bug #14229]
------------------------------------------------------------------------
r61481 | mame | 2017-12-26 18:04:26 +0900 (Tue, 26 Dec 2017) | 1 line

test/ruby/test_proc.rb: Add a test for Binding#source_location
------------------------------------------------------------------------
r61480 | mame | 2017-12-26 17:38:35 +0900 (Tue, 26 Dec 2017) | 3 lines

proc.c (bind_location): Add Binding#source_location

Fixes #14230
------------------------------------------------------------------------
r61479 | nobu | 2017-12-26 14:30:31 +0900 (Tue, 26 Dec 2017) | 4 lines

variable.c: public rb_autoload

* variable.c (rb_autoload): restore the visibility for backward
  compatibility.  [ruby-core:84454] [Bug #14236]
------------------------------------------------------------------------
r61478 | nobu | 2017-12-26 08:59:56 +0900 (Tue, 26 Dec 2017) | 4 lines

prelude.c.tmpl: get rid of errors with old gcc

* template/prelude.c.tmpl: moved diagnostic pragmas outside
  prelude_eval() for very old gcc.  [ruby-core:84449] [Bug #14234]
------------------------------------------------------------------------
r61477 | svn | 2017-12-26 08:33:53 +0900 (Tue, 26 Dec 2017) | 1 line

* 2017-12-26
------------------------------------------------------------------------
r61476 | nobu | 2017-12-26 08:33:52 +0900 (Tue, 26 Dec 2017) | 1 line

test/ruby/test_process.rb: get rid of timing issue
------------------------------------------------------------------------
r61475 | k0kubun | 2017-12-25 23:22:21 +0900 (Mon, 25 Dec 2017) | 3 lines

cont.c: fix comment to follow field name change

saved_thread was renamed to saved_ec in r59831 [ci skip]
------------------------------------------------------------------------
r61474 | matz | 2017-12-25 23:05:59 +0900 (Mon, 25 Dec 2017) | 2 lines

version.h (RUBY_VERSION): 2.6.0 development has started.

------------------------------------------------------------------------

Youez - 2016 - github.com/yon3zu
LinuXploit