ChangeLog   [plain text]


------------------------------------------------------------------------
r67580 | naruse | 2019-04-17 13:49:56 +0900 (Wed, 17 Apr 2019) | 1 line

add tag v2_6_3
------------------------------------------------------------------------
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 Rodr?guez <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 Mar?a Mart?nez G?mez <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 Mar?a Mart?nez G?mez <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 Mar?a Mart?nez G?mez <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 Mar?a Mart?nez G?mez <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 Mar?a Mart?nez G?mez <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 Sch??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 Marohni? (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 G?mez <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 Naud? <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 Naud? <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 Sch??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  (? 0.0%) i/s -    228.000  in   5.086576s
           CSV#shift     45.200  (? 0.0%) i/s -    228.000  in   5.044297s
            CSV.read     42.968  (? 0.0%) i/s -    216.000  in   5.027504s
           CSV.table     10.933  (? 0.0%) i/s -     55.000  in   5.031098s
```

## After
```
Calculating -------------------------------------
         CSV.foreach     48.201  (? 0.0%) i/s -    244.000  in   5.062256s
           CSV#shift     49.584  (? 0.0%) i/s -    248.000  in   5.001652s
            CSV.read     46.853  (? 0.0%) i/s -    236.000  in   5.037044s
           CSV.table     11.277  (? 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 (? 0.1%) i/s -    722.304k in   5.056884s
  Pathname#cleanpath     60.706k (? 0.1%) i/s -    306.764k in   5.053305s
      Pathname#root?    603.806k (? 0.3%) i/s -      3.062M in   5.071696s
  Pathname#absolute?    142.592k (? 0.1%) i/s -    720.846k in   5.055301s
Pathname#each_filename
                        115.600k (? 0.1%) i/s -    586.818k in   5.076292s
     Pathname#ascend     50.494k (? 0.1%) i/s -    255.301k in   5.056049s
          Pathname#+    100.550k (? 0.1%) i/s -    509.630k in   5.068433s
       Pathname#join     46.673k (? 0.1%) i/s -    236.433k in   5.065696s
Pathname#relative_path_from
                         28.362k (? 0.0%) i/s -    143.728k in   5.067640s
```

## After
```
Calculating -------------------------------------
  Pathname#absolute?    198.487k (? 0.1%) i/s -    995.665k in   5.016272s
  Pathname#cleanpath     79.415k (? 0.1%) i/s -    404.406k in   5.092344s
      Pathname#root?    759.157k (? 0.0%) i/s -      3.800M in   5.005072s
  Pathname#absolute?    197.859k (? 0.1%) i/s -    995.720k in   5.032494s
Pathname#each_filename
                        152.982k (? 0.1%) i/s -    775.555k in   5.069607s
     Pathname#ascend     63.606k (? 0.0%) i/s -    320.862k in   5.044560s
          Pathname#+    130.372k (? 0.1%) i/s -    660.856k in   5.068991s
       Pathname#join     60.994k (? 0.1%) i/s -    305.068k in   5.001626s
Pathname#relative_path_from
                         37.494k (? 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 Ho?rberg <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"}#{'?'}/` 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.

------------------------------------------------------------------------
r61473 | nobu | 2017-12-25 21:41:52 +0900 (Mon, 25 Dec 2017) | 4 lines

hash.c: prime2

* hash.c (prime2): turned into a uint32_t prime, as the lower
  32bits, non-prime part only was used always.
------------------------------------------------------------------------
r61472 | nobu | 2017-12-25 21:32:10 +0900 (Mon, 25 Dec 2017) | 6 lines

hash.c: use uint128_t

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

From: Nobuyoshi Nakada <nobu@ruby-lang.org>
------------------------------------------------------------------------
r61471 | nobu | 2017-12-25 21:32:09 +0900 (Mon, 25 Dec 2017) | 14 lines

Use UINT128_T support flag from configure

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

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

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

[ruby-core:84438] [Bug #14231] [Fix GH-1781]
From: Andrew Savchenko <bircoph@altlinux.org>
------------------------------------------------------------------------
r61470 | naruse | 2017-12-25 16:56:46 +0900 (Mon, 25 Dec 2017) | 1 line

Add ruby_2_5 branch to .travis.yml
------------------------------------------------------------------------
r61469 | nobu | 2017-12-25 16:55:25 +0900 (Mon, 25 Dec 2017) | 4 lines

irb.rb: fix highlight

* lib/irb.rb (IRB::Irb#eval_input): fix highlight for multiple
  lines exception messages.
------------------------------------------------------------------------
r61465 | nobu | 2017-12-25 14:54:27 +0900 (Mon, 25 Dec 2017) | 4 lines

fix leaked fds

* lib/rubygems/command.rb (Gem::Command#invoke_with_build_args):
  restore UI and close the created SilentUI.
------------------------------------------------------------------------
r61464 | mame | 2017-12-25 14:16:05 +0900 (Mon, 25 Dec 2017) | 4 lines

doc/contributing.rdoc: Update platform maintainers

* mswin32 and Symbian OS are no longer supported
* Mac OS X was renamed
------------------------------------------------------------------------
r61463 | ko1 | 2017-12-25 13:40:42 +0900 (Mon, 25 Dec 2017) | 5 lines

Disasm output contains code range.

* iseq.c (iseq_inspect): show also code range information.
  Note that `iseq_inspect` is used only for header of disasm.

------------------------------------------------------------------------
r61462 | nobu | 2017-12-25 12:25:45 +0900 (Mon, 25 Dec 2017) | 4 lines

prelude.rb: block passing

* prelude.rb (Thread.exclusive): pass the block as a block
  argument.
------------------------------------------------------------------------
r61461 | kazu | 2017-12-25 12:01:07 +0900 (Mon, 25 Dec 2017) | 1 line

NEWS: Fix typos [ci skip]
------------------------------------------------------------------------
r61460 | nobu | 2017-12-25 11:42:13 +0900 (Mon, 25 Dec 2017) | 4 lines

prelude.c.tmpl: static literals

* template/prelude.c.tmpl (PRELUDE_STR): make string objects with
  static literals not to copy them.
------------------------------------------------------------------------
r61459 | nobu | 2017-12-25 11:09:14 +0900 (Mon, 25 Dec 2017) | 5 lines

prelude.c.tmpl: fix optimization options

* template/prelude.c.tmpl (prelude_eval): fix optimization
  options.  trace_instruction member has been removed.  filled
  coverage_enabled and debug_level members instead.
------------------------------------------------------------------------
r61458 | hsbt | 2017-12-25 09:33:19 +0900 (Mon, 25 Dec 2017) | 1 line

Added gemification entry to NEWS file.
------------------------------------------------------------------------
r61457 | ko1 | 2017-12-25 09:27:17 +0900 (Mon, 25 Dec 2017) | 10 lines

Set first line numbers for empty iseqs.

* compile.c (iseq_compile_each): for empty method, block and so on,
  `last_line` is not set so that line number of `putnil` instruction
  will be zero. This patch set `first_lineno` for such `putnil`.

  Problem is reported by deivid-rodriguez via Yuichiro Kaneko.

* test/ruby/test_iseq.rb: add a test for this spec.

------------------------------------------------------------------------
r61452 | sorah | 2017-12-25 02:55:01 +0900 (Mon, 25 Dec 2017) | 3 lines

NEWS: use of copy_file_range(2) isn't a new method

[ci skip]
------------------------------------------------------------------------
r61451 | k0kubun | 2017-12-25 02:20:04 +0900 (Mon, 25 Dec 2017) | 7 lines

NEWS: move the section to note ERB performance

I heard that notable performance improvements should be written to
"Implementation Improvements". So I put the sentence here.

Also, the sentence itself is fixed to be the same as Ruby 2.5 release
note draft's one.
------------------------------------------------------------------------
r61450 | ko1 | 2017-12-25 02:07:53 +0900 (Mon, 25 Dec 2017) | 6 lines

Remove "trace_instruction" compile option.

* iseq.h (rb_compile_option_struct): trace instruction is removed so that
  remove the trace_instruction compile option.
  Don't show warning (just ignore) for Ruby 2.5.

------------------------------------------------------------------------
r61449 | svn | 2017-12-25 01:43:17 +0900 (Mon, 25 Dec 2017) | 1 line

* 2017-12-25
------------------------------------------------------------------------
r61448 | k0kubun | 2017-12-25 01:43:17 +0900 (Mon, 25 Dec 2017) | 8 lines

NEWS: note about ERB's rendering performance

improvement.

There is no specific ticket for it, but improving the ERB's performance
was my largest passion that made me a Ruby committer.

See r58735, r58842, r58904, r58905, r58916.
------------------------------------------------------------------------
r61447 | mame | 2017-12-24 23:52:23 +0900 (Sun, 24 Dec 2017) | 1 line

NEWS: Add a brief explanation for branch and method coverage
------------------------------------------------------------------------
r61446 | nobu | 2017-12-24 19:12:21 +0900 (Sun, 24 Dec 2017) | 1 line

fix grammatical mistake [ci skip]
------------------------------------------------------------------------
r61445 | normal | 2017-12-24 17:45:21 +0900 (Sun, 24 Dec 2017) | 1 line

NEWS: updates for WEBrick [ci skip]
------------------------------------------------------------------------
r61444 | normal | 2017-12-24 17:40:11 +0900 (Sun, 24 Dec 2017) | 1 line

NEWS: fix typo [ci skip]
------------------------------------------------------------------------
r61443 | normal | 2017-12-24 17:38:43 +0900 (Sun, 24 Dec 2017) | 13 lines

webrick 1.4.2

This release removes uses of Kernel#open to avoid unintended
behaviors and make future auditing easier. [Misc #14216]

6 changes since 1.4.1:

      webrick: httpauth requires regular files
      webrick/httpservlet/cgi_runner.rb: remove unnecessary open
      webrick: WEBrick::Log requires path arg when given string
      webrick/httpservlet/*handler: use File.open
      webrick/httputils: note Kernel#open behavior
      webrick/httpservelet/cgi_runner: avoid IO#reopen on pathname
------------------------------------------------------------------------
r61442 | mrkn | 2017-12-24 15:24:57 +0900 (Sun, 24 Dec 2017) | 1 line

NEWS: update for bigdecimal 1.3.4
------------------------------------------------------------------------
r61441 | mrkn | 2017-12-24 15:22:41 +0900 (Sun, 24 Dec 2017) | 5 lines

bigdecimal: version 1.3.4

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

  https://github.com/ruby/bigdecimal/compare/v1.3.3...v1.3.4
------------------------------------------------------------------------
r61438 | kazu | 2017-12-24 11:41:00 +0900 (Sun, 24 Dec 2017) | 1 line

[DOC] Improve example of IO#pread [ci skip]
------------------------------------------------------------------------
r61437 | nobu | 2017-12-24 11:38:27 +0900 (Sun, 24 Dec 2017) | 4 lines

compile.c: toplevel return arguments

* compile.c (compile_return): evaluate arguments to top-level
  return but ignore the results.
------------------------------------------------------------------------
r61435 | nobu | 2017-12-24 11:26:22 +0900 (Sun, 24 Dec 2017) | 1 line

lib/irb.rb: highlight exceptions
------------------------------------------------------------------------
r61434 | nobu | 2017-12-24 10:52:21 +0900 (Sun, 24 Dec 2017) | 1 line

lib/irb.rb: simplified backtrace filtering
------------------------------------------------------------------------
r61433 | kazu | 2017-12-24 10:26:46 +0900 (Sun, 24 Dec 2017) | 1 line

[DOC] Use File.open with block instead of File.new without close [ci skip]
------------------------------------------------------------------------
r61432 | hsbt | 2017-12-24 08:33:09 +0900 (Sun, 24 Dec 2017) | 5 lines

Merge rdoc-6.0.1.

  It fixes an installation error of activerecord.

  https://github.com/ruby/rdoc/issues/571
------------------------------------------------------------------------
r61431 | sorah | 2017-12-24 03:17:39 +0900 (Sun, 24 Dec 2017) | 3 lines

Print backtrace in reverse order on IRB too

[Feature #8861]
------------------------------------------------------------------------
r61430 | svn | 2017-12-24 01:17:57 +0900 (Sun, 24 Dec 2017) | 1 line

* 2017-12-24
------------------------------------------------------------------------
r61429 | naruse | 2017-12-24 01:17:57 +0900 (Sun, 24 Dec 2017) | 10 lines

undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P on GCC 4.8

GCC 4.8 with optimization causes error if it compiles following code.
[Bug #14221]

```c
__builtin_choose_expr(__builtin_constant_p(b),0,1)
```

https://github.com/ruby/ruby/pull/1778
------------------------------------------------------------------------
r61428 | ko1 | 2017-12-23 23:48:28 +0900 (Sat, 23 Dec 2017) | 1 line

fix last commit
------------------------------------------------------------------------
r61427 | ko1 | 2017-12-23 23:46:59 +0900 (Sat, 23 Dec 2017) | 7 lines

RubyVM::InstructionSequence#trace_points.

* iseq.c (iseqw_trace_points): add `RubyVM::InstructionSequence#trace_points`
  method for tools which want to manipulate ISeq (and traces).

* test/ruby/test_iseq.rb: add a test for this method.

------------------------------------------------------------------------
r61426 | nobu | 2017-12-23 23:31:56 +0900 (Sat, 23 Dec 2017) | 6 lines

test_io_console.rb: get rid of sporadic failures

* test/io/console/test_io_console.rb (test_getpass): try to get
  rid of timing issues.

* test/io/console/test_io_console.rb (test_ioflush2): ditto.
------------------------------------------------------------------------
r61425 | ko1 | 2017-12-23 21:48:24 +0900 (Sat, 23 Dec 2017) | 7 lines

RubyVM::InstructionSequence#each_child.

* iseq.c (iseqw_each_child): add RubyVM::InstructionSequence#each_child
  method for tools which want to manipulate ISeq.

* test/ruby/test_iseq.rb: add a test for this method.

------------------------------------------------------------------------
r61424 | ko1 | 2017-12-23 20:00:48 +0900 (Sat, 23 Dec 2017) | 15 lines

revert line number spec of *return events.

* compile.c (rb_iseq_compile_node): line number spec of :return, :b_return
  and :end events of 'TracePoint` is changed for [Feature #14104].

  Quoted from [Feature #14104]:
  > Line numbers on :return/:b_return events show the last executed lines,
  > instead of end lines (without return statement).
  Note that :end event also affected.

  However, "buybug", a well-known ruby debugger depends on previous behavior
  so that I reverted this specification.

* test/ruby/test_settracefunc.rb: catch up this fix.

------------------------------------------------------------------------
r61423 | k0kubun | 2017-12-23 18:10:34 +0900 (Sat, 23 Dec 2017) | 7 lines

iseq.c: show first_lineno on iseq inspect

My motivation was to improve the output of `ruby --dump=insns xxx.rb`.
When one file has many iseqs, it's hard to find the one I want to read.

So I wanted `iseq_disasm` to show first_lineno. I unified the behavior
of `iseqw_disasm` for consistency.
------------------------------------------------------------------------
r61422 | kazu | 2017-12-23 10:53:48 +0900 (Sat, 23 Dec 2017) | 1 line

iseq.c: Remove unused macro in r61395
------------------------------------------------------------------------
r61421 | nobu | 2017-12-23 09:55:29 +0900 (Sat, 23 Dec 2017) | 5 lines

iseq.c: local variable names

* iseq.c (rb_insn_operand_intern): simplified the condition for
  local variable names, assume TS_LINDEX and TS_NUM combinations
  are only for local variables.
------------------------------------------------------------------------
r61420 | nobu | 2017-12-23 09:51:36 +0900 (Sat, 23 Dec 2017) | 4 lines

insns.def: adjust type

* insns.def (checkkeyword): adjust argument type to
  vm_check_keyword as lindex_t.
------------------------------------------------------------------------
r61419 | hsbt | 2017-12-23 09:38:52 +0900 (Sat, 23 Dec 2017) | 1 line

Avoid to warnings about gemspec loadings in rubygems tests.
------------------------------------------------------------------------
r61418 | svn | 2017-12-23 09:30:36 +0900 (Sat, 23 Dec 2017) | 1 line

* 2017-12-23
------------------------------------------------------------------------
r61417 | nobu | 2017-12-23 09:30:33 +0900 (Sat, 23 Dec 2017) | 4 lines

fix unicode data directory

* test/ruby/enc/test_regex_casefold.rb: fix searching unicode data
  directory, like as test_case_comprehensive.rb.
------------------------------------------------------------------------
r61416 | hsbt | 2017-12-23 08:08:05 +0900 (Sat, 23 Dec 2017) | 4 lines

Postponing the Bundler merge.

  I faced a big issue about Bundler with ruby core.
  I have no time to resolve it issue before 2.5 final release.
------------------------------------------------------------------------
r61415 | nobu | 2017-12-22 21:39:32 +0900 (Fri, 22 Dec 2017) | 6 lines

update unicode data files directory

* test/ruby/enc/test_case_comprehensive.rb: search ucd directory
  first if exists.

* test/ruby/enc/test_regex_casefold.rb: ditto.
------------------------------------------------------------------------
r61413 | usa | 2017-12-22 17:52:11 +0900 (Fri, 22 Dec 2017) | 7 lines

force hash values fixable

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

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

------------------------------------------------------------------------
r61412 | glass | 2017-12-22 17:47:39 +0900 (Fri, 22 Dec 2017) | 6 lines

io.c: ignore EPERM

* io.c (nogvl_copy_file_range): ignore EPERM and fallback to
  sendfile(2) or read/write. copy_file_range(2) may not exist
  even if __NR_copy_file_range is defined in the build environment.
  [Bug #14207]
------------------------------------------------------------------------
r61411 | nobu | 2017-12-22 17:08:31 +0900 (Fri, 22 Dec 2017) | 5 lines

erb.rb: shadow by keys

* lib/erb.rb (ERB#new_toplevel): shadow already defined local
  variables by block local variabes, not to overwrite them.
  [ruby-core:84390] [Bug #14215]
------------------------------------------------------------------------
r61410 | hsbt | 2017-12-22 17:00:10 +0900 (Fri, 22 Dec 2017) | 3 lines

Bump up fileutils-1.0.2

  Added `FileUtils::VERSION` const variable.
------------------------------------------------------------------------
r61409 | normal | 2017-12-22 14:59:11 +0900 (Fri, 22 Dec 2017) | 8 lines

webrick/httpservelet/cgi_runner: avoid IO#reopen on pathname

IO#reopen seems to behave strangely on Win32 based on the logs
posted by Greg for [Bug #14420].  Lets try to fix the issue by
using File.open explicitly (but not Kernel#open).

* lib/webrick/httpservelet/cgi_runner: use File.open explicitly
  [Bug #14220]
------------------------------------------------------------------------
r61408 | ko1 | 2017-12-22 14:15:45 +0900 (Fri, 22 Dec 2017) | 6 lines

fix a test for debugging.

* test/rdoc/test_rdoc_markup_pre_process.rb: show
  `RDoc::Markup::PreProcess.post_processors` as a failure message
  for debugging.

------------------------------------------------------------------------
r61407 | kazu | 2017-12-22 12:35:54 +0900 (Fri, 22 Dec 2017) | 1 line

[DOC] StringIO#write accepts multiple arguments since r60377 [ci skip]
------------------------------------------------------------------------
r61406 | kazu | 2017-12-22 12:35:52 +0900 (Fri, 22 Dec 2017) | 1 line

[DOC] Fix indent [ci skip]
------------------------------------------------------------------------
r61405 | kazu | 2017-12-22 12:35:46 +0900 (Fri, 22 Dec 2017) | 1 line

[DOC] Remove unmatched parenthesis [ci skip]
------------------------------------------------------------------------
r61404 | nobu | 2017-12-22 10:49:00 +0900 (Fri, 22 Dec 2017) | 4 lines

ifaddr.c: get_ifaddrs

* ext/socket/ifaddr.c (get_ifaddrs): extract ifaddrs from
  Socket::Ifaddr.
------------------------------------------------------------------------
r61403 | nobu | 2017-12-22 10:12:02 +0900 (Fri, 22 Dec 2017) | 1 line

iseq.c (rb_insn_operand_intern): needs parenthesies
------------------------------------------------------------------------
r61402 | normal | 2017-12-22 10:08:05 +0900 (Fri, 22 Dec 2017) | 11 lines

webrick/httputils: note Kernel#open behavior

I don't know who uses the load_mime_types method; but it is
conceivable that a user would want to read the results of a
command instead of reading a regular file to load MIME types.

None of the WEBrick-related code in Ruby or default/bundled gems
seems to rely on this method; but it is likely 3rd-party code does.

* lib/webrick/httputils.rb (load_mime_types): note Kernel#open behavior
  [Misc #14216]
------------------------------------------------------------------------
r61401 | normal | 2017-12-22 10:08:00 +0900 (Fri, 22 Dec 2017) | 10 lines

webrick/httpservlet/*handler: use File.open

This makes future code audits easier.  None of these changes
fix realistic remote code execution vulnerabilities because
we stat(2) before attempting Kernel#open.

* lib/webrick/httpservlet/erbhandler.rb (do_GET): use File.open
* lib/webrick/httpservlet/filehandler.rb (do_GET): use File.open
  (make_partial_content): ditto
  [Misc #14216]
------------------------------------------------------------------------
r61400 | normal | 2017-12-22 10:07:55 +0900 (Fri, 22 Dec 2017) | 7 lines

webrick: WEBrick::Log requires path arg when given string

Allowing a user to specify "| command" via Kernel#open is
nonsensical since we never read from the resultant IO.

* lib/webrick/log.rb (initialize): replace Kernel#open with File.open
  [Misc #14216]
------------------------------------------------------------------------
r61399 | normal | 2017-12-22 10:07:50 +0900 (Fri, 22 Dec 2017) | 7 lines

webrick: add test for WEBrick::HTTPServlet::ERBHandler

This previously had no coverage.

* test/webrick/test_filehandler.rb (test_erbhandler): new test
* test/webrick/webrick.rhtml: new file for test
  [Misc #14216]
------------------------------------------------------------------------
r61398 | normal | 2017-12-22 10:07:45 +0900 (Fri, 22 Dec 2017) | 11 lines

webrick/httpservlet/cgi_runner.rb: remove unnecessary open

IO#reopen already takes string path names as well as IO objects
(but not "| command" strings)

This makes further auditing for inadvertant code execution
easier.  There's no actual bugfix or behavior change here,
as no external data is passed to cgi_runner.rb.

* lib/webrick/httpservlet/cgi_runner.rb: remove Kernel#open call
  [Misc #14216]
------------------------------------------------------------------------
r61397 | normal | 2017-12-22 10:07:39 +0900 (Fri, 22 Dec 2017) | 9 lines

webrick: httpauth requires regular files

Be sure we do not try to open a pipe to read from, since we care
about mtime in all cases.

* lib/webrick/httpauth/htdigest.rb: use File.open
* lib/webrick/httpauth/htgroup.rb: ditto
* lib/webrick/httpauth/htpasswd.rb: ditto
  [Misc #14216]
------------------------------------------------------------------------
r61396 | nobu | 2017-12-22 10:03:17 +0900 (Fri, 22 Dec 2017) | 4 lines

encoding.c: rb_enc_find_index2

* string.c (str_undump): use rb_enc_find_index2 to find encoding
  by unterminated string.  check the format before encoding name.
------------------------------------------------------------------------
r61395 | nobu | 2017-12-22 09:29:38 +0900 (Fri, 22 Dec 2017) | 4 lines

iseq.c: defined insn operand

* iseq.c (rb_insn_operand_intern): improve operands of defined
  instruction.
------------------------------------------------------------------------
r61394 | svn | 2017-12-22 08:28:16 +0900 (Fri, 22 Dec 2017) | 1 line

* 2017-12-22
------------------------------------------------------------------------
r61393 | shugo | 2017-12-22 08:28:15 +0900 (Fri, 22 Dec 2017) | 3 lines

Extend timeout for CI.

http://ci.rvm.jp/results/trunk-asserts-nopara@ruby-sky1/266962
------------------------------------------------------------------------
r61392 | akr | 2017-12-21 23:15:04 +0900 (Thu, 21 Dec 2017) | 5 lines

open-uri defines URI.open defined as an alias.

open-uri's Kernel.open will be deprecated in future.


------------------------------------------------------------------------
r61391 | nobu | 2017-12-21 20:59:31 +0900 (Thu, 21 Dec 2017) | 1 line

test for [Bug #14214]
------------------------------------------------------------------------
r61390 | hsbt | 2017-12-21 18:29:47 +0900 (Thu, 21 Dec 2017) | 1 line

Added detailed version of Bundler on NEWS.
------------------------------------------------------------------------
r61389 | eregon | 2017-12-21 18:29:18 +0900 (Thu, 21 Dec 2017) | 1 line

Simplify Thread#[]= spec
------------------------------------------------------------------------
r61388 | hsbt | 2017-12-21 18:22:15 +0900 (Thu, 21 Dec 2017) | 1 line

Merge release version of bundler-1.16.1 from upstream.
------------------------------------------------------------------------
r61387 | ko1 | 2017-12-21 17:29:56 +0900 (Thu, 21 Dec 2017) | 4 lines

revert r61371 for [Bug #14214]

Reverted patch doesn't check overwritten value.

------------------------------------------------------------------------
r61386 | nobu | 2017-12-21 16:59:00 +0900 (Thu, 21 Dec 2017) | 1 line

string.c: fix memory leak
------------------------------------------------------------------------
r61385 | nobu | 2017-12-21 16:50:46 +0900 (Thu, 21 Dec 2017) | 1 line

common.mk: revert r58542 [Bug #14213]
------------------------------------------------------------------------
r61384 | yui-knk | 2017-12-21 16:09:03 +0900 (Thu, 21 Dec 2017) | 1 line

iseq.c (rb_iseq_code_range): Remove needless `;`
------------------------------------------------------------------------
r61383 | mame | 2017-12-21 15:52:15 +0900 (Thu, 21 Dec 2017) | 7 lines

parse.y: change NODE_SCOPE's nd_loc to one of the parent NODE

This change (ad-hocly) adjusts the code range of NODE_SCOPE in
class/module definition because the same adjust is already done in
method definition.  I intend to just remove inconsistency between
class/module definition and method definition, but this kind of adjust
is dirty, so it should be fixed later (maybe in 2.6).
------------------------------------------------------------------------
r61382 | ko1 | 2017-12-21 15:40:28 +0900 (Thu, 21 Dec 2017) | 4 lines

add experimental API.

* iseq.c (rb_iseq_code_range): added to access iseq's code range.

------------------------------------------------------------------------
r61381 | naruse | 2017-12-21 14:09:17 +0900 (Thu, 21 Dec 2017) | 1 line

Don't allow mixed escape
------------------------------------------------------------------------
r61380 | naruse | 2017-12-21 14:09:16 +0900 (Thu, 21 Dec 2017) | 1 line

move dump format validation into parsing epilogue
------------------------------------------------------------------------
r61379 | naruse | 2017-12-21 14:08:57 +0900 (Thu, 21 Dec 2017) | 1 line

fix escapes in undump
------------------------------------------------------------------------
r61378 | sonots | 2017-12-21 14:07:43 +0900 (Thu, 21 Dec 2017) | 2 lines

* lib/logger.rb (Logger::LogDevice#open_logfile, #create_logfile):
  Logger should be able to open only files [Bug #14212]
------------------------------------------------------------------------
r61377 | tenderlove | 2017-12-21 09:40:54 +0900 (Thu, 21 Dec 2017) | 4 lines

Fix `imemo_name` to dump new imemo types

New IMEMO types were introduced, this just fixes the function that
converts the type to support the new types.
------------------------------------------------------------------------
r61376 | normal | 2017-12-21 09:26:24 +0900 (Thu, 21 Dec 2017) | 8 lines

io.c: IO#pwrite uses tmp buffer to avoid parallel modification

Since we release GVL, we must freeze and duplicate the string buffer
to prevent other threads from modifying our buffer while we are
waiting on pwrite(2).

* io.c (rb_io_pwrite): use_rb_str_tmp_frozen_{acquire/release}
  [Bug #14195]
------------------------------------------------------------------------
r61375 | ko1 | 2017-12-21 08:49:30 +0900 (Thu, 21 Dec 2017) | 5 lines

fix threading bug.

* spec/ruby/core/thread/element_set_spec.rb: `t` can be uninitialized.
  Use `Thread.current` explicitly.

------------------------------------------------------------------------
r61374 | usa | 2017-12-21 01:04:41 +0900 (Thu, 21 Dec 2017) | 10 lines

fix test errors on Windows

	* test/resolv/test_addr.rb (test_hosts_by_command): on Windows, `|` is
	  invalid charactor for path and raises `Errno::EINVAL` if trying to
	  open.

	* test/resolv/test_dns.rb (test_resolv_conf_by_command): ditto.

	cf. [Bug #14205]

------------------------------------------------------------------------
r61372 | svn | 2017-12-21 00:45:02 +0900 (Thu, 21 Dec 2017) | 1 line

* 2017-12-21
------------------------------------------------------------------------
r61371 | nobu | 2017-12-21 00:45:01 +0900 (Thu, 21 Dec 2017) | 5 lines

compile.c: branch on block param

* compile.c (compile_branch_condition): replace block param value
  in branch conditions with `defined(yield)`, to get rid of
  creating proc value.
------------------------------------------------------------------------
r61360 | nobu | 2017-12-20 23:10:06 +0900 (Wed, 20 Dec 2017) | 4 lines

iseq.c: block param name

* iseq.c (rb_insn_operand_intern): show local variable name at
  getblockparam/setblockparam too.
------------------------------------------------------------------------
r61359 | naruse | 2017-12-20 21:06:59 +0900 (Wed, 20 Dec 2017) | 3 lines

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

like r59693, initialize_http_header also should raise error. [Bug #14208]
------------------------------------------------------------------------
r61357 | stomar | 2017-12-20 18:51:29 +0900 (Wed, 20 Dec 2017) | 1 line

NEWS: update news for Psych
------------------------------------------------------------------------
r61356 | stomar | 2017-12-20 18:31:58 +0900 (Wed, 20 Dec 2017) | 1 line

NEWS: "absent operator" is now called "absence operator"
------------------------------------------------------------------------
r61355 | stomar | 2017-12-20 18:31:22 +0900 (Wed, 20 Dec 2017) | 1 line

NEWS: grammar fixes
------------------------------------------------------------------------
r61354 | hsbt | 2017-12-20 17:50:26 +0900 (Wed, 20 Dec 2017) | 1 line

Update rdoc-6.0.0 entry on NEWS file
------------------------------------------------------------------------
r61353 | mame | 2017-12-20 16:38:24 +0900 (Wed, 20 Dec 2017) | 6 lines

iseq.c (get_insn_info): use binary search instead of linear search

This change introduces get_insn_info_binary_search, which is (should be)
equivalent to the old get_insn_info.
The old get_insn_info is renamed to get_insn_info_linear_search.  When
VM_CHECK_MODE > 0, the equivalence is validated at finish_iseq_build.
------------------------------------------------------------------------
r61352 | mame | 2017-12-20 13:45:05 +0900 (Wed, 20 Dec 2017) | 3 lines

test/coverage/test_coverage.rb: make the expected value the same as 2.4

A follow up of r61350
------------------------------------------------------------------------
r61351 | nobu | 2017-12-20 13:25:01 +0900 (Wed, 20 Dec 2017) | 5 lines

Fixed command Injection

* lib/resolv.rb (Resolv::Config.parse_resolv_conf): fixed
  potential command injection by use of Kernel#open.
  [ruby-core:84347] [Bug #14205]
------------------------------------------------------------------------
r61350 | mame | 2017-12-20 13:24:14 +0900 (Wed, 20 Dec 2017) | 16 lines

compile.c: add a RUBY_EVENT_COVERAGE_LINE event for line coverage

2.5's line coverage measurement was about two times slower than 2.4
because of two reasons; (1) vm_trace uses rb_iseq_event_flags (which
takes O(n) currently where n is the length of iseq) to get an event
type, and (2) RUBY_EVENT_LINE uses setjmp to call an event hook.

This change adds a special event for line coverage,
RUBY_EVENT_COVERAGE_LINE, and adds `tracecoverage` instructions where
the event occurs in iseq.
`tracecoverage` instruction calls an event hook without vm_trace.
And, RUBY_EVENT_COVERAGE_LINE is an internal event which does not
use setjmp.

This change also cancells lineno change due to the deletion of trace
instructions [Feature #14104].  So fixes [Bug #14191].
------------------------------------------------------------------------
r61349 | nobu | 2017-12-20 13:18:31 +0900 (Wed, 20 Dec 2017) | 7 lines

Fixed command Injection

* resolv.rb (Resolv::Hosts#lazy_initialize): fixed potential
  command Injection in Hosts::new() by use of Kernel#open.
  [Fix GH-1777] [ruby-core:84347] [Bug #14205]

From: Drigg3r <drigg3r@yandex.com>
------------------------------------------------------------------------
r61348 | mame | 2017-12-20 10:51:50 +0900 (Wed, 20 Dec 2017) | 3 lines

vm_insnhelper.c (vm_trace): fix a typo

Typical code clone bug.
------------------------------------------------------------------------
r61347 | ko1 | 2017-12-20 09:24:19 +0900 (Wed, 20 Dec 2017) | 9 lines

extend timeout limit.

* test/ruby/test_process.rb (test_threading_works_after_exec_fail):
  extend timeout limit from 30 to 90 because some test nodes fails
  with timeout error.

  Also use a Queue instead of a local variable to communicate with
  threads.

------------------------------------------------------------------------
r61346 | nobu | 2017-12-20 09:09:51 +0900 (Wed, 20 Dec 2017) | 4 lines

parse.y: end of script at newline

* parse.y (parser_yylex): deal with end of script chars just after
  ignored newline as other places.  [ruby-core:84349] [Bug #14206]
------------------------------------------------------------------------
r61345 | ngoto | 2017-12-20 02:09:13 +0900 (Wed, 20 Dec 2017) | 7 lines

skip test_aspawn_too_long_path on Solaris 10 or earlier

* test/ruby/test_process.rb (TestProcess#test_aspawn_too_long_path):
  skip test_aspawn_too_long_path on Solaris 10 or earlier versions
  because they lack Process::RLIMIT_NPROC and the test creates
  extraordinary number of processes that makes the system unstable.

------------------------------------------------------------------------
r61344 | ngoto | 2017-12-20 01:55:08 +0900 (Wed, 20 Dec 2017) | 7 lines

Workaround for optimization bug of Oracle Developer Studio 12.4-12.6

* pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for
  optimization bug of Oracle Developer Studio (Oracle Solaris Studio)
  12.4, 12.5, and 12.6 on Solaris 10 with -xO4 optimization option.
  [Bug #11684] [ruby-core:84351]

------------------------------------------------------------------------
r61343 | svn | 2017-12-20 00:40:14 +0900 (Wed, 20 Dec 2017) | 1 line

* 2017-12-20
------------------------------------------------------------------------
r61342 | eregon | 2017-12-20 00:40:13 +0900 (Wed, 20 Dec 2017) | 4 lines

Break out of the loop after shutdown in DRbServer

* Patch by @seki:
  https://gist.github.com/seki/ae8bef20238c37c94a91b5461c4bfbdd
------------------------------------------------------------------------
r61341 | watson1978 | 2017-12-19 23:26:30 +0900 (Tue, 19 Dec 2017) | 6 lines

Revert "Improve performance of creating Hash object"

This reverts commit r61309
Because it was unstable on mswin CI.

[ruby-dev:50370][Bug #14203]
------------------------------------------------------------------------
r61340 | hsbt | 2017-12-19 21:28:18 +0900 (Tue, 19 Dec 2017) | 3 lines

Update version number of Psych

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r61339 | hsbt | 2017-12-19 21:23:21 +0900 (Tue, 19 Dec 2017) | 3 lines

Update RubyGems entry on NEWS file.

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r61338 | nobu | 2017-12-19 21:20:21 +0900 (Tue, 19 Dec 2017) | 9 lines

st.c: fix up

* st.c (_st_table_list, _st_table_pool): symbols beginning with an
  underscore and a lower letter are preserved by the standard.

* st.c (get_st_table): protoized.

* st.c (st_insert_generic): adjust local variable type to an
  argument argc.
------------------------------------------------------------------------
r61337 | nobu | 2017-12-19 19:46:51 +0900 (Tue, 19 Dec 2017) | 6 lines

thread_sync.c: fix rdoc

* thread_sync.c (define_thread_class): hide rb_define_class_under
  from rdoc, so that fake code to teach rdoc takes effect.

* thread_sync.c (Init_thread_sync): teach rdoc Mutex.
------------------------------------------------------------------------
r61336 | hsbt | 2017-12-19 18:44:33 +0900 (Tue, 19 Dec 2017) | 8 lines

Merge psych-3.0.2 from ruby/psych.

  It version changed fallback option to keywoad argument
  on `Yaml.load` method. It break backword compatiblity.

  see detailed discuttion: https://github.com/ruby/psych/issues/340

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r61335 | nobu | 2017-12-19 13:57:20 +0900 (Tue, 19 Dec 2017) | 4 lines

error.c: KeyError docs [ci skip]

* error.c (key_err_receiver, key_err_key): [DOC] documents of
  KeyError methods.
------------------------------------------------------------------------
r61334 | nobu | 2017-12-19 12:17:37 +0900 (Tue, 19 Dec 2017) | 4 lines

vcs: --add-author-from

* tool/vcs.rb (VCS::GIT#commit): no --add-author-from option if
  author equals committer.
------------------------------------------------------------------------
r61333 | hsbt | 2017-12-19 12:12:22 +0900 (Tue, 19 Dec 2017) | 10 lines

Update version of strscan to 1.0.0.

  But we couldn't ship strscan (and stringio) gem. Because rubygems.org
  still masked them.

  https://github.com/rubygems/rubygems.org/pull/1696

  I'm going to ship them after it deployed.

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r61332 | hsbt | 2017-12-19 11:43:09 +0900 (Tue, 19 Dec 2017) | 6 lines

Remove digest.gemspec for default gems.

  It needs to support header file installation and uninstallation.
  But current RubyGems didn't support it feature yet.

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r61331 | nobu | 2017-12-19 11:41:37 +0900 (Tue, 19 Dec 2017) | 7 lines

compile.c: pop splat result

* compile.c (compile_array): pop splat result without creating a
  new hash if the whole hash is popped.
  [ruby-core:84340] [Bug #14201]

From: Nobuyoshi Nakada <nobu@ruby-lang.org>
------------------------------------------------------------------------
r61330 | nobu | 2017-12-19 10:08:52 +0900 (Tue, 19 Dec 2017) | 6 lines

Improve Array#- efficiency [Fixes GH-1756]

When doing the difference of a small array with a big one it is not
efficient in both time and memory to convert the second one to a hash.

From: Ana Mar?a Mart?nez G?mez <ammartinez@suse.de>
------------------------------------------------------------------------
r61329 | nobu | 2017-12-19 09:45:55 +0900 (Tue, 19 Dec 2017) | 7 lines

compile.c: side effect in splat

* compile.c (compile_array): splat which may have side effects
  should be compiled even if the result will be popped.
  [ruby-core:84340] [Bug #14201]

From: Nobuyoshi Nakada <nobu@ruby-lang.org>
------------------------------------------------------------------------
r61327 | eregon | 2017-12-19 01:41:48 +0900 (Tue, 19 Dec 2017) | 1 line

Use syswrite to avoid potential buffering in IO#select spec
------------------------------------------------------------------------
r61326 | ngoto | 2017-12-19 01:17:17 +0900 (Tue, 19 Dec 2017) | 10 lines

Support C89 if possible

* addr2line.c: Because stdbool.h is a C99 feature, compile error
  occurs with some old compilers without specifying C99 options.
  Fix compile error with Oracle Solaris Studio 12.4 on Solaris 10.
  [Bug #14200] [ruby-dev:50366]

* missing/stdbool.h: Alternative of stdbool.h for C89 compilers.


------------------------------------------------------------------------
r61325 | svn | 2017-12-19 00:46:57 +0900 (Tue, 19 Dec 2017) | 1 line

* 2017-12-19
------------------------------------------------------------------------
r61324 | ngoto | 2017-12-19 00:46:56 +0900 (Tue, 19 Dec 2017) | 6 lines

eval_error.c: Fix compile error on Solaris 10

* eval_error.c (write_warn, write_warn2, write_warn_str): Fix compile
  error "operands have incompatible types" with Oracle Solaris Studio
  12.4 on Solaris 10.

------------------------------------------------------------------------
r61323 | naruse | 2017-12-18 18:03:59 +0900 (Mon, 18 Dec 2017) | 1 line

suppress warning: 'const' attribute on function returning 'void'
------------------------------------------------------------------------
r61322 | normal | 2017-12-18 17:54:30 +0900 (Mon, 18 Dec 2017) | 5 lines

webrick 1.4.1 release

* lib/webrick/version.rb: bump version
* lib/webrick/webrick.gemspec: support Ruby 2.3+
  [Bug #14189]
------------------------------------------------------------------------
r61321 | nobu | 2017-12-18 16:39:05 +0900 (Mon, 18 Dec 2017) | 6 lines

test_io.rb: EINVAL on Windows

* test/ruby/test_io.rb (test_read_command): unusable character
  causes Errno::EINVAL on Windows.

From: Nobuyoshi Nakada <nobu@ruby-lang.org>
------------------------------------------------------------------------
r61320 | nobu | 2017-12-18 16:15:07 +0900 (Mon, 18 Dec 2017) | 7 lines

io.c: opening external command

* io.c (rb_io_open_generic): try to open the named file as usual,
  if klass is not IO nor File, so that Errno::ENOENT will be
  raised probably.  calling on File will be same in the future.

From: Nobuyoshi Nakada <nobu@ruby-lang.org>
------------------------------------------------------------------------
r61319 | nobu | 2017-12-18 16:10:15 +0900 (Mon, 18 Dec 2017) | 5 lines

io.c: open generic in binread

* io.c (rb_io_s_binread): fix r61317, unintentional change.

From: Nobuyoshi Nakada <nobu@ruby-lang.org>
------------------------------------------------------------------------
r61318 | ko1 | 2017-12-18 13:42:53 +0900 (Mon, 18 Dec 2017) | 5 lines

check EOPNOTSUPP.

* test/ruby/test_file.rb (test_open_tempfile_path): skip EOPNOTSUPP
  (observed on Ubuntu 16 on Docker).

------------------------------------------------------------------------
r61317 | nobu | 2017-12-18 13:32:54 +0900 (Mon, 18 Dec 2017) | 7 lines

io.c: opening external command

* io.c (rb_io_open_generic): when external command will be invoked
  as other than IO singleton method, probably unintentionally,
  warn if it is File or raise ArgumentError.

From: Nobuyoshi Nakada <nobu@ruby-lang.org>
------------------------------------------------------------------------
r61316 | nobu | 2017-12-18 13:23:16 +0900 (Mon, 18 Dec 2017) | 6 lines

envutil.rb: define flush method

* test/lib/envutil.rb (verbose_warning): flush is called on STDOUT
  and STDERR sometimes.

From: Nobuyoshi Nakada <nobu@ruby-lang.org>
------------------------------------------------------------------------
r61315 | nobu | 2017-12-18 13:12:06 +0900 (Mon, 18 Dec 2017) | 3 lines

test/ruby/test_io.rb: test for r61314

From: Nobuyoshi Nakada <nobu@ruby-lang.org>
------------------------------------------------------------------------
r61314 | nobu | 2017-12-18 12:38:20 +0900 (Mon, 18 Dec 2017) | 6 lines

io.c: open_key_args by rb_io_open

* io.c (open_key_args): open by rb_io_open always also when
  open_args: option is given.

From: Nobuyoshi Nakada <nobu@ruby-lang.org>
------------------------------------------------------------------------
r61313 | mame | 2017-12-18 11:44:36 +0900 (Mon, 18 Dec 2017) | 7 lines

iseq.c (finish_iseq_build): fix coverage leakage [Bug #14191]

Before this change, coverage.so had failed to measure some multiple-line
code fragments.  This is because removing trace instructions (#14104)
changed TracePoint's lineno (new lineno), and coverage counter array was
based on old lineno.
This change initializes coverage counter array based on new lineno.
------------------------------------------------------------------------
r61312 | nobu | 2017-12-18 10:55:55 +0900 (Mon, 18 Dec 2017) | 3 lines

vcs.rb: --add-author-from option

From: Nobuyoshi Nakada <nobu@ruby-lang.org>
------------------------------------------------------------------------
r61311 | nobu | 2017-12-18 10:54:19 +0900 (Mon, 18 Dec 2017) | 1 line

st.c: no C99 comment
------------------------------------------------------------------------
r61310 | nobu | 2017-12-18 10:51:53 +0900 (Mon, 18 Dec 2017) | 5 lines

Requiring pp is not required now [ci skip]

- Followup of https://bugs.ruby-lang.org/issues/14123

From: Prathamesh Sonpatki <csonpatki@gmail.com>
------------------------------------------------------------------------
r61309 | watson1978 | 2017-12-18 10:49:33 +0900 (Mon, 18 Dec 2017) | 50 lines

Improve performance of creating Hash object

When generate Hash object, the heap area of st_table will be always allocated in internally
and seems it take a time.

To improve performance of creating Hash object,
this patch will reduce count of allocating heap areas for st_table by reuse them.

	Performance of creating Hash literal -> 1.53 times faster.

[Fix GH-1766] [ruby-core:84008] [Feature #14146]

### Environment

* OS : macOS 10.13.1
* CPU : 1.4 GHz Intel Core i7
* Compiler : Apple LLVM version 9.0.0 (clang-900.0.39)

### Before

$ ./miniruby -v -I. -I../benchmark-ips/lib ~/tmp/bench/literal.rb
ruby 2.5.0dev (2017-11-28 hash 60926) [x86_64-darwin17]
Warming up --------------------------------------
        Hash literal    51.544k i/100ms
Calculating -------------------------------------
        Hash literal    869.132k (? 1.1%) i/s -      4.381M in   5.041574s

### After

$ ./miniruby -v -I. -I../benchmark-ips/lib ~/tmp/bench/literal.rb
ruby 2.5.0dev (2017-11-28 hash 60926) [x86_64-darwin17]
Warming up --------------------------------------
        Hash literal    63.068k i/100ms
Calculating -------------------------------------
        Hash literal      1.328M (? 2.3%) i/s -      6.685M in   5.037861s

### Test code

require 'benchmark/ips'

Benchmark.ips do |x|
  x.report "Hash literal" do |loop|
    count = 0
    while count < loop
      hash = {foo: 12, bar: 34, baz: 56}

      count += 1
    end
  end
end
------------------------------------------------------------------------
r61308 | usa | 2017-12-18 03:43:49 +0900 (Mon, 18 Dec 2017) | 5 lines

`BASERUBY` may be not available when building from tarball

* common.mk ($(REVISION_H)): revert a part of r61055 because this obstructs
  building ruby from tarball in clean (no ruby) environment.

------------------------------------------------------------------------
r61307 | svn | 2017-12-18 03:19:42 +0900 (Mon, 18 Dec 2017) | 1 line

* properties.
------------------------------------------------------------------------
r61306 | svn | 2017-12-18 03:19:42 +0900 (Mon, 18 Dec 2017) | 1 line

* 2017-12-18
------------------------------------------------------------------------
r61305 | marcandre | 2017-12-18 03:19:41 +0900 (Mon, 18 Dec 2017) | 1 line

Integer#{any|all|no}_bits: Fix coercion. Add specs [#12753]
------------------------------------------------------------------------
r61304 | nobu | 2017-12-17 20:13:23 +0900 (Sun, 17 Dec 2017) | 4 lines

common.mk: exts-note [ci skip]

* common.mk (exts-note): show notes of non-configured extension
  libraries.
------------------------------------------------------------------------
r61303 | nobu | 2017-12-17 18:40:19 +0900 (Sun, 17 Dec 2017) | 4 lines

thread.c: adjusted [ci skip]

* thread.c (timeval_add): adjusted indent and parenthesized in
  braces.
------------------------------------------------------------------------
r61302 | normal | 2017-12-17 17:26:17 +0900 (Sun, 17 Dec 2017) | 7 lines

thread.c: fix overly long Thread#join w/ timeout

* test/ruby/test_thread.rb (test_signal_at_join): test with timeout
* thread.c (sleep_wait_for_interrupt): remove
  (thread_join_sleep): use native_sleep directly to avoid extra
  missing thread status change
  [Bug #14181]
------------------------------------------------------------------------
r61301 | normal | 2017-12-17 17:26:12 +0900 (Sun, 17 Dec 2017) | 8 lines

thread.c: hoist out timeval arithmetic functions

timeval arithmetic may be reused in other places and this
makes sleep_timeval easier-to-read.

* thread.c (timeval_add): hoist out of sleep_timeval
  (timeval_update_expire): ditto
  (sleep_timeval): use new functions
------------------------------------------------------------------------
r61300 | svn | 2017-12-17 14:35:28 +0900 (Sun, 17 Dec 2017) | 1 line

* 2017-12-17
------------------------------------------------------------------------
r61299 | nobu | 2017-12-17 14:35:28 +0900 (Sun, 17 Dec 2017) | 4 lines

vm_method.c: empty table

* vm_method.c (prepare_callable_method_entry): empty method table
  has no entries.
------------------------------------------------------------------------
r61298 | nobu | 2017-12-17 14:35:27 +0900 (Sun, 17 Dec 2017) | 4 lines

vm_method.c: debug message

* vm_method.c (method_definition_addref_complement): fix debug
  message, show complemented_count instead of alias_count.
------------------------------------------------------------------------
r61297 | nobu | 2017-12-16 22:25:11 +0900 (Sat, 16 Dec 2017) | 9 lines

ruby.c: script __dir__ encoding

* ruby.c (process_options): fallback to the encoding of the script
  name since rb_realpath_internal() cannot convert the encoding
  when it is ASCII-8BIT.

* test/ruby/test_rubyoptions.rb (test___dir__encoding): explicitly
  pass environment variables for locale as they are overriden by
  invoke_ruby.
------------------------------------------------------------------------
r61296 | k0kubun | 2017-12-16 22:02:25 +0900 (Sat, 16 Dec 2017) | 10 lines

vm.c: always export rb_frame_method_id_and_class

Functions declared in include/ruby/backward.h is exported only when
the condition `!defined RUBY_EXPORT && !defined RUBY_NO_OLD_COMPATIBILITY`
is met (i.e. included by include/ruby/ruby.h).

So if it is not the case when ruby is built, this will not be exported.
This was not intentional at r60994.

[Bug #14192]
------------------------------------------------------------------------
r61295 | usa | 2017-12-16 15:05:16 +0900 (Sat, 16 Dec 2017) | 5 lines

should install after test

* common.mk (love): should install after test (but this change does not gurantee
  the order).

------------------------------------------------------------------------
r61294 | usa | 2017-12-16 10:56:14 +0900 (Sat, 16 Dec 2017) | 4 lines

aliases

* tool/merger.rb: aliases for removetag command.

------------------------------------------------------------------------
r61292 | mame | 2017-12-16 09:39:34 +0900 (Sat, 16 Dec 2017) | 5 lines

random.c: make sure that Random.urandom returns required-length buffer

getrandom(2) and read(2) (from /dev/urandom) may return a random buffer
whose length is shorter than required.  This change makes sure that they
get enough buffer by using a loop.
------------------------------------------------------------------------
r61291 | nobu | 2017-12-16 09:36:31 +0900 (Sat, 16 Dec 2017) | 4 lines

test_vm_dump.rb: skip if gcc

* test/ruby/test_vm_dump.rb (assert_darwin_vm_dump_works): gcc seems
  not to chain some frames like Apple's clang.
------------------------------------------------------------------------
r61290 | nobu | 2017-12-16 09:30:52 +0900 (Sat, 16 Dec 2017) | 4 lines

string.c: multiple codepoints

* string.c (undump_after_backslash): fix multiple codepoints in
  braces.
------------------------------------------------------------------------
r61289 | nobu | 2017-12-16 09:03:51 +0900 (Sat, 16 Dec 2017) | 4 lines

string.c: suppress warning

* string.c (str_undump): suppress maybe-uninitialized warning by
  gcc 7 and later.
------------------------------------------------------------------------
r61288 | normal | 2017-12-16 06:55:50 +0900 (Sat, 16 Dec 2017) | 3 lines

NEWS: update for WEBrick Proc body responses

Better late than never :x [Feature #855]
------------------------------------------------------------------------
r61287 | normal | 2017-12-16 06:49:21 +0900 (Sat, 16 Dec 2017) | 4 lines

NEWS: updates about trivial GVL release changes

No tickets, but all pretty trivial changes which avoids
stalls on slow/non-responsive filesytems.
------------------------------------------------------------------------
r61286 | marcandre | 2017-12-16 05:15:54 +0900 (Sat, 16 Dec 2017) | 1 line

lib/erb: Update doc [ci-skip] [doc]
------------------------------------------------------------------------
r61285 | eregon | 2017-12-16 02:44:37 +0900 (Sat, 16 Dec 2017) | 1 line

Update to ruby/spec@595645f
------------------------------------------------------------------------
r61284 | svn | 2017-12-16 02:44:16 +0900 (Sat, 16 Dec 2017) | 1 line

* 2017-12-16
------------------------------------------------------------------------
r61283 | eregon | 2017-12-16 02:44:15 +0900 (Sat, 16 Dec 2017) | 1 line

Update to ruby/mspec@19d929e
------------------------------------------------------------------------
r61282 | nobu | 2017-12-15 23:42:43 +0900 (Fri, 15 Dec 2017) | 4 lines

gperf.sed: static declarations

* tool/gperf.sed: comment out arguments part only, to keep the
  following declarations static.  [Feature #13883]
------------------------------------------------------------------------
r61281 | kazu | 2017-12-15 20:52:41 +0900 (Fri, 15 Dec 2017) | 4 lines

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

Revert part of r61278 [Bug #13655]
[ci skip]
------------------------------------------------------------------------
r61280 | kazu | 2017-12-15 20:52:40 +0900 (Fri, 15 Dec 2017) | 1 line

Fix typo [ci skip]
------------------------------------------------------------------------
r61279 | naruse | 2017-12-15 18:43:40 +0900 (Fri, 15 Dec 2017) | 1 line

initialize should be outside
------------------------------------------------------------------------
r61278 | naruse | 2017-12-15 17:26:33 +0900 (Fri, 15 Dec 2017) | 1 line

IO.new doesn't recive "-" as external_encoding [Bug #13655]
------------------------------------------------------------------------
r61277 | rhe | 2017-12-15 17:19:32 +0900 (Fri, 15 Dec 2017) | 5 lines

openssl: suppress report_on_exception warning

Import a commit from upstream:

	33a67ac96492 test/utils: disable Thread's report_on_exception in start_server
------------------------------------------------------------------------
r61276 | naruse | 2017-12-15 16:58:02 +0900 (Fri, 15 Dec 2017) | 1 line

check icc version inside condition
------------------------------------------------------------------------
r61275 | naruse | 2017-12-15 16:58:00 +0900 (Fri, 15 Dec 2017) | 4 lines

suppress icc warnings

* subscript out of range
* enumerated type mixed with another type
------------------------------------------------------------------------
r61274 | nobu | 2017-12-15 16:27:04 +0900 (Fri, 15 Dec 2017) | 6 lines

thread.c: fix deadlock

* thread.c (thread_join_sleep): the target thread may exit during
  `RUBY_VM_CHECK_INTS_BLOCKING`, but `sleep_forever` does not
  consider the condition change to wait.
  [ruby-core:84248] [Bug #14181]
------------------------------------------------------------------------
r61273 | mame | 2017-12-15 14:55:11 +0900 (Fri, 15 Dec 2017) | 1 line

node.c: show variable type for NODE_*ASGN
------------------------------------------------------------------------
r61272 | mame | 2017-12-15 14:55:10 +0900 (Fri, 15 Dec 2017) | 1 line

node.c (NODE_HASH): remove wrong default case
------------------------------------------------------------------------
r61271 | mame | 2017-12-15 14:55:09 +0900 (Fri, 15 Dec 2017) | 1 line

node.c: add more comment to NODE_CASE2
------------------------------------------------------------------------
r61270 | mame | 2017-12-15 14:55:08 +0900 (Fri, 15 Dec 2017) | 1 line

node.c: fix typos
------------------------------------------------------------------------
r61269 | usa | 2017-12-15 12:22:51 +0900 (Fri, 15 Dec 2017) | 4 lines

add `removetag` command

* tool/merger.rb (remove_tag): add `removetag` command.

------------------------------------------------------------------------
r61268 | nobu | 2017-12-15 12:07:10 +0900 (Fri, 15 Dec 2017) | 6 lines

thread.c: debug messages

* thread.c (terminate_all): fix funtion name in debug messages.

* thread.c (terminate_all, thread_join_sleep, thread_join): show
  the status of the target thread in debug messages.
------------------------------------------------------------------------
r61267 | usa | 2017-12-15 12:04:56 +0900 (Fri, 15 Dec 2017) | 5 lines

check the existence of specified tag

* tool/merger.rb (tag): check the existence of specified tag before tagging to
  get rid of careless mistakes.

------------------------------------------------------------------------
r61266 | normal | 2017-12-15 05:02:15 +0900 (Fri, 15 Dec 2017) | 6 lines

webrick 1.4.0 release

* lib/webrick/version.rb: change VERSION to 1.4.0
* lib/webrick/webrick.gemspec: require_relative for version,
  update date and contact info
  [Feature #13173]
------------------------------------------------------------------------
r61265 | eregon | 2017-12-15 04:26:04 +0900 (Fri, 15 Dec 2017) | 1 line

Add [Feature #14143] to NEWS
------------------------------------------------------------------------
r61263 | naruse | 2017-12-15 03:33:33 +0900 (Fri, 15 Dec 2017) | 3 lines

particular_werror_flags=no on ICC

fix r61261
------------------------------------------------------------------------
r61262 | svn | 2017-12-15 01:47:29 +0900 (Fri, 15 Dec 2017) | 1 line

* 2017-12-15
------------------------------------------------------------------------
r61261 | naruse | 2017-12-15 01:47:28 +0900 (Fri, 15 Dec 2017) | 3 lines

ICC doesn't support -Werror= but ignore

It cause warnings when ruby remove error= on compiling ext/*.
------------------------------------------------------------------------
r61242 | nagachika | 2017-12-14 22:41:30 +0900 (Thu, 14 Dec 2017) | 1 line

Fix a command injection vulnerability in Net::FTP.
------------------------------------------------------------------------
r61237 | eregon | 2017-12-14 22:08:02 +0900 (Thu, 14 Dec 2017) | 4 lines

The main Thread should have report_on_exception=true for consistency

* Adapt test and add specs.
* See [Feature #14143] [ruby-core:84227]
------------------------------------------------------------------------
r61236 | rhe | 2017-12-14 20:19:17 +0900 (Thu, 14 Dec 2017) | 1 line

NEWS: add entry for openssl
------------------------------------------------------------------------
r61235 | rhe | 2017-12-14 20:19:16 +0900 (Thu, 14 Dec 2017) | 19 lines

openssl: import v2.1.0

Import Ruby/OpenSSL 2.1.0. Commits since v2.1.0.beta2 can be found at:

	https://github.com/ruby/openssl/compare/v2.1.0.beta2...v2.1.0

----------------------------------------------------------------
Kazuki Yamaguchi (8):
      test/test_ssl: prevent changing default internal encoding
      ssl: remove a misleading comment
      pkey/ec: rearrange PKey::EC::Point#initialize
      ssl: remove unreachable code
      asn1: fix docs
      pkey/ec: add support for octet string encoding of EC point
      Ruby/OpenSSL 2.0.7
      Ruby/OpenSSL 2.1.0

eregon (1):
      Fix test-all tests to avoid creating report_on_exception warnings
------------------------------------------------------------------------
r61234 | naruse | 2017-12-14 19:38:36 +0900 (Thu, 14 Dec 2017) | 1 line

NaCl support is dropped at r60374
------------------------------------------------------------------------
r61233 | stomar | 2017-12-14 19:25:57 +0900 (Thu, 14 Dec 2017) | 1 line

numeric.c: [DOC] grammar fixes
------------------------------------------------------------------------
r61232 | stomar | 2017-12-14 19:25:17 +0900 (Thu, 14 Dec 2017) | 1 line

struct.c: [DOC] improve docs for Struct.new
------------------------------------------------------------------------
r61231 | stomar | 2017-12-14 19:24:38 +0900 (Thu, 14 Dec 2017) | 1 line

process.c: [DOC] fix grammar and double negative
------------------------------------------------------------------------
r61230 | stomar | 2017-12-14 19:23:10 +0900 (Thu, 14 Dec 2017) | 1 line

NEWS: grammar fixes
------------------------------------------------------------------------
r61229 | stomar | 2017-12-14 19:21:56 +0900 (Thu, 14 Dec 2017) | 5 lines

enum.c: improve docs for Enumerable#{any?,all?,none?,one?}

* enum.c: [DOC] reword docs for Enumerable#{any?,all?,none?,one?}
  to not mention the receiver (`enum') from call-seq, because it
  does not appear in the call-seq of the rendered HTML docs.
------------------------------------------------------------------------
r61228 | tadd | 2017-12-14 17:47:13 +0900 (Thu, 14 Dec 2017) | 2 lines

Implement String#undump to unescape String#dump-ed string
[Feature #12275] [close GH-1765]
------------------------------------------------------------------------
r61227 | mame | 2017-12-14 17:22:22 +0900 (Thu, 14 Dec 2017) | 3 lines

node.h: add nd_last_loc and nd_set_last_loc

Just refactoring.
------------------------------------------------------------------------
r61226 | usa | 2017-12-14 15:38:47 +0900 (Thu, 14 Dec 2017) | 5 lines

Thread.current.report_on_exception = false

* test/win32ole/test_win32ole.rb: set report_on_exception = false in threads
  which are expected to be throw some exceptions.

------------------------------------------------------------------------
r61225 | naruse | 2017-12-14 15:30:22 +0900 (Thu, 14 Dec 2017) | 1 line

Use string instead of regexp
------------------------------------------------------------------------
r61224 | mame | 2017-12-14 15:02:26 +0900 (Thu, 14 Dec 2017) | 5 lines

node.[ch], parse.y, compile.c: rename nd_column to nd_first_column

nd_set_column -> nd_first_set_column
nd_lineno -> nd_first_lineno
nd_set_lineno -> nd_first_set_lineno
------------------------------------------------------------------------
r61223 | mame | 2017-12-14 14:54:10 +0900 (Thu, 14 Dec 2017) | 1 line

parse.y: suppress "unused variable" warning of ripper.y
------------------------------------------------------------------------
r61222 | nobu | 2017-12-14 14:13:23 +0900 (Thu, 14 Dec 2017) | 1 line

prelude.rb: remove duplicate rdoc
------------------------------------------------------------------------
r61221 | nobu | 2017-12-14 13:40:15 +0900 (Thu, 14 Dec 2017) | 4 lines

bigdecimal: dependency

* ext/bigdecimal/extconf.rb: extconf.h depends on the gemspec
  file.  [ruby-core:84247] [Bug #14180]
------------------------------------------------------------------------
r61220 | yuki | 2017-12-14 11:29:01 +0900 (Thu, 14 Dec 2017) | 1 line

* gems/bundled_gems: Upgrade the did_you_mean gem to 1.2.0
------------------------------------------------------------------------
r61219 | hsbt | 2017-12-14 11:21:41 +0900 (Thu, 14 Dec 2017) | 1 line

Added `test-bundler` and `test-bundled-gems` to `make help` entries`.
------------------------------------------------------------------------
r61218 | knu | 2017-12-14 10:11:28 +0900 (Thu, 14 Dec 2017) | 8 lines

Allow empty path components in a URI [Bug #8352]

* generic.rb (URI::Generic#merge, URI::Generic#route_to): Fix a bug
  where a sequence of slashes in the path part gets collapsed to a
  single slash.  According to the relevant RFCs and WHATWG URL
  Standard, empty path components are simply valid and there is no
  special treatment defined for them, so we just keep them as they
  are.
------------------------------------------------------------------------
r61217 | k0kubun | 2017-12-14 01:07:52 +0900 (Thu, 14 Dec 2017) | 33 lines

iseq.c: dump type of branchiftype on disasm

This makes easier to debug scripts related to r59950.

* before

$ ./ruby --dump=insns -e '"#{a}"'
== disasm: #<ISeq:<main>@-e>============================================
0000 putobject        ""                                              (   1)[Li]
0002 putself
0003 opt_send_without_block <callinfo!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE>, <callcache>
0006 dup
0007 branchiftype     5, 15
0010 dup
0011 opt_send_without_block <callinfo!mid:to_s, argc:0, FCALL|ARGS_SIMPLE>, <callcache>
0014 tostring
0015 concatstrings    2
0017 leave

* after

$ ./ruby --dump=insns -e '"#{a}"'
== disasm: #<ISeq:<main>@-e>============================================
0000 putobject        ""                                              (   1)[Li]
0002 putself
0003 opt_send_without_block <callinfo!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE>, <callcache>
0006 dup
0007 branchiftype     T_STRING, 15
0010 dup
0011 opt_send_without_block <callinfo!mid:to_s, argc:0, FCALL|ARGS_SIMPLE>, <callcache>
0014 tostring
0015 concatstrings    2
0017 leave
------------------------------------------------------------------------
r61216 | eregon | 2017-12-14 00:59:26 +0900 (Thu, 14 Dec 2017) | 4 lines

Document how to deal with output created by Thread.report_on_exception.

* Improve and clarify the documentation of Thread.report_on_exception
  and related methods.
------------------------------------------------------------------------
r61215 | mrkn | 2017-12-14 00:36:25 +0900 (Thu, 14 Dec 2017) | 1 line

NEWS: bigdecimal 1.3.3
------------------------------------------------------------------------
r61214 | svn | 2017-12-14 00:28:31 +0900 (Thu, 14 Dec 2017) | 1 line

* 2017-12-14
------------------------------------------------------------------------
r61213 | mrkn | 2017-12-14 00:28:30 +0900 (Thu, 14 Dec 2017) | 5 lines

bigdecimal: version 1.3.3

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

  https://github.com/ruby/bigdecimal/compare/v1.3.2...v1.3.3
------------------------------------------------------------------------
r61212 | kazu | 2017-12-13 23:08:20 +0900 (Wed, 13 Dec 2017) | 3 lines

[DOC] Fix exception class [ci skip]

ref https://github.com/rurema/doctree/pull/816
------------------------------------------------------------------------
r61211 | nobu | 2017-12-13 21:06:11 +0900 (Wed, 13 Dec 2017) | 4 lines

vcs.rb: raise NotFoundError when command not found

* tool/vcs.rb (VCS#get_revisions): raise VCS::NotFoundError when
  command not found.
------------------------------------------------------------------------
r61210 | eregon | 2017-12-13 20:22:55 +0900 (Wed, 13 Dec 2017) | 1 line

Travis: the workaround needs sudo: required to work
------------------------------------------------------------------------
r61209 | eregon | 2017-12-13 20:13:55 +0900 (Wed, 13 Dec 2017) | 5 lines

Use the older Travis CI image

* The new one produces many warnings like:
  warning: Insecure world writable dir /usr/local/clang-5.0.0/bin in PATH, mode 040777
* Workaround from https://blog.travis-ci.com/2017-12-12-new-trusty-images-q4-launch
------------------------------------------------------------------------
r61208 | sorah | 2017-12-13 19:55:41 +0900 (Wed, 13 Dec 2017) | 1 line

NEWS: typo [DOC] [ci skip]
------------------------------------------------------------------------
r61207 | nobu | 2017-12-13 19:43:21 +0900 (Wed, 13 Dec 2017) | 1 line

test/ruby/test_env.rb: suppress a warning
------------------------------------------------------------------------
r61206 | nobu | 2017-12-13 19:40:54 +0900 (Wed, 13 Dec 2017) | 5 lines

test_process.rb: fix error when empty groups

* test/ruby/test_process.rb (test_maxgroups): set one element at
  least get rid of ZeroDivisionError when no process groups.
  [ruby-core:84224] [Bug #14174]
------------------------------------------------------------------------
r61205 | nobu | 2017-12-13 19:26:09 +0900 (Wed, 13 Dec 2017) | 5 lines

Ripper::Lexer bit predicates

* ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer): added allbits?,
  anybits? and nobits? methods, as well as Integer.  a patch by
  aycabta.  [Feature #14170]
------------------------------------------------------------------------
r61204 | nobu | 2017-12-13 19:16:05 +0900 (Wed, 13 Dec 2017) | 1 line

process.c: adjust indent
------------------------------------------------------------------------
r61203 | eregon | 2017-12-13 18:45:48 +0900 (Wed, 13 Dec 2017) | 1 line

Avoid extra output in test_thread_interrupt_for_killed_thread
------------------------------------------------------------------------
r61202 | naruse | 2017-12-13 17:38:43 +0900 (Wed, 13 Dec 2017) | 1 line

Revert r61054
------------------------------------------------------------------------
r61201 | hsbt | 2017-12-13 14:52:47 +0900 (Wed, 13 Dec 2017) | 1 line

Bump version to etc-1.0.0 as default gems.
------------------------------------------------------------------------
r61200 | hsbt | 2017-12-13 14:24:01 +0900 (Wed, 13 Dec 2017) | 1 line

Bump version to csv-1.0.0 as default gems.
------------------------------------------------------------------------
r61199 | hsbt | 2017-12-13 11:43:38 +0900 (Wed, 13 Dec 2017) | 4 lines

Modify git clone command

  The previous git clone command is not work, the protocol in URL should be https
  [fix GH-1772]
------------------------------------------------------------------------
r61198 | yui-knk | 2017-12-13 10:10:27 +0900 (Wed, 13 Dec 2017) | 4 lines

parse.y: Revert r61196

* parse.y: Because top_stmts is generated from none (not "/* none */"),
  @0 is not set by YYLLOC_DEFAULT. So @0 is a meaningless location.
------------------------------------------------------------------------
r61197 | normal | 2017-12-13 09:38:08 +0900 (Wed, 13 Dec 2017) | 13 lines

webrick: compile RE correctly for beginning and end match

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

Thanks to mame and hsbt for reporting.

* lib/webrick/httpserver.rb (MountTable#compile):
  use \A and \z instead of ^ and $
* lib/webrick/httpserver.rb (MountTable#normalize): use \z instead of $
* test/webrick/test_httpserver.rb (test_cntrl_in_path): new test
------------------------------------------------------------------------
r61196 | yui-knk | 2017-12-13 08:48:50 +0900 (Wed, 13 Dec 2017) | 20 lines

parse.y: Fix the locations of an empty script

* parse.y: Fix the locations of NODE_BEGIN in
  an empty script.

  ```
  ruby --dump=p -e ''
  ```

  * Before

  ```
  NODE_BEGIN (line: 1, code_range: (1,1)-(1,1))
  ```

  * After

  ```
  NODE_BEGIN (line: 1, code_range: (1,0)-(1,0))
  ```
------------------------------------------------------------------------
r61195 | eregon | 2017-12-13 08:41:50 +0900 (Wed, 13 Dec 2017) | 5 lines

Capture the values of globals in EnvUtil to restore to the original

* Avoids the thread-safety issues mentioned in r61192,
  when thread concurrently modify default Encodings or $VERBOSE.
  Their state will always be the original one once the test finishes.
------------------------------------------------------------------------
r61194 | eregon | 2017-12-13 08:41:34 +0900 (Wed, 13 Dec 2017) | 3 lines

Revert r61192 and r61193

* More general fix coming.
------------------------------------------------------------------------
r61193 | eregon | 2017-12-13 07:37:40 +0900 (Wed, 13 Dec 2017) | 3 lines

Use EnvUtil.with_default_external in tests needing it

* Reverts part of r54522.
------------------------------------------------------------------------
r61192 | eregon | 2017-12-13 06:51:53 +0900 (Wed, 13 Dec 2017) | 11 lines

Do not change Encoding.default_internal in assert_raise_with_message

* It is not thread-safe: if two threads call it concurrently,
  the default_internal Encoding might not be restored, which causes
  many problems. The same applies for $VERBOSE, which might also not be
  restored to its original value but to the new value instead.
  This happens because reading the original value might capture the
  value already changed by EnvUtil.with_default_internal in another
  Thread. One solution could be to capture the value of these globals
  before running the test.
* Reverts part of r54522.
------------------------------------------------------------------------
r61191 | eregon | 2017-12-13 06:32:13 +0900 (Wed, 13 Dec 2017) | 4 lines

Check that global encodings are not changed in test-all

* Check that Encoding.default_internal and Encoding.default_external
  are the same before and after every test.
------------------------------------------------------------------------
r61190 | eregon | 2017-12-13 05:09:36 +0900 (Wed, 13 Dec 2017) | 3 lines

Remove useless assertion in TestThread#test_handle_interrupt_blocking

* It was originally th.join(0.2), but th.join never returns nil.
------------------------------------------------------------------------
r61189 | eregon | 2017-12-13 04:48:32 +0900 (Wed, 13 Dec 2017) | 3 lines

Handle exception explicitly in TestBignum#test_interrupt_during_to_s

* Otherwise it produces a warning with Thread.report_on_exception=true.
------------------------------------------------------------------------
r61188 | eregon | 2017-12-13 03:44:49 +0900 (Wed, 13 Dec 2017) | 6 lines

Fix test-all tests to avoid creating report_on_exception warnings

* The warnings are shown by Thread.report_on_exception defaulting to
  true. [Feature #14143] [ruby-core:83979]
* Improves tests by narrowing down the scope where an exception
  is expected.
------------------------------------------------------------------------
r61187 | eregon | 2017-12-13 03:44:33 +0900 (Wed, 13 Dec 2017) | 3 lines

Remove extra assert_nil in Rinda tests

* They are never executed since thread_join() raises.
------------------------------------------------------------------------
r61186 | eregon | 2017-12-13 03:44:21 +0900 (Wed, 13 Dec 2017) | 3 lines

Fix tests which fail with extra stderr output when a Thread dies

* [Feature #14143] [ruby-core:83979].
------------------------------------------------------------------------
r61185 | eregon | 2017-12-13 03:44:07 +0900 (Wed, 13 Dec 2017) | 5 lines

Rescue expected Interrupt in TupleSpaceTestModule#test_take_bug_8215

* test/rinda/test_rinda.rb (test_take_bug_8215): add rescue for
  expected exception, which removes the warning by
  Thread.report_on_exception [Feature #14143].
------------------------------------------------------------------------
r61184 | eregon | 2017-12-13 03:43:55 +0900 (Wed, 13 Dec 2017) | 7 lines

Avoid creating a Thread for shutting down a DRbServer

* lib/drb/drb.rb: avoid creating a Thread and call the shutdown logic
  directly. Do not try to kill or join the current Thread.
  Thread.new { stop_service } caused "can't alloc thread (ThreadError)",
  which is shown with Thread.report_on_exception = true.
  [Bug #14171]
------------------------------------------------------------------------
r61183 | eregon | 2017-12-13 03:43:42 +0900 (Wed, 13 Dec 2017) | 11 lines

Set Thread.report_on_exception=true by default to report exceptions in Threads

* [Feature #14143] [ruby-core:83979]
* vm.c (vm_init2): Set Thread.report_on_exception to true.
* thread.c (thread_start_func_2): Add indication the message is caused
  by report_on_exception = true.
* spec/ruby: Specify the new behavior.
* test/ruby/test_thread.rb: Adapt and improve tests for
  Thread.report_on_exception and Thread#report_on_exception.
* test/ruby/test_thread.rb, test/ruby/test_exception.rb: Unset
  report_on_exception for tests expecting no extra output.
------------------------------------------------------------------------
r61182 | k0kubun | 2017-12-13 00:12:05 +0900 (Wed, 13 Dec 2017) | 9 lines

struct.c: don't explain implementation details

of keyword_init option. [DOC] [ci skip]

It's implemented to take Hash, but it's just implementation detail and
it's intended to behave in the same way as keyword arguments (for
:keyword_init option too).

Also I unified coding style of r61137 with other places.
------------------------------------------------------------------------
r61181 | k0kubun | 2017-12-13 00:03:45 +0900 (Wed, 13 Dec 2017) | 14 lines

struct.c: show `keyword_init: true` on inspect

for debugging if it's specified for the Struct class.
This follows up r61137.

We don't provide a method to check it because I don't think of any use
case, but showing this to inspect would be helpful for debugging if
someone is debugging whether keyword_init is properly enabled or not.

In this commit, I didn't show `keyword_init: false` because of backward
compatibility. Ideally any application should not depend on the behavior
of inspect, but I don't have strong motivation to break it too.

[close GH-1773]
------------------------------------------------------------------------
r61180 | usa | 2017-12-13 00:02:51 +0900 (Wed, 13 Dec 2017) | 10 lines

set ino at `File.lstat` on Windows

* win32/win32.c (winnt_stat): support symbolic link and others.

* win32/win32.c (w32_stati128, wstati128, name_for_stat, rb_w32_{,ul}stati128,
  wutimensat): follow above change.
  [Feature #14169]

  From: Takehiro Kubo kubo@jiubao.org

------------------------------------------------------------------------
r61179 | kazu | 2017-12-13 00:01:13 +0900 (Wed, 13 Dec 2017) | 1 line

Add more example of `Enumerable#one?` [ci skip]
------------------------------------------------------------------------
r61178 | kazu | 2017-12-13 00:01:11 +0900 (Wed, 13 Dec 2017) | 1 line

pattern and modulo are not keyword argument [ci skip]
------------------------------------------------------------------------
r61177 | kazu | 2017-12-13 00:01:10 +0900 (Wed, 13 Dec 2017) | 1 line

Fix typos [ci skip]
------------------------------------------------------------------------
r61176 | kazu | 2017-12-13 00:01:08 +0900 (Wed, 13 Dec 2017) | 3 lines

atime,mtime,ctime of File::Stat are instance methods

[ci skip]
------------------------------------------------------------------------
r61175 | kazu | 2017-12-13 00:01:07 +0900 (Wed, 13 Dec 2017) | 11 lines

Remove unnecessary `:`

Before:

`.../irb/init.rb:280: warning: :LoadError: cannot load such file -- hoge`

After:

`.../irb/init.rb:280: warning: LoadError: cannot load such file -- hoge`

[ci skip]
------------------------------------------------------------------------
r61174 | kazu | 2017-12-13 00:01:04 +0900 (Wed, 13 Dec 2017) | 3 lines

Use printf instead of puts and sprintf

[ci skip]
------------------------------------------------------------------------
r61173 | svn | 2017-12-13 00:01:03 +0900 (Wed, 13 Dec 2017) | 1 line

* 2017-12-13
------------------------------------------------------------------------
r61172 | kazu | 2017-12-13 00:01:02 +0900 (Wed, 13 Dec 2017) | 3 lines

[DOC] Process.last_status may return nil

[ci skip]
------------------------------------------------------------------------
r61171 | yui-knk | 2017-12-12 23:47:34 +0900 (Tue, 12 Dec 2017) | 25 lines

parse.y: Change the last location of none

* parse.y: Change the last location of none to be
  equal to the first location of none.
  Sometimes none has length (`parser->tokp` does not
  match `lex_p` when none is generated).
  This leads to invalid code_ranges.

  e.g. The locations of the NODE_CALL (:sort) is fixed:

  ```
  x.sort.join(" ")
  ```

  * Before

  ```
  NODE_CALL (line: 1, code_range: (1,0)-(1,7))
  ```

  * After

  ```
  NODE_CALL (line: 1, code_range: (1,0)-(1,6))
  ```
------------------------------------------------------------------------
r61170 | yui-knk | 2017-12-12 23:21:20 +0900 (Tue, 12 Dec 2017) | 3 lines

parse.y: Set locations of nd_body in NODE_ITER explicitly

* parse.y: Same as r61168, but for brace_block.
------------------------------------------------------------------------
r61169 | hsbt | 2017-12-12 23:10:43 +0900 (Tue, 12 Dec 2017) | 6 lines

Revert "switch from http to https for Unicode data file downloads"

This reverts commit 90de118a75921a08497b41de2950971073b3c924.

  The environment of mswinci couldn't handle https download.
  (It's certificates problem, We should upgrade its environment)
------------------------------------------------------------------------
r61168 | yui-knk | 2017-12-12 23:10:23 +0900 (Tue, 12 Dec 2017) | 11 lines

parse.y: Set locations of nd_body in NODE_ITER explicitly

* parse.y: Currently the location of do_body is set
  by new_do_body. Sometimes the last part of do_body is
  none, because bodystmt ends with opt_ensure.
  Token keyword_end has been looked ahead when a tokenizer
  generates none, so the last location of opt_ensure matches
  the last location of `end`. But this relation will be
  broken when we change the last location of none to be equal to
  the first location of none. So set locations of nd_body in
  NODE_ITER explicitly.
------------------------------------------------------------------------
r61167 | k0kubun | 2017-12-12 22:56:48 +0900 (Tue, 12 Dec 2017) | 9 lines

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

is not changed.

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

Not only to preserve ARGV, but also r61149 intends to preserve $0.
This test prevents future breakage of the behavior.
------------------------------------------------------------------------
r61166 | k0kubun | 2017-12-12 22:47:46 +0900 (Tue, 12 Dec 2017) | 6 lines

test_struct.rb: rename constants to clarify

the intention. Follows up r61137.

They were forgotten to be renamed when :keyword_args is renamed to
:keyword_init.
------------------------------------------------------------------------
r61165 | yui-knk | 2017-12-12 22:19:40 +0900 (Tue, 12 Dec 2017) | 5 lines

ext/coverage/coverage.c: Add test cases

* ext/coverage/coverage.c (test_method_coverage_for_define_method):
  Add test cases for method coverages which test do-end block
  define_method.
------------------------------------------------------------------------
r61164 | svn | 2017-12-12 22:07:08 +0900 (Tue, 12 Dec 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r61163 | sorah | 2017-12-12 22:07:06 +0900 (Tue, 12 Dec 2017) | 1 line

NEWS: polish
------------------------------------------------------------------------
r61162 | ko1 | 2017-12-12 21:40:41 +0900 (Tue, 12 Dec 2017) | 6 lines

ignore lines (to catch up r61155).

* spec/ruby/library/net/ftp/return_code_spec.rb: check message body only.

* spec/ruby/library/net/http/http/set_debug_output_spec.rb: ditto.

------------------------------------------------------------------------
r61161 | sorah | 2017-12-12 21:17:38 +0900 (Tue, 12 Dec 2017) | 4 lines

error.c(rb_error_write): Remove ec_ from its name

It's unrelated to rb_execution_context_t during writing the patch
r61154
------------------------------------------------------------------------
r61160 | a_matsuda | 2017-12-12 21:12:40 +0900 (Tue, 12 Dec 2017) | 1 line

NEWS for Method#===
------------------------------------------------------------------------
r61159 | a_matsuda | 2017-12-12 21:12:39 +0900 (Tue, 12 Dec 2017) | 1 line

Unneeded assertion
------------------------------------------------------------------------
r61158 | a_matsuda | 2017-12-12 21:12:38 +0900 (Tue, 12 Dec 2017) | 3 lines

Add Method#=== that invokes #call

Patch by osyo via [Feature #14142]
------------------------------------------------------------------------
r61157 | sorah | 2017-12-12 21:10:21 +0900 (Tue, 12 Dec 2017) | 1 line

hotfix implicit-function-declaration
------------------------------------------------------------------------
r61156 | shyouhei | 2017-12-12 21:10:20 +0900 (Tue, 12 Dec 2017) | 2 lines

NEWS entry for [Feature #12882]

------------------------------------------------------------------------
r61155 | shyouhei | 2017-12-12 20:56:25 +0900 (Tue, 12 Dec 2017) | 27 lines

Add uplevel keyword to Kernel#warn and use it

If uplevel keyword is given, the warning message is prepended
with caller file and line information and the string "warning: ".
The use of the uplevel keyword makes Kernel#warn format output
similar to how rb_warn formats output.

This patch modifies net/ftp and net/imap to use Kernel#warn
instead of $stderr.puts or $stderr.printf, since they are used
for printing warnings.

This makes lib/cgi/core and tempfile use $stderr.puts instead of
warn for debug logging, since they are used for debug printing
and not for warning.

This does not modify bundler, rubygems, or rdoc, as those are
maintained outside of ruby and probably wish to remain backwards
compatible with older ruby versions.

rb_warn_m code is originally from nobu, but I've changed it
so that it only includes the path and lineno from uplevel
(not the method), and also prepends the string "warning: ",
to make it more similar to rb_warn.

From: Jeremy Evans code@jeremyevans.net
Signed-off-by: Urabe Shyouhei shyouhei@ruby-lang.org

------------------------------------------------------------------------
r61154 | sorah | 2017-12-12 20:47:16 +0900 (Tue, 12 Dec 2017) | 6 lines

error.c(exc_full_message): Exception#full_message

Add a method to retrieve a String expression of an exception,
formatted in the same way that Ruby prints an uncaught exception out.

[Feature #14141]
------------------------------------------------------------------------
r61153 | usa | 2017-12-12 20:43:18 +0900 (Tue, 12 Dec 2017) | 4 lines

remove unused variable

thanks kubo-san. c.f. [ruby-dev:50345]

------------------------------------------------------------------------
r61152 | shyouhei | 2017-12-12 20:33:26 +0900 (Tue, 12 Dec 2017) | 2 lines

NEWS entry for FrozenError [Feature #13224]

------------------------------------------------------------------------
r61151 | k0kubun | 2017-12-12 20:32:37 +0900 (Tue, 12 Dec 2017) | 1 line

irb/init.rb: make sure ARGV refers to toplevel one
------------------------------------------------------------------------
r61150 | svn | 2017-12-12 20:25:17 +0900 (Tue, 12 Dec 2017) | 1 line

* properties.
------------------------------------------------------------------------
r61149 | k0kubun | 2017-12-12 20:25:16 +0900 (Tue, 12 Dec 2017) | 12 lines

irb.rb: preserve ARGV on binding.irb

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

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

[Bug #14162] [close GH-1770]
------------------------------------------------------------------------
r61148 | hsbt | 2017-12-12 19:57:58 +0900 (Tue, 12 Dec 2017) | 4 lines

Bump version to fileutils-1.0.1.

  Update source code url metadata on rubygems.org.
  [Feature #13197][ruby-core:79455]
------------------------------------------------------------------------
r61147 | naruse | 2017-12-12 18:12:14 +0900 (Tue, 12 Dec 2017) | 1 line

Integer#allbits?, Integer#anybits?, Integer#nobits? [Feature #12753]
------------------------------------------------------------------------
r61146 | hsbt | 2017-12-12 18:01:34 +0900 (Tue, 12 Dec 2017) | 1 line

Bump version to fileutils-1.0.0 as default gems.
------------------------------------------------------------------------
r61145 | duerst | 2017-12-12 18:00:20 +0900 (Tue, 12 Dec 2017) | 2 lines

switch from http to https for Unicode data file downloads
(patch from MSP-Greg (Greg L), this closes issue #13962)
------------------------------------------------------------------------
r61144 | mrkn | 2017-12-12 18:00:19 +0900 (Tue, 12 Dec 2017) | 1 line

NEWS: mention Process.last_status
------------------------------------------------------------------------
r61143 | mrkn | 2017-12-12 18:00:17 +0900 (Tue, 12 Dec 2017) | 7 lines

process.c: add Process.last_status

* process.c (proc_s_last_status): add Process.last_status
  [ruby-core:83514] [Feature #14043]

* test/ruby/test_process.rb (test_last_status): add a test case for
  Process.last_status.
------------------------------------------------------------------------
r61142 | yui-knk | 2017-12-12 17:54:34 +0900 (Tue, 12 Dec 2017) | 20 lines

parse.y: Fix the locations of NODE_ITER (cmd_brace_block)

* parse.y: Update the locations of NODE_ITER
  when nd_iter is determined.

  ```
  a (1) {|i|}
  ```

  * Before

  ```
  NODE_ITER (line: 1, code_range: (1,6)-(1,10))
  ```

  * After

  ```
  NODE_ITER (line: 1, code_range: (1,0)-(1,11))
  ```
------------------------------------------------------------------------
r61141 | duerst | 2017-12-12 17:35:08 +0900 (Tue, 12 Dec 2017) | 1 line

mention support of emoji-related Unicode character properties in NEWS
------------------------------------------------------------------------
r61140 | svn | 2017-12-12 17:34:14 +0900 (Tue, 12 Dec 2017) | 1 line

* properties.
------------------------------------------------------------------------
r61139 | hsbt | 2017-12-12 17:34:13 +0900 (Tue, 12 Dec 2017) | 1 line

Ignore gemspec under the lib directory for documentation.
------------------------------------------------------------------------
r61138 | k0kubun | 2017-12-12 17:27:33 +0900 (Tue, 12 Dec 2017) | 1 line

NEWS: add entry for r61137
------------------------------------------------------------------------
r61137 | k0kubun | 2017-12-12 17:12:43 +0900 (Tue, 12 Dec 2017) | 5 lines

struct.c: add keyword_init option to Struct.new

to initialize struct with keyword arguments.

[Feature #11925] [close GH-1771]
------------------------------------------------------------------------
r61136 | svn | 2017-12-12 15:15:45 +0900 (Tue, 12 Dec 2017) | 1 line

* properties.
------------------------------------------------------------------------
r61135 | svn | 2017-12-12 15:15:45 +0900 (Tue, 12 Dec 2017) | 1 line

* remove trailing spaces, append newline at EOF.
------------------------------------------------------------------------
r61134 | hsbt | 2017-12-12 15:15:44 +0900 (Tue, 12 Dec 2017) | 4 lines

Merge 1-16-stable branch of bundler.

  It's rc version for bundler-1.16.1. I'm going to update it version
  after official release from bundler team.
------------------------------------------------------------------------
r61133 | yui-knk | 2017-12-12 10:13:56 +0900 (Tue, 12 Dec 2017) | 22 lines

parse.y: Fix locations of NODE_ARRAY of mlhs_head

* parse.y: Fix to only include a range of mlhs_item
  (exclude ',' form range).

  e.g. The locations of the NODE_ARRAY is fixed:

  ```
  (a,) = 1,2
  ```

  * Before

  ```
  NODE_ARRAY (line: 1, code_range: (1,1)-(1,3))
  ```

  * After

  ```
  NODE_ARRAY (line: 1, code_range: (1,1)-(1,2))
  ```
------------------------------------------------------------------------
r61132 | ko1 | 2017-12-12 09:56:24 +0900 (Tue, 12 Dec 2017) | 4 lines

catch up r61131.

* spec/ruby/core/kernel/autoload_spec.rb: should use FrozenError.

------------------------------------------------------------------------
r61131 | shyouhei | 2017-12-12 09:46:34 +0900 (Tue, 12 Dec 2017) | 11 lines

Add FrozenError as a subclass of RuntimeError

FrozenError will be used instead of RuntimeError for exceptions
raised when there is an attempt to modify a frozen object. The
reason for this change is to differentiate exceptions related
to frozen objects from generic exceptions such as those generated
by Kernel#raise without an exception class.

From: Jeremy Evans <code@jeremyevans.net>
Signed-off-by: Urabe Shyouhei <shyouhei@ruby-lang.org>

------------------------------------------------------------------------
r61130 | yui-knk | 2017-12-12 09:28:29 +0900 (Tue, 12 Dec 2017) | 21 lines

parse.y: Fix locations of NODE_ARRAY in NODE_CALL(:=~)

* parse.y (match_op_gen): Fix to only include a range of node2.

  e.g. The locations of the NODE_ARRAY is fixed:

  ```
  re =~ s1
  ```

  * Before

  ```
  NODE_ARRAY (line: 1, code_range: (1,0)-(1,8))
  ```

  * After

  ```
  NODE_ARRAY (line: 1, code_range: (1,6)-(1,8))
  ```
------------------------------------------------------------------------
r61129 | mame | 2017-12-12 09:20:58 +0900 (Tue, 12 Dec 2017) | 3 lines

ext/coverage/coverage.c: remove COVERAGE_EXPERIMENTAL_MODE

A NEWS entry is also added.
------------------------------------------------------------------------
r61128 | yui-knk | 2017-12-12 09:12:43 +0900 (Tue, 12 Dec 2017) | 22 lines

parse.y: Fix locations of NODE_ARRAY of opt_call_args

* parse.y: Fix to only include a range of assocs
  (exclude ',' form range).

  e.g. The locations of the NODE_ARRAY is fixed:

  ```
  m1(str: "bar",)
  ```

  * Before

  ```
  NODE_ARRAY (line: 1, code_range: (1,3)-(1,14))
  ```

  * After

  ```
  NODE_ARRAY (line: 1, code_range: (1,3)-(1,13))
  ```
------------------------------------------------------------------------
r61127 | marcandre | 2017-12-12 08:50:40 +0900 (Tue, 12 Dec 2017) | 1 line

NEWS: add changes for Matrix [ci-skip] [doc]
------------------------------------------------------------------------
r61126 | yui-knk | 2017-12-12 08:38:00 +0900 (Tue, 12 Dec 2017) | 21 lines

parse.y: Fix locations of NODE_ARRAY in NODE_BLOCK_PASS

* parse.y: Fix to only include a range of assocs.

  e.g. The locations of the NODE_ARRAY is fixed:

  ```
  m1(str: "bar", &blk)
  ```

  * Before

  ```
  NODE_ARRAY (line: 1, code_range: (1,3)-(1,19))
  ```

  * After

  ```
  NODE_ARRAY (line: 1, code_range: (1,3)-(1,13))
  ```
------------------------------------------------------------------------
r61125 | yui-knk | 2017-12-12 08:20:42 +0900 (Tue, 12 Dec 2017) | 4 lines

Fix a method name

* test/ruby/test_optimization.rb (test_fixnum_ge):
  Fix a method name to suppress method redefinition warnings.
------------------------------------------------------------------------
r61124 | yui-knk | 2017-12-12 08:13:47 +0900 (Tue, 12 Dec 2017) | 24 lines

parse.y: Change locations of NODE_DVAR in NODE_MASGN

* parse.y: Change the last location of NODE_DVAR to
  be equal to the first location of NODE_DVAR.
  NODE_DVAR of NODE_MASGN (nd_value) is an internal variable,
  so it has no length.

  e.g. The locations of the NODE_DVAR is changed:

  ```
  a.b {|(c,d)| e}
  ```

  * Before

  ```
  NODE_DVAR (line: 1, code_range: (1,7)-(1,10))
  ```

  * After

  ```
  NODE_DVAR (line: 1, code_range: (1,7)-(1,7))
  ```
------------------------------------------------------------------------
r61123 | ko1 | 2017-12-12 05:30:37 +0900 (Tue, 12 Dec 2017) | 10 lines

remove vm_opt_binop_dispatch().

* vm_insnhelper.c (vm_opt_binop_dispatch): removed because this function
  has several issues for micro-benchmark. Write conditions manually.
  The worst point is that we can't control value checking order.
  For example, we can assume FIXNUM arithmetic operations are most popular
  in Ruby, so that we need to check FIXNUM at first.

* test/ruby/test_optimization.rb: also fix redef bug for LE/GT/GE.

------------------------------------------------------------------------
r61122 | ko1 | 2017-12-12 04:17:25 +0900 (Tue, 12 Dec 2017) | 13 lines

do not disable `trace_` prefix insns.

* vm.c: introduce `ruby_vm_event_enabled_flags` which represents which
  event flags are enabled before.

* vm_trace.c: do not turn off `trace_` prefix instructions because turn on
  overhead is a matter if a program repeats turn on and turn off frequently.

* iseq.c (finish_iseq_build): respect `ruby_vm_event_enabled_flags`.

* vm_insnhelper.c (vm_trace): check `ruby_vm_event_flags` and disable
  lazy trace-off technique (do not disable traces).

------------------------------------------------------------------------
r61121 | usa | 2017-12-12 02:31:43 +0900 (Tue, 12 Dec 2017) | 4 lines

fixed typo

* win32/win32.c (get_ino): forgotten to specify the member.  thanks kubo-san.

------------------------------------------------------------------------
r61120 | ko1 | 2017-12-12 01:07:21 +0900 (Tue, 12 Dec 2017) | 11 lines

vm_exec.h: introduce macros for abstarction.

* vm_exec.h: declare two macros
  * START_OF_ORIGINAL_INSN()
  * DISPATCH_ORIGINAL_INSN()
  instead of inserting label and goto lines.
  For OPT_CALL_THREADED_CODE, first macro is empty and second macro
  is simply call the original insn function.

* tool/instruction.rb: use above macros.

------------------------------------------------------------------------
r61119 | usa | 2017-12-12 01:06:41 +0900 (Tue, 12 Dec 2017) | 4 lines

undef previous definition of `SIZEOF_STRUCT_STAT_ST_INO`

trying to solve build problem of MinGW.  see [Bug #14165]

------------------------------------------------------------------------
r61118 | svn | 2017-12-12 00:30:01 +0900 (Tue, 12 Dec 2017) | 1 line

* 2017-12-12
------------------------------------------------------------------------
r61117 | kou | 2017-12-12 00:30:00 +0900 (Tue, 12 Dec 2017) | 2 lines

Update test-unit to 3.2.7

------------------------------------------------------------------------
r61116 | naruse | 2017-12-11 21:09:47 +0900 (Mon, 11 Dec 2017) | 1 line

extern rb_time_utc_offset to get utc offset
------------------------------------------------------------------------
r61115 | hsbt | 2017-12-11 17:37:49 +0900 (Mon, 11 Dec 2017) | 1 line

Bump version to zlib-1.0.0 as default gems.
------------------------------------------------------------------------
r61114 | hsbt | 2017-12-11 17:18:01 +0900 (Mon, 11 Dec 2017) | 1 line

Bump version to scanf-1.0.0 as default gems.
------------------------------------------------------------------------
r61113 | hsbt | 2017-12-11 15:48:09 +0900 (Mon, 11 Dec 2017) | 1 line

Bump version to sdbm-1.0.0 as default gems.
------------------------------------------------------------------------
r61112 | hsbt | 2017-12-11 15:03:53 +0900 (Mon, 11 Dec 2017) | 1 line

Bump version to fcntl-1.0.0 as default gems.
------------------------------------------------------------------------
r61111 | mame | 2017-12-11 13:46:57 +0900 (Mon, 11 Dec 2017) | 3 lines

lib/pp.rb: remove alias for suppressing a redefinition warning.

Because there is now the same guard in prelude.rb (alias pp pp).
------------------------------------------------------------------------
r61110 | hsbt | 2017-12-11 12:56:01 +0900 (Mon, 11 Dec 2017) | 1 line

Bump version to date-1.0.0 as default gems.
------------------------------------------------------------------------
r61109 | hsbt | 2017-12-11 12:27:47 +0900 (Mon, 11 Dec 2017) | 1 line

Bump version to cmath-1.0.0 as default gems.
------------------------------------------------------------------------
r61108 | usa | 2017-12-11 11:30:42 +0900 (Mon, 11 Dec 2017) | 2 lines

bccwin is no longer supported

------------------------------------------------------------------------
r61107 | usa | 2017-12-11 11:30:21 +0900 (Mon, 11 Dec 2017) | 4 lines

depend on win32.h on Windows

* lib/mkmf.rb (depend_rules): all objs should depend on win32.h on Windows.

------------------------------------------------------------------------
r61106 | yui-knk | 2017-12-11 11:19:43 +0900 (Mon, 11 Dec 2017) | 21 lines

parse.y: Fix locations of NODE_DSTR generated by evstr2dstr_gen

* parse.y (evstr2dstr_gen): Fix to only include a range of node.

  e.g. The locations of the NODE_DSTR is fixed:

  ```
  %W[a #{b} c]
  ```

  * Before

  ```
  NODE_DSTR (line: 1, code_range: (1,3)-(1,9))
  ```

  * After

  ```
  NODE_DSTR (line: 1, code_range: (1,5)-(1,9))
  ```
------------------------------------------------------------------------
r61105 | svn | 2017-12-11 10:04:47 +0900 (Mon, 11 Dec 2017) | 1 line

* properties.
------------------------------------------------------------------------
r61104 | hsbt | 2017-12-11 10:04:46 +0900 (Mon, 11 Dec 2017) | 3 lines

Ignore to generate documentation for template files of bundler.

  [Bug #14163][ruby-core:84141]
------------------------------------------------------------------------
r61103 | yui-knk | 2017-12-11 09:28:27 +0900 (Mon, 11 Dec 2017) | 3 lines

parse.y: Remove not used argument

* parse.y (list_append_gen): location is not used.
------------------------------------------------------------------------
r61102 | yui-knk | 2017-12-11 09:06:11 +0900 (Mon, 11 Dec 2017) | 24 lines

parse.y: Fix locations of NODE_SCOPE in NODE_MODULE

* parse.y: Fix to only include a range of bodystmt.

  e.g. The locations of the NODE_SCOPE is fixed:

  ```
  module M
    def m
    end
  end
  ```

  * Before

  ```
  NODE_SCOPE (line: 4, code_range: (1,0)-(4,3))
  ```

  * After

  ```
  NODE_SCOPE (line: 4, code_range: (1,8)-(4,3))
  ```
------------------------------------------------------------------------
r61101 | yui-knk | 2017-12-11 08:44:22 +0900 (Mon, 11 Dec 2017) | 21 lines

parse.y: Fix the last location of NODE_COLON2

* parse.y: Fix to only include a range from primary_value to tCONSTANT.

  e.g. The locations of the NODE_COLON2 is fixed:

  ```
  A::B ||= 1
  ```

  * Before

  ```
  NODE_COLON2 (line: 1, code_range: (1,0)-(1,10))
  ```

  * After

  ```
  NODE_COLON2 (line: 1, code_range: (1,0)-(1,4))
  ```
------------------------------------------------------------------------
r61100 | usa | 2017-12-11 08:28:09 +0900 (Mon, 11 Dec 2017) | 2 lines

mention about [Feature #13726] and [Feature #13731]

------------------------------------------------------------------------
r61099 | yui-knk | 2017-12-11 08:27:58 +0900 (Mon, 11 Dec 2017) | 22 lines

parse.y: Change the first location of NODE_ARRAY in NODE_DSTR (nd_next->nd_next)

* parse.y (list_append_gen): Change the first location to
  start with the location of item if new list is generated.

  e.g. The locations of the NODE_ARRAY is changed:

  ```
  "#{a}.#{b}"
  ```

  * Before

  ```
  NODE_ARRAY (line: 1, code_range: (1,0)-(1,6))
  ```

  * After

  ```
  NODE_ARRAY (line: 1, code_range: (1,5)-(1,6))
  ```
------------------------------------------------------------------------
r61098 | marcandre | 2017-12-11 07:36:28 +0900 (Mon, 11 Dec 2017) | 3 lines

Add case equality arity to Enumerable#all?, any?, none? and one?,
and specialized Array#any? and Hash#any?
Based on patch by D.E. Akers [#11286]
------------------------------------------------------------------------
r61097 | svn | 2017-12-11 02:26:59 +0900 (Mon, 11 Dec 2017) | 1 line

* 2017-12-11
------------------------------------------------------------------------
r61096 | usa | 2017-12-11 02:26:58 +0900 (Mon, 11 Dec 2017) | 12 lines

support 128bit ino on Windows (if available)

* win32/win32.c, include/ruby/win32.h (stati128, rb_{,u,l,ul}stati128): rename
  from stati64ns, change the type of st_ino to 64bit and added st_inohigh.

* dir.c, file.c (stat, lstat): follow above changes.

* file.c (rb_stat_ino): support 128bit ino.

* win32/win32.c (rb_{,u,l,ul}stati128): ditto.
  [Feature #13731]

------------------------------------------------------------------------
r61095 | yui-knk | 2017-12-09 22:13:58 +0900 (Sat, 09 Dec 2017) | 22 lines

parse.y: Fix locations of NODE_ARRAY in NODE_ATTRASGN (nd_args)

* parse.y (arg_append_gen): Fix to only include a range of
  node2 if new list is generated.

  e.g. The locations of the NODE_ARRAY is fixed:

  ```
  x.default = 5
  ```

  * Before

  ```
  NODE_ARRAY (line: 1, code_range: (1,0)-(1,13))
  ```

  * After

  ```
  NODE_ARRAY (line: 1, code_range: (1,12)-(1,13))
  ```
------------------------------------------------------------------------
r61094 | nobu | 2017-12-09 20:58:25 +0900 (Sat, 09 Dec 2017) | 1 line

test_process.rb (test_maxgroups): add assertions
------------------------------------------------------------------------
r61093 | yui-knk | 2017-12-09 18:44:03 +0900 (Sat, 09 Dec 2017) | 25 lines

parse.y: Change locations of NODE_BLOCK in NODE_RESBODY (nd_body)

* parse.y: Change to only include a range from exc_var to compstmt.

  e.g. The locations of the NODE_BLOCK is changed:

  ```
  begin
    :a
  rescue E => e
    :b
  end
  ```

  * Before

  ```
  NODE_BLOCK (line: 3, code_range: (3,0)-(5,3))
  ```

  * After

  ```
  NODE_BLOCK (line: 3, code_range: (3,9)-(4,4))
  ```
------------------------------------------------------------------------
r61092 | yui-knk | 2017-12-09 12:52:59 +0900 (Sat, 09 Dec 2017) | 23 lines

parse.y: Fix locations of NODE_SCOPE in NODE_SCLASS

* parse.y: Fix to only include a range of bodystmt.

  e.g. The locations of the NODE_SCOPE is fixed:

  ```
  class << []
    def m; end
  end
  ```

  * Before

  ```
  NODE_SCOPE (line: 3, code_range: (1,0)-(3,3))
  ```

  * After

  ```
  NODE_SCOPE (line: 3, code_range: (2,2)-(3,3))
  ```
------------------------------------------------------------------------
r61091 | normal | 2017-12-09 12:46:39 +0900 (Sat, 09 Dec 2017) | 15 lines

Dir#chdir keeps GVL if passed block

On further examination, Dir.chdir with a block from multiple
threads is thread-unsafe given our use of the chdir_blocking and
chdir_thread global variables.

This bug was only introduced in r60583 so not part of any stable
release.

Dir.chdir without a block can still make senses in a MT context
as only one thread could be cwd-sensitive and other threads do
not care which directory they're in.

* dir.c (dir_chdir): keep GVL here
  (dir_s_chdir): release GVL if no block given
------------------------------------------------------------------------
r61090 | yui-knk | 2017-12-09 12:18:55 +0900 (Sat, 09 Dec 2017) | 21 lines

parse.y: Fix locations of NODE_ARRAY in NODE_OPCALL(nd_args)

* parse.y: Fix to only include a range of arg1.

  e.g. The locations of the NODE_ARRAY is fixed:

  ```
  1 + 2
  ```

  * Before

  ```
  NODE_ARRAY (line: 1, code_range: (1,0)-(1,5))
  ```

  * After

  ```
  NODE_ARRAY (line: 1, code_range: (1,4)-(1,5))
  ```
------------------------------------------------------------------------
r61089 | yui-knk | 2017-12-09 12:03:34 +0900 (Sat, 09 Dec 2017) | 23 lines

parse.y: Fix locations of NODE_SCOPE in NODE_CLASS

* parse.y: Fix to only include a range of bodystmt.

  e.g. The locations of the NODE_SCOPE is fixed:

  ```
  class A
    def a; end
  end
  ```

  * Before

  ```
  NODE_SCOPE (line: 3, code_range: (1,0)-(3,3))
  ```

  * After

  ```
  NODE_SCOPE (line: 3, code_range: (1,7)-(3,3))
  ```
------------------------------------------------------------------------
r61088 | stomar | 2017-12-09 07:51:42 +0900 (Sat, 09 Dec 2017) | 1 line

doc/syntax/refinements.rdoc: fix typos
------------------------------------------------------------------------
r61087 | stomar | 2017-12-09 07:43:47 +0900 (Sat, 09 Dec 2017) | 1 line

bignum.c: [DOC] simplify comment
------------------------------------------------------------------------
r61086 | stomar | 2017-12-09 07:43:05 +0900 (Sat, 09 Dec 2017) | 1 line

NEWS: grammar fix
------------------------------------------------------------------------
r61085 | stomar | 2017-12-09 07:42:19 +0900 (Sat, 09 Dec 2017) | 1 line

ext/strscan/strscan.c: [DOC] grammar fixes
------------------------------------------------------------------------
r61084 | svn | 2017-12-09 03:51:57 +0900 (Sat, 09 Dec 2017) | 1 line

* 2017-12-09
------------------------------------------------------------------------
r61083 | normal | 2017-12-09 03:51:56 +0900 (Sat, 09 Dec 2017) | 15 lines

webrick: allow shutdown after StartCallback

We must to ensure the @status ivar is set to :Running before
running StartCallback, otherwise Webrick::Server#stop will not
change the @status to :Shutdown properly.

Note: I have not been able to reproduce the original issue but
understood at least part of the problem and fixed it with this
commit.  However, the original reporter (Peak Xu) was still able
to reproduce the problem on 1.9.2 p180 on Windows, so I'm not
sure what else might be going on.  Ruby threading and
synchronization primitives have changed a lot since 1.9.2, so
maybe that was fixed elsewhere.

* lib/webrick/server.rb: call StartCallback sooner [Bug #4841]
------------------------------------------------------------------------
r61082 | nobu | 2017-12-08 17:38:57 +0900 (Fri, 08 Dec 2017) | 1 line

lib/pp.rb: no rdoc of alias to suppress a warning
------------------------------------------------------------------------
r61081 | nobu | 2017-12-08 16:35:07 +0900 (Fri, 08 Dec 2017) | 5 lines

test_file_exhaustive.rb: get rid of failures

* test/ruby/test_file_exhaustive.rb (test_utime_symlinkfile):
  under some condition, symlink file is also affected by utimes()
  on Linux.
------------------------------------------------------------------------
r61080 | nobu | 2017-12-08 16:17:34 +0900 (Fri, 08 Dec 2017) | 4 lines

pp.rb: rdoc

* lib/pp.rb (pp): move pp alias before its rdoc, not to prevent
  parsing.
------------------------------------------------------------------------
r61079 | nobu | 2017-12-08 16:13:04 +0900 (Fri, 08 Dec 2017) | 5 lines

test_file_exhaustive.rb: test_utime_symlinkfile

* test_file_exhaustive.rb (test_utime_symlinkfile): investigate
  failures on some platforms.  wait a second to tell if symlink
  atime is changed.
------------------------------------------------------------------------
r61078 | nobu | 2017-12-08 15:24:16 +0900 (Fri, 08 Dec 2017) | 1 line

test_file_exhaustive.rb: fix arguments order
------------------------------------------------------------------------
r61077 | nobu | 2017-12-08 15:20:06 +0900 (Fri, 08 Dec 2017) | 4 lines

win32.c: check error code

* win32/win32.c (w32_io_info): check GetFileInformationByHandleEx
  error code to fallback to GetFileInformationByHandle.
------------------------------------------------------------------------
r61076 | nobu | 2017-12-08 14:51:19 +0900 (Fri, 08 Dec 2017) | 7 lines

support gperf 3.1

* tool/gperf.sed: extracted sed commands to a script.  ANSI-C code
  produced by gperf 3.1 declares length arguments as `size_t`.  it
  causes conflict with existing declarations, and needs casts for
  a local variable and return statements.
  [Feature #13883]
------------------------------------------------------------------------
r61075 | yui-knk | 2017-12-08 09:45:23 +0900 (Fri, 08 Dec 2017) | 3 lines

parse.y Fix compile error

ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
------------------------------------------------------------------------
r61074 | yui-knk | 2017-12-08 09:33:38 +0900 (Fri, 08 Dec 2017) | 22 lines

parse.y: Fix locations of modifier_rescue

* parse.y: Fix to only include a range from modifier_rescue
  to stmt (or arg).

  e.g. The locations of the NODE_RESBODY is fixed:

  ```
  a rescue 1
  ```

  * Before

  ```
  NODE_RESBODY (line: 1, code_range: (1,0)-(1,10))
  ```

  * After

  ```
  NODE_RESBODY (line: 1, code_range: (1,2)-(1,10))
  ```
------------------------------------------------------------------------
r61073 | svn | 2017-12-08 08:36:00 +0900 (Fri, 08 Dec 2017) | 1 line

* 2017-12-08
------------------------------------------------------------------------
r61072 | yui-knk | 2017-12-08 08:35:59 +0900 (Fri, 08 Dec 2017) | 21 lines

parse.y: Fix locations of string

* parse.y: Fix to include locations of tSTRING_BEG and tSTRING_END.

  e.g. The locations of the NODE_STR is fixed:

  ```
  "a"
  ```

  * Before

  ```
  NODE_STR (line: 1, code_range: (1,1)-(1,2))
  ```

  * After

  ```
  NODE_STR (line: 1, code_range: (1,0)-(1,3))
  ```
------------------------------------------------------------------------
r61071 | hsbt | 2017-12-07 17:08:56 +0900 (Thu, 07 Dec 2017) | 4 lines

Follow up r60970 for bundler's examples.

  r60970 break Gemfile.lock format with file protocol after bundle
  install/update. I addd hostname to these examples.
------------------------------------------------------------------------
r61070 | yui-knk | 2017-12-07 15:38:49 +0900 (Thu, 07 Dec 2017) | 23 lines

parse.y: Fix locations of array

* parse.y (make_array): Set locations of ary to
  include locations of start token (tLBRACK, tWORDS_BEG, ...)
  and end token (']', tSTRING_END, ...) of array.

  e.g. The locations of the NODE_ARRAY is fixed:

  ```
  [1, 2, 3]
  ```

  * Before

  ```
  NODE_ARRAY (line: 1, code_range: (1,1)-(1,8))
  ```

  * After

  ```
  NODE_ARRAY (line: 1, code_range: (1,0)-(1,9))
  ```
------------------------------------------------------------------------
r61069 | nobu | 2017-12-07 13:42:16 +0900 (Thu, 07 Dec 2017) | 1 line

win32/win32.c: removed a stale comment
------------------------------------------------------------------------
r61068 | nobu | 2017-12-07 13:12:42 +0900 (Thu, 07 Dec 2017) | 4 lines

parse.y: fix for old compilers

* parse.y (arg_value): initialization of aggregation type with
  non-constant values is not allowed in C89.
------------------------------------------------------------------------
r61067 | nobu | 2017-12-07 13:03:44 +0900 (Thu, 07 Dec 2017) | 5 lines

win32.c: fallback to old API

* win32/win32.c (w32_io_info, rb_w32_file_identical_p): fallback
  to GetFileInformationByHandle if GetFileInformationByHandleEx
  failed.  it seems not working on network drives.
------------------------------------------------------------------------
r61066 | yui-knk | 2017-12-07 12:00:36 +0900 (Thu, 07 Dec 2017) | 21 lines

parse.y: Fix locations of dsym

* parse.y: Fix to only include a range from tSTRING_BEG to tLABEL_END.

  e.g. The locations of the NODE_LIT is fixed:

  ```
  { "a": 10 }
  ```

  * Before

  ```
  NODE_LIT (line: 1, code_range: (1,2)-(1,9))
  ```

  * After

  ```
  NODE_LIT (line: 1, code_range: (1,2)-(1,6))
  ```
------------------------------------------------------------------------
r61065 | yui-knk | 2017-12-07 11:48:38 +0900 (Thu, 07 Dec 2017) | 22 lines

parse.y: Fix locations of dsym

* parse.y (dsym_node_gen): Always set locations
  to include locations of tSYMBEG and tSTRING_END.

  e.g. The locations of the NODE_LIT is fixed:

  ```
  :"a"
  ```

  * Before

  ```
  NODE_LIT (line: 1, code_range: (1,2)-(1,3))
  ```

  * After

  ```
  NODE_LIT (line: 1, code_range: (1,0)-(1,4))
  ```
------------------------------------------------------------------------
r61064 | yui-knk | 2017-12-07 11:36:51 +0900 (Thu, 07 Dec 2017) | 22 lines

parse.y: Fix locations of regexp

* parse.y (new_regexp_gen): Always set locations
  to include locations of tREGEXP_BEG and tREGEXP_END.

  e.g. The locations of the NODE_LIT is fixed:

  ```
  /a/
  ```

  * Before

  ```
  NODE_LIT (line: 1, code_range: (1,1)-(1,2))
  ```

  * After

  ```
  NODE_LIT (line: 1, code_range: (1,0)-(1,3))
  ```
------------------------------------------------------------------------
r61063 | yui-knk | 2017-12-07 11:25:37 +0900 (Thu, 07 Dec 2017) | 22 lines

parse.y: Fix locations of xstring

* parse.y (new_xstring_gen): Always set locations
  to include locations of tXSTRING_BEG and tSTRING_END.

  e.g. The locations of the NODE_XSTR is fixed:

  ```
  `a`
  ```

  * Before

  ```
  NODE_XSTR (line: 1, code_range: (1,1)-(1,2))
  ```

  * After

  ```
  NODE_XSTR (line: 1, code_range: (1,0)-(1,3))
  ```
------------------------------------------------------------------------
r61062 | shugo | 2017-12-07 08:56:04 +0900 (Thu, 07 Dec 2017) | 1 line

remove unnecessary read_timeout.
------------------------------------------------------------------------
r61061 | mame | 2017-12-07 07:43:54 +0900 (Thu, 07 Dec 2017) | 1 line

eval_intern.h: fix a typo
------------------------------------------------------------------------
r61060 | normal | 2017-12-07 06:51:10 +0900 (Thu, 07 Dec 2017) | 3 lines

cont.c: update comment for ec refactoring

* cont.c (fiber_switch): update comment (ec.fiber => ec->fiber_ptr)
------------------------------------------------------------------------
r61059 | svn | 2017-12-07 00:02:32 +0900 (Thu, 07 Dec 2017) | 1 line

* 2017-12-07
------------------------------------------------------------------------
r61058 | kazu | 2017-12-07 00:02:31 +0900 (Thu, 07 Dec 2017) | 4 lines

`Integer#pow(b)` accepts numeric

instead of integer only and returns numeric instead of integer only
same as `Integer#**`
------------------------------------------------------------------------
r61057 | nobu | 2017-12-06 21:36:37 +0900 (Wed, 06 Dec 2017) | 4 lines

numeric.c: rb_int_powm rdoc

* numeric.c (Init_Numeric): let rdoc know that rb_int_powm is
  defined in bignum.c.  [Feature #12508] [Feature #11003]
------------------------------------------------------------------------
r61056 | nobu | 2017-12-06 20:36:42 +0900 (Wed, 06 Dec 2017) | 5 lines

vcs.rb: fix r61054

* tool/vcs.rb (VCS::SVN.get_revisions): cmd_readd_at expects the
  whole arguments for IO.popen as the second argument, that is an
  array of command and mode.
------------------------------------------------------------------------
r61055 | nobu | 2017-12-06 20:18:53 +0900 (Wed, 06 Dec 2017) | 4 lines

file2lastrev.rb: suppress_not_found

* tool/file2lastrev.rb: exit successfully when command not found,
  and if --suppress_not_found is given.
------------------------------------------------------------------------
r61054 | nobu | 2017-12-06 20:18:52 +0900 (Wed, 06 Dec 2017) | 4 lines

vcs.rb: raise NotFoundError when command not found

* tool/vcs.rb (cmd_pipe_at, cmd_read_at, system): moved from GIT
  to VCS, and now raise VCS::NotFoundError when command not found.
------------------------------------------------------------------------
r61053 | hsbt | 2017-12-06 17:35:13 +0900 (Wed, 06 Dec 2017) | 1 line

Bump fiddle-1.0.0 for released version.
------------------------------------------------------------------------
r61052 | hsbt | 2017-12-06 17:34:34 +0900 (Wed, 06 Dec 2017) | 1 line

Bump gdbm-2.0.0 for released versionn.
------------------------------------------------------------------------
r61051 | hsbt | 2017-12-06 17:32:01 +0900 (Wed, 06 Dec 2017) | 1 line

Bump dbm-1.0.0 for released version.
------------------------------------------------------------------------
r61050 | mame | 2017-12-06 16:26:54 +0900 (Wed, 06 Dec 2017) | 4 lines

compile.c (rb_iseq_compile_node): Move the check for imemo_ifunc to top

Applying nd_type to imemo_ifunc object seems harmless fortunately, but
very dirty (to me).
------------------------------------------------------------------------
r61049 | mame | 2017-12-06 16:19:17 +0900 (Wed, 06 Dec 2017) | 4 lines

vm_core.h (RUBY_EVENT_COVERAGE_BRANCH): renamed

This change moves RUBY_EVENT_COVERAGE from include/ruby/ruby.h to
vm_core.h and renames it to RUBY_EVENT_COVERAGE_BRANCH.
------------------------------------------------------------------------
r61048 | mame | 2017-12-06 16:19:16 +0900 (Wed, 06 Dec 2017) | 3 lines

Remove RUBY_EVENT_SPECIFIED_LINE

Follow up of r61044
------------------------------------------------------------------------
r61047 | mame | 2017-12-06 16:04:49 +0900 (Wed, 06 Dec 2017) | 1 line

insns.def (tracebranch): renamed from `trace2`
------------------------------------------------------------------------
r61046 | mame | 2017-12-06 16:04:48 +0900 (Wed, 06 Dec 2017) | 4 lines

thread.c (update_branch_coverage): renamed from `update_coverage`

Now this function only deals with branch events, so this change renames
it and remove complexity that is no longer needed.
------------------------------------------------------------------------
r61045 | ko1 | 2017-12-06 15:54:40 +0900 (Wed, 06 Dec 2017) | 1 line

fix last commit
------------------------------------------------------------------------
r61044 | ko1 | 2017-12-06 15:53:15 +0900 (Wed, 06 Dec 2017) | 7 lines

remove unsupported RUBY_EVENT_SPECIFIED_LINE.

* vm_trace.c (get_event_id): remove experimental in past, and not supported
  now feature.

* vm_trace.c (tracepoint_inspect): ditto.

------------------------------------------------------------------------
r61043 | mame | 2017-12-06 15:39:05 +0900 (Wed, 06 Dec 2017) | 5 lines

thread.c (update_line_coverage): Use RUBY_EVENT_LINE

This change makes coverage use the general event type RUBY_EVENT_LINE
instead of a special event type RUBY_EVENT_COVERAGE.
Just a refactoring.
------------------------------------------------------------------------
r61042 | nobu | 2017-12-06 14:22:19 +0900 (Wed, 06 Dec 2017) | 4 lines

prelude.c.tmpl: fix line number

* template/prelude.c.tmpl (Init_prelude): fix line number of
  preludes.  line of prelude_eval is an int, not a VALUE.
------------------------------------------------------------------------
r61041 | mame | 2017-12-06 12:19:17 +0900 (Wed, 06 Dec 2017) | 1 line

eval_intern.h: prevent core dump with clang and make test-all
------------------------------------------------------------------------
r61040 | ko1 | 2017-12-06 12:16:08 +0900 (Wed, 06 Dec 2017) | 5 lines

remove `PUSH_TAG`/`EXEC_AG`/`POP_TAG`/`JUMO_TAG`.

* eval_intern.h: remove non-`EC_` prefix *_TAG() macros.
  Use `EC_` prefix macros explicitly.

------------------------------------------------------------------------
r61039 | yui-knk | 2017-12-06 12:09:55 +0900 (Wed, 06 Dec 2017) | 28 lines

parse.y: Fix the first location of heredoc identifier

* parse.y (parser_heredoc_identifier):
  Put length of term at the head of rb_strterm_heredoc_struct.term.

* parse.y (rb_parser_set_location_from_strterm_heredoc):
  Use length of term to calculate first_loc.column.

  e.g. The locations of the NODE_DSTR is fixed:

  ```
  a <<STR
  123
  #{:a}
  STR
  ```

  * Before

  ```
  NODE_DSTR (line: 3, code_range: (1,3)-(1,7))
  ```

  * After

  ```
  NODE_DSTR (line: 3, code_range: (1,2)-(1,7))
  ```
------------------------------------------------------------------------
r61038 | mame | 2017-12-06 10:41:05 +0900 (Wed, 06 Dec 2017) | 3 lines

parse.y: remove redefined typedef

Clang told me that this is C11 feature.
------------------------------------------------------------------------
r61037 | yui-knk | 2017-12-06 09:44:18 +0900 (Wed, 06 Dec 2017) | 28 lines

parse.y: Fix locations of HEREDOC

* parse.y (rb_parser_set_location_from_strterm_heredoc):
  Set locations based on rb_strterm_heredoc_t.

* parse.y (yylex): Set yylloc based on rb_strterm_heredoc_t
  when parsing heredoc.

  e.g. The locations of the NODE_DSTR is changed:

  ```
  a <<STR
  123
  #{:a}
  STR
  ```

  * Before

  ```
  NODE_DSTR (line: 3, code_range: (3,0)-(1,7))
  ```

  * After

  ```
  NODE_DSTR (line: 3, code_range: (1,3)-(1,7))
  ```
------------------------------------------------------------------------
r61036 | svn | 2017-12-06 08:34:15 +0900 (Wed, 06 Dec 2017) | 1 line

* 2017-12-06
------------------------------------------------------------------------
r61035 | yui-knk | 2017-12-06 08:34:14 +0900 (Wed, 06 Dec 2017) | 5 lines

test_syntax.rb: Add a test case for `not()`

* test/ruby/test_syntax.rb (TestSyntax#test_keyword_not_parens):
  Currently `not()` is tested by only TestRipper::ParserEvents#test_unary,
  so I think it's better to test this syntax directly.
------------------------------------------------------------------------
r61034 | nobu | 2017-12-05 22:49:40 +0900 (Tue, 05 Dec 2017) | 4 lines

parse.y: nd_line of new node

* parse.y (nd_set_loc): set nd_line of the newly created node to
  the first location.
------------------------------------------------------------------------
r61033 | nobu | 2017-12-05 22:46:21 +0900 (Tue, 05 Dec 2017) | 4 lines

parse.y: nd_line of call_uni_op

* parse.y (call_uni_op): set nd_line to the unary operator
  location, same as non-operator method calls.
------------------------------------------------------------------------
r61032 | nobu | 2017-12-05 22:42:46 +0900 (Tue, 05 Dec 2017) | 4 lines

parse.y: nd_line of logop

* parse.y (logop): set nd_line to the logical operator location,
  same as non-operator method calls.
------------------------------------------------------------------------
r61031 | nobu | 2017-12-05 22:38:01 +0900 (Tue, 05 Dec 2017) | 4 lines

parse.y: nd_line of match_op

* parse.y (match_op): set nd_line to the match operator location,
  same as non-operator method calls.
------------------------------------------------------------------------
r61030 | nobu | 2017-12-05 22:30:06 +0900 (Tue, 05 Dec 2017) | 4 lines

parse.y: nd_line of call_bin_op

* parse.y (call_bin_op): set nd_line to the binary operator
  location, same as non-operator method calls.
------------------------------------------------------------------------
r61029 | hsbt | 2017-12-05 20:08:00 +0900 (Tue, 05 Dec 2017) | 3 lines

Bump version to rdoc-6.0.0.

  There is no changes from rdoc-6.0.0.bebta4.
------------------------------------------------------------------------
r61028 | mame | 2017-12-05 18:45:03 +0900 (Tue, 05 Dec 2017) | 1 line

iseq.c (iseq_load, iseq_data_to_ary): Fix a type error (for clang)
------------------------------------------------------------------------
r61027 | mame | 2017-12-05 17:58:57 +0900 (Tue, 05 Dec 2017) | 3 lines

Hide ISeq#load

I disclosed it incorrectly at r61025.  Sorry.
------------------------------------------------------------------------
r61026 | mame | 2017-12-05 17:56:51 +0900 (Tue, 05 Dec 2017) | 5 lines

ext/coverage/coverage.c: method coverage has column info. of method def.

This change makes method coverage result have not only first lineno of
method defintion, but also code range (i.e. first lineno, first column,
last lineno, and last column).
------------------------------------------------------------------------
r61025 | mame | 2017-12-05 17:56:50 +0900 (Tue, 05 Dec 2017) | 4 lines

vm_core.h (rb_iseq_locatoin_t): add a field `code_range`

This change makes each ISeq keep NODE's code range.  This information is
needed for method coverage.
------------------------------------------------------------------------
r61024 | nobu | 2017-12-05 17:50:14 +0900 (Tue, 05 Dec 2017) | 4 lines

node.c: FIELD_BLOCK

* node.c (COMPOUND_FIELD, FIELD_BLOCK): moved block outside
  arguments like as SIMPLE_FIELD.
------------------------------------------------------------------------
r61023 | mame | 2017-12-05 16:16:42 +0900 (Tue, 05 Dec 2017) | 11 lines

Revamp method coverage to support define_method

Traditionally, method coverage measurement was implemented by inserting
`trace2` instruction to the head of method iseq.  So, it just measured
methods defined by `def` keyword.

This commit drastically changes the measuring mechanism of method
coverage; at `RUBY_EVENT_CALL`, it keeps a hash from rb_method_entry_t*
to runs (i.e., it counts the runs per method entry), and at
`Coverage.result`, it creates the result hash by enumerating all
`rb_method_entry_t*` objects (by `ObjectSpace.each_object`).
------------------------------------------------------------------------
r61022 | mame | 2017-12-05 13:23:06 +0900 (Tue, 05 Dec 2017) | 3 lines

node.c: a simple notation for code range of NODEs

This affects only `--dump=parsetree` and `--dump=parsetree_with_comment`.
------------------------------------------------------------------------
r61021 | svn | 2017-12-05 10:10:15 +0900 (Tue, 05 Dec 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r61020 | hsbt | 2017-12-05 10:10:13 +0900 (Tue, 05 Dec 2017) | 22 lines

vm_core.h: Increase the Fiber stack size on powerpc64

Currently the Fiber stack size is small for powerpc64 and it causes
test/ruby/test_backtrace.rb test to break, since it is using a 8kb stack
size.

It breaks on powerpc64 due to the fact that a frame in the stack is
usually 50% bigger on powerpc64 compared to Intel, due to some
considerations:

 * The powerpc64 minimum frame is 2x bigger than on Intel
 * Powerpc has more registers that might be saved in the frame compared
   to Intel.

I ran the same ruby test that is failing on both Intel and Powerpc, and
each Fiber frame is ~50% bigger on powerpc64 for every single lambda
function, thus, we need to increase the stack size on powerpc64 to
accomodate the same tests/applications.

This fixes bug#13757.

Signed-off-by: Breno Leitao <leitao@debian.org>
------------------------------------------------------------------------
r61019 | shugo | 2017-12-05 09:59:40 +0900 (Tue, 05 Dec 2017) | 3 lines

Remove unnecessary read_timeout.

http://ci.rvm.jp/results/trunk-asserts-nopara@ruby-sky1/219867
------------------------------------------------------------------------
r61018 | nobu | 2017-12-05 09:09:58 +0900 (Tue, 05 Dec 2017) | 3 lines

bignum.c: unified int_pow_tmp2

* bignum.c (int_pow_tmp2): unified DLONG and none DLONG code.
------------------------------------------------------------------------
r61017 | svn | 2017-12-05 08:59:03 +0900 (Tue, 05 Dec 2017) | 1 line

* 2017-12-05
------------------------------------------------------------------------
r61016 | yui-knk | 2017-12-05 08:59:02 +0900 (Tue, 05 Dec 2017) | 27 lines

parse.y: Fix locations of NODE_*ASGN and NODE_ERRINFO

* parse.y: Fix to only include a range of exc_var.

  e.g. The locations of the NODE_DASGN_CURR and NODE_ERRINFO are fixed:

  ```
  begin
    1
  rescue => e
    2
  end
  ```

  * Before

  ```
  NODE_DASGN_CURR (line: 3, first_lineno: 3, first_column: 0, last_lineno: 5, last_column: 3)
  NODE_ERRINFO (line: 5, first_lineno: 3, first_column: 0, last_lineno: 5, last_column: 3)
  ```

  * After

  ```
  NODE_DASGN_CURR (line: 3, first_lineno: 3, first_column: 7, last_lineno: 3, last_column: 11)
  NODE_ERRINFO (line: 5, first_lineno: 3, first_column: 7, last_lineno: 3, last_column: 11)
  ```
------------------------------------------------------------------------
r61015 | nobu | 2017-12-04 21:49:20 +0900 (Mon, 04 Dec 2017) | 3 lines

win32.c: fix error on mingw

* win32/win32.c (FILE_ID_128): defined on mingw already.
------------------------------------------------------------------------
r61014 | kazu | 2017-12-04 21:31:44 +0900 (Mon, 04 Dec 2017) | 1 line

[DOC] improve rdoc formatting for links [ci skip]
------------------------------------------------------------------------
r61013 | usa | 2017-12-04 19:48:30 +0900 (Mon, 04 Dec 2017) | 10 lines

support nanosec file timestamp on newer Windows

Support nanosec file timestamp on Windows 8 or later.
Original patches are written by kubo (Kubo Takehiro).
Windows 7 and earlier also supports nanosec file timestamp, but it's too
accurate than system time.  so, this feature is disabled on such versions.
[Feature #13726]

this change also includes [Misc #13702]

------------------------------------------------------------------------
r61012 | nobu | 2017-12-04 19:41:45 +0900 (Mon, 04 Dec 2017) | 4 lines

bignum.c: explicit casts

* bignum.c (int_pow_tmp2): explicitly cast to get rid of implicit
  conversion.
------------------------------------------------------------------------
r61011 | yui-knk | 2017-12-04 17:20:07 +0900 (Mon, 04 Dec 2017) | 22 lines

parse.y: Fix a location of NODE_BLOCK_PASS

* parse.y (arg_append_gen): Update the last location of
  NODE_BLOCK_PASS when NODE is appended to nd_head.

  e.g. The locations of the NODE_BLOCK_PASS is fixed:

  ```
  o[1, &bl] = :c
  ```

  * Before

  ```
  NODE_BLOCK_PASS (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 8)
  ```

  * After

  ```
  NODE_BLOCK_PASS (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 14)
  ```
------------------------------------------------------------------------
r61010 | yui-knk | 2017-12-04 16:50:42 +0900 (Mon, 04 Dec 2017) | 22 lines

parse.y: Fix a location of NODE_ARGSCAT

* parse.y (arg_append_gen): Update the last location of
  NODE_ARGSCAT when NODE is appended to nd_body.

  e.g. The locations of the NODE_ARGSCAT is fixed:

  ```
  m(*a, :b, :c)
  ```

  * Before

  ```
  NODE_ARGSCAT (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 8)
  ```

  * After

  ```
  NODE_ARGSCAT (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 12)
  ```
------------------------------------------------------------------------
r61009 | nobu | 2017-12-04 16:37:21 +0900 (Mon, 04 Dec 2017) | 7 lines

hide internal data objects

* marshal.c (compat_allocator_table): hide the wrapper object of
  compat_allocator_tbl.

* process.c (rb_execarg_new): hide wrapper objects of struct
  rb_execarg.
------------------------------------------------------------------------
r61008 | yui-knk | 2017-12-04 16:16:31 +0900 (Mon, 04 Dec 2017) | 22 lines

parse.y: Fix a location of NODE_ARRAY in NODE_ARGSCAT

* parse.y: Fix the first location to be equal to the location
  of the first element of NODE_ARRAY.

  e.g. The locations of the NODE_ARRAY is fixed:

  ```
  m(*a, :b, :c)
  ```

  * Before

  ```
  NODE_ARRAY (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 12)
  ```

  * After

  ```
  NODE_ARRAY (line: 1, first_lineno: 1, first_column: 6, last_lineno: 1, last_column: 12)
  ```
------------------------------------------------------------------------
r61007 | usa | 2017-12-04 15:41:28 +0900 (Mon, 04 Dec 2017) | 5 lines

try to pass compiling with VC12

* win32/win32.c (FILE_ID_128): it's not defined in SDK with VC10, but seems to
  be defined in SDK with VC12.

------------------------------------------------------------------------
r61006 | nobu | 2017-12-04 15:08:30 +0900 (Mon, 04 Dec 2017) | 5 lines

ifaddr.c: fix memsize

* ext/socket/ifaddr.c (ifaddr_memsize): do not count the whole
  rb_ifaddr_t array for each elements.  the header size is
  included in the first element for the time being.
------------------------------------------------------------------------
r61005 | usa | 2017-12-04 12:33:48 +0900 (Mon, 04 Dec 2017) | 7 lines

support `File.identical?` on ReFS

* file.c (rb_file_idenitical_p): move Windows dependent code to win32/win32.c.

* win32/win32.c (rb_w32_file_identical_p): support ReFS.
  see [Feature #13731] [ruby-dev:50166]

------------------------------------------------------------------------
r61004 | mrkn | 2017-12-04 11:35:41 +0900 (Mon, 04 Dec 2017) | 1 line

NEWS: add Integer#pow(b, m)
------------------------------------------------------------------------
r61003 | mrkn | 2017-12-04 11:35:40 +0900 (Mon, 04 Dec 2017) | 34 lines

bignum.c, numeric.c: add Integer#pow(b, m)

This commit is based on the pull-request #1320 created by Makoto Kishimoto.
[Feature #12508] [Feature #11003] [close GH-1320]

* bignum.c (rb_int_powm): Added for Integer#pow(b, m).

* internal.h (rb_int_powm): Declared to refer in numeric.c.

* bignum.c (bary_powm_gmp): Added for Integer#pow(b, m) using GMP.

* bignum.c (int_pow_tmp1): Added for implementing Integer#pow(b, m).

* bignum.c (int_pow_tmp2, int_pow_tmp3): ditto.

* internal.h (rb_num_positive_int_p): Moved from numeric.c for sharing
  the definition with bignum.c.

* internal.h (rb_num_negative_int_p, rb_num_compare_with_zero): ditto.

* numeric.c(negative_int_p): Moved to internal.h for sharing the
  definition with bignum.c.

* numeric.c (positive_int_p, compare_with_zero): ditto.

* numeric.c (rb_int_odd_p): Exported (renamed from int_odd_p).

* internal.h (rb_int_odd_p): ditto.

* internal.h (HALF_LONG_MSB): Added.

* numeric.c (SQRT_LONG_MAX): Redefined by using HALF_LONG_MSB.

* test/ruby/test_numeric.rb (test_pow): Added for Integer#pow(b, m).
------------------------------------------------------------------------
r61002 | usa | 2017-12-04 09:23:31 +0900 (Mon, 04 Dec 2017) | 5 lines

revert r60999

* test/logger/test_logdevice.rb: revert r60999 because it was caused by not
  committed changes.

------------------------------------------------------------------------
r61001 | nobu | 2017-12-04 08:54:45 +0900 (Mon, 04 Dec 2017) | 4 lines

ifaddr.c: unused member

* ext/socket/ifaddr.c (struct rb_ifaddr_tag): removed set but
  unused member root.
------------------------------------------------------------------------
r61000 | yui-knk | 2017-12-04 08:12:01 +0900 (Mon, 04 Dec 2017) | 21 lines

parse.y: Fix a location of NODE_ZARRAY

* parse.y: Fix to only include a range of opt_call_args.

  e.g. The locations of the NODE_ZARRAY is fixed:

  ```
  a[] ||= 1
  ```

  * Before

  ```
  NODE_ZARRAY (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 9)
  ```

  * After

  ```
  NODE_ZARRAY (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 3)
  ```
------------------------------------------------------------------------
r60999 | svn | 2017-12-04 00:49:06 +0900 (Mon, 04 Dec 2017) | 1 line

* 2017-12-04
------------------------------------------------------------------------
r60998 | usa | 2017-12-04 00:49:05 +0900 (Mon, 04 Dec 2017) | 5 lines

give a change to determine to rotate the log or not

* test/logger/test_logdevice.rb (test_shifting_{age,period_suffix}): give a
  chance to determine to rotate the log or not.

------------------------------------------------------------------------
r60997 | yui-knk | 2017-12-03 21:44:47 +0900 (Sun, 03 Dec 2017) | 1 line

parse.y (new_args_gen): Set the location of NODE_ARGS
------------------------------------------------------------------------
r60996 | yui-knk | 2017-12-03 21:27:01 +0900 (Sun, 03 Dec 2017) | 21 lines

parse.y: Fix a location of NODE_DVAR in rb_args_info

* parse.y (new_args_tail_gen): Set only a location of NODE_DVAR.

  e.g. The locations of the NODE_DVAR is fixed:

  ```
  def a(k: 1, **kws) end
  ```

  * Before

  ```
  NODE_DVAR (line: 1, first_lineno: 1, first_column: 6, last_lineno: 1, last_column: 18)
  ```

  * After

  ```
  NODE_DVAR (line: 1, first_lineno: 1, first_column: 12, last_lineno: 1, last_column: 17)
  ```
------------------------------------------------------------------------
r60995 | naruse | 2017-12-03 21:11:19 +0900 (Sun, 03 Dec 2017) | 1 line

Set binmode to handle non ASCII commit message
------------------------------------------------------------------------
r60994 | nobu | 2017-12-03 21:10:19 +0900 (Sun, 03 Dec 2017) | 5 lines

common.mk: ignore error

* common.mk ($(REVISION_H)): ignore error when git not found.
  `--suppress_not_found` option suppresses a warning but does not
  ignore the error.
------------------------------------------------------------------------
r60993 | naruse | 2017-12-03 21:06:16 +0900 (Sun, 03 Dec 2017) | 1 line

Add test for Bug::String.buf_new
------------------------------------------------------------------------
r60992 | shugo | 2017-12-03 17:35:44 +0900 (Sun, 03 Dec 2017) | 3 lines

Specify refinement inheritance by Module#include.

[ruby-core:79880] [Bug #13271]
------------------------------------------------------------------------
r60991 | shugo | 2017-12-03 17:10:42 +0900 (Sun, 03 Dec 2017) | 4 lines

Fix a documentation error of IO#putc.

IO#putc is multi-byte character safe when a String is given as its argument.
[ruby-core:82019] [Bug #13741]
------------------------------------------------------------------------
r60990 | shugo | 2017-12-03 17:02:56 +0900 (Sun, 03 Dec 2017) | 1 line

Init functions should have prefix to avoid confliction.
------------------------------------------------------------------------
r60989 | yui-knk | 2017-12-03 15:53:18 +0900 (Sun, 03 Dec 2017) | 1 line

parse.y: Set a location of NODE_NIL in `not()`
------------------------------------------------------------------------
r60988 | nobu | 2017-12-03 15:14:58 +0900 (Sun, 03 Dec 2017) | 4 lines

parse.y: location of BEGIN

* parse.y (top_stmt): wrap BEGIN statement to store the whole
  location for each block.
------------------------------------------------------------------------
r60987 | nobu | 2017-12-03 14:08:17 +0900 (Sun, 03 Dec 2017) | 1 line

common.mk: suppress an error message when git not found
------------------------------------------------------------------------
r60986 | yui-knk | 2017-12-03 13:53:05 +0900 (Sun, 03 Dec 2017) | 23 lines

parse.y: Fix locations of NODEs generated by cond0

* parse.y: Fix to only include a range of the first argument of cond.

  e.g. The locations of the NODE_MATCH2 and NODE_GVAR are fixed:

  ```
  1 while /#{:a}/
  ```

  * Before

  ```
  NODE_MATCH2 (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 15)
  NODE_GVAR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 15)
  ```

  * After

  ```
  NODE_MATCH2 (line: 1, first_lineno: 1, first_column: 8, last_lineno: 1, last_column: 15)
  NODE_GVAR (line: 1, first_lineno: 1, first_column: 8, last_lineno: 1, last_column: 15)
  ```
------------------------------------------------------------------------
r60985 | nobu | 2017-12-03 13:41:06 +0900 (Sun, 03 Dec 2017) | 4 lines

setup.mak: make Makefile stable

* win32/setup.mak (-basic-vars-): moved BASERUBY and HAVE_BASERUBY
  definition to make Makefile stable when they have been defaulted.
------------------------------------------------------------------------
r60984 | shugo | 2017-12-03 09:39:26 +0900 (Sun, 03 Dec 2017) | 4 lines

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

Otherwise, VM_ASSERT(callable_method_entry_p(cme)) in
prepare_callable_method_entry() fails if VM_CHECK_MODE is 2.
------------------------------------------------------------------------
r60983 | svn | 2017-12-03 00:41:08 +0900 (Sun, 03 Dec 2017) | 1 line

* 2017-12-03
------------------------------------------------------------------------
r60982 | naruse | 2017-12-03 00:41:08 +0900 (Sun, 03 Dec 2017) | 1 line

static
------------------------------------------------------------------------
r60981 | naruse | 2017-12-03 00:41:07 +0900 (Sun, 03 Dec 2017) | 1 line

Update dependencies
------------------------------------------------------------------------
r60980 | shugo | 2017-12-02 19:54:39 +0900 (Sat, 02 Dec 2017) | 6 lines

Modules should not have subclasses.

When refining a module, the module was set to the superclass of its refinement,
and a segmentation fault occurred.
The superclass of the refinement should be an iclass of the module.
[ruby-core:83617] [Bug #14070]
------------------------------------------------------------------------
r60979 | nobu | 2017-12-02 16:09:16 +0900 (Sat, 02 Dec 2017) | 4 lines

string.c: fix rb_external_str_new_with_enc

* string.c (rb_external_str_new_with_enc): do not search non-ascii
  by NULL pointer.  [ruby-core:84055] [Bug #14150]
------------------------------------------------------------------------
r60978 | nobu | 2017-12-02 12:16:01 +0900 (Sat, 02 Dec 2017) | 4 lines

common.mk: fix message

* common.mk (update-unicode-property-files): fix emoji version in
  the message.
------------------------------------------------------------------------
r60977 | nobu | 2017-12-02 12:12:51 +0900 (Sat, 02 Dec 2017) | 8 lines

fix for emoji-data.txt

* common.mk: download emoji-data.txt.  As emoji data files are
  located in a separate directory in Unicode.org site, reearranged
  Unicode data files directories same as the site.

* tool/enc-unicode.rb (get_file): search emoji data files in the
  second argument path.
------------------------------------------------------------------------
r60976 | nobu | 2017-12-02 12:12:50 +0900 (Sat, 02 Dec 2017) | 4 lines

enc-unicode.rb: for gperf 3.1

* tool/enc-unicode.rb: support for gperf 3.1, which defines length
  arguments as `size_t` but a local variable as `unsigned int`.
------------------------------------------------------------------------
r60975 | eregon | 2017-12-02 02:51:16 +0900 (Sat, 02 Dec 2017) | 1 line

Update to ruby/spec@e2d0d1e
------------------------------------------------------------------------
r60974 | svn | 2017-12-02 00:41:52 +0900 (Sat, 02 Dec 2017) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r60973 | eregon | 2017-12-02 00:41:50 +0900 (Sat, 02 Dec 2017) | 1 line

Update to ruby/spec@bacedc5
------------------------------------------------------------------------
r60972 | eregon | 2017-12-02 00:41:23 +0900 (Sat, 02 Dec 2017) | 1 line

Update to ruby/mspec@b501ade
------------------------------------------------------------------------
r60971 | svn | 2017-12-02 00:09:42 +0900 (Sat, 02 Dec 2017) | 1 line

* 2017-12-02
------------------------------------------------------------------------
r60970 | naruse | 2017-12-02 00:09:41 +0900 (Sat, 02 Dec 2017) | 6 lines

Append "//" if empty host for file or postgres URI

https://url.spec.whatwg.org/#url-serializing
> Otherwise, if url?s host is null and url?s scheme is "file", append "//" to output.

URL spec doesn't says anything about postgres, but assume the same thing.
------------------------------------------------------------------------
r60969 | naruse | 2017-12-01 23:32:12 +0900 (Fri, 01 Dec 2017) | 1 line

re-apply r60755
------------------------------------------------------------------------
r60968 | svn | 2017-12-01 23:08:14 +0900 (Fri, 01 Dec 2017) | 1 line

* properties.
------------------------------------------------------------------------
r60967 | naruse | 2017-12-01 23:08:13 +0900 (Fri, 01 Dec 2017) | 1 line

Add missing file
------------------------------------------------------------------------
r60966 | naruse | 2017-12-01 22:50:13 +0900 (Fri, 01 Dec 2017) | 3 lines

Update to Onigmo 6.1.3-669ac9997619954c298da971fcfacccf36909d05.

[Bug #13892]
------------------------------------------------------------------------
r60965 | yui-knk | 2017-12-01 22:40:03 +0900 (Fri, 01 Dec 2017) | 23 lines

parse.y: Fix locations of NODEs related to for statement

* parse.y: Fix to only include a range of for_var.

  e.g. The locations of the NODE_ARGS and NODE_DVAR are fixed:

  ```
  for a in m do n end
  ```

  * Before

  ```
  NODE_ARGS (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 19)
  NODE_DVAR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 19)
  ```

  * After

  ```
  NODE_ARGS (line: 1, first_lineno: 1, first_column: 4, last_lineno: 1, last_column: 5)
  NODE_DVAR (line: 1, first_lineno: 1, first_column: 4, last_lineno: 1, last_column: 5)
  ```
------------------------------------------------------------------------
r60964 | k0kubun | 2017-12-01 21:26:40 +0900 (Fri, 01 Dec 2017) | 12 lines

vm.c: partially revert r60558

because it was actually used in
https://github.com/tmm1/rbtrace/blob/v0.4.8/ext/rbtrace.c#L329
and deprecated in r60579 AFTER removal in r60558.

ko1 agreed that we should keep just deprecated in Ruby 2.5 and remove it
later, and I'm commiting this because I want to make rbtrace.gem
installation successful.

backward.h: modify r60579 to make rb_frame_method_id_and_class()
compilable.
------------------------------------------------------------------------
r60963 | nobu | 2017-12-01 21:00:10 +0900 (Fri, 01 Dec 2017) | 1 line

vm_trace.c: suppress -Wclobbered warning
------------------------------------------------------------------------
r60962 | nobu | 2017-12-01 21:00:09 +0900 (Fri, 01 Dec 2017) | 6 lines

vm_trace.c: remove duplicate flag

* vm_trace.c (rb_suppress_tracing): remove duplicate flag
  `tracing`, which equals to `ec->trace_arg != NULL`.  and that
  `ec->trace_arg` points `dummy_trace_arg` means it was NULL at
  the beginning.
------------------------------------------------------------------------
r60961 | akr | 2017-12-01 19:48:29 +0900 (Fri, 01 Dec 2017) | 51 lines

Replace Kernel#pp after PP class is defined.

Avoid a race condition which a context switch
occur after replacing Kernel#pp but before
defining PP class.

Following patch, inserting sleep, makes
this problem reproducible.

```
Index: lib/pp.rb
===================================================================
--- lib/pp.rb	(revision 60960)
+++ lib/pp.rb	(working copy)
@@ -26,6 +26,7 @@ module Kernel
   end
   undef __pp_backup__ if method_defined?(:__pp_backup__)
   module_function :pp
+  sleep 1 # thread context switch
 end
 
 ##
```

With the above patch, "uninitialized constant Kernel::PP" can
happen as as follows.

```
% ./ruby -w -Ilib -e '
t1 = Thread.new {
  Thread.current.report_on_exception = true
  pp :foo1
}
t2 = Thread.new {
  Thread.current.report_on_exception = true
  sleep 0.5
  pp :foo2
}
t1.join rescue nil
t2.join rescue nil
'
#<Thread:0x000055dbf926eaa0@-e:6 run> terminated with exception:
Traceback (most recent call last):
	3: from -e:9:in `block in <main>'
	2: from /home/ruby/tst2/ruby/lib/pp.rb:22:in `pp'
	1: from /home/ruby/tst2/ruby/lib/pp.rb:22:in `each'
/home/ruby/tst2/ruby/lib/pp.rb:23:in `block in pp': uninitialized constant Kernel::PP (NameError)
:foo1
```


------------------------------------------------------------------------
r60960 | yui-knk | 2017-12-01 18:48:17 +0900 (Fri, 01 Dec 2017) | 21 lines

parse.y: Fix a location of NODE_HASH

* parse.y: Fix to only include a range of assocs.

  e.g. The locations of the NODE_HASH is fixed:

  ```
  a(1, b: 10, &block)
  ```

  * Before

  ```
  NODE_HASH (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 18)
  ```

  * After

  ```
  NODE_HASH (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 10)
  ```
------------------------------------------------------------------------
r60959 | mrkn | 2017-12-01 17:35:58 +0900 (Fri, 01 Dec 2017) | 3 lines

NEWS: Net::HTTP is a stdlib

[ci skip]
------------------------------------------------------------------------
r60958 | yui-knk | 2017-12-01 15:32:59 +0900 (Fri, 01 Dec 2017) | 21 lines

parse.y: Fix a location of hash keys

* parse.y: Use @1 to only include a range of tLABEL.

  e.g. The locations of the NODE_LIT(:b) is fixed:

  ```
  a(1, b: 10)
  ```

  * Before

  ```
  NODE_LIT (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 10)
  ```

  * After

  ```
  NODE_LIT (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 7)
  ```
------------------------------------------------------------------------
r60957 | usa | 2017-12-01 14:32:29 +0900 (Fri, 01 Dec 2017) | 5 lines

bold/underscore support in traceback before Windows10

* io.c (rb_write_error2): call `rb_w32_write_console()` when the device is tty,
  like `rb_write_error_str()`.

------------------------------------------------------------------------
r60956 | hsbt | 2017-12-01 13:39:49 +0900 (Fri, 01 Dec 2017) | 1 line

Added repository url for default gems.
------------------------------------------------------------------------
r60955 | nobu | 2017-12-01 13:27:32 +0900 (Fri, 01 Dec 2017) | 1 line

prelude.c.tmpl: escape comments
------------------------------------------------------------------------
r60954 | hsbt | 2017-12-01 13:25:32 +0900 (Fri, 01 Dec 2017) | 1 line

Added bundler entry to documentation of library and maintainers.
------------------------------------------------------------------------
r60953 | nobu | 2017-12-01 12:54:50 +0900 (Fri, 01 Dec 2017) | 5 lines

prelude.c.tmpl: split prelude code

* template/prelude.c.tmpl: split prelude code into blocks so that
  each elements do not exceed the string literal size limit in
  C89.
------------------------------------------------------------------------
r60952 | nobu | 2017-12-01 12:54:49 +0900 (Fri, 01 Dec 2017) | 1 line

prelude.rb: suppress redefinition warnings
------------------------------------------------------------------------
r60951 | hsbt | 2017-12-01 10:52:26 +0900 (Fri, 01 Dec 2017) | 3 lines

Merge psych-3.0.0.

  See NEWS file for this update details.
------------------------------------------------------------------------
r60950 | usa | 2017-12-01 10:29:50 +0900 (Fri, 01 Dec 2017) | 5 lines

revert r60873

* template/prelude.c.tmpl (translate): revert r60873 because when some errors or
  warnings are shown their line numbers are shifted.

------------------------------------------------------------------------
r60949 | svn | 2017-12-01 09:41:18 +0900 (Fri, 01 Dec 2017) | 1 line

* 2017-12-01
------------------------------------------------------------------------
r60948 | mame | 2017-12-01 09:41:17 +0900 (Fri, 01 Dec 2017) | 1 line

lib/pp.rb (Kernel#pp): Fix a race condition
------------------------------------------------------------------------
r60945 | mame | 2017-11-30 11:12:42 +0900 (Thu, 30 Nov 2017) | 1 line

prelude.rb (Kernel#pp): Fix a delegation bug
------------------------------------------------------------------------
r60944 | mame | 2017-11-30 10:31:00 +0900 (Thu, 30 Nov 2017) | 3 lines

prelude.rb: Add Kernel#pp, a trigger for lib/pp.rb

[Feature #14123]
------------------------------------------------------------------------
r60943 | marcandre | 2017-11-30 04:46:46 +0900 (Thu, 30 Nov 2017) | 1 line

Cherrypick 9f8d3d0 from ruby/spec
------------------------------------------------------------------------
r60942 | marcandre | 2017-11-30 02:47:59 +0900 (Thu, 30 Nov 2017) | 1 line

Make Module#{define|alias|undef|remove}_method public [#14133]
------------------------------------------------------------------------
r60941 | svn | 2017-11-30 02:47:48 +0900 (Thu, 30 Nov 2017) | 1 line

* 2017-11-30
------------------------------------------------------------------------
r60940 | marcandre | 2017-11-30 02:47:47 +0900 (Thu, 30 Nov 2017) | 1 line

Make Module#attr{accessor|reader|writer|} public [#14132]
------------------------------------------------------------------------
r60939 | nobu | 2017-11-29 23:48:02 +0900 (Wed, 29 Nov 2017) | 1 line

configure.ac: fixed a typo [Feature #4052]
------------------------------------------------------------------------
r60938 | naruse | 2017-11-29 21:04:24 +0900 (Wed, 29 Nov 2017) | 1 line

Update information about Oniguruma/Onigmo [Bug #13818]
------------------------------------------------------------------------
r60937 | k0kubun | 2017-11-29 20:27:32 +0900 (Wed, 29 Nov 2017) | 9 lines

test_workspace.rb: prefer using skip

rather than ignoring test definition to know untestability when
executing test with `-v`.

Also this simplifies check using `MiniTest::Unit::Guard#windows?`.

This change is suggested by @MSP-Greg here:
https://github.com/ruby/ruby/commit/7128849c8c5fce8df450379db54136fd21fab6ad#commitcomment-25836745
------------------------------------------------------------------------
r60936 | sorah | 2017-11-29 20:16:14 +0900 (Wed, 29 Nov 2017) | 3 lines

Typo... the feature committed at r60935

[Feature #14140] [ruby-core:83963]
------------------------------------------------------------------------
r60935 | sorah | 2017-11-29 20:14:23 +0900 (Wed, 29 Nov 2017) | 6 lines

Log exception with bold and underline for TTYs

Print error message in bold/underlined text if STDERR is unchanged and a tty.
[Feature #14160] [experimental]

Screenshot: https://img.sorah.jp/s/2017-11-29_1711_xj2fu.png
------------------------------------------------------------------------
r60934 | nobu | 2017-11-29 19:38:36 +0900 (Wed, 29 Nov 2017) | 1 line

spec/ruby/optional/capi/constants_spec.rb: Data is deprecated now
------------------------------------------------------------------------
r60933 | nobu | 2017-11-29 18:59:20 +0900 (Wed, 29 Nov 2017) | 3 lines

file.c: File.lutime

* file.c (utime_internal): add File.lutime.  [Feature #4052]
------------------------------------------------------------------------
r60932 | svn | 2017-11-29 17:39:48 +0900 (Wed, 29 Nov 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r60931 | shugo | 2017-11-29 17:39:47 +0900 (Wed, 29 Nov 2017) | 5 lines

Unused module refinement shouldn't break method search.

Use rb_callable_method_entry_t::defined_class instead of
rb_callable_method_entry_t::owner, because the superclass of iclass
should be searched for modules. [ruby-core:83613] [Bug #14068]
------------------------------------------------------------------------
r60930 | nobu | 2017-11-29 17:23:16 +0900 (Wed, 29 Nov 2017) | 4 lines

object.c: deprecate Data

* object.c (InitVM_Object): Data is deprecated now.
  [Feature #3072]
------------------------------------------------------------------------
r60929 | nobu | 2017-11-29 16:57:48 +0900 (Wed, 29 Nov 2017) | 6 lines

strscan.c: add MatchData-like methods

* ext/strscan/strscan.c: added `size`, `captures` and `values_at`
  to StringScanner, shorthands of accessing the matched data.
  based on the patch by apeiros (Stefan Rusterholz) at
  [ruby-core:20412].  [Feature #836]
------------------------------------------------------------------------
r60928 | svn | 2017-11-29 07:30:29 +0900 (Wed, 29 Nov 2017) | 1 line

* 2017-11-29
------------------------------------------------------------------------
r60927 | hsbt | 2017-11-29 07:30:28 +0900 (Wed, 29 Nov 2017) | 3 lines

Merge rubygems-2.7.3.

  http://blog.rubygems.org/2017/11/28/2.7.3-released.html
------------------------------------------------------------------------
r60926 | yui-knk | 2017-11-28 15:19:04 +0900 (Tue, 28 Nov 2017) | 1 line

Fix typos
------------------------------------------------------------------------
r60925 | normal | 2017-11-28 12:28:35 +0900 (Tue, 28 Nov 2017) | 23 lines

file: release GVL for access(2) syscalls

Like stat(2), the access(2) syscall may take an indeterminate
amount of time on slow/remote filesystems.

This lets the following methods release the GVL to avoid choking
the entire VM while one thread is stuck on a slow or
non-responsive filesystem:

- File.readable?
- File.readable_real?
- File.writable?
- File.writable_real?
- File.executable?
- File.executable_real?

* file.c (nogvl_eaccess): new function
  (nogvl_access): ditto
  (rb_access): new wrapper function
  (rb_eaccess): release GVL
  (rb_file_readable_real_p): use rb_access
  (rb_file_writable_real_p): ditto
  (rb_file_executable_real_p): ditto
------------------------------------------------------------------------
r60924 | svn | 2017-11-28 11:27:48 +0900 (Tue, 28 Nov 2017) | 1 line

* 2017-11-28
------------------------------------------------------------------------
r60923 | ko1 | 2017-11-28 11:27:47 +0900 (Tue, 28 Nov 2017) | 9 lines

check ruby_vm_event_flags everytime.

* vm_insnhelper.c (vm_trace): use EXEC_EVENT_HOOK() instead of
  EXEC_EVENT_HOOK_VM_TRACE(). The latter macro assumes
  `ruby_vm_event_flags` is constant in `vm_trace()` function,
  but it can be changed in hook functions.

* vm_core.h (EXEC_EVENT_HOOK_VM_TRACE): removed.

------------------------------------------------------------------------
r60922 | hsbt | 2017-11-27 20:02:48 +0900 (Mon, 27 Nov 2017) | 1 line

Ignored obsoleted `bundle_ruby` command from upstream.
------------------------------------------------------------------------
r60921 | svn | 2017-11-27 19:45:27 +0900 (Mon, 27 Nov 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r60920 | hsbt | 2017-11-27 19:45:24 +0900 (Mon, 27 Nov 2017) | 3 lines

Merge rdoc-6.0.0.beta4 from upstream.

  It version applied `frozen_string_literal: true`
------------------------------------------------------------------------
r60919 | nobu | 2017-11-27 15:59:07 +0900 (Mon, 27 Nov 2017) | 4 lines

psych_parser.c: fix compile error

* ext/psych/psych_parser.c (parse): fix declarations after
  statement, which cause compile error on mswin.
------------------------------------------------------------------------
r60918 | hsbt | 2017-11-27 14:38:48 +0900 (Mon, 27 Nov 2017) | 3 lines

Ignored `bundle_ruby` example with Ruby core.

  It was ignored with Bundler-1.15.x. It's regression at r60603.
------------------------------------------------------------------------
r60917 | hsbt | 2017-11-27 12:11:18 +0900 (Mon, 27 Nov 2017) | 1 line

Merge psych-3.0.0.beta4 from upstream.
------------------------------------------------------------------------
r60916 | ko1 | 2017-11-27 11:11:36 +0900 (Mon, 27 Nov 2017) | 5 lines

Ignore failures related to threading.

* test/lib/tracepointchecker.rb: ignore "deletion trace" check
  when there are threads other than the main thread.

------------------------------------------------------------------------
r60915 | ko1 | 2017-11-27 09:43:23 +0900 (Mon, 27 Nov 2017) | 7 lines

Relax `rb_bug()` condition.

* iseq.c (rb_iseq_trace_set): simply return immediately if
  ISeq::compile_data is available. Not sure why this state
  is allowed, but exception during compile (or `ISeq::load`)
  can make such states.

------------------------------------------------------------------------
r60914 | yui-knk | 2017-11-27 08:52:47 +0900 (Mon, 27 Nov 2017) | 22 lines

parse.y: Fix the last location of NODE_KW_ARG

* parse.y (kwd_append): Update the last location of
  NODE_KW_ARG when NODE is appended to the last.

  e.g. The locations of the first NODE_KW_ARG is fixed:

  ```
  def a(b: 1, c: 2); end
  ```

  * Before

  ```
  NODE_KW_ARG (line: 1, first_lineno: 1, first_column: 6, last_lineno: 1, last_column: 10)
  ```

  * After

  ```
  NODE_KW_ARG (line: 1, first_lineno: 1, first_column: 6, last_lineno: 1, last_column: 16)
  ```
------------------------------------------------------------------------
r60913 | svn | 2017-11-27 08:33:24 +0900 (Mon, 27 Nov 2017) | 1 line

* 2017-11-27
------------------------------------------------------------------------
r60912 | yui-knk | 2017-11-27 08:33:23 +0900 (Mon, 27 Nov 2017) | 22 lines

parse.y: Fix the last location of NODE_OPT_ARG

* parse.y (opt_arg_append): Update the last location of
  NODE_OPT_ARG when NODE is appended to the last.

  e.g. The locations of the first NODE_OPT_ARG is fixed:

  ```
  def a(b = 1, c = 2); end
  ```

  * Before

  ```
  NODE_OPT_ARG (line: 1, first_lineno: 1, first_column: 6, last_lineno: 1, last_column: 11)
  ```

  * After

  ```
  NODE_OPT_ARG (line: 1, first_lineno: 1, first_column: 6, last_lineno: 1, last_column: 18)
  ```
------------------------------------------------------------------------
r60911 | rhe | 2017-11-26 19:33:32 +0900 (Sun, 26 Nov 2017) | 8 lines

openssl: sync with 2475d94517b4

Merge a commit from upstream:

	01445af367ec test/test_ssl: prevent changing default internal encoding

OpenSSL::TestSSL#test_fallback_scsv could change the default internal
encoding accidentally, causing other unrelated test cases to fail.
------------------------------------------------------------------------
r60910 | nobu | 2017-11-26 11:11:24 +0900 (Sun, 26 Nov 2017) | 1 line

leakchecker.rb: no conversion
------------------------------------------------------------------------
r60909 | svn | 2017-11-26 10:36:34 +0900 (Sun, 26 Nov 2017) | 1 line

* 2017-11-26
------------------------------------------------------------------------
r60908 | nobu | 2017-11-26 10:36:33 +0900 (Sun, 26 Nov 2017) | 1 line

util.h: remove my_getcwd
------------------------------------------------------------------------
r60907 | rhe | 2017-11-25 23:12:08 +0900 (Sat, 25 Nov 2017) | 47 lines

openssl: import v2.1.0.beta2

Import Ruby/OpenSSL 2.1.0.beta2. The full commit log since commit
e72d960db262 which was imported by r60013 can be found at:

	https://github.com/ruby/openssl/compare/e72d960db262...v2.1.0.beta2

----------------------------------------------------------------
Kazuki Yamaguchi (26):
      bn: use ALLOCV() macro instead of xmalloc()
      appveyor.yml: remove 'openssl version' line
      test/test_ssl_session: skip tests for session_remove_cb
      x509ext: implement X509::Extension#==
      x509attr: implement X509::Attribute#==
      x509cert: implement X509::Certificate#==
      x509revoked: add missing X509::Revoked#to_der
      x509crl, x509revoked: implement X509::{CRL,Revoked}#==
      x509req: implement X509::Request#==
      ssl: extract rb_intern("call")
      cipher: disallow setting AAD for non-AEAD ciphers
      test/test_cipher: fix test_non_aead_cipher_set_auth_data failure
      ssl: fix conflict of options in SSLContext#set_params
      buffering: let #write accept multiple arguments
      pkey: make pkey_check_public_key() non-static
      x509cert, x509crl, x509req, ns_spki: check sanity of public key
      test/envutil: port assert_warning from Ruby trunk
      test/utils: remove a pointless .public_key call in issue_cert
      ssl: add SSLContext#add_certificate
      test/test_ssl: fix test_security_level
      Drop support for LibreSSL 2.4
      kdf: add HKDF support
      test/test_x509cert: fix flaky test
      test/test_x509crl: fix random failure
      History.md: fix a typo
      Ruby/OpenSSL 2.1.0.beta2

Mark Wright (1):
      Fix build failure against OpenSSL 1.1 built with no-deprecated Thanks rhenium for the code review and fixes.

Peter Karman (1):
      Add RSA sign_pss() and verify_pss() methods

aeris (1):
      TLS Fallback Signaling Cipher Suite Value

kazu (1):
      Use caller with length to reduce unused strings
------------------------------------------------------------------------
r60906 | rhe | 2017-11-25 23:12:07 +0900 (Sat, 25 Nov 2017) | 3 lines

openssl: revert changes in SSLContext#{min,max}_version= in r60310

And adapt a net/http test to their old behavior.  [ruby-core:83491]
------------------------------------------------------------------------
r60905 | yui-knk | 2017-11-25 20:57:33 +0900 (Sat, 25 Nov 2017) | 4 lines

parse.y: opt_arg_append

* parse.y (opt_arg_append): extract optional arguments
  append.
------------------------------------------------------------------------
r60904 | svn | 2017-11-25 10:39:46 +0900 (Sat, 25 Nov 2017) | 1 line

* 2017-11-25
------------------------------------------------------------------------
r60903 | yui-knk | 2017-11-25 10:39:45 +0900 (Sat, 25 Nov 2017) | 26 lines

parse.y: Fix a location of assignable nodes

* parse.y (new_op_assign_gen): Update the location of
  lhs when NODE_OP_ASGN_OR/NODE_OP_ASGN_AND are generated.
  When NODE_OP_ASGN_OR/NODE_OP_ASGN_AND are generated
  a nd_value of lhs is set, so it is needed to update
  a location of lhs to include a location of rhs (same as
  node_assign_gen).

  e.g. The locations of NODE_DASGN_CURR is fixed:

  ```
  a ||= 1
  ```

  * Before

  ```
  NODE_DASGN_CURR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 1)
  ```

  * After

  ```
  NODE_DASGN_CURR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 7)
  ```
------------------------------------------------------------------------
r60902 | yui-knk | 2017-11-24 22:08:21 +0900 (Fri, 24 Nov 2017) | 4 lines

node.h: Remove not used macros

* node.h (nd_modl, nd_clss_, nd_tval, nd_visi_): Remove
  not used macros.
------------------------------------------------------------------------
r60901 | k0kubun | 2017-11-24 21:37:07 +0900 (Fri, 24 Nov 2017) | 11 lines

test_workspace.rb: skip test failing on windows

> Note that all files are always readable
> https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/chmod-wchmod
It seems that we can't make a file unreadable with `File.chmod` on
Windows.

When file can't be read, File::EACCES is raised on Windows too. So
r60900 should work anyway, but I don't know how to let it happen by
Ruby code. I tried to open file before reading it, but I couldn't
reproduce File::EACCES too.
------------------------------------------------------------------------
r60900 | kazu | 2017-11-24 20:00:10 +0900 (Fri, 24 Nov 2017) | 1 line

Fix TOCTTOU and avoid to read existing unreadable file
------------------------------------------------------------------------
r60899 | kazu | 2017-11-24 20:00:08 +0900 (Fri, 24 Nov 2017) | 1 line

Fix typos [ci skip]
------------------------------------------------------------------------
r60898 | nobu | 2017-11-24 14:46:55 +0900 (Fri, 24 Nov 2017) | 1 line

test/irb/test_workspace.rb: fix SCRIPT_LINES__
------------------------------------------------------------------------
r60897 | nobu | 2017-11-24 14:44:58 +0900 (Fri, 24 Nov 2017) | 1 line

workspace.rb: one more space
------------------------------------------------------------------------
r60896 | nobu | 2017-11-24 14:00:56 +0900 (Fri, 24 Nov 2017) | 6 lines

workspace.rb: fix SCRIPT_LINES__

* lib/irb/workspace.rb (code_around_binding): `SCRIPT_LINES__`
  values are arrays of lines.  get file and line at once.  moved
  loop-invariant format string.  join without extra strings by
  `$,`.
------------------------------------------------------------------------
r60895 | normal | 2017-11-24 13:49:05 +0900 (Fri, 24 Nov 2017) | 8 lines

file.c: simplify eaccess(3) callers

This will make future work to release GVL here simpler.

* file.c (rb_eaccess): new function
  (rb_file_readable_p): use rb_eaccess
  (rb_file_writable_p): ditto
  (rb_file_executable_p): ditto
------------------------------------------------------------------------
r60894 | k0kubun | 2017-11-24 13:29:49 +0900 (Fri, 24 Nov 2017) | 3 lines

NEWS: note about r57274

fixed r60888 to have Feature number too.
------------------------------------------------------------------------
r60893 | nobu | 2017-11-24 13:26:29 +0900 (Fri, 24 Nov 2017) | 3 lines

parse.y: make_array

* parse.y (make_array): turn NULL node into zero length array.
------------------------------------------------------------------------
r60892 | nobu | 2017-11-24 13:26:27 +0900 (Fri, 24 Nov 2017) | 8 lines

parse.y: refactor list literals

* parse.y (words, symbols, qwords, qsymbols): unify empty list and
  non-empty list.

* parse.y (parser_parse_string): always dispatch a word separator
  at the beginning of list literals.
  [ruby-core:83871] [Bug #14126]
------------------------------------------------------------------------
r60891 | nobu | 2017-11-24 13:26:23 +0900 (Fri, 24 Nov 2017) | 5 lines

test_parser_events.rb: results of list literals

* test/ripper/test_parser_events.rb (test_qwords_add),
  (test_qsymbols_add, test_symbols_add, test_words_add): more
  assertions for results of list literals.
------------------------------------------------------------------------
r60890 | svn | 2017-11-24 12:53:30 +0900 (Fri, 24 Nov 2017) | 1 line

* properties.
------------------------------------------------------------------------
r60889 | svn | 2017-11-24 12:53:28 +0900 (Fri, 24 Nov 2017) | 1 line

* 2017-11-24
------------------------------------------------------------------------
r60888 | k0kubun | 2017-11-24 12:53:27 +0900 (Fri, 24 Nov 2017) | 3 lines

irb.rb: show source around binding.irb on start

[Feature #14124] [ruby-dev:50319] [close GH-1764]
------------------------------------------------------------------------
r60887 | yui-knk | 2017-11-23 23:15:27 +0900 (Thu, 23 Nov 2017) | 22 lines

parse.y: Fix a location of serial NODE_AND/NODE_OR

* parse.y (logop_gen): Update the last location of
  NODE_AND/NODE_OR when NODE is appended to the last.

  e.g. The locations of NODE_AND is fixed:

  ```
  a && b && c
  ```

  * Before

  ```
  NODE_AND (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 6)
  ```

  * After

  ```
  NODE_AND (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 11)
  ```
------------------------------------------------------------------------
r60886 | k0kubun | 2017-11-23 23:04:24 +0900 (Thu, 23 Nov 2017) | 12 lines

.travis.yml: revert "workaround to resolve ::1"

This commit reverts r60736.

Shibata-san reported the cause of r60736 to Travis and it seems fixed:
https://github.com/travis-ci/travis-ci/issues/8780

In another CI, I found "::1     ip6-localhost ip6-loopback" in build
system information, unlike "::1  localhost ip6-localhost ip6-loopback"
that had failed in Ruby's CI on Travis.

Let's try Container-based environment again.
------------------------------------------------------------------------
r60885 | yui-knk | 2017-11-23 20:52:36 +0900 (Thu, 23 Nov 2017) | 4 lines

thread.c: Update documents

* thread.c (rb_default_coverage): Update documents of internal
  data structures for branch coverage.
------------------------------------------------------------------------
r60884 | nobu | 2017-11-23 16:10:56 +0900 (Thu, 23 Nov 2017) | 4 lines

io.c: read BOM only for reading

* io.c (io_strip_bom): just abandon detecting UTF encoding by BOM
  unless opened for reading.
------------------------------------------------------------------------
r60883 | nobu | 2017-11-23 13:30:23 +0900 (Thu, 23 Nov 2017) | 8 lines

ripper.y: fix word list events

* parse.y (parser_skip_words_sep): QWORDS_BEG should not include
  the first separators in ripper.

* parse.y (parser_parse_string): WORDS_SEP should not include
  the closing parentheses of a word list in ripper, should include
  spaces at beginning of lines.  [ruby-core:83864] [Bug #14126]
------------------------------------------------------------------------
r60882 | nobu | 2017-11-23 12:14:12 +0900 (Thu, 23 Nov 2017) | 1 line

debug.c: include RIMemo in ruby_dummy_gdb_enums
------------------------------------------------------------------------
r60881 | stomar | 2017-11-23 06:13:51 +0900 (Thu, 23 Nov 2017) | 1 line

lib/set.rb: [DOC] remove empty comments
------------------------------------------------------------------------
r60880 | svn | 2017-11-23 05:58:25 +0900 (Thu, 23 Nov 2017) | 1 line

* 2017-11-23
------------------------------------------------------------------------
r60879 | stomar | 2017-11-23 05:58:24 +0900 (Thu, 23 Nov 2017) | 5 lines

set.rb: improve docs for Set

* lib/set.rb: [DOC] add examples for Set#replace,
  add examples for creating a set from a hash with duplicates,
  simplify and fix style of some other examples, fix typos.
------------------------------------------------------------------------
r60878 | svn | 2017-11-22 21:32:42 +0900 (Wed, 22 Nov 2017) | 1 line

* 2017-11-22
------------------------------------------------------------------------
r60877 | yui-knk | 2017-11-22 21:32:41 +0900 (Wed, 22 Nov 2017) | 22 lines

parse.y: Fix the locations of NODE_BLOCK_PASS

  * parse.y (arg_blk_pass): Update the first location of
    NODE_BLOCK_PASS if nd_head is assigned.

  e.g. The locations of NODE_BLOCK_PASS is fixed:

  ```
  a(1, &:to_s)
  ```

  * Before

  ```
  NODE_BLOCK_PASS (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 11)
  ```

  * After

  ```
  NODE_BLOCK_PASS (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 11)
  ```
------------------------------------------------------------------------
r60876 | kazu | 2017-11-21 21:29:52 +0900 (Tue, 21 Nov 2017) | 1 line

Fix a typo
------------------------------------------------------------------------
r60875 | kazu | 2017-11-21 21:29:51 +0900 (Tue, 21 Nov 2017) | 4 lines

Use `const void*` instead of `const char*`

Use cast from `char*` to `void*` instead of union in opendir_without_gvl,
because convert from `void*` to `char*` without union in nogvl_opendir.
------------------------------------------------------------------------
r60874 | nobu | 2017-11-21 20:15:51 +0900 (Tue, 21 Nov 2017) | 4 lines

vm_args.c: ec arg of args_setup_kw_parameters

* vm_args.c (args_setup_kw_parameters): use same ec as the caller.
  make arguments order consistent with other functions.
------------------------------------------------------------------------
r60873 | usa | 2017-11-21 17:48:07 +0900 (Tue, 21 Nov 2017) | 5 lines

Skip comment lines

* template/prelude.c.tmpl (translate): empty (only LF) lines are not necessary.
  so skip them, but for safety only when they are made from comment line.

------------------------------------------------------------------------
r60872 | nobu | 2017-11-21 14:01:28 +0900 (Tue, 21 Nov 2017) | 6 lines

fix test_erb.rb [GH-1763]

* test/erb/test_erb.rb (test_run): require stringio.  suppress an
  unused variable warning.

From: MSP-Greg <MSP-Greg@users.noreply.github.com>
------------------------------------------------------------------------
r60871 | ko1 | 2017-11-21 11:57:01 +0900 (Tue, 21 Nov 2017) | 5 lines

check invariant.

* iseq.c (rb_iseq_trace_set): at this point ISEQ_USE_COMPILE_DATA
  should not be set.

------------------------------------------------------------------------
r60870 | eregon | 2017-11-21 09:56:09 +0900 (Tue, 21 Nov 2017) | 1 line

test/ruby/bug-13526.rb: should wait until all threads are stopped
------------------------------------------------------------------------
r60869 | yui-knk | 2017-11-21 09:47:00 +0900 (Tue, 21 Nov 2017) | 26 lines

parse.y: Fix the locations of NODE in percent strings

  * parse.y (parser_yylex): token_flush before
    calling parse_string. Without token_flush
    the first locations of NODE in percent strings
    are set to the location of %.

  e.g. The locations of NODE_STR is fixed:

  ```
  %w[a b]
  ```

  * Before

  ```
  NODE_STR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 4) ("a")
  NODE_STR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 6) ("b")
  ```

  * After

  ```
  NODE_STR (line: 1, first_lineno: 1, first_column: 3, last_lineno: 1, last_column: 4) ("a")
  NODE_STR (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 6) ("b")
  ```
------------------------------------------------------------------------
r60868 | yui-knk | 2017-11-21 08:58:42 +0900 (Tue, 21 Nov 2017) | 21 lines

parse.y: Fix the last location of NODE_STR in %w

  * parse.y: Use @2 to only include a range of tSTRING_CONTENT.

  e.g. The locations of NODE_STR is fixed:

  ```
  %w[a]
  ```

  * Before

  ```
  NODE_STR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 5)
  ```

  * After

  ```
  NODE_STR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 4)
  ```
------------------------------------------------------------------------
r60867 | yui-knk | 2017-11-21 08:37:01 +0900 (Tue, 21 Nov 2017) | 23 lines

parse.y: Set the last location of NODE_ARRAY in %w

  * parse.y: list_append uses the locations
    of the second argument. So we should set the
    locations of $2 before pass it to list_append.

  e.g. The locations of NODE_ARRAY is fixed:

  ```
  %w[a b]
  ```

  * Before

  ```
  NODE_ARRAY (line: 1, first_lineno: 1, first_column: 0, last_lineno: 0, last_column: -1)
  ```

  * After

  ```
  NODE_ARRAY (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 7)
  ```
------------------------------------------------------------------------
r60866 | yui-knk | 2017-11-21 08:12:43 +0900 (Tue, 21 Nov 2017) | 21 lines

parse.y: Fix the last location of NODE_LIT in %i

  * parse.y: Use @2 to not include a range of ' '.

  e.g. The locations of NODE_LIT is fixed:

  ```
  %i[a]
  ```

  * Before

  ```
  NODE_LIT (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 5)
  ```

  * After

  ```
  NODE_LIT (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 4)
  ```
------------------------------------------------------------------------
r60865 | svn | 2017-11-21 07:48:06 +0900 (Tue, 21 Nov 2017) | 1 line

* 2017-11-21
------------------------------------------------------------------------
r60864 | yui-knk | 2017-11-21 07:48:05 +0900 (Tue, 21 Nov 2017) | 23 lines

parse.y: Set the last location of NODE_ARRAY in %i

  * parse.y: list_append uses the locations
    of the second argument. So we should set the
    locations of $2 before pass it to list_append.

  e.g. The locations of NODE_ARRAY is fixed:

  ```
  %i[a b]
  ```

  * Before

  ```
  NODE_ARRAY (line: 1, first_lineno: 1, first_column: 0, last_lineno: 0, last_column: -1)
  ```

  * After

  ```
  NODE_ARRAY (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 7)
  ```
------------------------------------------------------------------------
r60863 | kazu | 2017-11-20 21:57:08 +0900 (Mon, 20 Nov 2017) | 1 line

[DOC] Fix example result [ci skip]
------------------------------------------------------------------------
r60862 | yui-knk | 2017-11-20 15:00:04 +0900 (Mon, 20 Nov 2017) | 22 lines

parse.y: Fix the locations of NODE_FCALL

  * parse.y: Update the locations of NODE_FCALL
    when nd_args is determined.

  e.g. The locations of NODE_FCALL is fixed:

  ```
  a 1
  ```

  * Before

  ```
  NODE_FCALL (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 1)
  ```

  * After

  ```
  NODE_FCALL (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 3)
  ```
------------------------------------------------------------------------
r60861 | normal | 2017-11-20 11:29:35 +0900 (Mon, 20 Nov 2017) | 8 lines

File.mkfifo releases GVL

mkfifo(3) is subject to the same problems as open(2) on slow
filesystems.  Release the GVL and let the rest of the VM run
while we call mkfifo.

* file.c (nogvl_mkfifo): new function
  (rb_file_s_mkfifo): release GVL
------------------------------------------------------------------------
r60860 | marcandre | 2017-11-20 11:18:43 +0900 (Mon, 20 Nov 2017) | 3 lines

lib/matrix: Add hadamard_product/entrywise_product.

Based on a patch by Charley Hutchison. [GH-674]
------------------------------------------------------------------------
r60859 | marcandre | 2017-11-20 11:18:34 +0900 (Mon, 20 Nov 2017) | 1 line

lib/matrix: Add Matrix{.|#}combine
------------------------------------------------------------------------
r60858 | marcandre | 2017-11-20 11:18:23 +0900 (Mon, 20 Nov 2017) | 1 line

lib/matrix: accept vectors in {h|v}stack
------------------------------------------------------------------------
r60857 | marcandre | 2017-11-20 11:18:12 +0900 (Mon, 20 Nov 2017) | 1 line

lib/matrix: Add explicit coercion #to_matrix
------------------------------------------------------------------------
r60856 | nobu | 2017-11-20 10:17:43 +0900 (Mon, 20 Nov 2017) | 10 lines

win32.c: vm_exit_handler

* win32/win32.c (vm_exit_handler): separate exit handler for
  resources which must be released at exit of Ruby VM.

* win32/win32.c (socklist_insert, constat_handle): install the VM
  exit handler.

* gc.c (ENABLE_VM_OBJSPACE): no longer needs process global object
  space on Windows too.
------------------------------------------------------------------------
r60855 | yui-knk | 2017-11-20 08:59:32 +0900 (Mon, 20 Nov 2017) | 22 lines

Update the last location of NODE_BLOCK

* parse.y (block_append_gen): Update the last
  location of NODE_BLOCK when a tail is appended.

  e.g. The locations of NODE_BLOCK is fixed:

  ```
  a; b; c
  ```

  * Before

  ```
  NODE_BLOCK (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 4)
  ```

  * After

  ```
  NODE_BLOCK (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 7)
  ```
------------------------------------------------------------------------
r60854 | eregon | 2017-11-20 00:15:49 +0900 (Mon, 20 Nov 2017) | 4 lines

test/ruby/bug-13526.rb: Fix to actually refer to an existing file

* Add Thread.report_on_exception=true to catch problems early.
* Increase the number of Thread.pass to let the autoload start.
------------------------------------------------------------------------
r60853 | svn | 2017-11-20 00:15:32 +0900 (Mon, 20 Nov 2017) | 1 line

* properties.
------------------------------------------------------------------------
r60852 | svn | 2017-11-20 00:15:32 +0900 (Mon, 20 Nov 2017) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r60851 | eregon | 2017-11-20 00:15:31 +0900 (Mon, 20 Nov 2017) | 3 lines

Add specs for concurrent Module#autoload

* When the file does not exist or the constant is not set.
------------------------------------------------------------------------
r60850 | svn | 2017-11-20 00:15:13 +0900 (Mon, 20 Nov 2017) | 1 line

* 2017-11-20
------------------------------------------------------------------------
r60849 | eregon | 2017-11-20 00:15:12 +0900 (Mon, 20 Nov 2017) | 1 line

Reorganize Module#autoload to have similar specs next to each other
------------------------------------------------------------------------
r60848 | nobu | 2017-11-19 16:07:42 +0900 (Sun, 19 Nov 2017) | 1 line

gc.c: moved ENABLE_VM_OBJSPACE from vm_core.h
------------------------------------------------------------------------
r60847 | normal | 2017-11-19 14:23:48 +0900 (Sun, 19 Nov 2017) | 7 lines

file.c (rb_file_s_mkfifo): use mode_t instead of int

mode_t is the correct type for mkfifo(3).  This fixes an
oversight from r60592 which made the same change to several
other functions.

* file.c (rb_file_s_mkfifo): use mode_t instead of int
------------------------------------------------------------------------
r60846 | normal | 2017-11-19 14:03:22 +0900 (Sun, 19 Nov 2017) | 4 lines

file.c: fix 64-bit conversion warnings from r60844

* file.c (nogvl_truncate): cast int to VALUE before "void *"
  (rb_file_s_truncate): cast "void *" to VALUE before int
------------------------------------------------------------------------
r60845 | normal | 2017-11-19 14:03:17 +0900 (Sun, 19 Nov 2017) | 9 lines

File.readlink and rb_readlink releases GVL

The `readlink' can stall on slow filesystems like `open' and
`read' syscalls.  Release the GVL and let the rest of the VM
function while `readlink' runs.

* file.c (nogvl_readlink): new function
  (readlink_without_gvl): ditto
  (rb_readlink): use readlink_without_gvl
------------------------------------------------------------------------
r60844 | normal | 2017-11-19 07:45:11 +0900 (Sun, 19 Nov 2017) | 10 lines

file: File#truncate and File.truncate release GVL

Like IO#write and IO.open, these file operations have
unpredictable performance on slow file systems.  Allow other
threads of the VM to proceed while they are taking place.

* file.c (nogvl_truncate): extract from rb_file_s_truncate
  (rb_file_s_truncate): release GVL
  (nogvl_ftruncate): extract from rb_file_truncate
  (rb_file_truncate): release GVL
------------------------------------------------------------------------
r60843 | normal | 2017-11-19 06:57:38 +0900 (Sun, 19 Nov 2017) | 8 lines

addr2line.c: fix r60841 for glibc before 2.22

SHF_COMPRESSED was not defined until glibc 2.22, and there are
older distros (e.g. Debian 8.x jessie) which do not have this
defined.

Perhaps it is safe to define SHF_COMPRESSED to (1 << 11) ourselves,
too, since ELF should be a standardized format.
------------------------------------------------------------------------
r60842 | svn | 2017-11-19 03:05:40 +0900 (Sun, 19 Nov 2017) | 1 line

* 2017-11-19
------------------------------------------------------------------------
r60841 | naruse | 2017-11-19 03:05:39 +0900 (Sun, 19 Nov 2017) | 5 lines

explictly skip compressed debug line

To identify the line of backtrace with ease, show the offset address of library.
You can just find the source filename and the line with
`addr2line -e libruby.so.2.5.0 0xXXXX`
------------------------------------------------------------------------
r60840 | yui-knk | 2017-11-18 22:11:36 +0900 (Sat, 18 Nov 2017) | 22 lines

parse.y: Fix the locations of NODE_ITER

  * parse.y: Update the locations of NODE_ITER
    when nd_iter is determined.

  e.g. The locations of NODE_ITER is fixed:

  ```
  a {b}
  ```

  * Before

  ```
  NODE_ITER (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 5)
  ```

  * After

  ```
  NODE_ITER (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 5)
  ```
------------------------------------------------------------------------
r60839 | ko1 | 2017-11-18 22:01:12 +0900 (Sat, 18 Nov 2017) | 5 lines

call only with ISEQ_TRACE_EVENTS.

* vm_insnhelper.c (vm_trace): rb_iseq_trace_set() only accepts
  ISEQ_TRACE_EVENTS.

------------------------------------------------------------------------
r60838 | ko1 | 2017-11-18 18:39:41 +0900 (Sat, 18 Nov 2017) | 18 lines

introduce `trace_events' info for iseq.

* vm_core.h (rb_iseq_t::aux): add `trace_events` which represents
  which events are enabled on this iseq. With this information,
  we can skip useless trace-on changes for ISeqs.

* vm_trace.c (RUBY_EVENTS_TRACE_BY_ISEQ): moved to iseq.h and rename it
  with ISEQ_TRACE_EVENTS.

* iseq.h: introduce ISEQ_USE_COMPILE_DATA iseq (imemo) flag to represent
  COMPILE_DATA is available. In other words, iseq->aux.trace_events is not
  available when this flag is set.
  * ISEQ_COMPILE_DATA() is changed from a macro.
  * ISEQ_COMPILE_DATA_ALLOC() is added.
  * ISEQ_COMPILE_DATA_CLEAR() is added.

* iseq.c: use them.

------------------------------------------------------------------------
r60837 | usa | 2017-11-18 17:25:29 +0900 (Sat, 18 Nov 2017) | 6 lines

Cannot call rb_thread_call_with{out,}_gvl before running VM

* dir.c (opendir_without_gvl, with_gvl_gc_for_fd, opendir_at): check the VM is
  already initialized before calling rb_thread_call_with{out,}_gvl().
  [Bug #14115]

------------------------------------------------------------------------
r60836 | yui-knk | 2017-11-18 17:21:46 +0900 (Sat, 18 Nov 2017) | 22 lines

parse.y: Fix the locations of NODE_DVAR and NODE_LVAR

  * parse.y: Fix the locations of NODE_DVAR and NODE_LVAR
    when it's a multiple assignment method parameter.

  e.g. The locations of NODE_DVAR is fixed:

  ```
  a {|(b, c)| d}
  ```

  * Before

  ```
  NODE_DVAR (line: 1, first_lineno: 1, first_column: 4, last_lineno: 1, last_column: 10)
  ```

  * After

  ```
  NODE_DVAR (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 9)
  ```
------------------------------------------------------------------------
r60835 | ktsj | 2017-11-18 15:24:52 +0900 (Sat, 18 Nov 2017) | 3 lines

.gdbinit: fix print_pathobj

$str is not C string but RString.
------------------------------------------------------------------------
r60834 | ktsj | 2017-11-18 14:45:21 +0900 (Sat, 18 Nov 2017) | 4 lines

.gdbinit: follow up changes in r60726

rb_iseq_constant_body::line_info_size and line_info_table have
been renamed to insns_info_size, insns_info.
------------------------------------------------------------------------
r60833 | yui-knk | 2017-11-18 12:32:05 +0900 (Sat, 18 Nov 2017) | 1 line

parse.y: Use node_assign
------------------------------------------------------------------------
r60832 | suke | 2017-11-18 11:53:39 +0900 (Sat, 18 Nov 2017) | 4 lines

* ext/win32ole/win32ole.c: use WIN32OLEQueryInterfaceError when failed
  to query com interface.
* ext/win32ole/win32ole_event.c: ditto.
* ext/win32ole/win32ole_method.c: ditto.
------------------------------------------------------------------------
r60831 | normal | 2017-11-18 11:01:49 +0900 (Sat, 18 Nov 2017) | 12 lines

dir.c: openat calls release GVL, too

openat(2) also performs a path lookup, so it is also subject
to pathological slowdowns like opendir(3) and open(2) syscalls.

* dir.c (struct opendir_at_arg): new struct for callback
  (with_gvl_gc_for_fd): new callback for rb_thread_call_with_gvl
  (gc_for_fd_with_gvl): moved up
  (nogvl_opendir_at): extracted from do_opendir
  (opendir_at): new wrapper to release GVL for opendir_at
  (do_opendir): use new wrappers to release GVL
  (nogvl_dir_empty_p): adjust for gc_for_fd_with_gvl
------------------------------------------------------------------------
r60830 | normal | 2017-11-18 11:01:44 +0900 (Sat, 18 Nov 2017) | 10 lines

dir: release GVL on opendir

opendir(3) is subject to the same pathological slowdowns on
slow or unreliable filesystems as open(2), so release the GVL
to avoid stalling the entire VM like we do with IO#open

* dir.c (nogvl_opendir): new function
  (opendir_without_gvl): new function
  (dir_initialize): s/opendir/&_without_gvl/
  (do_opendir): ditto
------------------------------------------------------------------------
r60829 | yui-knk | 2017-11-18 10:40:13 +0900 (Sat, 18 Nov 2017) | 23 lines

Update the last location of NODE_ARRAY

* parse.y (list_append_gen, list_concat): Update
  the last location of NODE_ARRAY when an item is
  appended or concatenated with another NODE_ARRAY.

  e.g. The locations of NODE_ARRAY is fixed:

  ```
  a(1,2,3)
  ```

  * Before

  ```
  NODE_ARRAY (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 3)
  ```

  * After

  ```
  NODE_ARRAY (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 7)
  ```
------------------------------------------------------------------------
r60828 | svn | 2017-11-18 00:08:04 +0900 (Sat, 18 Nov 2017) | 1 line

* 2017-11-18
------------------------------------------------------------------------
r60827 | kazu | 2017-11-18 00:08:03 +0900 (Sat, 18 Nov 2017) | 5 lines

Fix typo in `Timeout` doc [ci skip]

Author: yuuji.yaginuma <yuuji.yaginuma@gmail.com>
https://github.com/ruby/ruby/pull/1760
[Fix GH-1760]
------------------------------------------------------------------------
r60826 | nobu | 2017-11-17 21:16:31 +0900 (Fri, 17 Nov 2017) | 1 line

parse.y: RUBY_SET_YYLLOC to rb_parser_set_location
------------------------------------------------------------------------
r60825 | nobu | 2017-11-17 21:16:30 +0900 (Fri, 17 Nov 2017) | 6 lines

parse.y: RUBY_SET_YYLLOC

* parse.y (RUBY_SET_YYLLOC): extract setting locations from the
  source line.

* parse.y (yylex): use RUBY_SET_YYLLOC.
------------------------------------------------------------------------
r60824 | knu | 2017-11-17 18:48:47 +0900 (Fri, 17 Nov 2017) | 4 lines

Add examples to Set documentation [ci skip]

GitHub PR:    https://github.com/ruby/ruby/pull/1752 [Fix GH-1752]
Submitted by: @Ana06 <anamma06@gmail.com>
------------------------------------------------------------------------
r60823 | yui-knk | 2017-11-17 17:23:06 +0900 (Fri, 17 Nov 2017) | 5 lines

NODE_CALL is not passed to node_assign_gen

* parse.y (node_assign_gen): NODE_CALL is not passed to
  node_assign_gen. NODE_CALL is not assignable. Assignable
  method call (array set and attr set) is represented by NODE_ATTRASGN.
------------------------------------------------------------------------
r60822 | ko1 | 2017-11-17 16:47:03 +0900 (Fri, 17 Nov 2017) | 4 lines

don't use `goto`.

* vm_trace.c (rb_exec_event_hooks): we don't need to use goto statement.

------------------------------------------------------------------------
r60821 | yui-knk | 2017-11-17 16:39:15 +0900 (Fri, 17 Nov 2017) | 24 lines

Fix location of assignable nodes

* parse.y (node_assign_gen): NODE_ATTRASGN is created
  before rhs is created. It is needed to set location
  after rhs is created to rhs range be included to the
  location of NODE_ATTRASGN.

  e.g. The locations of NODE_ATTRASGN is fixed:

  ```
  a[1] = 2
  ```

  * Before

  ```
  NODE_ATTRASGN (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 4)
  ```

  * After

  ```
  NODE_ATTRASGN (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 8)
  ```
------------------------------------------------------------------------
r60820 | ko1 | 2017-11-17 16:29:07 +0900 (Fri, 17 Nov 2017) | 6 lines

remove a wrong assertion.

* iseq.c (rb_iseq_trace_set): remove a wrong assertion.
  This assertion checked `insn` is `trace_` prefix instruction
  but threaded code `insn` is original code.

------------------------------------------------------------------------
r60819 | ko1 | 2017-11-17 15:59:22 +0900 (Fri, 17 Nov 2017) | 7 lines

reuse gvar value.

* vm_core.h (EXEC_EVENT_HOOK_VM_TRACE): added to pass vm_event_flags
  (== ruby_vm_event_flags) as a macro parameter.

* vm_insnhelper.c (vm_trace): use an added macro.

------------------------------------------------------------------------
r60818 | svn | 2017-11-17 15:24:56 +0900 (Fri, 17 Nov 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r60817 | ko1 | 2017-11-17 15:24:55 +0900 (Fri, 17 Nov 2017) | 10 lines

remove `trace_` prefix insns lazily.

* vm_trace.c (update_global_event_hook): set only when tracing is added.
  If tracing was off (event flags are decreased), then ignore them.
  Next `trace_` prefix instruction will trace off itself (lazy tracing off).

* vm_insnhelper.c (vm_trace): trace-off for when trace is not needed.

* iseq.c (rb_iseq_trace_set): fix trace-off process (it was never off tracing).

------------------------------------------------------------------------
r60816 | yui-knk | 2017-11-17 13:25:48 +0900 (Fri, 17 Nov 2017) | 24 lines

Fix location of assignable nodes

* parse.y (node_assign_gen): In some case assignable nodes
  are created before rhs is created. In this case it is
  needed to set location after rhs is shifted to
  rhs range be included to assignable nodes.

  e.g. The locations of NODE_DASGN_CURR is fixed:

  ```
  a = 10
  ```

  * Before

  ```
  NODE_DASGN_CURR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 1)
  ```

  * After

  ```
  NODE_DASGN_CURR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 6)
  ```
------------------------------------------------------------------------
r60815 | svn | 2017-11-17 08:13:25 +0900 (Fri, 17 Nov 2017) | 1 line

* 2017-11-17
------------------------------------------------------------------------
r60814 | yui-knk | 2017-11-17 08:13:24 +0900 (Fri, 17 Nov 2017) | 27 lines

Fix location of NODEs generated by new_op_assign_gen

* parse.y (new_op_assign_gen): Use a location of lhs
  when call gettable, bacause gettable creates a variable
  node. Use a location of rhs when call new_list,
  because item of new_list is rhs.

  The locations of NODE_DVAR(nd_vid: :a) and NODE_ARRAY
  are fixed:

  ```
  a -= 1
  ```

  * Before

  ```
  NODE_DVAR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 6)
  NODE_ARRAY (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 6)
  ```

  * After

  ```
  NODE_DVAR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 1)
  NODE_ARRAY (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 6)
  ```
------------------------------------------------------------------------
r60813 | usa | 2017-11-16 21:26:04 +0900 (Thu, 16 Nov 2017) | 6 lines

Old gem file had not been removed

* common.mk (update-gems): `old.delete("gems/#{gem}")` always returns nil
  because when really downloading new gem, the filename is not in `old`.
  the real intention of this condition might be checking `old` is empty or not.

------------------------------------------------------------------------
r60812 | mame | 2017-11-16 20:03:37 +0900 (Thu, 16 Nov 2017) | 1 line

Refactoring out the direct accesses of NODE's u1, u2, and u3
------------------------------------------------------------------------
r60811 | k0kubun | 2017-11-16 19:02:03 +0900 (Thu, 16 Nov 2017) | 12 lines

thread_win32.c: stop returning unused value

to unify signature with pthread's one

I'm planning to use functions for rb_nativethread_cond_t and
rb_nativethread_mutex_t in the future JIT introduction.

In that case, I want them to have the same signature. To prevent the case
that its return value is used in somewhere and it becomes harder to unify
signature, I want to drop unused return value.

[close GH-1751]
------------------------------------------------------------------------
r60810 | ko1 | 2017-11-16 18:24:48 +0900 (Thu, 16 Nov 2017) | 5 lines

remove an unused function.

* eval.c (rb_iterator_p): removed because nobody use it
  and not exposed by headers.

------------------------------------------------------------------------
r60809 | ko1 | 2017-11-16 18:00:15 +0900 (Thu, 16 Nov 2017) | 5 lines

make a func static.

* vm_backtrace.c (rb_ec_backtrace_location_ary): make it static and
  remove `rb_` prefix.

------------------------------------------------------------------------
r60808 | ko1 | 2017-11-16 17:53:49 +0900 (Thu, 16 Nov 2017) | 4 lines

make a func static.

* vm_method.c (rb_resolve_refined_method_callable): make it static.

------------------------------------------------------------------------
r60807 | ko1 | 2017-11-16 17:48:59 +0900 (Thu, 16 Nov 2017) | 7 lines

make funcs static.

* thread.c (rb_threadptr_trap_interrupt): make it static
  and remove `rb_` prefix.

* thread.c (rb_threadptr_pending_interrupt_active_p): ditto.

------------------------------------------------------------------------
r60806 | ko1 | 2017-11-16 17:19:46 +0900 (Thu, 16 Nov 2017) | 6 lines

make funcs static.

* node.c: make them static:
  * rb_node_buffer_new
  * rb_node_buffer_free

------------------------------------------------------------------------
r60805 | ko1 | 2017-11-16 17:01:26 +0900 (Thu, 16 Nov 2017) | 4 lines

make a func static.

* addr2line.c (main_exe_path): make it static.

------------------------------------------------------------------------
r60804 | ko1 | 2017-11-16 16:56:56 +0900 (Thu, 16 Nov 2017) | 4 lines

remove unused func.

* gc.c (rb_garbage_collect): removed.

------------------------------------------------------------------------
r60803 | ko1 | 2017-11-16 16:49:43 +0900 (Thu, 16 Nov 2017) | 4 lines

make a func static.

* vm_eval.c (rb_f_block_given_p): make it static.

------------------------------------------------------------------------
r60802 | ko1 | 2017-11-16 16:47:33 +0900 (Thu, 16 Nov 2017) | 4 lines

make a func static.

* vm_eval.c (rb_f_public_send): make it static.

------------------------------------------------------------------------
r60801 | ko1 | 2017-11-16 16:46:05 +0900 (Thu, 16 Nov 2017) | 4 lines

remove unused function.

* vm_method.c (rb_method_entry_with_refinements): removed.

------------------------------------------------------------------------
r60800 | ko1 | 2017-11-16 16:43:27 +0900 (Thu, 16 Nov 2017) | 5 lines

make a func static.

* vm.c (rb_proc_create_from_captured): make this func static and renmae
  with vm_ prefix.

------------------------------------------------------------------------
r60799 | ko1 | 2017-11-16 16:41:33 +0900 (Thu, 16 Nov 2017) | 4 lines

export rb_tracearg_callee_id().

* include/ruby/debug.h (rb_tracearg_callee_id): export.

------------------------------------------------------------------------
r60798 | ko1 | 2017-11-16 16:38:41 +0900 (Thu, 16 Nov 2017) | 5 lines

make a func static.

* vm_eval.c (rb_raise_method_missing): make this func static and renmae with
  vm_ prefix.

------------------------------------------------------------------------
r60797 | ko1 | 2017-11-16 16:28:16 +0900 (Thu, 16 Nov 2017) | 4 lines

make it static.

* vm.c (rb_thread_mark): now file local.

------------------------------------------------------------------------
r60796 | ko1 | 2017-11-16 16:25:30 +0900 (Thu, 16 Nov 2017) | 9 lines

provide rb_vm_make_proc/lambda().

* vm.c (rb_vm_make_proc): removed.

* vm_core.h: provide utility inline functions
  * rb_vm_make_proc()
  * rb_vm_make_lambda()
  to call rb_vm_make_proc_lambda().

------------------------------------------------------------------------
r60795 | ko1 | 2017-11-16 16:14:45 +0900 (Thu, 16 Nov 2017) | 4 lines

remove unused function.

* vm_insnhelper.c (rb_vm_env_write): remove unused function.

------------------------------------------------------------------------
r60794 | ko1 | 2017-11-16 15:10:31 +0900 (Thu, 16 Nov 2017) | 4 lines

accepts `ec` as first parameter.

* vm_insnhelper.c (vm_check_match): accepts `ec` as first parameter.

------------------------------------------------------------------------
r60793 | ko1 | 2017-11-16 14:56:21 +0900 (Thu, 16 Nov 2017) | 4 lines

fix r60792.

* error.c (warning_string): `file` is already cstr.

------------------------------------------------------------------------
r60792 | ko1 | 2017-11-16 14:52:19 +0900 (Thu, 16 Nov 2017) | 7 lines

`rb_source_loc` -> `rb_source_location_cstr`

* vm.c (rb_source_loc): rename to rb_source_location_cstr()
  to make behavior clear compare with rb_source_location().

* error.c (warning_string): use rb_source_location_cstr() directly.

------------------------------------------------------------------------
r60791 | ko1 | 2017-11-16 14:45:44 +0900 (Thu, 16 Nov 2017) | 4 lines

fix r60789.

* vm.c (rb_source_loc): fix condition.

------------------------------------------------------------------------
r60790 | nobu | 2017-11-16 14:36:42 +0900 (Thu, 16 Nov 2017) | 4 lines

parse.y: no return in class

* parse.y (k_return): prohibit return in class/module body except
  for singleton class.
------------------------------------------------------------------------
r60789 | ko1 | 2017-11-16 14:35:58 +0900 (Thu, 16 Nov 2017) | 4 lines

rb_source_location() may return nil.

* vm.c (rb_source_location): return nil if path is not found.

------------------------------------------------------------------------
r60788 | ko1 | 2017-11-16 14:18:29 +0900 (Thu, 16 Nov 2017) | 4 lines

remove an unused function.

* vm.c (rb_sourcefilename): removed because nobody use it.

------------------------------------------------------------------------
r60787 | ko1 | 2017-11-16 14:14:18 +0900 (Thu, 16 Nov 2017) | 6 lines

add `ec` as first parameter.

* vm.c (vm_svar_get): accepts `ec` as first parameter.

* vm.c (vm_svar_set): ditto.

------------------------------------------------------------------------
r60786 | ko1 | 2017-11-16 13:37:02 +0900 (Thu, 16 Nov 2017) | 4 lines

fix up r60782 and r60783.

* cont.c (cont_restore_thread): re-check a condition (pointed by nobu).

------------------------------------------------------------------------
r60785 | yui-knk | 2017-11-16 12:36:20 +0900 (Thu, 16 Nov 2017) | 12 lines

Add a last location to branch coverage

* compile.c (DECL_BRANCH_BASE, ADD_TRACE_BRANCH_COVERAGE): Add
  a last location to arguments.

* compile.c (compile_if, compile_case, compile_case2, compile_loop, iseq_compile_each0):
  Pass a last location to macros.

* ext/coverage/coverage.c (branch_coverage): Add a last location to
  a return value.

* test/coverage/test_coverage.rb: Follow-up these changes.
------------------------------------------------------------------------
r60784 | kazu | 2017-11-16 12:32:23 +0900 (Thu, 16 Nov 2017) | 4 lines

Regexp#===: Use `\A` and `\z` instead of `^` and `$`

[ci skip]
ref https://github.com/rurema/doctree/pull/812
------------------------------------------------------------------------
r60783 | ko1 | 2017-11-16 11:53:17 +0900 (Thu, 16 Nov 2017) | 4 lines

avoid duplicated-cond compile error.

* cont.c (cont_restore_thread): fix duplicated-cond compile error.

------------------------------------------------------------------------
r60782 | ko1 | 2017-11-16 11:47:58 +0900 (Thu, 16 Nov 2017) | 17 lines

cleanup hook cleanup code.

* vm_trace.c: before this patch, deleted hooks are remvoed at
  *the beggining* of hooks (exec_hooks_precheck).
  This patch cleanup deleted hooks at
  (1) just after hook is deleted (TracePoint#disable and so on)
  (2) just after executing hooks (exec_hooks_postcheck)
  Most of time (1) is enough, but if some threads running hooks,
  we need to wait cleaning up deleted hooks until threads finish
  running the hooks. This is why (2) is introduced (and this is
  why current impl cleanup deleted hooks at the beggining of hooks).

* test/lib/tracepointchecker.rb: check also the number of delete
  waiting hooks.

* cont.c (cont_restore_thread): fix VM->trace_running count.

------------------------------------------------------------------------
r60781 | yui-knk | 2017-11-16 10:56:54 +0900 (Thu, 16 Nov 2017) | 24 lines

parse.y: Fix location of asgn node

* parse.y (new_op_assign_gen): Fix location of asgn node.
  Assignable node (e.g. NODE_LASGN) is generated before rhs
  is generated, so we reset the location when nd_value of
  asgn is fixed.

  e.g. :

  ```
  a -= 10
  ```

  * Before

  ```
  NODE_DASGN_CURR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 1)
  ```

  * After

  ```
  NODE_DASGN_CURR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 7)
  ```
------------------------------------------------------------------------
r60780 | yui-knk | 2017-11-16 10:06:10 +0900 (Thu, 16 Nov 2017) | 39 lines

parse.y: Preserve previous line and restore it when read '\n'

* parse.y (parser_params): Add prevline to store previous line.
* parse.y (yycompile0): Initialize prevline with 0.
* parse.y (parser_nextline): Store previous line on prevline.
* parse.y (parser_nextc): Check parser is on EOF or has nextline.
  Now parser_yylex does not always set lex_p as lex_pend, we should check
  EOF flag and nextline is set.
* parse.y (parser_yylex): Restore previous line, set lex_p and tokp
  on '\n'. Before this commit, tokp is on the head of next line of '\n'
  and lex_p is on the tail of next line when next token is '\n'.
  By this behavior, in some case the last column of NODE_CALL (or NODE_QCALL) is
  set to the last column of next line. NODE_CALL can be generated
  via `primary_value call_op operation2 {} opt_paren_args` and opt_paren_args
  can be none. If none is generated with next token '\n', the last column of
  none is set to the last column of next line.

  e.g. :

  ```
  a.b
  cd.ef
  ```

  The location of NODE_CALL of first line is set to,

  * Before

  ```
  NODE_CALL (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 6)
  ```

  * After

  ```
  NODE_CALL (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 3)
  ```

* parse.y (parser_mark): GC mark prevline.
------------------------------------------------------------------------
r60779 | svn | 2017-11-16 02:07:55 +0900 (Thu, 16 Nov 2017) | 1 line

* 2017-11-16
------------------------------------------------------------------------
r60778 | hsbt | 2017-11-16 02:07:54 +0900 (Thu, 16 Nov 2017) | 1 line

Bump rake-12.3.0 on bundled gems.
------------------------------------------------------------------------
r60777 | kazu | 2017-11-15 22:53:15 +0900 (Wed, 15 Nov 2017) | 1 line

Remove redundant last newline [ci skip]
------------------------------------------------------------------------
r60776 | ko1 | 2017-11-15 22:21:24 +0900 (Wed, 15 Nov 2017) | 12 lines

remove rb_thread_t::event_hooks.

* vm_core.h (rb_thread_t): remove rb_thread_t::event_hooks.

* vm_trace.c: all hooks are connected to vm->event_hooks and
  add rb_event_hook_t::filter::th to filter invoke thread.
  It will simplify invoking hooks code.

* thread.c (thread_start_func_2): clear thread specific trace_func.

* test/ruby/test_settracefunc.rb: add a test for Thread#add_trace_func.

------------------------------------------------------------------------
r60775 | nobu | 2017-11-15 17:02:09 +0900 (Wed, 15 Nov 2017) | 4 lines

tmpdir.rb: merged make_tmpname to create

* lib/tmpdir.rb (Dir::Tmpname#create): try conversion of prefix
  and suffix just once before loop.
------------------------------------------------------------------------
r60774 | normal | 2017-11-15 16:24:26 +0900 (Wed, 15 Nov 2017) | 14 lines

dir.c: revert r60772, r60770, and r60769

Using readdir(3) without any locking causes thread-safety
problems if directory streams get shared between threads.  On
ancient platforms, readdir(3) may have thread-safety problems
even on different directory streams.

Using readdir_r(3) is not viable, either, as it's deprecated
due to name overflow problems.

So for now, rely on GVL as in previous Rubies and perhaps
consider per-"struct dir_data" mutexes for modern platforms
which allow concurrent calls to readdir(3) on different
directory streams.
------------------------------------------------------------------------
r60773 | nobu | 2017-11-15 14:50:10 +0900 (Wed, 15 Nov 2017) | 4 lines

thread.c: use ec

* thread.c (call_without_gvl): use execution context for
  RUBY_VM_CHECK_INTS_BLOCKING.
------------------------------------------------------------------------
r60772 | usa | 2017-11-15 14:18:37 +0900 (Wed, 15 Nov 2017) | 6 lines

Cannot call rb_thread_call_without_gvl before running VM

* dir.c (readdir_without_gvl): check the VM is already initialized before
  calling rb_thread_call_without_gvl().
  [Bug #14108]

------------------------------------------------------------------------
r60771 | ko1 | 2017-11-15 13:52:39 +0900 (Wed, 15 Nov 2017) | 7 lines

fix uninitialized memory reference.

* compile.c (iseq_set_sequence): clear kwargs (in ci_entries) memory area.
  kwargs ci entries are initialized by compiler. However, sometimes these
  initializations are skipped because corresponding calls are eliminated
  by some optimizations (for example, `if true` syntax elimnates else code).

------------------------------------------------------------------------
r60770 | usa | 2017-11-15 12:44:58 +0900 (Wed, 15 Nov 2017) | 4 lines

nogvl readdir make SEGV on Windows

* dir.c (readdir_without_gvl): workaround for Windows.  [Bug #14108]

------------------------------------------------------------------------
r60769 | normal | 2017-11-15 08:20:31 +0900 (Wed, 15 Nov 2017) | 18 lines

dir.c: release GVL around remaining readdir calls

Release GVL around all remaining readdir calls from the Dir
class to prevent pathological stalls on slow filesystems in
multi-threaded applications.

opendir, rewinddir, closedir calls are not affected yet, but
will be changed in future commits.

In the future, further work may be done consolidate multiple GVL
releasing calls to reduce overhead, similar to how changes to
Dir.empty? were made in r60111

* dir.c (nogvl_readdir): new function
  (readdir_without_gvl): ditto
  (dir_read): s/READDIR/readdir_without_gvl/
  (dir_each_entry): ditto
  (glob_helper): ditto
------------------------------------------------------------------------
r60768 | nobu | 2017-11-15 02:07:47 +0900 (Wed, 15 Nov 2017) | 3 lines

compile.c: fixup TRACE

* compile.c (remove_unreachable_chunk): ignore TRACE elements.
------------------------------------------------------------------------
r60767 | svn | 2017-11-15 00:37:49 +0900 (Wed, 15 Nov 2017) | 1 line

* 2017-11-15
------------------------------------------------------------------------
r60766 | nobu | 2017-11-15 00:37:48 +0900 (Wed, 15 Nov 2017) | 6 lines

parse.y: zero codepoints

* parse.y (parser_tokadd_utf8): relax restriction to allow zero or
  more codepoints.  fixup r59417.

  https://github.com/ruby/ruby/commit/7e8b910#commitcomment-25602670
------------------------------------------------------------------------
r60765 | ko1 | 2017-11-14 22:25:11 +0900 (Tue, 14 Nov 2017) | 5 lines

rewrite only if changed.

* vm_trace.c (update_global_event_hook): rewrite ISeqs only when
  effective events are changed.

------------------------------------------------------------------------
r60764 | ko1 | 2017-11-14 22:18:44 +0900 (Tue, 14 Nov 2017) | 9 lines

fix prefix.

* compile.c: the following functions accept LINK_ELEMENT so
  rename to `ELEM_` prefix names:
  * INSERT_ELEM_NEXT -> ELEM_INSERT_NEXT
  * INSERT_ELEM_PREV -> ELEM_INSERT_PREV
  * REPLACE_ELEM     -> ELEM_REPLACE
  * REMOVE_ELEM      -> ELEM_REMOVE

------------------------------------------------------------------------
r60763 | ko1 | 2017-11-14 21:58:36 +0900 (Tue, 14 Nov 2017) | 22 lines

remove `trace` instruction. [Feature #14104]

* tool/instruction.rb: create `trace_` prefix instructions.

* compile.c (ADD_TRACE): do not add `trace` instructions but add
  TRACE link elements. TRACE elements will be unified with a next
  instruction as instruction information.

* vm_trace.c (update_global_event_hook): modify all ISeqs when
  hooks are enabled.

* iseq.c (rb_iseq_trace_set): added to toggle `trace_` instructions.

* vm_insnhelper.c (vm_trace): added.
  This function is a body of `trace_` prefix instructions.

* vm_insnhelper.h (JUMP): save PC to a control frame.

* insns.def (trace): removed.

* vm_exec.h (INSN_ENTRY_SIG): add debug output (disabled).

------------------------------------------------------------------------
r60762 | nobu | 2017-11-14 13:42:38 +0900 (Tue, 14 Nov 2017) | 10 lines

process.c: removed preserving_errno

* process.c (try_with_sh, handle_fork_error): added argument for
  errno.

* process.c (proc_exec_cmd, proc_exec_sh, exec_async_signal_safe):
  now return errno instead of -1.

* process.c (rb_fork_ruby): merged retry_fork_ruby() and unified
  clean-up after fork regardless failure.
------------------------------------------------------------------------
r60761 | nobu | 2017-11-14 12:02:58 +0900 (Tue, 14 Nov 2017) | 1 line

string.c: prefer rb_syserr_fail
------------------------------------------------------------------------
r60760 | nobu | 2017-11-14 12:00:23 +0900 (Tue, 14 Nov 2017) | 1 line

common.mk: add dependencies for iseq.h
------------------------------------------------------------------------
r60759 | nobu | 2017-11-14 11:40:04 +0900 (Tue, 14 Nov 2017) | 1 line

compile.c: comments for concatstrings optimization [ci skip]
------------------------------------------------------------------------
r60758 | ko1 | 2017-11-14 10:37:41 +0900 (Tue, 14 Nov 2017) | 8 lines

use RUBY_API_VERSION as ISEQ versions.

* iseq.h: use RUBY_API_VERSION_MAJOR for ISEQ_MAJOR_VERSION and
  RUBY_API_VERSION_MINOR for ISEQ_MINOR_VERSION.
  We need to keep compatibility for ISeq during same major/minor versions.
  If we need to change compatibility between teeny versions, we should use
  (RUBY_API_VERSION_MINOR * 10 + iseq revs) for ISEQ_MINOR_VERSION.

------------------------------------------------------------------------
r60757 | svn | 2017-11-14 08:53:01 +0900 (Tue, 14 Nov 2017) | 1 line

* 2017-11-14
------------------------------------------------------------------------
r60756 | nobu | 2017-11-14 08:53:00 +0900 (Tue, 14 Nov 2017) | 5 lines

compile.c: fixup r60727

* compile.c (iseq_peephole_optimize): skip next `freezestring`
  instruction after `concatstrings` instruction when frozen string
  literal is enabled.
------------------------------------------------------------------------
r60755 | nobu | 2017-11-13 14:50:54 +0900 (Mon, 13 Nov 2017) | 5 lines

regexec.c: invalidate previously matched position

* regexec.c (match_at): invalidate end position not yet matched
  when new start position is pushed, to dispose previously stored
  position.  [ruby-core:83743] [Bug #14101]
------------------------------------------------------------------------
r60754 | nobu | 2017-11-13 14:46:30 +0900 (Mon, 13 Nov 2017) | 4 lines

test_regexp.rb: test_absent

* test/ruby/test_regexp.rb (test_absent): add simple tests for
  absent operator.
------------------------------------------------------------------------
r60753 | nobu | 2017-11-13 10:58:18 +0900 (Mon, 13 Nov 2017) | 4 lines

envutil.rb: preserve RUBYLIB

* test/lib/envutil.rb (invoke_ruby): preserve RUBYLIB which is
  set by runruby.rb and necessary to load standard libraries.
------------------------------------------------------------------------
r60752 | yui-knk | 2017-11-13 10:24:16 +0900 (Mon, 13 Nov 2017) | 3 lines

Print last location of a node

* node.c (A_NODE_HEADER): Print last location of a node.
------------------------------------------------------------------------
r60751 | yui-knk | 2017-11-13 10:24:15 +0900 (Mon, 13 Nov 2017) | 5 lines

Initialize last column with -1 and lineno with 0

* parse.y (node_newnode): Initialize last column of nodes
  with -1 and lineno with 0 to make it easy to detect nodes
  which we forget to set a column number or lineno.
------------------------------------------------------------------------
r60750 | yui-knk | 2017-11-13 09:14:33 +0900 (Mon, 13 Nov 2017) | 16 lines

Store last location of a node on RNode

* node.c (rb_node_init): Initialize last location with 0.

* node.h (struct rb_code_range_struct): Define a structure
  which contains first location and last location of a node.
* node.h (struct RNode): Use rb_code_range_t to store last
  location of a node.
* node.h (nd_column, nd_set_column, nd_lineno, nd_set_lineno):
  Follow-up the change of struct RNode.
* node.h (nd_last_column, nd_set_last_column, nd_last_lineno, nd_set_last_lineno):
  Define getter/setter macros for last location of RNode.

* parse.y : Set last location of tokens.

Thanks to Yusuke Endoh (mame) for design of data structures.
------------------------------------------------------------------------
r60749 | rhe | 2017-11-13 02:10:29 +0900 (Mon, 13 Nov 2017) | 6 lines

string.c: fix up r60748

An #ifdef was missing in r60748 and build broke on systems without
crypt_r().

https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20171112T162503Z.fail.html.gz
------------------------------------------------------------------------
r60748 | rhe | 2017-11-13 00:55:04 +0900 (Mon, 13 Nov 2017) | 9 lines

string.c: fix memory leak in String#crypt

Use ALLOCV to allocate struct crypt_data for slightly cleaner and less
error-prone code. It is currently possible it leaks when an invalid
argument is passed to String#crypt or rb_str_new_cstr() fails to
allocate memory.

SIZEOF_CRYPT_DATA macro in missing/crypt.h is removed since it is not
used any longer.
------------------------------------------------------------------------
r60747 | svn | 2017-11-13 00:25:57 +0900 (Mon, 13 Nov 2017) | 1 line

* 2017-11-13
------------------------------------------------------------------------
r60746 | k0kubun | 2017-11-13 00:25:56 +0900 (Mon, 13 Nov 2017) | 3 lines

.gitignore: ignore dlntest.dll

This was generated with in-place build on MinGW and not ignored.
------------------------------------------------------------------------
r60745 | kazu | 2017-11-12 16:05:58 +0900 (Sun, 12 Nov 2017) | 5 lines

Clarify Dir.mktmpdir's change

`FileUtils.remove_entry_secure` checks `world_writable?` (and `sticky?`) only.
[ci skip]
ref https://github.com/rurema/doctree/pull/805
------------------------------------------------------------------------
r60744 | svn | 2017-11-12 13:45:52 +0900 (Sun, 12 Nov 2017) | 1 line

* 2017-11-12
------------------------------------------------------------------------
r60743 | nobu | 2017-11-12 13:45:51 +0900 (Sun, 12 Nov 2017) | 6 lines

load.c: cwd encoding

* load.c (rb_get_expanded_load_path): save cwd cache in OS path
  encoding, to get rid of unnecessary conversion and infinite
  loading when it needs encoding conversion.
  [ruby-dev:50221] [Bug #13863]
------------------------------------------------------------------------
r60742 | nobu | 2017-11-11 13:50:11 +0900 (Sat, 11 Nov 2017) | 1 line

parse.y: constified YYLTYPE
------------------------------------------------------------------------
r60741 | svn | 2017-11-11 12:57:03 +0900 (Sat, 11 Nov 2017) | 1 line

* 2017-11-11
------------------------------------------------------------------------
r60740 | suke | 2017-11-11 12:57:02 +0900 (Sat, 11 Nov 2017) | 2 lines

* ext/win32ole/win32ole.c(ole_const_load): suppress constant redefinition
  warnings when WIN32OLE.const_load [Bug #14085]
------------------------------------------------------------------------
r60739 | k0kubun | 2017-11-10 22:59:01 +0900 (Fri, 10 Nov 2017) | 10 lines

bin/erb: change template file encoding to UTF-8

Unlike Ruby source file encoding (script encoding) whose default is
changed to UTF-8 in Ruby 2.0 (Feature #6679), template's file encoding
given to erb(1) has been ASCII-8BIT since ERB supports m17n at r21170.

Like Ruby source file encoding, erb template file encoding should be
UTF-8 in Ruby 2.

[Bug #14095] [ruby-core:83708]
------------------------------------------------------------------------
r60738 | kazu | 2017-11-10 22:50:14 +0900 (Fri, 10 Nov 2017) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r60737 | mame | 2017-11-10 22:46:38 +0900 (Fri, 10 Nov 2017) | 6 lines

Make `rb_ast_dispose` use `RB_OBJ_WRITE`

This fixes the mistake of r60722.
I used `rb_gc_writebarrier_remember` to notify to GC that the references
is changed.  But the function just adds the object to the remember set
blindly.  Ko1 told me that `RB_OBJ_WRITE` is suitable in this case.
------------------------------------------------------------------------
r60736 | k0kubun | 2017-11-10 20:50:00 +0900 (Fri, 10 Nov 2017) | 19 lines

.travis.yml: workaround to resolve ::1

Container-based Trusty environment (sudo: false) does not support IPv6.
https://github.com/travis-ci/travis-ci/issues/3302

And the image has "::1  localhost ip6-localhost ip6-loopback" entry in
addition to "127.0.0.1 localhost" in /etc/hosts.
Thus when it can resolve localhost to ::1 and CI fails.

To resolve this, at least we need to modify /etc/hosts for now but we
can't modify /etc/hosts without sudo.

So I enabled sudo. As Sudo-enabled VM didn't have "::1 localhost" entry,
this change fixed the cause without touching /etc/hosts.

Since boot of `sudo: required` is slower than `sudo: false`, please revert
this commit anytime when Container-based Trusty environment is updated and
::1 issue has gone.
https://docs.travis-ci.com/user/reference/overview/
------------------------------------------------------------------------
r60735 | nobu | 2017-11-10 17:26:44 +0900 (Fri, 10 Nov 2017) | 4 lines

iseq.c: disasm only once for each iseq

* iseq.c (rb_iseq_disasm): do not dump repeatedly same iseq which
  has been dumped by catch tables.
------------------------------------------------------------------------
r60734 | hsbt | 2017-11-10 15:31:36 +0900 (Fri, 10 Nov 2017) | 4 lines

Do not define test method instead of skip when Calendar class is not defined.

  Revisit r34739. Patch by MSP-Greg.
  [Bug #14088][ruby-core:83690][fix GH-1743]
------------------------------------------------------------------------
r60733 | ko1 | 2017-11-10 14:26:52 +0900 (Fri, 10 Nov 2017) | 6 lines

refactoring about source line.

* iseq.c (find_line_no): renamed to rb_iseq_line_no().

* vm_backtrace.c (calc_lineno): add a comment why we need to use "pos-1".

------------------------------------------------------------------------
r60732 | nobu | 2017-11-10 08:08:01 +0900 (Fri, 10 Nov 2017) | 4 lines

iseq.c: operand lvar

* iseq.c (rb_insn_operand_intern): show local variable operand
  name in unified instructions.
------------------------------------------------------------------------
r60731 | nobu | 2017-11-10 08:02:52 +0900 (Fri, 10 Nov 2017) | 1 line

mk_call_iseq_optimized.rb: add mode string [ci skip]
------------------------------------------------------------------------
r60730 | marcandre | 2017-11-10 07:05:44 +0900 (Fri, 10 Nov 2017) | 1 line

lib/matrix: Remove method catalog [doc] [ci-skip]
------------------------------------------------------------------------
r60729 | svn | 2017-11-10 07:04:48 +0900 (Fri, 10 Nov 2017) | 1 line

* 2017-11-10
------------------------------------------------------------------------
r60728 | marcandre | 2017-11-10 07:04:47 +0900 (Fri, 10 Nov 2017) | 1 line

TracePoint.new: raise ArgumentError when no block given [#14074]
------------------------------------------------------------------------
r60727 | nobu | 2017-11-09 17:27:01 +0900 (Thu, 09 Nov 2017) | 1 line

compile.c: optimize nested string interpolations
------------------------------------------------------------------------
r60726 | ko1 | 2017-11-09 15:57:24 +0900 (Thu, 09 Nov 2017) | 11 lines

insn_info/insns_info

* iseq.h (iseq_line_info_entry): rename to iseq_insn_info_entry.

* vm_core.h (rb_iseq_constant_body): rename field name line_info_table
  to insns_info and also from line_info_size to insns_info_size.

* compile.c (INSN): add struct insn_info to contain per insn information.

* compile.c (add_insn_info): added to add new insn_info entry.

------------------------------------------------------------------------
r60725 | ko1 | 2017-11-09 14:22:51 +0900 (Thu, 09 Nov 2017) | 8 lines

fix backtrace on argment error.

* vm_backtrace.c (rb_backtrace_use_iseq_first_lineno_for_last_location):
  added. It modifies last location's line as corresponding iseq's first line
  number.

* vm_args.c (raise_argument_error): use added function.

------------------------------------------------------------------------
r60724 | ko1 | 2017-11-09 13:27:27 +0900 (Thu, 09 Nov 2017) | 9 lines

fix peephole optimization.

* compile.c (iseq_peephole_optimize): do not need to put `pop`
  instruction.

* test/ruby/test_optimization.rb (test_peephole_optimization_without_trace):
  This code "def foo; 1.times{|(a), &b| nil && a}; end" fails to compile
  by stack underflow because of above bug (fixed by this patch).

------------------------------------------------------------------------
r60723 | mame | 2017-11-09 10:50:58 +0900 (Thu, 09 Nov 2017) | 5 lines

node.c (dump_node): add an explanation of NODE_HASH's nd_alen

The field has a flag to represent if it is a keyword argument (that has
no braces, e.g., `foo(k:1)`) or hash literal (that has braces, e.g.,
`foo({k:1})`).
------------------------------------------------------------------------
r60722 | mame | 2017-11-09 10:32:11 +0900 (Thu, 09 Nov 2017) | 4 lines

use `rb_ast_dispose` instead of `rb_ast_free`

`rb_ast_dispose` calls `rb_gc_writebarrier_remember`.  Unless we call
it, the marked objects may not be GC'ed until `rb_ast_t` is GC'ed.
------------------------------------------------------------------------
r60721 | hsbt | 2017-11-09 09:42:19 +0900 (Thu, 09 Nov 2017) | 4 lines

Merge rubygems-2.7.2.

  This version fixes some setup commands.
  https://github.com/rubygems/rubygems/blob/01e797f6aa045fd09df7813d0b5448e3667172a9/History.txt#L3
------------------------------------------------------------------------
r60720 | nobu | 2017-11-09 08:09:25 +0900 (Thu, 09 Nov 2017) | 6 lines

parse.y: fix r60644

* parse.y (rb_strterm_heredoc_t): should not define sourceline as
  union, to fix wrong read on big-endian platforms.
  as rb_imemo_new stores all members as VALUEs, should read it as
  VALUE too.
------------------------------------------------------------------------
r60719 | svn | 2017-11-09 01:43:24 +0900 (Thu, 09 Nov 2017) | 1 line

* 2017-11-09
------------------------------------------------------------------------
r60718 | a_matsuda | 2017-11-09 01:43:23 +0900 (Thu, 09 Nov 2017) | 8 lines

Fix typo in doc [ci skip]

`enable` and `disable` are instance methods.

Patch by: yuuji.yaginuma <yuuji.yaginuma@gmail.com>

https://github.com/ruby/ruby/pull/1744
[Fix GH-1744]
------------------------------------------------------------------------
r60717 | kazu | 2017-11-08 23:14:54 +0900 (Wed, 08 Nov 2017) | 1 line

fixup r60440 [ci skip]
------------------------------------------------------------------------
r60716 | nobu | 2017-11-08 19:54:09 +0900 (Wed, 08 Nov 2017) | 4 lines

parse.y: remove in_single

* parse.y (parser_params): removed in_single, which is referenced
  with in_def always.
------------------------------------------------------------------------
r60715 | knu | 2017-11-08 12:57:54 +0900 (Wed, 08 Nov 2017) | 1 line

Fix typos in rdoc
------------------------------------------------------------------------
r60714 | yui-knk | 2017-11-08 09:03:02 +0900 (Wed, 08 Nov 2017) | 5 lines

Omit first argument of NEW_CASE2

* node.h (NEW_CASE2): Omit first argument of NEW_CASE2,
  bacause the first argument of NEW_CASE2 is always 0.
* parse.y: Ditto
------------------------------------------------------------------------
r60713 | stomar | 2017-11-08 05:17:04 +0900 (Wed, 08 Nov 2017) | 6 lines

hash.c: improve docs for Hash#slice

* hash.c: [DOC] clarify description for Hash#slice and remove
  a sentence that might suggest that the receiver is modified;
  improve example to also include a case where a hash with
  several elements is returned.
------------------------------------------------------------------------
r60712 | stomar | 2017-11-08 05:15:59 +0900 (Wed, 08 Nov 2017) | 6 lines

string.c: improve docs for String#{concat,<<}

* string.c: [DOC] remove a misleading call-seq for String#concat,
  which suggests that all arguments must be Integers in this case;
  also clarify in the example that the receiver is modified;
  fix grammar for String#<<; move references to the end.
------------------------------------------------------------------------
r60711 | stomar | 2017-11-08 05:14:46 +0900 (Wed, 08 Nov 2017) | 5 lines

pathname.c: improve docs for Pathname

* ext/pathname/pathname.c: [DOC] improve example for Pathname.glob,
  by using a more common glob pattern, and improve the reference
  to the `base' keyword argument for Pathname#glob.
------------------------------------------------------------------------
r60710 | stomar | 2017-11-08 05:13:48 +0900 (Wed, 08 Nov 2017) | 3 lines

http.rb: improve docs

* lib/net/http.rb: [DOC] fix typos and grammar
------------------------------------------------------------------------
r60709 | stomar | 2017-11-08 05:13:00 +0900 (Wed, 08 Nov 2017) | 4 lines

socket.c,tcpsocket.c: improve deprecation notices

* ext/socket/socket.c: [DOC] fix grammar in deprecation notices.
* ext/socket/tcpsocket.c: [DOC] ditto.
------------------------------------------------------------------------
r60708 | stomar | 2017-11-08 05:11:44 +0900 (Wed, 08 Nov 2017) | 1 line

vm_dump.c: [DOC] fix grammar
------------------------------------------------------------------------
r60707 | stomar | 2017-11-08 05:11:09 +0900 (Wed, 08 Nov 2017) | 3 lines

string.c: fix typos

* string.c: [DOC] fix typos in doxygen comments.
------------------------------------------------------------------------
r60706 | stomar | 2017-11-08 05:10:29 +0900 (Wed, 08 Nov 2017) | 4 lines

file.c: improve docs for File#path

* file.c: [DOC] fix grammar in docs for File#path
  and use a stronger description than "inaccurate".
------------------------------------------------------------------------
r60705 | stomar | 2017-11-08 05:09:19 +0900 (Wed, 08 Nov 2017) | 1 line

ext/socket/ifaddr.c: [DOC] fix typo
------------------------------------------------------------------------
r60704 | stomar | 2017-11-08 05:08:34 +0900 (Wed, 08 Nov 2017) | 3 lines

etc.c: improve docs for sysconfdir

* ext/etc/etc.c: [DOC] small language fixes for etc_sysconfdir docs.
------------------------------------------------------------------------
r60703 | stomar | 2017-11-08 05:07:33 +0900 (Wed, 08 Nov 2017) | 1 line

README.md: fix typos and grammar
------------------------------------------------------------------------
r60702 | stomar | 2017-11-08 05:06:25 +0900 (Wed, 08 Nov 2017) | 1 line

NEWS: clarify "ubygems.rb" entry
------------------------------------------------------------------------
r60701 | svn | 2017-11-08 05:04:59 +0900 (Wed, 08 Nov 2017) | 1 line

* 2017-11-08
------------------------------------------------------------------------
r60700 | stomar | 2017-11-08 05:04:58 +0900 (Wed, 08 Nov 2017) | 4 lines

refinements.rdoc: improve docs

* doc/syntax/refinements.rdoc: [DOC] fix typos and grammar
  and remove superfluous "for the first time".
------------------------------------------------------------------------
r60699 | ko1 | 2017-11-07 23:23:58 +0900 (Tue, 07 Nov 2017) | 5 lines

disable GC.

* test/ruby/test_io.rb (test_write_no_garbage): malloc can cause GC
  and it will reduce string object counts. So disable GC during this test.

------------------------------------------------------------------------
r60698 | nobu | 2017-11-07 20:21:09 +0900 (Tue, 07 Nov 2017) | 1 line

tool/runruby.rb: fix RUNRUBY_USE_GDB case
------------------------------------------------------------------------
r60697 | ko1 | 2017-11-07 17:23:57 +0900 (Tue, 07 Nov 2017) | 7 lines

`th` is not used.

* vm_args.c: `th` parameter is not used on the following functions:
  * args_check_block_arg0
  * keyword_hash_p
  * args_pop_keyword_hash

------------------------------------------------------------------------
r60696 | ko1 | 2017-11-07 17:19:25 +0900 (Tue, 07 Nov 2017) | 5 lines

th->ec: dtrace

* vm.c (ruby_th_dtrace_setup): rename to rb_dtrace_setup()
  and accept `ec`.

------------------------------------------------------------------------
r60695 | ko1 | 2017-11-07 17:01:26 +0900 (Tue, 07 Nov 2017) | 1 line

`rb_execution_context_t *` should not be `th`
------------------------------------------------------------------------
r60694 | mame | 2017-11-07 15:36:07 +0900 (Tue, 07 Nov 2017) | 11 lines

Symptomatic treatment for `rb_thread_terminate_all` freeze

Under uncertain condition, `rb_thread_terminate_all` gets stuck.  `make
test-all TESTOPTS="test/ruby/test_gc.rb -n test_interrupt_in_finalizer`
fails very rarely (only once every thousand runs).  This IS a bug, but
seems difficult to fix it soon.

This commit makes `rb_thread_terminate_all` wake up every one second,
instead of waiting forever, which mitigates the unuseful freeze.
This is not an essential solution for the bug, though.  I'll create a
ticket with how to reproduce the original issue.
------------------------------------------------------------------------
r60693 | ko1 | 2017-11-07 15:14:00 +0900 (Tue, 07 Nov 2017) | 4 lines

th->ec: vm_once_dispatch.

* vm_insnhelper.c (vm_once_dispatch): accepts `ec`.

------------------------------------------------------------------------
r60692 | ko1 | 2017-11-07 15:09:47 +0900 (Tue, 07 Nov 2017) | 4 lines

th->ec: rb_threadptr_setup_exception

* eval.c (rb_threadptr_setup_exception): renamed to rb_ec_setup_exception().

------------------------------------------------------------------------
r60691 | ko1 | 2017-11-07 15:01:16 +0900 (Tue, 07 Nov 2017) | 9 lines

fix prefix `ruby_...()` to `rb_...()`.

* vm_core.h: fix prefix `ruby_` to `rb_` for the following functions.
  * ruby_current_execution_context
  * ruby_current_thread
  * ruby_current_vm
  * ruby_vm_check_ints
  * ruby_exec_event_hook_orig

------------------------------------------------------------------------
r60690 | ko1 | 2017-11-07 14:54:34 +0900 (Tue, 07 Nov 2017) | 2 lines

* vm_trace.c (rb_exec_event_hooks): accepts pop_p.

------------------------------------------------------------------------
r60689 | ko1 | 2017-11-07 14:45:46 +0900 (Tue, 07 Nov 2017) | 4 lines

th->ec: rb_load_internal0

* load.c (rb_load_internal0): accepts `ec`.

------------------------------------------------------------------------
r60688 | ko1 | 2017-11-07 14:41:43 +0900 (Tue, 07 Nov 2017) | 1 line

fix comment
------------------------------------------------------------------------
r60687 | ko1 | 2017-11-07 14:41:15 +0900 (Tue, 07 Nov 2017) | 2 lines

* eval_intern.h (rb_threadptr_tag_state): rename to rb_ec_tag_state.

------------------------------------------------------------------------
r60686 | ko1 | 2017-11-07 14:39:02 +0900 (Tue, 07 Nov 2017) | 2 lines

* vm_eval.c (rescue_funcall_args): th->ec

------------------------------------------------------------------------
r60685 | knu | 2017-11-07 14:28:14 +0900 (Tue, 07 Nov 2017) | 1 line

Add details on the min/time parameters to the rdoc
------------------------------------------------------------------------
r60684 | ko1 | 2017-11-07 14:22:09 +0900 (Tue, 07 Nov 2017) | 3 lines

* eval_intern.h: rename macros rb_thread_raised_* to
  rb_ec_raised_*.

------------------------------------------------------------------------
r60683 | ko1 | 2017-11-07 14:12:39 +0900 (Tue, 07 Nov 2017) | 5 lines

rename to rb_ec_set_raised().

* thread.c (rb_threadptr_set_raised): rename to rb_ec_set_raised
  and accepts `ec`

------------------------------------------------------------------------
r60682 | ko1 | 2017-11-07 14:09:27 +0900 (Tue, 07 Nov 2017) | 1 line

use GET_VM()
------------------------------------------------------------------------
r60681 | ko1 | 2017-11-07 14:08:09 +0900 (Tue, 07 Nov 2017) | 1 line

use GET_EC() directly
------------------------------------------------------------------------
r60680 | ko1 | 2017-11-07 14:06:50 +0900 (Tue, 07 Nov 2017) | 2 lines

* vm_backtrace.c (rb_debug_inspector_t): `th` -> `ec`.

------------------------------------------------------------------------
r60679 | ko1 | 2017-11-07 14:01:51 +0900 (Tue, 07 Nov 2017) | 5 lines

move `rb_thread_t::method_missing_reason` to ec.

* vm_core.h (rb_thread_t): move method_missing_reason to
  rb_execution_context_t.

------------------------------------------------------------------------
r60678 | ko1 | 2017-11-07 13:53:11 +0900 (Tue, 07 Nov 2017) | 4 lines

remove `rb_postponed_job_t::th`.

* vm_trace.c (rb_postponed_job_t): remove `th` field because it is not used.

------------------------------------------------------------------------
r60677 | ko1 | 2017-11-07 13:04:18 +0900 (Tue, 07 Nov 2017) | 2 lines

rename because it doesn't receive `th`.

------------------------------------------------------------------------
r60676 | ko1 | 2017-11-07 13:01:13 +0900 (Tue, 07 Nov 2017) | 11 lines

th->ec: rb_threadptr_reset_raised()

* thread.c (rb_threadptr_reset_raised): rename to `rb_ec_reset_raised`
  and accepts `ec`.

* vm_trace.c: the following functions accept `ec` instead of `th`
  * exec_hooks_body
  * exec_hooks_precheck
  * exec_hooks_unprotected
  * exec_hooks_protected

------------------------------------------------------------------------
r60675 | svn | 2017-11-07 12:41:35 +0900 (Tue, 07 Nov 2017) | 1 line

* 2017-11-07
------------------------------------------------------------------------
r60674 | ko1 | 2017-11-07 12:41:34 +0900 (Tue, 07 Nov 2017) | 5 lines

prepare local variables (th and vm).

* vm_trace.c (rb_threadptr_exec_event_hooks_orig): prepare local variables
  `th` and `vm` instead of using rb_ec_... functions.

------------------------------------------------------------------------
r60673 | ko1 | 2017-11-06 17:22:27 +0900 (Mon, 06 Nov 2017) | 2 lines

use `GET_EC()` directly.

------------------------------------------------------------------------
r60672 | ko1 | 2017-11-06 16:44:28 +0900 (Mon, 06 Nov 2017) | 12 lines

move rb_thread_t::interrupt_flag and mask
to rb_execution_context_t.

* vm_core.h (rb_thread_t): move
  `rb_thread_t::interrupt_flag` and
  `rb_thread_t::interrupt_mask` to rb_execution_context_t.

  RUBY_VM_CHECK_INTS() accepts `ec` instead of `th`.

* cont.c (rb_fiber_terminate): to propagate interrupt information,
  add new parameter `need_interrupt`.

------------------------------------------------------------------------
r60671 | ko1 | 2017-11-06 16:35:37 +0900 (Mon, 06 Nov 2017) | 1 line

show the location at intterrupted
------------------------------------------------------------------------
r60670 | ko1 | 2017-11-06 14:41:48 +0900 (Mon, 06 Nov 2017) | 5 lines

renmae ec::fiber to ec::fiber_ptr.

* vm_core.h (rb_execution_context_t): renmae ec::fiber to
  ec::fiber_ptr make consistent with ec::thread_ptr.

------------------------------------------------------------------------
r60669 | hsbt | 2017-11-06 11:02:04 +0900 (Mon, 06 Nov 2017) | 3 lines

Merge RubyGems 2.7.1.

  * Fix `gem update --system` with RubyGems 2.7+.
------------------------------------------------------------------------
r60668 | nobu | 2017-11-06 08:32:50 +0900 (Mon, 06 Nov 2017) | 4 lines

enum.c: check argument first

* enum.c (enum_cycle_size): check an argument before the size of
  the receiver, if it is given.
------------------------------------------------------------------------
r60667 | nobu | 2017-11-06 08:27:46 +0900 (Mon, 06 Nov 2017) | 1 line

test/ruby/test_lazy_enumerator.rb: test for [Bug #14082]
------------------------------------------------------------------------
r60666 | marcandre | 2017-11-06 07:14:25 +0900 (Mon, 06 Nov 2017) | 3 lines

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

Patch by Kenichi Kamiya
------------------------------------------------------------------------
r60665 | nobu | 2017-11-06 06:13:18 +0900 (Mon, 06 Nov 2017) | 7 lines

lexer.rb: Ripper::Lexer::State

* ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer::State): wrapper
  of lex_state values.

* parse.y (rb_parser_lex_state_name): return shared strings.  lex
  state combinations are very restricted.
------------------------------------------------------------------------
r60664 | nobu | 2017-11-06 06:13:17 +0900 (Mon, 06 Nov 2017) | 1 line

runruby.rb: add -C/--chdir option
------------------------------------------------------------------------
r60663 | svn | 2017-11-06 00:10:41 +0900 (Mon, 06 Nov 2017) | 1 line

* 2017-11-06
------------------------------------------------------------------------
r60662 | kazu | 2017-11-06 00:10:41 +0900 (Mon, 06 Nov 2017) | 6 lines

Modify spell miss.

Runing -> Running

Author:    TomoyukiNakagawa <nakagawa.tomoyuki@gmail.com>
[Fix GH-1741] [ci skip]
------------------------------------------------------------------------
r60661 | nobu | 2017-11-05 14:11:04 +0900 (Sun, 05 Nov 2017) | 1 line

runruby.rb: support run.gdb by --debugger option
------------------------------------------------------------------------
r60660 | mame | 2017-11-05 12:52:22 +0900 (Sun, 05 Nov 2017) | 7 lines

Revert "Introduce rb_code_range_t and replace YYLTYPE with it"

r60655 changed the usage of bison by defining a customized YYLTYPE,
which seemed to cause a random stall at rb_thread_terminate_all.

Kazuki Tsujimoto investigated the issue and pointed out the commit that
caused it.  Thanks!
------------------------------------------------------------------------
r60659 | suke | 2017-11-05 10:02:04 +0900 (Sun, 05 Nov 2017) | 3 lines

ext/win32ole/lib/win32ole.rb (metods): rescue WIN32OLEQueryInterfaceError.
test/win32ole/test_win32ole.rb: add test for WIN32OLE#methods

------------------------------------------------------------------------
r60658 | suke | 2017-11-05 09:36:37 +0900 (Sun, 05 Nov 2017) | 2 lines

test/win32ole/test_win32ole_method.rb: remove redundant assertions.

------------------------------------------------------------------------
r60657 | suke | 2017-11-05 09:30:57 +0900 (Sun, 05 Nov 2017) | 10 lines

* ext/win32ole/win32ole_error.c: add WIN32OLEQueryInterfaceError.
* ext/win32ole/win32ole_error.h: ditto.
* ext/win32ole/win32ole.c(typeinfo_from_ole): raise WIN32OLEQueryInterfaceError in ole_methods.
* ext/win32ole/win32ole_method.c(ole_methods_from_typeinfo): ditto.

M    ext/win32ole/win32ole.c
M    ext/win32ole/win32ole_error.c
M    ext/win32ole/win32ole_error.h
M    ext/win32ole/win32ole_method.c

------------------------------------------------------------------------
r60656 | eregon | 2017-11-05 02:48:51 +0900 (Sun, 05 Nov 2017) | 1 line

Workaround Travis CI issue by hardcoding localhost
------------------------------------------------------------------------
r60655 | mame | 2017-11-05 01:34:00 +0900 (Sun, 05 Nov 2017) | 8 lines

Introduce rb_code_range_t and replace YYLTYPE with it

rb_code_range_t has two t_code_location_t, i.e., the first and last
locations.

This is used for YYLTYPE, tracked locations of bison, and will be also
used for representing the "range", the first and the last locations of
each NODE.  Currently, each NODE keeps only the first location, though.
------------------------------------------------------------------------
r60654 | nobu | 2017-11-05 00:39:52 +0900 (Sun, 05 Nov 2017) | 4 lines

parse.y: fix duplicate symbol

* parse.y (rb_strterm_mark): do not define in ripper to get rid of
  duplicate symbol with static-linked-ext.
------------------------------------------------------------------------
r60653 | svn | 2017-11-05 00:22:19 +0900 (Sun, 05 Nov 2017) | 1 line

* 2017-11-05
------------------------------------------------------------------------
r60652 | mame | 2017-11-05 00:22:18 +0900 (Sun, 05 Nov 2017) | 5 lines

Introduce `rb_code_location_t`

`rb_code_location_t` has two integers, lineno and column, which point to
one location on a code.  Now `rb_code_location_t` is used instead of
`VALUE nd_location`.
------------------------------------------------------------------------
r60651 | nobu | 2017-11-04 23:32:48 +0900 (Sat, 04 Nov 2017) | 3 lines

gc.c: UNEXPECTED_NODE

* gc.c (UNEXPECTED_NODE): extract rb_bug for T_NODE.
------------------------------------------------------------------------
r60650 | mame | 2017-11-04 23:24:16 +0900 (Sat, 04 Nov 2017) | 10 lines

Avoid usage of the magic number `(NODE*)-1`

This magic number has two meanings depending upon the context:

* "required keyword argument (no name)" on NODE_LASGN (`def foo(x:)`)
* "rest argument (no name)" on NODE_MASGN and NODE_POSTARG
  ('a, b, * = ary` or `a, b, *, z = ary`)

To show this intention explicitly, two macros are introduced:
NODE_SPECIAL_REQUIRED_KEYWORD and NODE_SPECIAL_NO_NAME_REST.
------------------------------------------------------------------------
r60649 | yui-knk | 2017-11-04 22:59:34 +0900 (Sat, 04 Nov 2017) | 6 lines

compile.c (setup_args): Fix a typo

* compile.c (setup_args): In this function,
  an argument of nd_line is argn except this line.
  And argn is a pointer of NODE. So I think this
  is a typo.
------------------------------------------------------------------------
r60648 | mame | 2017-11-04 22:31:47 +0900 (Sat, 04 Nov 2017) | 8 lines

gc.c (rb_free_tmp_buffer): stop accessing imemo_alloc as NODE

The fields of imemo_alloc were accessed via RNODE() cast, since the
imemo was NODE_ALLOCA traditionally.  This was refactored at r60239,
so now the fields should be accessed as imemo_alloc.  This prevented
change of NODE structure.

Yuichiro Kaneko pointed out this inconsistency.  Thanks!
------------------------------------------------------------------------
r60647 | mame | 2017-11-04 22:31:46 +0900 (Sat, 04 Nov 2017) | 4 lines

parse.y (new_args_tail_gen): returns a NODE instead of imemo

`new_args_tail_gen` returned imemo, but the value was later accessed as
`NODE*`.  This prevented change of NODE structure.
------------------------------------------------------------------------
r60646 | mame | 2017-11-04 22:05:05 +0900 (Sat, 04 Nov 2017) | 5 lines

test/ruby/test_io.rb (test_write_no_garbage): Add detailed message

I saw this test failed once.  There is no problem if `before > after`
but we cannot check it.  To allow diagnosis in future, the detailed
message is added.
------------------------------------------------------------------------
r60645 | nobu | 2017-11-04 21:07:20 +0900 (Sat, 04 Nov 2017) | 4 lines

parse.y: suppress warning in ripper

* parse.y (rb_discard_node_gen): rb_discard_node() is not used in
  ripper right now.
------------------------------------------------------------------------
r60644 | nobu | 2017-11-04 21:01:42 +0900 (Sat, 04 Nov 2017) | 8 lines

parse.y: suppress warnings

* parse.y (parser_set_line): removed no longer used function.

* parse.y (rb_strterm_heredoc_t): adjust type of sourceline to
  ruby_sourceline.

* parse.y (rb_strterm_t): get rid of redefinition.
------------------------------------------------------------------------
r60643 | mame | 2017-11-04 20:37:19 +0900 (Sat, 04 Nov 2017) | 5 lines

Remove RNODE cast from NODE utility functions

Now, casting NODE to VALUE is not recommended.  This change requires an
explicit cast from VALUE to NODE to use the NODE utility functions such
as `nd_type`.
------------------------------------------------------------------------
r60642 | mame | 2017-11-04 19:56:50 +0900 (Sat, 04 Nov 2017) | 3 lines

Rename imemo_strterm to imemo_parser_strterm

Per ko1's request.
------------------------------------------------------------------------
r60641 | mame | 2017-11-04 19:56:49 +0900 (Sat, 04 Nov 2017) | 1 line

ext/objspace/objspace.c: add imemo_strterm
------------------------------------------------------------------------
r60640 | mame | 2017-11-04 19:02:43 +0900 (Sat, 04 Nov 2017) | 1 line

Remove NODE-related pieces of code from GC
------------------------------------------------------------------------
r60639 | mame | 2017-11-04 18:18:08 +0900 (Sat, 04 Nov 2017) | 11 lines

Make Ripper use NODE buffer

This is a follow-up of r60488.  Not only the Ruby parser but also Ripper
now use NODE buffer instead of NODE objects managed by GC.

Now we can change the struct of NODEs so that it can keep detailed
location information, perhaps (not tried yet).  Note that, however, the
first word of each NODE must be still compatible with RBasic structure.
This is because Ripper handles NODEs and other objects uniformly;
especially, it still uses `RB_TYPE_P(obj, T_NODE)` for distinguishing
between NODEs and other objects.
------------------------------------------------------------------------
r60638 | mame | 2017-11-04 16:21:37 +0900 (Sat, 04 Nov 2017) | 1 line

Fix the alignment bug of r60634 for LLP64
------------------------------------------------------------------------
r60637 | mame | 2017-11-04 16:21:36 +0900 (Sat, 04 Nov 2017) | 3 lines

Revert "Revert "Replace NODE_STRTERM and NODE_HEREDOC with imemo_strterm""

Retry r60634
------------------------------------------------------------------------
r60636 | rhe | 2017-11-04 15:56:16 +0900 (Sat, 04 Nov 2017) | 7 lines

openssl: pull test case from upstream commit 62af0446569a

The test case added by r60310 ("fix OpenSSL::SSL::SSLContext#min_version
doesn't work", 2017-10-21) does not pass with OpenSSL >= 1.1.0 or
LibreSSL >= 2.6.0. Check that the default 'min_version' value is
properly enforced by actually attempting a handshake rather than by
inspecting the SSL option flags.  [ruby-core:83479] [Bug #14039]
------------------------------------------------------------------------
r60635 | mame | 2017-11-04 13:59:19 +0900 (Sat, 04 Nov 2017) | 3 lines

Revert "Replace NODE_STRTERM and NODE_HEREDOC with imemo_strterm"

Due to build failure on mswin and mingw.
------------------------------------------------------------------------
r60634 | mame | 2017-11-04 12:04:54 +0900 (Sat, 04 Nov 2017) | 8 lines

Replace NODE_STRTERM and NODE_HEREDOC with imemo_strterm

Just refactoring.

NODE_STRTERM and NODE_HEREDOC are not an internal node of AST, but a
temporary storage for managing termination of string literals and
heredocs.  Instead of NODE abuse, I want to use imemo for the storage
in order to avoid (my) confusion.
------------------------------------------------------------------------
r60633 | svn | 2017-11-04 10:48:46 +0900 (Sat, 04 Nov 2017) | 1 line

* 2017-11-04
------------------------------------------------------------------------
r60632 | nobu | 2017-11-04 10:48:45 +0900 (Sat, 04 Nov 2017) | 6 lines

load from relative path to __FILE__

* spec/ruby/library/pathname/empty_spec.rb: load spec_helper from
  relative path to `__FILE__` same as other spec files, instead of
  `__dir__` in which symlinks are resolved, to get rid of constant
  redefinition warning when `srcdir` contains symlinks.
------------------------------------------------------------------------
r60631 | kazu | 2017-11-03 16:14:51 +0900 (Fri, 03 Nov 2017) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r60630 | suke | 2017-11-03 15:07:24 +0900 (Fri, 03 Nov 2017) | 3 lines

* ext/win32ole/lib/win32ole.rb :add WIN32OLE#methods. WIN32OLE might work
  well with did_you_mean gem.

------------------------------------------------------------------------
r60629 | yui-knk | 2017-11-03 12:49:07 +0900 (Fri, 03 Nov 2017) | 1 line

node.c: Add some comments
------------------------------------------------------------------------
r60628 | yui-knk | 2017-11-03 12:22:23 +0900 (Fri, 03 Nov 2017) | 6 lines

node.c: Fix possible alignment bugs

* node.c (rb_node_buffer_new): Use offsetof for
  node_buffer_t size calculation.
* node.c (rb_ast_newnode): Use offsetof for
  node_buffer_elem_t size calculation.
------------------------------------------------------------------------
r60627 | yui-knk | 2017-11-03 11:17:07 +0900 (Fri, 03 Nov 2017) | 5 lines

node.h: Remove obsolete comment

* node.h: NODE_FL_CREF_PUSHED_BY_EVAL was defined as
  NODE_FL_NEWLINE by r25984, redefined by r40703
  and removed by r49897.
------------------------------------------------------------------------
r60625 | nobu | 2017-11-03 09:52:54 +0900 (Fri, 03 Nov 2017) | 4 lines

test/ruby/test_eval.rb: use orphan procs

This failure has been hidden by the bug of assert_raise which is
fixed at r60614.
------------------------------------------------------------------------
r60624 | stomar | 2017-11-03 05:38:04 +0900 (Fri, 03 Nov 2017) | 4 lines

io.c: improve docs for the chomp option

* io.c: [DOC] improve the description for the chomp option and
  add examples to IO.readlines and IO#readlines; other small fixes.
------------------------------------------------------------------------
r60623 | stomar | 2017-11-03 05:26:11 +0900 (Fri, 03 Nov 2017) | 1 line

NEWS: add entry for Psych
------------------------------------------------------------------------
r60622 | stomar | 2017-11-03 05:25:37 +0900 (Fri, 03 Nov 2017) | 1 line

NEWS: fix grammar
------------------------------------------------------------------------
r60621 | stomar | 2017-11-03 05:25:04 +0900 (Fri, 03 Nov 2017) | 1 line

doc/NEWS-2.4.0: fix grammar and typo
------------------------------------------------------------------------
r60620 | stomar | 2017-11-03 05:23:47 +0900 (Fri, 03 Nov 2017) | 4 lines

proc.c: fix rdoc for Method class documentation

* proc.c: [DOC] fix rdoc syntax for the class documentation of
  the Method class so that it is displayed in the rendered docs.
------------------------------------------------------------------------
r60619 | stomar | 2017-11-03 05:21:15 +0900 (Fri, 03 Nov 2017) | 6 lines

proc.c: further improve docs for {Method,Proc}#arity

* proc.c: [DOC] fix grammar in docs for {Method,Proc}#arity;
  for Method#arity, move special case of methods written in C to the
  end of the description, fix a typo in a method name, and add an
  example for required arguments with an optional keyword argument.
------------------------------------------------------------------------
r60618 | stomar | 2017-11-03 05:20:11 +0900 (Fri, 03 Nov 2017) | 6 lines

proc.c: improve docs for {Method,Proc}#arity

* proc.c: [DOC] improve Method#arity documentation to match with
  Proc#arity, mentioning keyword arguments; also make Proc#arity
  examples more consistent in the naming of keyword arguments.
  Patch by Nikita Misharin (TheSmartnik).  [Fix GH-1735]
------------------------------------------------------------------------
r60617 | svn | 2017-11-03 05:06:38 +0900 (Fri, 03 Nov 2017) | 1 line

* 2017-11-03
------------------------------------------------------------------------
r60616 | stomar | 2017-11-03 05:06:38 +0900 (Fri, 03 Nov 2017) | 4 lines

rexml: improve docs

* lib/rexml/entity.rb: [DOC] drop a pointless comment.
  Reported by Michael Gee (mikegee).  [Fix GH-1736]
------------------------------------------------------------------------
r60615 | nobu | 2017-11-02 21:45:37 +0900 (Thu, 02 Nov 2017) | 4 lines

skip/fix wrong tests

* test/ruby/test_{class,eval}.rb: skip or fix wrong tests hidden
  by a bug of assert_raise.
------------------------------------------------------------------------
r60614 | nobu | 2017-11-02 21:29:33 +0900 (Thu, 02 Nov 2017) | 4 lines

assertions.rb: fix return in assert_raise

* test/lib/test/unit/assertions.rb (assert_raise): should fail if
  returned gently in the given block without any exceptions.
------------------------------------------------------------------------
r60613 | nobu | 2017-11-02 16:52:49 +0900 (Thu, 02 Nov 2017) | 4 lines

compile.c: kw splat after splat

* compile.c (setup_args): set keyword splat flag after splat
  arguments.  [ruby-core:83638] [Bug #10856]
------------------------------------------------------------------------
r60612 | nobu | 2017-11-02 16:52:48 +0900 (Thu, 02 Nov 2017) | 3 lines

debug.c: vm call flags

* debug.c (ruby_dummy_gdb_enums): include vm_call_flag_bits.
------------------------------------------------------------------------
r60611 | rhe | 2017-11-02 15:30:18 +0900 (Thu, 02 Nov 2017) | 5 lines

bignum.c: avoid use of uninitialized value in Integer.sqrt

This is a follow-up fix to r57713. estimate_initial_sqrt() didn't
initialize BDIGITs except the topmost two, letting Integer.sqrt return
wrong result in the fast path, such as for (1<<504).
------------------------------------------------------------------------
r60610 | usa | 2017-11-02 13:28:30 +0900 (Thu, 02 Nov 2017) | 7 lines

Support Windows

* spec/bundler/spec_helper.rb: there are no reason to refuse ':' and '-' in the
  path of spec files.  especially, ':' is always contained on Windows.

* spec/bundler/spec/helper.rb: open3.rb is also supported on Windows.

------------------------------------------------------------------------
r60609 | hsbt | 2017-11-02 13:27:33 +0900 (Thu, 02 Nov 2017) | 1 line

Fixed syntax error with ignore option order.
------------------------------------------------------------------------
r60608 | hsbt | 2017-11-02 13:25:37 +0900 (Thu, 02 Nov 2017) | 1 line

Merge release version of Rubygems 2.7.0.
------------------------------------------------------------------------
r60607 | usa | 2017-11-02 12:12:05 +0900 (Thu, 02 Nov 2017) | 4 lines

Should quote by double quotes, not single quotes for Windows

* common.mk (test-bundler-precheck): single quotes is not quote on Windows.

------------------------------------------------------------------------
r60606 | svn | 2017-11-02 08:30:03 +0900 (Thu, 02 Nov 2017) | 1 line

* 2017-11-02
------------------------------------------------------------------------
r60605 | svn | 2017-11-02 08:30:01 +0900 (Thu, 02 Nov 2017) | 1 line

* properties.
------------------------------------------------------------------------
r60604 | svn | 2017-11-02 08:30:00 +0900 (Thu, 02 Nov 2017) | 1 line

* remove trailing spaces, append newline at EOF.
------------------------------------------------------------------------
r60603 | hsbt | 2017-11-02 08:29:38 +0900 (Thu, 02 Nov 2017) | 4 lines

Update bundled bundler to 1.16.0.

  * lib/bundler, spec/bundler: Merge bundler-1.16.0.
  * common.mk: rspec examples of bundler-1.16.0 needs require option.
------------------------------------------------------------------------
r60602 | nobu | 2017-11-01 12:26:55 +0900 (Wed, 01 Nov 2017) | 1 line

compile.c: refactored compile_return
------------------------------------------------------------------------
r60601 | nobu | 2017-11-01 12:26:54 +0900 (Wed, 01 Nov 2017) | 4 lines

test_syntax.rb: all assertions

* test/ruby/test_syntax.rb (test_return_toplevel): try all
  assertions even if any assertions failed.
------------------------------------------------------------------------
r60600 | nobu | 2017-11-01 12:26:27 +0900 (Wed, 01 Nov 2017) | 1 line

Pathname: get rid of a -Wcomment warning [DOC]
------------------------------------------------------------------------
r60599 | nobu | 2017-11-01 11:22:10 +0900 (Wed, 01 Nov 2017) | 5 lines

file.c: infect from arguments

* file.c (rb_check_realpath_internal): infetct the result with
  arguments, no taint if none are tainted and cwd is not used.
  [ruby-core:83583] [Bug #14060]
------------------------------------------------------------------------
r60598 | ko1 | 2017-11-01 11:04:02 +0900 (Wed, 01 Nov 2017) | 1 line

revert r60596 because it cause faulure on TestFile#test_realpath_taintedness
------------------------------------------------------------------------
r60597 | nobu | 2017-11-01 10:55:45 +0900 (Wed, 01 Nov 2017) | 1 line

dir.c: cast to suppress a warning
------------------------------------------------------------------------
r60596 | nobu | 2017-11-01 10:51:57 +0900 (Wed, 01 Nov 2017) | 5 lines

file.c: infect from arguments

* file.c (rb_check_realpath_internal): infetct the result with
  arguments, no taint if none are tainted and cwd is not used.
  [ruby-core:83583] [Bug #14060]
------------------------------------------------------------------------
r60595 | normal | 2017-11-01 09:17:11 +0900 (Wed, 01 Nov 2017) | 11 lines

dir: Dir.mkdir and Dir.rmdir release GVL

This avoids blocking the entire VM when operating on slow or
unreliable filesystems.  Instead, only the thread performing
the mkdir or rmdir operation is blocked and other threads
are free to proceed.

* dir.c (nogvl_mkdir): new function
  (nogvl_rmdir): ditto
  (dir_s_mkdir): release GVL
  (dir_s_rmdir): ditto
------------------------------------------------------------------------
r60594 | marcandre | 2017-11-01 07:24:03 +0900 (Wed, 01 Nov 2017) | 1 line

Pathname: Simplify example [DOC] [ci-skip]
------------------------------------------------------------------------
r60593 | svn | 2017-11-01 04:10:20 +0900 (Wed, 01 Nov 2017) | 1 line

* 2017-11-01
------------------------------------------------------------------------
r60592 | normal | 2017-11-01 04:10:19 +0900 (Wed, 01 Nov 2017) | 13 lines

use mode_t where applicable (instead of int)

mode_t is the correct type for these syscalls and it can be
easier-to-understand.  It may also help portability to future
platforms and improve type checking.

* dir.c (dir_s_mkdir): use mode_t for mkdir(2)

* file.c (chmod_internal): use mode_t for chmod(2)
  (rb_file_s_chmod): s/int/mode_t/
  (lchmod_internal): ditto, deref pointer as in chmod_internal
  (rb_file_s_lchmod): pass pointer as in rb_file_s_chmod
  (rb_file_s_rename): use mode_t for umask(2)
------------------------------------------------------------------------
r60591 | yui-knk | 2017-10-31 22:29:54 +0900 (Tue, 31 Oct 2017) | 4 lines

node.h: Rename nd_reserved to nd_location

* node.h (RNode): Now nd_reserved is used to store location
  information, so rename nd_reserved to nd_location.
------------------------------------------------------------------------
r60590 | nobu | 2017-10-31 18:33:22 +0900 (Tue, 31 Oct 2017) | 7 lines

compile.c: ensure after return in library toplevel

* compile.c (compile_return): execute ensure clause after toplevel
  return even in library toplevel other than the main script.
  [ruby-core:83589] [Bug #14061]

test
------------------------------------------------------------------------
r60589 | nobu | 2017-10-31 18:33:21 +0900 (Tue, 31 Oct 2017) | 3 lines

compile.c: compile_return

* compile.c (compile_return): extract from iseq_compile_each.
------------------------------------------------------------------------
r60588 | hsbt | 2017-10-31 16:24:29 +0900 (Tue, 31 Oct 2017) | 4 lines

null byte at Psych::Emitter.

  Check null byte. Patched by tommy (Masahiro Tomita).
  [Bug #13993][ruby-dev:50285]
------------------------------------------------------------------------
r60587 | mame | 2017-10-31 14:24:21 +0900 (Tue, 31 Oct 2017) | 1 line

Remove unneeded complexity
------------------------------------------------------------------------
r60586 | normal | 2017-10-31 10:37:37 +0900 (Tue, 31 Oct 2017) | 23 lines

webrick/httpresponse: minor cleanups to reduce memory use

I never knew "format" was a global method alias for "sprintf";
so it was confusing to me.  Normally, one would use "sprintf"
since it's also available in many other languages, but
Integer#to_s avoids parsing a format string so it's less
bug-prone.

Furthermore, favor string interpolation over String#<< since it
is easier for the VM to optimize memory allocation (as in r60320).
Interpolation also reduces method calls and memory overhead
for inline method cache.

Finally, ensure we clear all short-lived buffers for body
responses.  A similar change was made and measured for Net::*
in r58840 showing a large memory reduction on some workloads.

* webrick/httpresponse.rb (send_body_io): favor String#to_s,
  reduce method calls for String#<<,
  clear `buf' when done,
  avoid extra String#bytesize calls

* (send_body_string): ditto
------------------------------------------------------------------------
r60585 | yui-knk | 2017-10-31 09:46:30 +0900 (Tue, 31 Oct 2017) | 30 lines

Use NODE_CASE2 if case expressions don't exist

When NODE_WHEN is compiled by iseq_compile_each0,
the node passed to compile_when is NODE_WHEN (not NODE_CASE).
So we can not handle the location of NODE_CASE of
case statements which don't have case expressions.

e.g. :

```
case; when 1; foo; when 2; bar; else baz; end
```

This commit adds NODE_CASE2, and compiles it by
iseq_compile_each0.

* compile.c (compile_case): Does not call COMPILE_ when
  NODE_CASE does not have case expressions.
* compile.c (compile_case2): Compile NODE_CASE2 by compile_case2.
* compile.c (compile_when): Delete an obsoleted function.
* compile.c (iseq_compile_each0): Compile NODE_CASE2.

* ext/objspace/objspace.c (count_nodes): Add NODE_CASE2 case.

* node.c (dump_node, rb_gc_mark_node): Add NODE_CASE2 case.

* node.h (node_type): Add NODE_CASE2.
* node.h (NEW_CASE2): Add a macro which generates NODE_CASE2.

* parse.y: Generate NODE_CASE2 if case expressions don't exist.
------------------------------------------------------------------------
r60584 | normal | 2017-10-31 08:56:44 +0900 (Tue, 31 Oct 2017) | 9 lines

webrick: support Proc objects as body responses

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

* test/webrick/test_httpresponse.rb (test_send_body_proc): new test
  (test_send_body_proc_chunked): ditto
  [Feature #855]
------------------------------------------------------------------------
r60583 | normal | 2017-10-31 08:47:27 +0900 (Tue, 31 Oct 2017) | 9 lines

dir: Dir.chdir releases GVL

chdir(2) is subject to all the pathological slowdowns and
caveats as open(2) on slow or unreliable filesystems, so ensure
other threads can proceed while this is happening.

* dir.c (nogvl_chdir): new function

* dir.c (dir_chdir): release GVL
------------------------------------------------------------------------
r60582 | svn | 2017-10-31 08:44:43 +0900 (Tue, 31 Oct 2017) | 1 line

* 2017-10-31
------------------------------------------------------------------------
r60581 | yui-knk | 2017-10-31 08:44:42 +0900 (Tue, 31 Oct 2017) | 17 lines

Use nd_lineno instead of nd_line for branch coverages

* compile.c (compile_if, compile_case, compile_loop, iseq_compile_each0):
  Use nd_lineno of nodes for branch coverages.
  nd_lineno is not adjusted line number of nodes.
  Sometimes nd_line is adjusted by fixpos. These
  adjustments lead to confusing result.

  For example, lineno of NODE_IF is 1, but
  line is 2 (line number is one-based).

  ```
  ;;;;;;;;;;;;;;;;;;;;if
    1 + 1
    2
  end
  ```
------------------------------------------------------------------------
r60580 | yui-knk | 2017-10-30 22:36:20 +0900 (Mon, 30 Oct 2017) | 12 lines

Store lineno on RNode

* node.c (A_NODE_HEADER): Print lineno.

* node.h (nd_column, nd_set_column): Store column
  number with 16-bit.
* node.h (nd_lineno, nd_set_lineno): Define
  getter/setter macros for lineno of RNode.

* parse.y : Set first lineno of tokens.

Thanks to takeshinoda for review.
------------------------------------------------------------------------
r60579 | nobu | 2017-10-30 14:45:21 +0900 (Mon, 30 Oct 2017) | 4 lines

backward.h: rb_frame_method_id_and_class

* include/ruby/backward.h (rb_frame_method_id_and_class): moved
  a deprecated declaration from intern.h, for r60558.
------------------------------------------------------------------------
r60578 | nobu | 2017-10-30 14:45:20 +0900 (Mon, 30 Oct 2017) | 5 lines

rbinstall.rb: show categories of default gems

* tool/rbinstall.rb (#install_default_gem): show categories of
  default gems, pure ruby libraries and libraries with extensions.
  [ruby-core:83600] [Bug #14065]
------------------------------------------------------------------------
r60577 | ko1 | 2017-10-30 12:58:05 +0900 (Mon, 30 Oct 2017) | 1 line

stop refine_spec because it causes double free error
------------------------------------------------------------------------
r60576 | yui-knk | 2017-10-30 07:12:08 +0900 (Mon, 30 Oct 2017) | 4 lines

Remove duplicated column set

* parse.y : Column of resq is set by new_resbody, so
  this line is needless.
------------------------------------------------------------------------
r60575 | yui-knk | 2017-10-30 06:52:54 +0900 (Mon, 30 Oct 2017) | 1 line

parse.y (new_regexp_gen): Set column for NODE_SCOPE
------------------------------------------------------------------------
r60574 | stomar | 2017-10-30 06:43:36 +0900 (Mon, 30 Oct 2017) | 3 lines

string.c: improve docs

* string.c: [DOC] fix rdoc for cross reference; fix grammar.
------------------------------------------------------------------------
r60573 | stomar | 2017-10-30 05:59:33 +0900 (Mon, 30 Oct 2017) | 3 lines

lib/set.rb: improve docs for Set#===

* lib/set.rb: [DOC] improve description and examples for Set#===.
------------------------------------------------------------------------
r60572 | stomar | 2017-10-30 05:58:36 +0900 (Mon, 30 Oct 2017) | 3 lines

io.c: improve docs

* io.c: [DOC] fix rdoc for some cross references; fix grammar.
------------------------------------------------------------------------
r60571 | stomar | 2017-10-30 05:57:29 +0900 (Mon, 30 Oct 2017) | 3 lines

io.c: docs for IO#write

* io.c: [DOC] fix example and language in IO#write docs.
------------------------------------------------------------------------
r60570 | stomar | 2017-10-30 05:56:13 +0900 (Mon, 30 Oct 2017) | 1 line

doc/contributors.rdoc: [DOC] update
------------------------------------------------------------------------
r60569 | stomar | 2017-10-30 05:50:55 +0900 (Mon, 30 Oct 2017) | 3 lines

complex.c: doc fix

* complex.c: [DOC] fix grammar and typo.
------------------------------------------------------------------------
r60568 | eregon | 2017-10-30 01:20:04 +0900 (Mon, 30 Oct 2017) | 1 line

Clarify what is written and read in IO#popen spec
------------------------------------------------------------------------
r60567 | eregon | 2017-10-30 01:18:50 +0900 (Mon, 30 Oct 2017) | 1 line

Fix spec which can fail if the pipe is closed before flushing in the subprocess
------------------------------------------------------------------------
r60566 | ko1 | 2017-10-30 01:12:06 +0900 (Mon, 30 Oct 2017) | 4 lines

* vm_dump.c (vm_stack_dump_each): accepts `ec`.

* vm_dump.c (vm_base_ptr): constify.

------------------------------------------------------------------------
r60565 | ko1 | 2017-10-30 00:51:23 +0900 (Mon, 30 Oct 2017) | 2 lines

* node.h (ast_t): renamed to `rb_ast_t`.

------------------------------------------------------------------------
r60564 | ko1 | 2017-10-30 00:41:53 +0900 (Mon, 30 Oct 2017) | 2 lines

* eval_jump.c (rb_exec_end_proc): use `GET_EC()`.

------------------------------------------------------------------------
r60563 | ko1 | 2017-10-30 00:38:55 +0900 (Mon, 30 Oct 2017) | 9 lines

call `rb_vm_stack_to_heap()`

* safe.c (rb_set_safe_level): call `rb_vm_stack_to_heap()`
  to set block parameter.

* safe.c (rb_set_safe_level): use `GET_EC()`.

* safe.c (safe_setter): ditto.

------------------------------------------------------------------------
r60562 | ko1 | 2017-10-30 00:34:20 +0900 (Mon, 30 Oct 2017) | 2 lines

* vm_insnhelper.h (GET_SP_COUNT): removed because nobody use it.

------------------------------------------------------------------------
r60561 | ko1 | 2017-10-30 00:31:47 +0900 (Mon, 30 Oct 2017) | 2 lines

* vm_eval.c (current_vm_stack_arg): accepts `ec`.

------------------------------------------------------------------------
r60560 | ko1 | 2017-10-30 00:27:07 +0900 (Mon, 30 Oct 2017) | 1 line

use given `ec`.
------------------------------------------------------------------------
r60559 | ko1 | 2017-10-30 00:25:32 +0900 (Mon, 30 Oct 2017) | 6 lines

constify `rb_vm_bh_to_procval()`

* vm_insnhelper.c (rb_vm_bh_to_procval): constify 1st param (ec).

* vm_args.c (args_setup_block_parameter): accepts (const) `ec`.

------------------------------------------------------------------------
r60558 | ko1 | 2017-10-30 00:17:29 +0900 (Mon, 30 Oct 2017) | 6 lines

remove unused functions.

* vm.c (rb_frame_method_id_and_class): removed because nobody use it.

* vm.c (rb_thread_current_status): ditto.

------------------------------------------------------------------------
r60557 | ko1 | 2017-10-30 00:13:49 +0900 (Mon, 30 Oct 2017) | 10 lines

use `GET_EC()`.

* eval.c (rb_block_given_p): use `GET_EC()` directly.

* eval.c (rb_ensure): ditto.

* eval.c (rb_errinfo): ditto.

* eval.c (previous_frame): accepts `ec` instead of `th`.

------------------------------------------------------------------------
r60556 | ko1 | 2017-10-30 00:03:33 +0900 (Mon, 30 Oct 2017) | 2 lines

* vm_eval.c (vm_catch_protect): accepts `ec` instead of `th`.

------------------------------------------------------------------------
r60555 | svn | 2017-10-30 00:00:24 +0900 (Mon, 30 Oct 2017) | 1 line

* 2017-10-30
------------------------------------------------------------------------
r60554 | ko1 | 2017-10-30 00:00:23 +0900 (Mon, 30 Oct 2017) | 1 line

use `GET_EC()`.
------------------------------------------------------------------------
r60553 | ko1 | 2017-10-29 23:59:04 +0900 (Sun, 29 Oct 2017) | 1 line

use `GET_EC()`.
------------------------------------------------------------------------
r60552 | ko1 | 2017-10-29 23:55:19 +0900 (Sun, 29 Oct 2017) | 2 lines

`th` -> `ec` for `rb_iterate0`.

------------------------------------------------------------------------
r60551 | ko1 | 2017-10-29 23:52:05 +0900 (Sun, 29 Oct 2017) | 2 lines

`th` -> `ec` for rb_raise_method_missing().

------------------------------------------------------------------------
r60550 | ko1 | 2017-10-29 23:45:16 +0900 (Sun, 29 Oct 2017) | 4 lines

`rb_call0()` accepts `ec`.

* vm_eval.c (rb_call0): accepts `ec`.

------------------------------------------------------------------------
r60549 | ko1 | 2017-10-29 23:39:51 +0900 (Sun, 29 Oct 2017) | 2 lines

* vm_eval.c (rb_current_receiver): use `GET_EC()`.

------------------------------------------------------------------------
r60548 | ko1 | 2017-10-29 23:38:25 +0900 (Sun, 29 Oct 2017) | 4 lines

`th` -> `ec` for vm_call_super().

* vm_eval.c (vm_call_super): accepts `ec` instead of `th`.

------------------------------------------------------------------------
r60547 | ko1 | 2017-10-29 23:33:23 +0900 (Sun, 29 Oct 2017) | 2 lines

use `GET_VM()` directly.

------------------------------------------------------------------------
r60546 | ko1 | 2017-10-29 23:31:01 +0900 (Sun, 29 Oct 2017) | 9 lines

`th` -> `ec` for VM dump related functions.

* vm_dump.c: `th` -> `ec` (and constify) for:
  * control_frame_dump
  * rb_vmdebug_stack_dump_raw
  * rb_vmdebug_debug_print_register
  * rb_vmdebug_debug_print_pre
  * rb_vmdebug_debug_print_post

------------------------------------------------------------------------
r60545 | ko1 | 2017-10-29 23:06:58 +0900 (Sun, 29 Oct 2017) | 5 lines

`rb_ec_error_print()`.

* eval_error.c (rb_threadptr_error_print): renamed to
  rb_ec_error_print() and it accepts `ec`.

------------------------------------------------------------------------
r60544 | ko1 | 2017-10-29 22:51:37 +0900 (Sun, 29 Oct 2017) | 4 lines

remove rb_threadptr_during_gc().

* gc.c (rb_threadptr_during_gc): removed because nobody use it.

------------------------------------------------------------------------
r60543 | ko1 | 2017-10-29 22:50:24 +0900 (Sun, 29 Oct 2017) | 2 lines

use `GET_EC()`.

------------------------------------------------------------------------
r60542 | ko1 | 2017-10-29 22:49:45 +0900 (Sun, 29 Oct 2017) | 5 lines

rb_ec_stack_check()

* gc.c (rb_ec_stack_check): renamed from rb_threadptr_stack_check()
  and it accepts `ec`.

------------------------------------------------------------------------
r60541 | ko1 | 2017-10-29 22:20:44 +0900 (Sun, 29 Oct 2017) | 2 lines

use `GET_EC()` directly.

------------------------------------------------------------------------
r60540 | ko1 | 2017-10-29 22:19:53 +0900 (Sun, 29 Oct 2017) | 2 lines

use `GET_VM()` directly.

------------------------------------------------------------------------
r60539 | ko1 | 2017-10-29 22:19:14 +0900 (Sun, 29 Oct 2017) | 4 lines

EXEC_EVENT_HOOK(ec, ...)

* vm_core.h (EXEC_EVENT_HOOK): accepts `ec` instead of `th`.

------------------------------------------------------------------------
r60538 | ko1 | 2017-10-29 22:17:37 +0900 (Sun, 29 Oct 2017) | 4 lines

`rb_trace_arg_t::ec`

* vm_core.h (rb_trace_arg_t): introduce `ec` field instead of `th`.

------------------------------------------------------------------------
r60537 | ko1 | 2017-10-29 21:57:04 +0900 (Sun, 29 Oct 2017) | 7 lines

`ec` has `thread_ptr`.

* cont.c (rb_context_struct): move rb_context_t::thread_ptr to
  rb_execution_context_t::thread_ptr.

* cont.c (rb_fiberptr_thread_ptr): removed.

------------------------------------------------------------------------
r60536 | ktsj | 2017-10-29 15:16:10 +0900 (Sun, 29 Oct 2017) | 3 lines

.gdbinit: follow up changes in r60440

ruby_current_vm has been renamed to ruby_current_vm_ptr.
------------------------------------------------------------------------
r60535 | nobu | 2017-10-29 14:46:23 +0900 (Sun, 29 Oct 2017) | 5 lines

io.c: honor buffered mode

* io.c (io_writev): honor buffered mode to get rid of broken pipe
  error when stdout is redirected to a pipeline.
  [ruby-core:83578] [Feature #14042]
------------------------------------------------------------------------
r60534 | nobu | 2017-10-29 09:43:34 +0900 (Sun, 29 Oct 2017) | 5 lines

io.c: convert to string at writev

* io.c (io_fwritev): needs conversion to string before accessing
  the content, as well as single argument case, not to segfault.
  [Feature #9323]
------------------------------------------------------------------------
r60533 | nobu | 2017-10-29 08:54:16 +0900 (Sun, 29 Oct 2017) | 1 line

Localize EC functions
------------------------------------------------------------------------
r60532 | eregon | 2017-10-29 05:04:52 +0900 (Sun, 29 Oct 2017) | 3 lines

Ignore the libruby check if it cannot be found

* ENV['RUBY_EXE'] can be just 'ruby' and is not an absolute path.
------------------------------------------------------------------------
r60531 | eregon | 2017-10-29 02:45:46 +0900 (Sun, 29 Oct 2017) | 1 line

Make sure to compile each extension only once in ruby/spec
------------------------------------------------------------------------
r60530 | kazu | 2017-10-29 01:34:30 +0900 (Sun, 29 Oct 2017) | 4 lines

Add note to close_{read,write} too

when call on closed stream
[ci skip]
------------------------------------------------------------------------
r60529 | eregon | 2017-10-29 01:15:46 +0900 (Sun, 29 Oct 2017) | 3 lines

Use ENV['RUBY_EXE'] as RbConfig.ruby might be incorrect

* On a built-but-not-installed-ruby.
------------------------------------------------------------------------
r60528 | ktsj | 2017-10-29 00:37:00 +0900 (Sun, 29 Oct 2017) | 5 lines

iseq.c: remove obsolete comment

You can see ARGS_SIMPLE flag as follows:

 $ ruby --dump=insns -e itself
------------------------------------------------------------------------
r60527 | svn | 2017-10-29 00:15:52 +0900 (Sun, 29 Oct 2017) | 1 line

* properties.
------------------------------------------------------------------------
r60526 | svn | 2017-10-29 00:15:52 +0900 (Sun, 29 Oct 2017) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r60525 | eregon | 2017-10-29 00:15:48 +0900 (Sun, 29 Oct 2017) | 1 line

Update to ruby/spec@a6b8805
------------------------------------------------------------------------
r60524 | svn | 2017-10-29 00:14:56 +0900 (Sun, 29 Oct 2017) | 1 line

* 2017-10-29
------------------------------------------------------------------------
r60523 | eregon | 2017-10-29 00:14:55 +0900 (Sun, 29 Oct 2017) | 1 line

Update to ruby/mspec@90925d6
------------------------------------------------------------------------
r60522 | ko1 | 2017-10-28 22:22:04 +0900 (Sat, 28 Oct 2017) | 10 lines

`th` -> `ec` for backtrace functions.

* vm_backtrace.c: accept `ec` and rename `threadptr` to `ec`.
  * rb_threadptr_backtrace_object -> rb_ec_backtrace_object
  * rb_threadptr_backtrace_str_ary -> rb_ec_backtrace_str_ar
  * rb_threadptr_backtrace_location_ary -> rb_ec_backtrace_location_ary
  * threadptr_backtrace_to_ary -> ec_backtrace_to_ary

* vm_eval.c (adjust_backtrace_in_eval): accepts `ec`.

------------------------------------------------------------------------
r60521 | ko1 | 2017-10-28 21:23:51 +0900 (Sat, 28 Oct 2017) | 16 lines

`th` -> `ec` for method management functions.

* vm_eval.c: `th` -> `ec` for the following functions:
  * check_funcall_respond_to
  * check_funcall_callable
  * check_funcall_missing
  * rb_method_call_status

* vm_method.c: ditto.
  * call_method_entry
  * basic_obj_respond_to_missing
  * basic_obj_respond_to
  * vm_respond_to

* vm_eval.c (stack_check): accepts `ec` instead of `th`.

------------------------------------------------------------------------
r60520 | ko1 | 2017-10-28 20:52:56 +0900 (Sat, 28 Oct 2017) | 6 lines

`th` -> `ec` for rb_vm_call()

* vm_eval.c (rb_vm_call): accepts `ec` instead of `th`.

* proc.c: catch up this fix.

------------------------------------------------------------------------
r60519 | ko1 | 2017-10-28 20:46:32 +0900 (Sat, 28 Oct 2017) | 4 lines

* proc.c (rb_block_arity): use `ec` directly.

* proc.c (rb_mod_define_method): ditto.

------------------------------------------------------------------------
r60518 | ko1 | 2017-10-28 20:43:17 +0900 (Sat, 28 Oct 2017) | 2 lines

* proc.c (proc_new): use `ec` directly.

------------------------------------------------------------------------
r60517 | ko1 | 2017-10-28 20:41:08 +0900 (Sat, 28 Oct 2017) | 10 lines

`th` -> `ec` for rb_longjmp() and related functions.

* eval.c: `th` -> `ec` for the following functions:
  * rb_longjmp
  * exc_setup_message
  * setup_exception
  * errinfo_place

* eval.c (get_thread_errinfo): rename to get_ec_errinfo() and accepts `ec`.

------------------------------------------------------------------------
r60516 | ko1 | 2017-10-28 20:22:15 +0900 (Sat, 28 Oct 2017) | 2 lines

use `ec` directly.

------------------------------------------------------------------------
r60515 | ko1 | 2017-10-28 20:20:17 +0900 (Sat, 28 Oct 2017) | 6 lines

check `ec` instead of `th`.

* error.c (rb_bug): check `ec` instead of `th`.

* error.c (rb_bug_context): ditto.

------------------------------------------------------------------------
r60514 | ko1 | 2017-10-28 20:15:56 +0900 (Sat, 28 Oct 2017) | 4 lines

`th` -> `ec` for rb_vm_make_binding().

* vm.c (rb_vm_make_binding): accepts (const) `ec` instead of `th`.

------------------------------------------------------------------------
r60513 | ko1 | 2017-10-28 20:11:17 +0900 (Sat, 28 Oct 2017) | 5 lines

rename a function.

* vm.c (rb_thread_method_id_and_class): rename to
  rb_ec_frame_method_id_and_class() and accepts `ec` instead of `th`.

------------------------------------------------------------------------
r60512 | ko1 | 2017-10-28 20:04:08 +0900 (Sat, 28 Oct 2017) | 2 lines

* vm.c (vm_define_method): don't use `th` any more.

------------------------------------------------------------------------
r60511 | ko1 | 2017-10-28 20:02:16 +0900 (Sat, 28 Oct 2017) | 2 lines

* vm.c (REWIND_CFP): use `ec` directly.

------------------------------------------------------------------------
r60510 | ko1 | 2017-10-28 19:59:37 +0900 (Sat, 28 Oct 2017) | 4 lines

`th` -> `ec` for vm_iter_break().

* vm.c (vm_iter_break): accepts `ec` instead of `th`.

------------------------------------------------------------------------
r60509 | ko1 | 2017-10-28 19:55:35 +0900 (Sat, 28 Oct 2017) | 7 lines

`th` -> `ec` for some functions.

* vm.c: `th` -> `ec` for the following functions:
  * vm_normal_frame
  * vm_cfp_svar_get
  * vm_cfp_svar_set

------------------------------------------------------------------------
r60508 | ko1 | 2017-10-28 19:47:19 +0900 (Sat, 28 Oct 2017) | 6 lines

`th` -> `ec` for some functions.

* vm.c (rb_vm_get_binding_creatable_next_cfp): accepts `ec` instead of `th`.

* vm.c (rb_vm_stack_to_heap): ditto.

------------------------------------------------------------------------
r60507 | ko1 | 2017-10-28 19:43:30 +0900 (Sat, 28 Oct 2017) | 4 lines

`th` -> `ec` for rb_vm_rewind_cfp.

* vm.c (rb_vm_rewind_cfp): accepts `ec` instead of `th`.

------------------------------------------------------------------------
r60506 | ko1 | 2017-10-28 19:35:55 +0900 (Sat, 28 Oct 2017) | 4 lines

`th` -> `ec` for vm_exec().

* vm.c (vm_exec): accepts `ec` instead of `th`.

------------------------------------------------------------------------
r60505 | eregon | 2017-10-28 19:32:45 +0900 (Sat, 28 Oct 2017) | 1 line

Add specs for [Feature #13983] Rational and Complex should be frozen
------------------------------------------------------------------------
r60504 | ko1 | 2017-10-28 19:23:58 +0900 (Sat, 28 Oct 2017) | 8 lines

`th` -> `ec` for vm_set_*_stack.

* vm.c: `th` -> `ec` for the following functions:
  * vm_set_top_stack
  * vm_set_eval_stack
  * vm_set_main_stack
  * vm_cref_new_toplevel

------------------------------------------------------------------------
r60503 | ko1 | 2017-10-28 19:01:54 +0900 (Sat, 28 Oct 2017) | 7 lines

move fields from `th` to `ec`.

* vm_core.h: move rb_thread_t::passed_block_handler to
  rb_execution_context_t::passed_block_handler.
  Also move rb_thread_t::passed_bmethod_me to
  rb_execution_context_t::passed_bmethod_me.

------------------------------------------------------------------------
r60502 | ktsj | 2017-10-28 18:22:45 +0900 (Sat, 28 Oct 2017) | 1 line

iseq.c: fix a typo
------------------------------------------------------------------------
r60501 | ktsj | 2017-10-28 18:22:44 +0900 (Sat, 28 Oct 2017) | 1 line

iseq.c: show all call flags
------------------------------------------------------------------------
r60500 | a_matsuda | 2017-10-28 15:49:50 +0900 (Sat, 28 Oct 2017) | 13 lines

Fix example that trace method is called outside block

[ci skip]

`TracePoint` doesn't have the `line` method.
Therefore, this example will raise `NoMethodError`.
But since it does not seem to be the intended error, use the existing `lineno`
method instead.

Patch by: yuuji.yaginuma <yuuji.yaginuma@gmail.com>

https://github.com/ruby/ruby/pull/1731
[Fix GH-1731]
------------------------------------------------------------------------
r60499 | ko1 | 2017-10-28 14:36:48 +0900 (Sat, 28 Oct 2017) | 7 lines

skip machine stack marking for current ec.

* vm.c (rb_execution_context_mark): At the beggining of GC marking,
  mark_current_machine_context() marks running machine stack so that
  rb_execution_context_mark() should not mark machine stack if it is
  current ec.

------------------------------------------------------------------------
r60498 | a_matsuda | 2017-10-28 10:05:17 +0900 (Sat, 28 Oct 2017) | 7 lines

Invalid TracePoint#disable example (without block)

Patch by: Johan <djo.went@hotmail.com>

https://github.com/ruby/ruby/pull/1727
[Fix GH-1727]
[ci skip]
------------------------------------------------------------------------
r60497 | ko1 | 2017-10-28 09:45:43 +0900 (Sat, 28 Oct 2017) | 4 lines

fix compile error.

* compile.c (iseq_compile_each): fix declaration because VC shows compile error.

------------------------------------------------------------------------
r60496 | normal | 2017-10-28 08:26:48 +0900 (Sat, 28 Oct 2017) | 18 lines

socket: fix BasicSocket#*_nonblock buffering bugs from r58400

IO#read_nonblock and IO#write_nonblock take into account
buffered data, so the Linux-only BasicSocket#read_nonblock
and BasicSocket#write_nonblock methods must, too.

This bug was only introduced in r58400
("socket: avoid fcntl for read/write_nonblock on Linux")
and does not affect any stable release.

* ext/socket/basicsocket.c (rsock_init_basicsocket):
* ext/socket/init.c (rsock_s_recvfrom_nonblock):
* ext/socket/init.c (rsock_init_socket_init):
* ext/socket/lib/socket.rb (def read_nonblock):
* ext/socket/lib/socket.rb (def write_nonblock):
* ext/socket/rubysocket.h (static inline void rsock_maybe_wait_fd):
* test/socket/test_basicsocket.rb (def test_read_write_nonblock):
  [Feature #13362]
------------------------------------------------------------------------
r60495 | nobu | 2017-10-28 06:08:37 +0900 (Sat, 28 Oct 2017) | 1 line

node.c: removed duplicate node_buffer_t definition
------------------------------------------------------------------------
r60494 | nobu | 2017-10-28 06:08:35 +0900 (Sat, 28 Oct 2017) | 1 line

compile.c: make node arguments invariant
------------------------------------------------------------------------
r60493 | ko1 | 2017-10-28 04:16:51 +0900 (Sat, 28 Oct 2017) | 4 lines

catch up recent changes for call threaded code VM.

Fix compile errors for OPT_CALL_THREADED_CODE (in vm_opts.h).

------------------------------------------------------------------------
r60492 | ko1 | 2017-10-28 04:08:31 +0900 (Sat, 28 Oct 2017) | 8 lines

`th` -> `ec` for `rb_insn_func_t`.

* vm_core.h (rb_insn_func_t): accepts `ec` instead of `th`.

* vm_insnhelper.c (rb_vm_opt_struct_aref): ditto.

* vm_insnhelper.c (rb_vm_opt_struct_aset): ditto.

------------------------------------------------------------------------
r60491 | ko1 | 2017-10-28 03:55:28 +0900 (Sat, 28 Oct 2017) | 1 line

skip tests temporarily
------------------------------------------------------------------------
r60490 | normal | 2017-10-28 03:37:23 +0900 (Sat, 28 Oct 2017) | 10 lines

io.c: fix IO.copy_stream on O_APPEND destination on Linux

Linux copy_file_range(2) fails with EBADF if the destination FD
has O_APPEND set.  Preserve existing (Ruby <= 2.4) behavior by
falling back to alternative copy mechanisms if this is the case
(instead of raising Errno::EBADF).

* io.c (nogvl_copy_file_range): do not raise on O_APPEND dst
* test/ruby/test_io.rb (test_copy_stream_append): new test
  [Feature #13867]
------------------------------------------------------------------------
r60489 | mame | 2017-10-28 02:06:06 +0900 (Sat, 28 Oct 2017) | 1 line

parse.y: Need to mark the third element of `NODE_HEREDOC`
------------------------------------------------------------------------
r60488 | mame | 2017-10-28 01:44:57 +0900 (Sat, 28 Oct 2017) | 4 lines

Revert "Revert "Manage AST NODEs out of GC""

This re-introduces r60485.
This reverts commit 5a176b75b1187cbd3861c387bde65ff66396a07c.
------------------------------------------------------------------------
r60487 | mame | 2017-10-28 01:34:57 +0900 (Sat, 28 Oct 2017) | 3 lines

compile.c: stop modifying NODE tree

This fixes some modification remained in r60479
------------------------------------------------------------------------
r60486 | mame | 2017-10-28 01:02:34 +0900 (Sat, 28 Oct 2017) | 3 lines

Revert "Manage AST NODEs out of GC"

This reverts commit 620ba74778bfdbdc34ffbb142d49ce84a0ef58e9.
------------------------------------------------------------------------
r60485 | mame | 2017-10-28 00:59:02 +0900 (Sat, 28 Oct 2017) | 33 lines

Manage AST NODEs out of GC

NODEs in AST are no longer objects managed by GC.  This change will
remove the restriction imposed by the GC.  For example, a NODE can use
more than five words (this is my primary purpose; we want to store the
position data for each NODE, for coverage library), or even a NODE can
have variable length (some kinds of NODEs have unused fields).
To do this, however, we need more work, since Ripper still uses T_NODE
objects managed by the GC.

The life time of NODEs is more obvious than other kinds of objects; they
are created at parsing, and they become disused immediately after
compilation.  This change releases all NODEs by a few `xfree`s after
compilation, so performance will be improved a bit.  In extreme example,
`eval("x=1;" * 10000000)` runs much faster (40 sec. -> 7.8 sec. on my
machine).

The most important part of this change is `ast_t` struct, which has
three contents: (1) NODE buffer (malloc'ed memory), (2) a reference to
the root NODE, and (3) an array that contains objects that must be
marked during parsing (such as literal objects).  Some functions that
had received `NODE*` arguments, must now receive `ast_t*`.

* node.c, node.h: defines `ast_t` struct and related operations.
* gc.c, internal.h: defines `imemo_ast`.
* parse.y: makes `parser_params` struct have a reference to `ast_t`.
  Instead of `rb_node_newnode`, use `rb_ast_newnode` to create a NODE.
* iseq.c, load.c, ruby.c, template/prelude.c.tmpl: modifies some
  functions to handle `ast_t*` instead of `NODE*`.
* test/ruby/test_gc.rb: ad-hoc fix for a failed test.  The test assumes
  GC eden is increased at startup by NODE object creation.  However,
  this change now create no NODE object, so GC eden is not necessarily
  increased.
------------------------------------------------------------------------
r60484 | kazu | 2017-10-28 00:14:02 +0900 (Sat, 28 Oct 2017) | 1 line

Fix parameter name
------------------------------------------------------------------------
r60483 | kazu | 2017-10-28 00:13:59 +0900 (Sat, 28 Oct 2017) | 1 line

Remove duplicated include
------------------------------------------------------------------------
r60482 | svn | 2017-10-28 00:06:39 +0900 (Sat, 28 Oct 2017) | 1 line

* 2017-10-28
------------------------------------------------------------------------
r60481 | mame | 2017-10-28 00:06:38 +0900 (Sat, 28 Oct 2017) | 4 lines

Add explicit markers for literal objects generated in parse.y

This is just a preparation to manage AST NODEs out of GC.
Currently `add_mark_object` does nothing.
------------------------------------------------------------------------
r60480 | watson1978 | 2017-10-27 23:55:03 +0900 (Fri, 27 Oct 2017) | 24 lines

string.c: Improve String#prepend performance if only one argument is given

* string.c (rb_str_prepend_multi): Prepend the string without generating
    temporary String object if only one argument is given.
	This is very similar with https://github.com/ruby/ruby/pull/1634

	String#prepend -> 47.5 % up

    [Fix GH-1670] [ruby-core:82195] [Bug #13773]

* Before
      String#prepend      1.517M (? 1.8%) i/s -      7.614M in   5.019819s

* After
      String#prepend      2.236M (? 3.4%) i/s -     11.234M in   5.029716s

* Test code
require 'benchmark/ips'

Benchmark.ips do |x|
  x.report "String#prepend" do |loop|
    loop.times { "!".prepend("hello") }
  end
end
------------------------------------------------------------------------
r60479 | nobu | 2017-10-27 21:00:38 +0900 (Fri, 27 Oct 2017) | 1 line

compile.c, iseq.c: consitfied NODE pointers
------------------------------------------------------------------------
r60478 | naruse | 2017-10-27 17:40:40 +0900 (Fri, 27 Oct 2017) | 5 lines

Revert "Dir.glob with FNM_EXTGLOB is optimized [Feature #13873]"

This reverts commit r60341,r60342,r60344,r60345.
Breaking compabitility of the order of result breaks many tests.
To avoid such effort to fix tests, the order should be kept.
------------------------------------------------------------------------
r60477 | ko1 | 2017-10-27 15:21:50 +0900 (Fri, 27 Oct 2017) | 6 lines

vm_exec_core() accepts `ec` instead of `th`.

* vm_exec.c (vm_exec_core): accepts `ec` instead of `th`.

* vm_args.c (vm_caller_setup_arg_block): also accepts `ec`.

------------------------------------------------------------------------
r60476 | ko1 | 2017-10-27 15:06:31 +0900 (Fri, 27 Oct 2017) | 27 lines

`th` -> `ec` for block related functions.

* vm.c: the following functions accept `ec` instead of `th`.
  * invoke_block
  * invoke_bmethod
  * invoke_iseq_block_from_c
  * invoke_block_from_c_bh
  * check_block_handler
  * vm_yield_with_cref
  * vm_yield
  * vm_yield_with_block
  * vm_yield_force_blockarg
  * invoke_block_from_c_proc
  * vm_invoke_proc
  * vm_invoke_bmethod
  * rb_vm_invoke_proc

* vm_insnhelper.c: ditto.
  * vm_yield_with_cfunc
  * vm_yield_with_symbol
  * vm_callee_setup_block_arg
  * vm_yield_setup_args
  * vm_invoke_iseq_block
  * vm_invoke_symbol_block
  * vm_invoke_ifunc_block
  * vm_invoke_block

------------------------------------------------------------------------
r60475 | ko1 | 2017-10-27 15:01:21 +0900 (Fri, 27 Oct 2017) | 5 lines

should use `th`.

* signal.c (check_stack_overflow): ruby_stack_overflowed_p()
  should accept `th`.

------------------------------------------------------------------------
r60474 | ko1 | 2017-10-27 14:33:33 +0900 (Fri, 27 Oct 2017) | 6 lines

`ec` -> `th`

* vm_exec.h (VM_SP_CNT): accepts `ec` instead of `th`.

* vm_insnhelper.c (vm_stack_consistency_error): ditto.

------------------------------------------------------------------------
r60473 | ko1 | 2017-10-27 14:30:05 +0900 (Fri, 27 Oct 2017) | 4 lines

vm_defined() accepts `ec` instead of `th`.

* vm_insnhelper.c (vm_defined): accepts `ec` instead of `th`.

------------------------------------------------------------------------
r60472 | ko1 | 2017-10-27 14:27:25 +0900 (Fri, 27 Oct 2017) | 5 lines

remove duplicated definition.

* vm_insnhelper.c (vm_block_handler_to_proc): removed because it is same
  functionality of rb_vm_bh_to_procval(). Use rb_vm_bh_to_procval().

------------------------------------------------------------------------
r60471 | ko1 | 2017-10-27 14:22:24 +0900 (Fri, 27 Oct 2017) | 6 lines

vm_search_super_method() accepts `ec` instead of `th`.

* vm_insnhelper.c (vm_search_super_method): accepts `ec` instead of `th`.
  Surprisingly, it doesn't use `th` (now `ec`) so this patch is for
  the future extension.

------------------------------------------------------------------------
r60470 | ko1 | 2017-10-27 14:18:58 +0900 (Fri, 27 Oct 2017) | 4 lines

vm_get_ev_const() accepts `ec` instead of `th`.

* vm_insnhelper.c (vm_get_ev_const): accepts `ec` instead of `th`.

------------------------------------------------------------------------
r60469 | a_matsuda | 2017-10-27 12:55:09 +0900 (Fri, 27 Oct 2017) | 6 lines

Fix typo

Patch by: 284km <k.furuhashi10@gmail.com>

https://github.com/ruby/ruby/pull/1729
[Fix GH-1729]
------------------------------------------------------------------------
r60468 | ko1 | 2017-10-27 11:49:30 +0900 (Fri, 27 Oct 2017) | 44 lines

`vm_call_handler` and related functions accept `ec` instead of `th`.

* vm_core.h (vm_call_handler): fix to accept `ec` instead of `th`.

* vm_args.c: the following functions accept `ec` instead of `th`.
  * raise_argument_error
  * argument_arity_error
  * argument_kw_error
  * setup_parameters_complex

* vm_eval.c: ditto.
  * vm_call0
  * vm_call0_cfunc_with_frame
  * vm_call0_cfunc
  * vm_call0_body

* vm_insnhelper.c: ditto
  * vm_call_iseq_setup_tailcall_0start
  * vm_call_iseq_setup_normal_0start
  * vm_callee_setup_arg
  * vm_call_iseq_setup
  * vm_call_iseq_setup_2
  * vm_call_iseq_setup_normal
  * vm_call_iseq_setup_tailcall
  * vm_cfp_consistent_p
  * vm_call_cfunc_with_frame
  * vm_call_cfunc
  * vm_call_ivar
  * vm_call_attrset
  * vm_call_bmethod_body
  * vm_call_bmethod
  * vm_call_opt_send
  * vm_call_opt_call
  * vm_call_method_missing
  * vm_call_zsuper
  * current_method_entry
  * vm_call_method_each_type
  * vm_call_method_nome
  * vm_call_method
  * vm_call_general
  * vm_call_super_method

* tool/mk_call_iseq_optimized.rb: ditto.

------------------------------------------------------------------------
r60467 | ko1 | 2017-10-27 10:35:12 +0900 (Fri, 27 Oct 2017) | 4 lines

vm_throw* accept `ec` instead of `th`.

* vm_insnhelper.c (vm_throw*): accept `ec` instead of `th`.

------------------------------------------------------------------------
r60466 | ko1 | 2017-10-27 10:31:15 +0900 (Fri, 27 Oct 2017) | 12 lines

ec->th for vm_cref_push() and constify.

* vm_insnhelper.c (vm_cref_push): accepts `ec` instead of `th`.

* vm_insnhelper.c: consitfy the first parameter (ec):
  * lep_svar
  * lep_svar_write
  * lep_svar_get
  * lep_svar_set
  * vm_getspecial
  and added vm_cref_push.

------------------------------------------------------------------------
r60465 | ko1 | 2017-10-27 10:22:01 +0900 (Fri, 27 Oct 2017) | 9 lines

Some functions accept `ec` instead of `th`.

* vm_insnhelper.c: The following functions accept `ec` instead of `th`.
  * lep_svar
  * lep_svar_write
  * lep_svar_get
  * lep_svar_set
  * vm_getspecial

------------------------------------------------------------------------
r60464 | ko1 | 2017-10-27 10:13:35 +0900 (Fri, 27 Oct 2017) | 6 lines

refactoring (rb_|)threadptr_stack_overflow.

* vm_insnhelper.c (ec_stack_overflow): renamed from threadptr_stack_overflow
  and also rb_ec_stack_overflow is from rb_threadptr_stack_overflow
  because they accept `ec` instead of `th`.

------------------------------------------------------------------------
r60463 | ko1 | 2017-10-27 09:46:11 +0900 (Fri, 27 Oct 2017) | 6 lines

vm_get_ruby_level_caller_cfp() accepts `ec` instead of `th`.

* vm.c (vm_get_ruby_level_caller_cfp): accepts `ec` instead of `th`.

* vm.c (vm_collect_local_variables_in_heap): don't need `th` anymore.

------------------------------------------------------------------------
r60462 | ko1 | 2017-10-27 09:31:59 +0900 (Fri, 27 Oct 2017) | 4 lines

move decl.

* proc.c: move declaration of rb_vm_bh_to_procval() to vm_core.h.

------------------------------------------------------------------------
r60461 | mame | 2017-10-27 09:25:57 +0900 (Fri, 27 Oct 2017) | 3 lines

Restore the prototype declaration of rb_vm_bh_to_procval

Fixes r60460
------------------------------------------------------------------------
r60460 | ko1 | 2017-10-27 08:33:59 +0900 (Fri, 27 Oct 2017) | 4 lines

rb_vm_bh_to_procval() accepts `ec` instead of `th`.

* vm_insnhelper.c (rb_vm_bh_to_procval): accepts `ec` instead of `th`.

------------------------------------------------------------------------
r60459 | hsbt | 2017-10-27 08:02:18 +0900 (Fri, 27 Oct 2017) | 3 lines

Removed obsoleted gitignore for test dependency.

  Follow up r60458.
------------------------------------------------------------------------
r60458 | usa | 2017-10-27 02:16:30 +0900 (Fri, 27 Oct 2017) | 2 lines

Ignore .bundle

------------------------------------------------------------------------
r60457 | usa | 2017-10-27 02:14:16 +0900 (Fri, 27 Oct 2017) | 5 lines

Quote with double quotes for Windows

* common.mk (test-bundled-gems-prepare): single quote cannot quote shell meta
  characters on Windows.

------------------------------------------------------------------------
r60456 | svn | 2017-10-27 00:29:37 +0900 (Fri, 27 Oct 2017) | 1 line

* 2017-10-27
------------------------------------------------------------------------
r60455 | naruse | 2017-10-27 00:29:36 +0900 (Fri, 27 Oct 2017) | 1 line

Host header should add branckets to IPv6 address [Bug #12642]
------------------------------------------------------------------------
r60454 | ko1 | 2017-10-26 23:44:09 +0900 (Thu, 26 Oct 2017) | 2 lines

replace `GET_THREAD()->ec` to `GET_EC()`.

------------------------------------------------------------------------
r60453 | ko1 | 2017-10-26 23:38:22 +0900 (Thu, 26 Oct 2017) | 7 lines

make root fiber at switching.

* cont.c (fiber_switch): make sure the root fiber object is available
  before the first switching.

* test/ruby/test_fiber.rb: remove "skip".

------------------------------------------------------------------------
r60452 | ko1 | 2017-10-26 23:28:43 +0900 (Thu, 26 Oct 2017) | 1 line

skip test_fiber_transfer_segv because it cause error with previous commit
------------------------------------------------------------------------
r60451 | ko1 | 2017-10-26 23:21:31 +0900 (Thu, 26 Oct 2017) | 11 lines

fix freeing `th->ec` bugs.

* vm.c (thread_free): simply call rb_threadptr_root_fiber_release().

* cont.c (rb_threadptr_root_fiber_release): release th->ec (ec->fiber)
  iff root_fiber is NULL. If root_fiber is available, then ignore it
  and root fiber object will free th->ec too.

* cont.c (rb_threadptr_root_fiber_setup): do not set th->root_fiber.
  th->root_fiber will be set if a root fiber object is created.

------------------------------------------------------------------------
r60450 | ko1 | 2017-10-26 20:02:13 +0900 (Thu, 26 Oct 2017) | 13 lines

introduce EC_*_TAG() instead of TH_*_TAG()

* eval_intern.h:
  introduce EC_*_TAG() macros instead of TH_*_TAG() macros.
  * TH_PUSH_TAG() -> EC_PUSH_TAG()
  * TH_POP_TAG() -> EC_POP_TAG()
  * TH_TMPPOP_TAG() -> EC_TMPPOP_TAG()
  * TH_REPUSH_TAG() -> EC_REPUSH_TAG()
  * TH_EXEC_TAG() -> EC_EXEC_TAG()
  * TH_JUMP_TAG() -> EC_JUMP_TAG()

  rb_threadptr_tag_state() , rb_ec_tag_jump() also accept `ec` instead of `th`.

------------------------------------------------------------------------
r60449 | ko1 | 2017-10-26 19:57:16 +0900 (Thu, 26 Oct 2017) | 4 lines

backtrace_each() accepts `ec` instead of `th`.

* vm_backtrace.c (backtrace_each): accepts `ec` instead of `th`.

------------------------------------------------------------------------
r60448 | ko1 | 2017-10-26 19:55:24 +0900 (Thu, 26 Oct 2017) | 4 lines

vm_pop_frame() accepts `ec` instead of `th`.

* vm_insnhelper.c (vm_pop_frame): accepts `ec` instead of `th`.

------------------------------------------------------------------------
r60447 | ko1 | 2017-10-26 19:53:42 +0900 (Thu, 26 Oct 2017) | 4 lines

vm_push_frame() accepts `ec` instead of `th`.

* vm_insnhelper.c (vm_push_frame): accepts `ec` instead of `th`.

------------------------------------------------------------------------
r60446 | ko1 | 2017-10-26 19:52:05 +0900 (Thu, 26 Oct 2017) | 4 lines

use GET_EC()

* vm.c (vm_ep_in_heap_p_): use GET_EC() instead of GET_THREAD().

------------------------------------------------------------------------
r60445 | ko1 | 2017-10-26 19:50:45 +0900 (Thu, 26 Oct 2017) | 4 lines

A function accepts `ec` instead of `th`.

* vm.c (VM_CFP_IN_HEAP_P): accepts `ec` instead of `th`.

------------------------------------------------------------------------
r60444 | ko1 | 2017-10-26 19:49:33 +0900 (Thu, 26 Oct 2017) | 4 lines

A function accepts `ec` instead of `th`.

* vm.c (rb_vm_search_cf_from_ep): accept `ec` instead of `th`.

------------------------------------------------------------------------
r60443 | mame | 2017-10-26 17:45:14 +0900 (Thu, 26 Oct 2017) | 3 lines

Expand the definition of rb_imemo_new in rb_imemo_alloc_new

per ko1's comment
------------------------------------------------------------------------
r60442 | ko1 | 2017-10-26 17:42:44 +0900 (Thu, 26 Oct 2017) | 1 line

fix comments
------------------------------------------------------------------------
r60441 | ko1 | 2017-10-26 17:41:34 +0900 (Thu, 26 Oct 2017) | 18 lines

some functions accept `ec` instead of `th`.

* vm.c (vm_make_env_object): accepts `ec`.

* vm.c (rb_vm_get_ruby_level_next_cfp): ditto.

* vm.c (rb_vm_make_proc): ditto.

* vm.c (rb_vm_make_proc_lambda): ditto.

* vm_core.h: some macros accept ec instead of th
  (and make them inline functions):
  * RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW
  * RUBY_VM_END_CONTROL_FRAME
  * RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P

* eval.c (frame_func_id): constify for the first parameter.

------------------------------------------------------------------------
r60440 | ko1 | 2017-10-26 17:32:49 +0900 (Thu, 26 Oct 2017) | 21 lines

Use rb_execution_context_t instead of rb_thread_t
to represent execution context [Feature #14038]

* vm_core.h (rb_thread_t): rb_thread_t::ec is now a pointer.
  There are many code using `th` to represent execution context
  (such as cfp, VM stack and so on). To access `ec`, they need to
  use `th->ec->...` (adding one indirection) so that we need to
  replace them by passing `ec` instead of `th`.

* vm_core.h (GET_EC()): introduced to access current ec. Also
  remove `ruby_current_thread` global variable.

* cont.c (rb_context_t): introduce rb_context_t::thread_ptr instead of
  rb_context_t::thread_value.

* cont.c (ec_set_vm_stack): added to update vm_stack explicitly.

* cont.c (ec_switch): added to switch ec explicitly.

* cont.c (rb_fiber_close): added to terminate fibers explicitly.

------------------------------------------------------------------------
r60439 | nobu | 2017-10-26 16:36:23 +0900 (Thu, 26 Oct 2017) | 4 lines

test_env.rb: fix one-off bug

* test/ruby/test_env.rb (TestEnv#test_win32_blocksize): count the
  terminator byte too.
------------------------------------------------------------------------
r60438 | nobu | 2017-10-26 16:23:23 +0900 (Thu, 26 Oct 2017) | 10 lines

common conversion functions

* array.c (rb_to_array_type): make public to share common code
  internally.

* hash.c (rb_to_hash_type): make public to share common code
  internally.

* symbol.c (rb_to_symbol_type): make public to share common code
  internally.
------------------------------------------------------------------------
r60437 | marcandre | 2017-10-26 15:58:09 +0900 (Thu, 26 Oct 2017) | 1 line

TracePoint#enable, #disable: Don't yield any argument. [Bug #14057]
------------------------------------------------------------------------
r60436 | nobu | 2017-10-26 10:36:52 +0900 (Thu, 26 Oct 2017) | 6 lines

common.mk: quote pipes on Windows

* common.mk (update-gems, update-bundled_gems): quote pipes by
  double qoutes instead of single quotes, to escape them on
  Windows.  wildcard characters `*?[{` still need to be quoted by
  single quotes to get rid of globbing.
------------------------------------------------------------------------
r60435 | nobu | 2017-10-26 09:59:15 +0900 (Thu, 26 Oct 2017) | 4 lines

common.mk: test-bundled-gem [ci skip]

* common.mk (test-bundled-gems): moved from Makefile.in so it
  might work on nmake too.
------------------------------------------------------------------------
r60434 | nobu | 2017-10-26 09:59:13 +0900 (Thu, 26 Oct 2017) | 4 lines

common.mk: test-bundler [ci skip]

* common.mk (test-bundler): moved from Makefile.in so it might
  work on nmake too.
------------------------------------------------------------------------
r60433 | kazu | 2017-10-26 08:45:33 +0900 (Thu, 26 Oct 2017) | 1 line

test/ostruct: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r60432 | svn | 2017-10-26 08:35:47 +0900 (Thu, 26 Oct 2017) | 1 line

* 2017-10-26
------------------------------------------------------------------------
r60431 | nobu | 2017-10-26 08:35:46 +0900 (Thu, 26 Oct 2017) | 4 lines

test-bundled-gems-fetch

* tool/fetch-bundled_gems.rb: get rid of tool/git-refresh which
  requries Bourne shell.
------------------------------------------------------------------------
r60430 | nobu | 2017-10-25 23:25:39 +0900 (Wed, 25 Oct 2017) | 1 line

common.mk: remove old gems at update-gems
------------------------------------------------------------------------
r60429 | mame | 2017-10-25 22:38:53 +0900 (Wed, 25 Oct 2017) | 1 line

Refactoring by adding `rb_imemo_alloc_new` to create imemo_alloc buffer
------------------------------------------------------------------------
r60428 | usa | 2017-10-25 22:29:27 +0900 (Wed, 25 Oct 2017) | 8 lines

Get rid of a test error on Windows caused by r60417

* test/testunit/test_parallel.rb (teardown): this code seems to allow
  `Errno::EPIPE` from @worker_in.  in such case, `close` may also raise the same
  exception.
  I'm not confident in this conclusion and still doubt that we should revert
  r60417 instead of this commit or not.

------------------------------------------------------------------------
r60427 | mame | 2017-10-25 22:19:45 +0900 (Wed, 25 Oct 2017) | 6 lines

Make imemo_alloc writebarrier-unprotected

imemo_alloc provides a memory buffer whose contents are marked by GC.
C code can access imemo_alloc buffer freely, so imemo_alloc must be
considered writebarrier-unprotected.  But T_IMEMO is writebarrier-
protected by default, which caused a GC bug.
------------------------------------------------------------------------
r60426 | kazu | 2017-10-25 21:57:34 +0900 (Wed, 25 Oct 2017) | 3 lines

Fix `shadowing outer local variable` warning [ci skip]

ref https://github.com/rurema/doctree/pull/697
------------------------------------------------------------------------
r60425 | nobu | 2017-10-25 21:33:42 +0900 (Wed, 25 Oct 2017) | 1 line

io.c: let rb_p use writev
------------------------------------------------------------------------
r60424 | nobu | 2017-10-25 21:31:30 +0900 (Wed, 25 Oct 2017) | 4 lines

test_io.rb: skip writev test

* test/ruby/test_io.rb (TestIO#test_puts_parallel): skip a test
  needs writev which is not portable.  [Feature #14042]
------------------------------------------------------------------------
r60423 | nobu | 2017-10-25 21:04:53 +0900 (Wed, 25 Oct 2017) | 4 lines

io.c: warn old write

* io.c (rb_io_puts): warn if write method accepts just one
  argument.  [ruby-core:83529] [Feature #14042]
------------------------------------------------------------------------
r60422 | hsbt | 2017-10-25 18:24:37 +0900 (Wed, 25 Oct 2017) | 3 lines

Regenerate slack token on Travis CI.

  The previous token did not work on our slack team.
------------------------------------------------------------------------
r60421 | nobu | 2017-10-25 17:37:17 +0900 (Wed, 25 Oct 2017) | 4 lines

win32.c: unknown reparse tags

* win32/win32.c (rb_w32_read_reparse_point): skip unknown reparse
  tags.  [ruby-core:83539] [Bug #14047]
------------------------------------------------------------------------
r60420 | nobu | 2017-10-25 16:28:22 +0900 (Wed, 25 Oct 2017) | 4 lines

securerandom.rb: fix an example of choose [ci skip]

* lib/securerandom.rb (Random::Formatter#choose): [DOC] fix an
  example, `n` is not optional.
------------------------------------------------------------------------
r60419 | hsbt | 2017-10-25 16:03:11 +0900 (Wed, 25 Oct 2017) | 1 line

Update power_assert-1.1.1. It support `test-bundled-gems`.
------------------------------------------------------------------------
r60418 | hsbt | 2017-10-25 15:58:24 +0900 (Wed, 25 Oct 2017) | 3 lines

Fixed conflicted variables. v is already used another condition.

  [Misc #14050][ruby-core:83553]
------------------------------------------------------------------------
r60417 | nobu | 2017-10-25 14:44:38 +0900 (Wed, 25 Oct 2017) | 5 lines

io.c: write a newline together

* io.c (rb_io_puts): write a newline together at once for each
  argument.  based on the patch by rohitpaulk (Rohit Kuruvilla) at
  [ruby-core:83508].  [Feature #14042]
------------------------------------------------------------------------
r60416 | nobu | 2017-10-25 14:23:54 +0900 (Wed, 25 Oct 2017) | 6 lines

range.c: use rb_check_funcall

* range.c (rb_range_values): use rb_check_funcall instead of
  calling rb_respond_to then rb_funcall, and allow `begin` and
  `end` to be private as well as other internal conversions.
  [ruby-core:83541] [Bug #14048]
------------------------------------------------------------------------
r60415 | hsbt | 2017-10-25 14:04:24 +0900 (Wed, 25 Oct 2017) | 1 line

Added development dependency for power_assert.
------------------------------------------------------------------------
r60414 | hsbt | 2017-10-25 12:38:02 +0900 (Wed, 25 Oct 2017) | 3 lines

Update rake-12.2.1 for bundled gems.

  rake-12.2.0 broke Capistrano 3 task. 12.2.1 fixed this regression.
------------------------------------------------------------------------
r60413 | nobu | 2017-10-25 11:41:47 +0900 (Wed, 25 Oct 2017) | 5 lines

Fix Mock.verify_call to mock_respond_to?

* spec/mspec/lib/mspec/mocks/mock.rb (Mock.verify_call): should
  pass arguments to as given, not packed in an array.
  mock_respond_to? expects 2 or 3 arguments.
------------------------------------------------------------------------
r60412 | nobu | 2017-10-25 10:45:28 +0900 (Wed, 25 Oct 2017) | 4 lines

compile.c: refine error messages

* compile.c (rb_iseq_compile_node): raise compile error with exact
  iseq type name.
------------------------------------------------------------------------
r60411 | nobu | 2017-10-25 10:40:15 +0900 (Wed, 25 Oct 2017) | 6 lines

range.c: check if exclude_end? is defined

* range.c (rb_range_values): should raise TypeError if necessary
  method is not defined, not NoMethodError, when trying to tell if
  the object is a Range and extract info.
  [ruby-core:83541] [Bug #14048]
------------------------------------------------------------------------
r60410 | hsbt | 2017-10-25 10:13:35 +0900 (Wed, 25 Oct 2017) | 4 lines

Update latest bundled_gems.

  * rake-12.2.0
  * test-unit-3.2.6
------------------------------------------------------------------------
r60409 | nobu | 2017-10-25 09:33:29 +0900 (Wed, 25 Oct 2017) | 4 lines

debug.c: RSymbol info

* debug.c (ruby_dummy_gdb_enums): force to include struct RSymbol
  info.
------------------------------------------------------------------------
r60408 | normal | 2017-10-25 08:35:52 +0900 (Wed, 25 Oct 2017) | 6 lines

file.c: fix possible alignment bugs in r60386

* file.c (struct apply_filename): split out from struct apply_arg
* file.c (apply2files): use offsetof for flex array size calculation
* file.c (apply2files): avoid redundant marking with ALLOCV
  [ruby-core:83535]
------------------------------------------------------------------------
r60407 | nobu | 2017-10-25 08:19:57 +0900 (Wed, 25 Oct 2017) | 5 lines

debug.c: imemo_mask

* .gdbinit (rp, rp_imemo, rb_ps_thread): update imemo_mask.

* debug.c (ruby_dummy_gdb_enums): include imemo_types.
------------------------------------------------------------------------
r60406 | marcandre | 2017-10-25 03:08:15 +0900 (Wed, 25 Oct 2017) | 3 lines

lib/ostruct.rb: Use frozen literals.

Patch adapted from Espartaco Palma. [GH-1714] [Bug #14000]
------------------------------------------------------------------------
r60405 | svn | 2017-10-25 03:08:01 +0900 (Wed, 25 Oct 2017) | 1 line

* 2017-10-25
------------------------------------------------------------------------
r60404 | marcandre | 2017-10-25 03:08:00 +0900 (Wed, 25 Oct 2017) | 1 line

lib/weakref: Remove incorrect example [DOC] [Bug #14031]
------------------------------------------------------------------------
r60403 | ko1 | 2017-10-24 22:59:59 +0900 (Tue, 24 Oct 2017) | 1 line

add NEWS entry about [Feature #14045]
------------------------------------------------------------------------
r60402 | nobu | 2017-10-24 22:48:08 +0900 (Tue, 24 Oct 2017) | 10 lines

sysconfdir on Windows

* ext/etc/etc.c (etc_sysconfdir): mentioned special case on
  Windows.  [ruby-core:43110] [Bug #6121]

* ext/etc/extconf.rb: define SYSCONFDIR only if sysconfdir is set
  in RbConfig::CONFIG and not empty.

* win32/Makefile.sub (config.status): sysconfdir is not used on
  Windows.
------------------------------------------------------------------------
r60401 | kazu | 2017-10-24 21:10:32 +0900 (Tue, 24 Oct 2017) | 5 lines

Update call-seq of ARGF.read_nonblock

ARGF.read_nonblock supports `exception: false' like IO#read_nonblock
since 2.3.0.
[Feature #11358]
------------------------------------------------------------------------
r60400 | nobu | 2017-10-24 20:24:19 +0900 (Tue, 24 Oct 2017) | 1 line

Test for r60396
------------------------------------------------------------------------
r60399 | naruse | 2017-10-24 20:15:20 +0900 (Tue, 24 Oct 2017) | 5 lines

Revert "sysconfdir on Windows"

This reverts commit r60279.
This breaks mswin build:
https://ci.appveyor.com/project/ruby/ruby/build/1.0.5571
------------------------------------------------------------------------
r60398 | svn | 2017-10-24 20:13:50 +0900 (Tue, 24 Oct 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r60397 | ko1 | 2017-10-24 20:13:49 +0900 (Tue, 24 Oct 2017) | 32 lines

Lazy Proc allocation for block parameters
[Feature #14045]

* insns.def (getblockparam, setblockparam): add special access
  instructions for block parameters.
  getblockparam checks VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM and
  if it is not set this instruction creates a Proc object from
  a given blcok and set VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM.
  setblockparam is similar to setlocal, but set
  VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM.

* compile.c: use get/setblockparm instead get/setlocal instructions.
  Note that they are used for method local block parameters (def m(&b)),
  not for block local method parameters (iter{|&b|).

* proc.c (get_local_variable_ptr): creates Proc object for
  Binding#local_variable_get/set.

* safe.c (safe_setter): we need to create Proc objects for postponed
  block parameters when $SAFE is changed.

* vm_args.c (args_setup_block_parameter): used only for block local blcok
  parameters.

* vm_args.c (vm_caller_setup_arg_block): if called with
  VM_CALL_ARGS_BLOCKARG_BLOCKPARAM flag then passed block values should be
  a block handler.

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

* benchmark/bm_vm1_blockparam*: added.

------------------------------------------------------------------------
r60396 | nobu | 2017-10-24 20:09:41 +0900 (Tue, 24 Oct 2017) | 4 lines

ruby.c: fix r60393

* ruby.c (load_file_internal): set loop options after parsing
  shebang line.
------------------------------------------------------------------------
r60395 | nobu | 2017-10-24 17:13:13 +0900 (Tue, 24 Oct 2017) | 4 lines

vm_eval.c: all value type cases

* vm_eval.c (rb_type_str): ensure all value types are covered.
  missed types would be warned by -Wswitch option of gcc.
------------------------------------------------------------------------
r60394 | nobu | 2017-10-24 17:00:36 +0900 (Tue, 24 Oct 2017) | 6 lines

Removed NODE_OPT_N

* node.h (NODE_OPT_N): removed.

* parse.y (parser_append_options): expand -n option loop to while
  gets loop.
------------------------------------------------------------------------
r60393 | nobu | 2017-10-24 16:41:48 +0900 (Tue, 24 Oct 2017) | 7 lines

parse.y: rb_parser_set_options

* parse.y (yycompile0): append top-level addenda before appending
  prelude nodes.

* parse.y (rb_parser_set_options): set top-level addendum options
  before parsing.
------------------------------------------------------------------------
r60392 | nobu | 2017-10-24 16:17:36 +0900 (Tue, 24 Oct 2017) | 5 lines

vm_eval.c: uncallable_object

* vm_eval.c (uncallable_object): extract error case as a no-return
  function.  split successive ?-marks not to get confused with a
  trigraph.
------------------------------------------------------------------------
r60391 | mame | 2017-10-24 15:27:58 +0900 (Tue, 24 Oct 2017) | 5 lines

Avoid many type casts

The idiom `rb_gc_force_recycle((VALUE)...)` was used heavily.
This change defines `rb_discard_nod(NODE*)` and allows C compiler to
typecheck.
------------------------------------------------------------------------
r60390 | mame | 2017-10-24 15:16:31 +0900 (Tue, 24 Oct 2017) | 5 lines

Remove dynamic NODE allocation out of parser

A temporary NODE object was allocated to create iseq.  Instead, this
patch allocates a dummy NODE as auto variable, and discard it soon.
This change is intended as a preparation to manage AST NODEs out of GC.
------------------------------------------------------------------------
r60389 | mame | 2017-10-24 14:54:30 +0900 (Tue, 24 Oct 2017) | 5 lines

Remove special handling for (NODE*)1

The magic number was used to mark NODE_ATTRASGN when its receiver is
self.  But the hack was refactored at r46366.  So the remaining code
fragments are no longer needed.
------------------------------------------------------------------------
r60388 | normal | 2017-10-24 10:22:08 +0900 (Tue, 24 Oct 2017) | 16 lines

net/http: use require_relative to reduce syscalls

require_relative speeds up loading of files by reducing path
lookups.  On a clean install with RubyGems-enabled,
"ruby -rnet/http -e exit" shows a reduction in failed open(2)
syscalls from 410 to 350 (x86-64 GNU/Linux).

I could not measure a time difference on my Linux-based
machines, however this should be noticeable to users of other
kernels with worse syscall and VFS performance than Linux.

Further use of require_relative will reduce lookups in other
places.

* lib/net/http.rb: use require_relative
  [ruby-core:78285] [Feature #12973]
------------------------------------------------------------------------
r60387 | svn | 2017-10-24 10:20:05 +0900 (Tue, 24 Oct 2017) | 1 line

* properties.
------------------------------------------------------------------------
r60386 | normal | 2017-10-24 10:20:04 +0900 (Tue, 24 Oct 2017) | 35 lines

file.c: apply2files releases GVL

This means File.chmod, File.lchmod, File.chown, File.lchown,
File.unlink, and File.utime operations on slow filesystems
no longer hold up other threads.

The platform-specific utime_failed changes is compile-tested
using a new UTIME_EINVAL macro

This hurts performance on fast filesystem, but these methods
are unlikely to be performance bottlenecks and (IMHO) avoiding
pathological slowdowns and stalls are more important.

benchmark results:
minimum results in each 3 measurements.
Execution time (sec)
name	trunk	built
file_chmod	0.591	0.801

Speedup ratio: compare with the result of `trunk' (greater is better)
name	built
file_chmod	0.737

* file.c (UTIME_EINVAL): new macro to ease compile-testing
* file.c (struct apply_arg): new struct
* file.c (no_gvl_apply2files): new function
* file.c (apply2files): release GVL
* file.c (chmod_internal): adjust for apply2files changes
* file.c (lchmod_internal): ditto
* file.c (chown_internal): ditto
* file.c (lchown_internal): ditto
* file.c (utime_failed): ditto
* file.c (utime_internal): ditto
* file.c (unlink_internal): ditto
  [ruby-core:83200] [Feature #13996]
------------------------------------------------------------------------
r60385 | svn | 2017-10-24 06:50:10 +0900 (Tue, 24 Oct 2017) | 1 line

* 2017-10-24
------------------------------------------------------------------------
r60384 | normal | 2017-10-24 06:50:08 +0900 (Tue, 24 Oct 2017) | 10 lines

thread_pthread: do not corrupt stack

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

Thanks to wanabe for finding the bug and original patch.

* thread_pthread (native_thread_init_stack): fix stack corruption
  [ruby-core:82737] [Bug #13387]
------------------------------------------------------------------------
r60383 | nobu | 2017-10-23 23:05:07 +0900 (Mon, 23 Oct 2017) | 4 lines

multiple arguments to write

Make write methods of IO-like objects accept multiple arguments,
as well as IO#write.
------------------------------------------------------------------------
r60382 | yui-knk | 2017-10-23 22:25:59 +0900 (Mon, 23 Oct 2017) | 4 lines

Add test cases for branch coverage

* test/coverage/test_coverage.rb (test_branch_coverage_for_while_statement):
  Add test cases for modifier while/until.
------------------------------------------------------------------------
r60381 | kazu | 2017-10-23 21:59:05 +0900 (Mon, 23 Oct 2017) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r60380 | naruse | 2017-10-23 17:28:05 +0900 (Mon, 23 Oct 2017) | 4 lines

OpenSSL may show the different error message

https://github.com/ruby/ruby/commit/d02211c9da608742b09aec768db79442007eabc0#commitcomment-25119729
From: MSP-Greg <MSP-Greg@users.noreply.github.com>
------------------------------------------------------------------------
r60379 | nobu | 2017-10-23 16:06:12 +0900 (Mon, 23 Oct 2017) | 3 lines

zlib.c: multiple arguments to write

* ext/zlib/zlib.c (rb_gzwriter_write): accepts multiple arguments.
------------------------------------------------------------------------
r60378 | nobu | 2017-10-23 15:42:37 +0900 (Mon, 23 Oct 2017) | 4 lines

error.c: warning to write multiple arguments

* error.c (warning_write): accepts multiple arguments to merge
  multiple warning messages.
------------------------------------------------------------------------
r60377 | nobu | 2017-10-23 15:25:39 +0900 (Mon, 23 Oct 2017) | 4 lines

stringio.c: write multiple arguments

* ext/stringio/stringio.c (strio_write_m): make StringIO#write
  accept multiple arguments, as well as IO#write.
------------------------------------------------------------------------
r60376 | nobu | 2017-10-23 15:05:46 +0900 (Mon, 23 Oct 2017) | 1 line

NEWS: add [Feature #9323] [ci skip]
------------------------------------------------------------------------
r60375 | hsbt | 2017-10-23 14:58:59 +0900 (Mon, 23 Oct 2017) | 1 line

Removed empty dir.
------------------------------------------------------------------------
r60374 | hsbt | 2017-10-23 14:56:25 +0900 (Mon, 23 Oct 2017) | 8 lines

Drop to support NaCl platform.

  Because NaCl and PNaCl are already sunset status.
  see https://bugs.chromium.org/p/chromium/issues/detail?id=239656#c160

  configure.ac: Patch for this file was provided by @nobu.

  [Feature #14041][ruby-core:83497][fix GH-1726]
------------------------------------------------------------------------
r60373 | nobu | 2017-10-23 14:28:12 +0900 (Mon, 23 Oct 2017) | 4 lines

io.c: fix infinite retry

* io.c (io_binwritev): fix infinite retry when flushing buffered
  data.  [Feature #9323]
------------------------------------------------------------------------
r60372 | nobu | 2017-10-23 14:09:35 +0900 (Mon, 23 Oct 2017) | 4 lines

io.c: fix buffered output

* io.c (io_binwritev): append to buffered data, not overwriting.
  [Feature #9323]
------------------------------------------------------------------------
r60371 | nobu | 2017-10-23 14:09:34 +0900 (Mon, 23 Oct 2017) | 3 lines

io.c: fix total

* io.c (io_writev): total may be a bignum.  [Feature #9323]
------------------------------------------------------------------------
r60370 | nobu | 2017-10-23 11:25:58 +0900 (Mon, 23 Oct 2017) | 4 lines

io.c: no restriction

* io.c (io_write_m): remove argc restriction upto IOV_MAX-1.
  [Feature #9323]
------------------------------------------------------------------------
r60369 | sonots | 2017-10-23 01:57:16 +0900 (Mon, 23 Oct 2017) | 1 line

common.mk: add install-capi to make help
------------------------------------------------------------------------
r60368 | svn | 2017-10-23 01:03:58 +0900 (Mon, 23 Oct 2017) | 1 line

* 2017-10-23
------------------------------------------------------------------------
r60367 | kou | 2017-10-23 01:03:57 +0900 (Mon, 23 Oct 2017) | 27 lines

rss itunes: fix a bug that <itunes:explicit> value isn't fully supported

Fix GH-1725

<itunes:explicit> accepts "explicit", "yes", "true", "clean", "no" and
"false" as valid values.

Here is the <itunes:explicit>'s description in
https://help.apple.com/itc/podcasts_connect/#/itcb54353390:

> The <itunes:explicit> tag indicates whether your podcast contains
> explicit material. You can specify the following values:
>
>   * Yes | Explicit | True. If you specify yes, explicit, or true,
>     indicating the presence of explicit content, the iTunes Store
>     displays an Explicit parental advisory graphic for your podcast.
>
>   * Clean | No | False. If you specify clean, no, or false, indicating
>     that none of your podcast episodes contain explicit language or
>     adult content, the iTunes Store displays a Clean parental
>     advisory graphic for your podcast.

I don't know whether <itunes:explicit> value is case sensitive or
insensitive. But the current implementation is case insensitive.

Reported by Valerie Woolard Srinivasan. Thanks!!!

------------------------------------------------------------------------
r60366 | yui-knk | 2017-10-22 23:13:50 +0900 (Sun, 22 Oct 2017) | 4 lines

Add test cases for branch coverage

* test/coverage/test_coverage.rb (test_branch_coverage_for_if_statement):
  Add a test case for ternary operator.
------------------------------------------------------------------------
r60365 | yui-knk | 2017-10-22 22:58:55 +0900 (Sun, 22 Oct 2017) | 4 lines

Add test cases for branch coverage

* test/coverage/test_coverage.rb (test_branch_coverage_for_if_statement):
  Add test cases for modifier if/unless.
------------------------------------------------------------------------
r60364 | yui-knk | 2017-10-22 22:49:41 +0900 (Sun, 22 Oct 2017) | 4 lines

Add test cases for branch coverage

* test/coverage/test_coverage.rb (test_branch_coverage_for_if_statement):
  Add test cases for if/unless without else clauses.
------------------------------------------------------------------------
r60363 | yui-knk | 2017-10-22 22:34:24 +0900 (Sun, 22 Oct 2017) | 1 line

test/coverage/test_coverage.rb: Use `<<~` to ease to calculate column of target codes
------------------------------------------------------------------------
r60362 | yui-knk | 2017-10-22 22:18:40 +0900 (Sun, 22 Oct 2017) | 12 lines

Add column numbers to branch coverage

* compile.c (DECL_BRANCH_BASE, ADD_TRACE_BRANCH_COVERAGE): Add
  column to arguments.

* compile.c (compile_if, compile_case, compile_when, compile_loop, iseq_compile_each0):
  Pass column numbers to macros.

* ext/coverage/coverage.c (branch_coverage): Add column numbers to
  a return value.

* test/coverage/test_coverage.rb: Follow-up these changes.
------------------------------------------------------------------------
r60361 | knu | 2017-10-22 21:26:21 +0900 (Sun, 22 Oct 2017) | 1 line

Mention `Set#reset`
------------------------------------------------------------------------
r60360 | knu | 2017-10-22 21:25:34 +0900 (Sun, 22 Oct 2017) | 4 lines

Add `Set#reset`

This method resets the internal state of a set after modification to
existing elements, reindexing and deduplicating them. [Feature #6589]
------------------------------------------------------------------------
r60359 | hsbt | 2017-10-22 20:27:06 +0900 (Sun, 22 Oct 2017) | 3 lines

Fixed misspelling words.

  These are detected by https://github.com/client9/misspell
------------------------------------------------------------------------
r60358 | kazu | 2017-10-22 18:16:54 +0900 (Sun, 22 Oct 2017) | 1 line

Use `\A` and `\z` instead of `^` and `$`
------------------------------------------------------------------------
r60357 | kazu | 2017-10-22 18:16:51 +0900 (Sun, 22 Oct 2017) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r60356 | rhe | 2017-10-22 16:18:55 +0900 (Sun, 22 Oct 2017) | 3 lines

gdbm, dbm, sdbm: remove unnecessary conditions

The dfree and dsize callback functions are never called with NULL.
------------------------------------------------------------------------
r60355 | rhe | 2017-10-22 16:18:54 +0900 (Sun, 22 Oct 2017) | 5 lines

gdbm, dbm, sdbm: prevent memory leak in #initialize

Have the allocator function allocate struct dbmdata too. #initialize
should not call ALLOC() after opening a file since it can fail with
NoMemoryError, leaking the opened file.
------------------------------------------------------------------------
r60354 | yui-knk | 2017-10-22 16:04:00 +0900 (Sun, 22 Oct 2017) | 6 lines

Fix a target method of a test

* test/ruby/test_string.rb (test_delete): I guess
  this line should be a test case which asserts
  coderange is handled correctly when a result of
  String#delete has non-ASCII characters.
------------------------------------------------------------------------
r60353 | kazu | 2017-10-22 16:01:57 +0900 (Sun, 22 Oct 2017) | 5 lines

Update doc of Hash#slice [ci skip]

- Add arguments to call-seq
- Add sample of multiple keys
- Add sample: hash does not contain key
------------------------------------------------------------------------
r60352 | kazu | 2017-10-22 15:30:47 +0900 (Sun, 22 Oct 2017) | 1 line

Fix indent and comment [ci skip]
------------------------------------------------------------------------
r60351 | nobu | 2017-10-22 15:22:50 +0900 (Sun, 22 Oct 2017) | 4 lines

io.c: fix local variables

* io.c (io_writev): fix local variable declarations, when
  writev(2) is not available.  [Feature #9323]
------------------------------------------------------------------------
r60350 | yui-knk | 2017-10-22 15:11:01 +0900 (Sun, 22 Oct 2017) | 1 line

parse.y (new_scope_gen): adjust indent
------------------------------------------------------------------------
r60349 | nobu | 2017-10-22 15:01:07 +0900 (Sun, 22 Oct 2017) | 4 lines

Add missing `buf` parameter to `recv_nonblock` doc [ci skip]

[Fix GH-1725]
From: yuuji.yaginuma <yuuji.yaginuma@gmail.com>
------------------------------------------------------------------------
r60348 | nobu | 2017-10-22 14:36:49 +0900 (Sun, 22 Oct 2017) | 4 lines

objspace.c: missing types

* ext/objspace/objspace.c (count_nodes): added recently added node
  types that were missing.
------------------------------------------------------------------------
r60347 | nobu | 2017-10-22 14:13:57 +0900 (Sun, 22 Oct 2017) | 4 lines

remove NODE_DREGX_ONCE

* node.h (enum node_type): remove NODE_DREGX_ONCE which is not
  used anymore.
------------------------------------------------------------------------
r60346 | rhe | 2017-10-22 13:19:03 +0900 (Sun, 22 Oct 2017) | 3 lines

doc/syntax/methods.rdoc: fix a misleading example

As a bonus, wrap a long line added by r60295.
------------------------------------------------------------------------
r60345 | nobu | 2017-10-22 13:06:23 +0900 (Sun, 22 Oct 2017) | 1 line

dir.c: adjust indent [ci skip]
------------------------------------------------------------------------
r60344 | naruse | 2017-10-22 11:19:52 +0900 (Sun, 22 Oct 2017) | 1 line

sort test result
------------------------------------------------------------------------
r60343 | glass | 2017-10-22 11:11:07 +0900 (Sun, 22 Oct 2017) | 4 lines

Make IO#write accept multiple arguments

io.c: make IO#write accept multiple arguments.
it uses writev(2) if possible.
------------------------------------------------------------------------
r60342 | naruse | 2017-10-22 11:08:46 +0900 (Sun, 22 Oct 2017) | 1 line

sort the test result
------------------------------------------------------------------------
r60341 | naruse | 2017-10-22 11:03:49 +0900 (Sun, 22 Oct 2017) | 3 lines

Dir.glob with FNM_EXTGLOB is optimized [Feature #13873]

The order of resulted array is changed in some cases.
------------------------------------------------------------------------
r60340 | nobu | 2017-10-22 10:46:43 +0900 (Sun, 22 Oct 2017) | 5 lines

compile.c: optimize local variable assignments

* compile.c (iseq_peephole_optimize): eliminate simple self
  assignments of a local variable when the result is used.
  follow-up of r60322.
------------------------------------------------------------------------
r60339 | nobu | 2017-10-22 10:37:36 +0900 (Sun, 22 Oct 2017) | 4 lines

parse.y: workaround for warnings

* parse.y (mark_lvar_used): enable workaround to suppress unused
  local variables.  [ruby-core:82656] [Bug #13872]
------------------------------------------------------------------------
r60338 | nobu | 2017-10-22 10:13:57 +0900 (Sun, 22 Oct 2017) | 3 lines

fix up r60224

* parse.y (match_op_gen): fix optimization at DREGX_ONCE.
------------------------------------------------------------------------
r60337 | glass | 2017-10-22 09:57:46 +0900 (Sun, 22 Oct 2017) | 4 lines

hash.c: optimize Hash#compare_by_identity

hash.c (rb_hash_compare_by_id): avoid unnecessary allocation of st_table.
formerly, st_table created in rb_hash_modify() was not used and replaced immediately.
------------------------------------------------------------------------
r60336 | yui-knk | 2017-10-22 09:45:05 +0900 (Sun, 22 Oct 2017) | 6 lines

Remove not used node_type NODE_BMETHOD

* ext/objspace/objspace.c (count_nodes): This node_type has
  not been used since r24128.
* node.c (dump_node): ditto
* node.h (node_type, NEW_BMETHOD): ditto
------------------------------------------------------------------------
r60335 | glass | 2017-10-22 09:38:05 +0900 (Sun, 22 Oct 2017) | 3 lines

Add arity check into Hash#flatten

* hash.c (rb_hash_flatten): add arity check
------------------------------------------------------------------------
r60334 | yui-knk | 2017-10-22 09:29:40 +0900 (Sun, 22 Oct 2017) | 6 lines

Remove not used node_type NODE_BLOCK_ARG

* ext/objspace/objspace.c (count_nodes): This node_type has
  not been used since r11840.
* node.c (dump_node, rb_gc_mark_node): ditto
* node.h (node_type, NEW_BLOCK_ARG): ditto
------------------------------------------------------------------------
r60333 | nobu | 2017-10-22 09:19:12 +0900 (Sun, 22 Oct 2017) | 4 lines

vm_insnhelper.c: array aref optimization

* vm_insnhelper.c (vm_opt_aref): optimize on other than fixnum
  argument too.
------------------------------------------------------------------------
r60332 | yui-knk | 2017-10-22 09:17:39 +0900 (Sun, 22 Oct 2017) | 6 lines

Remove not used node_type NODE_TO_ARY

* ext/objspace/objspace.c (count_nodes): This node_type has
  not been used since r13236.
* node.c (dump_node, rb_gc_mark_node): ditto
* node.h (node_type, NEW_TO_ARY): ditto
------------------------------------------------------------------------
r60331 | nobu | 2017-10-22 09:00:41 +0900 (Sun, 22 Oct 2017) | 1 line

string.c: comment layout [ci skip]
------------------------------------------------------------------------
r60330 | suke | 2017-10-22 08:57:10 +0900 (Sun, 22 Oct 2017) | 3 lines

ext/win32ole/win32ole.c (fole_missing): set receiver in NoMethodError.
test/win32ole/test_win32ole.rb: ditto.

------------------------------------------------------------------------
r60329 | svn | 2017-10-22 08:49:36 +0900 (Sun, 22 Oct 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r60328 | sonots | 2017-10-22 08:49:35 +0900 (Sun, 22 Oct 2017) | 6 lines

* string.c: [DOC] Split rdoc of String#<< and String#concat [ci skip]

Split String#<< and String#concat docs to reflect single and multiple
arguments

patched by MSP-Greg [fix GH-1614]
------------------------------------------------------------------------
r60327 | sonots | 2017-10-22 08:44:15 +0900 (Sun, 22 Oct 2017) | 11 lines

* object.c: Improve documentation of Kernel#Array

Array(arg) does more than just call to_ary or to_a on the argument.
It also falls back to returning [arg] if neither method is available.
This patch extends the description and adds a few examples of how it
handles common types of arguments, including an integer
(which does not implement to_ary or to_a).

Extend Kernel#Array doc to mention TypeError

patched by ragesoss (Sage Ross) [fix GH-1663]
------------------------------------------------------------------------
r60326 | sonots | 2017-10-22 08:38:17 +0900 (Sun, 22 Oct 2017) | 8 lines

* doc/regexp.rdoc: In regexp doc, two backslashes match one literally

In the "Metacharacters and Escapes" section of regexp.rdoc, it said that
to match a backslash literally, it must be backslash-escaped, but the
rendered HTML showed three backslashes (\\\). There should only be two
backslashes (\\).

patched by jlmuir (J. Lewis Muir) [fix GH-1677]
------------------------------------------------------------------------
r60325 | sonots | 2017-10-22 08:36:53 +0900 (Sun, 22 Oct 2017) | 2 lines

* doc/regexp.rdoc: Fix regexp doc syntax highlighting
  patched by jlmuir (J. Lewis Muir) [fix GH-1678]
------------------------------------------------------------------------
r60324 | sonots | 2017-10-22 08:35:40 +0900 (Sun, 22 Oct 2017) | 2 lines

* string.c: Remove errant "the" in gsub documentation
  patched by jlmuir (J. Lewis Muir) [fix GH-1679]
------------------------------------------------------------------------
r60323 | sonots | 2017-10-22 08:32:57 +0900 (Sun, 22 Oct 2017) | 4 lines

Fix typo in comment

* test/ruby/test_transcode.rb: fix typo in comment
  patched by larskanis (Lars Kanis) [GH-1681]
------------------------------------------------------------------------
r60322 | nobu | 2017-10-22 08:30:39 +0900 (Sun, 22 Oct 2017) | 4 lines

compile.c: optimize local variable assignments

* compile.c (iseq_peephole_optimize): eliminate repeated
  assignments and copy from/to a same local variable.
------------------------------------------------------------------------
r60321 | akr | 2017-10-22 08:23:05 +0900 (Sun, 22 Oct 2017) | 3 lines

reference Socket.getaddrinfo to Addrinfo.getaddrinfo.


------------------------------------------------------------------------
r60320 | nobu | 2017-10-22 08:21:05 +0900 (Sun, 22 Oct 2017) | 58 lines

Improve performance of string interpolation

This patch will add pre-allocation in string interpolation.
By this, unecessary capacity resizing is avoided.

For small strings, optimized `rb_str_resurrect` operation is
faster, so pre-allocation is done only when concatenated strings
are large.  `MIN_PRE_ALLOC_SIZE` was decided by experimenting with
local machine (x86_64-apple-darwin 16.5.0, Apple LLVM version
8.1.0 (clang - 802.0.42)).

String interpolation will be faster around 72% when large string is created.

* Before
  ```
  Calculating -------------------------------------
  Large string interpolation
                            1.276M (? 5.9%) i/s -      6.358M in   5.002022s
  Small string interpolation
                            5.156M (? 5.5%) i/s -     25.728M in   5.005731s
  ```

* After
  ```
  Calculating -------------------------------------
  Large string interpolation
                            2.201M (? 5.8%) i/s -     11.063M in   5.043724s
  Small string interpolation
                            5.192M (? 5.7%) i/s -     25.971M in   5.020516s
  ```

* Test code
  ```ruby
  require 'benchmark/ips'

  Benchmark.ips do |x|
    x.report "Large string interpolation" do |t|
      a = "Hellooooooooooooooooooooooooooooooooooooooooooooooooooo"
      b = "Wooooooooooooooooooooooooooooooooooooooooooooooooooorld"

      t.times do
        "#{a}, #{b}!"
      end
    end

    x.report "Small string interpolation" do |t|
      a = "Hello"
      b = "World"

      t.times do
        "#{a}, #{b}!"
      end
    end
  end
  ```

[Fix GH-1626]
From: Nao Minami <south37777@gmail.com>
------------------------------------------------------------------------
r60319 | akr | 2017-10-22 08:19:47 +0900 (Sun, 22 Oct 2017) | 23 lines

deprecate TCPSocket.gethostbyname.

TCPSocket.gethostbyname has problems similar to
Socket.gethostbyname.

An example of the problem which only the address family of
the first address is returned:

```
pp TCPSocket.gethostbyname("www.wide.ad.jp")
#=> ["www.wide.ad.jp",
      [],
      10,
      "2001:200:dff:fff1:216:3eff:fe4b:651c",
      "203.178.137.58"]
```

The address family of the first address, AF_INET6 (10), is
returned but
the address family of the second address, AF_INET, is not
returned.


------------------------------------------------------------------------
r60318 | rhe | 2017-10-22 05:26:26 +0900 (Sun, 22 Oct 2017) | 7 lines

openssl: merge test fix from upstream

Merge a commit from upstream:

	d1cbf6d75280 test/test_ssl_session: skip tests for session_remove_cb

Tests using SSL::SSLContext#session_remove_cb= are now skipped.
------------------------------------------------------------------------
r60317 | knu | 2017-10-22 02:03:40 +0900 (Sun, 22 Oct 2017) | 6 lines

Avoid use of `self.class.new(self)` in Set#collect!

That prevents infinite recursion when a subclass of Set uses
`collect!` in its constructor.

This should fix [Bug #12437].
------------------------------------------------------------------------
r60316 | naruse | 2017-10-22 01:44:56 +0900 (Sun, 22 Oct 2017) | 1 line

ignore server side error
------------------------------------------------------------------------
r60315 | naruse | 2017-10-22 01:44:56 +0900 (Sun, 22 Oct 2017) | 3 lines

Revert "ignore server side error"

This reverts commit r60314.
------------------------------------------------------------------------
r60314 | naruse | 2017-10-22 01:43:54 +0900 (Sun, 22 Oct 2017) | 1 line

ignore server side error
------------------------------------------------------------------------
r60313 | naruse | 2017-10-22 01:34:34 +0900 (Sun, 22 Oct 2017) | 1 line

fic expected error message
------------------------------------------------------------------------
r60312 | knu | 2017-10-22 01:28:52 +0900 (Sun, 22 Oct 2017) | 4 lines

Fix comparison methods of Set to check if `@hash` is actually comparable

This should fix comparison of rbtree backed SortedSet instances.
[Bug #12072]
------------------------------------------------------------------------
r60311 | naruse | 2017-10-22 01:25:22 +0900 (Sun, 22 Oct 2017) | 3 lines

Introduce Net::HTTP#min_version/max_version [Feature #9450]

Set SSL minimum/maximum version.
------------------------------------------------------------------------
r60310 | naruse | 2017-10-22 01:25:19 +0900 (Sun, 22 Oct 2017) | 1 line

fix OpenSSL::SSL::SSLContext#min_version doesn't work
------------------------------------------------------------------------
r60309 | akr | 2017-10-22 01:12:46 +0900 (Sun, 22 Oct 2017) | 2 lines

less random generations in Random::Formatter#choose.

------------------------------------------------------------------------
r60308 | hsbt | 2017-10-22 01:11:58 +0900 (Sun, 22 Oct 2017) | 5 lines

Add documentation for `chomp` option.

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

  Patch by @ksss [fix GH-1717]
------------------------------------------------------------------------
r60307 | yui-knk | 2017-10-22 01:09:51 +0900 (Sun, 22 Oct 2017) | 7 lines

Remove not used node_type NODE_CVDECL

* compile.c (defined_expr0): This node_type has
  not been used since r11614.
* ext/objspace/objspace.c (count_nodes): ditto
* node.c (dump_node): ditto
* node.h (node_type, NEW_CVDECL): ditto
------------------------------------------------------------------------
r60306 | hsbt | 2017-10-22 01:05:01 +0900 (Sun, 22 Oct 2017) | 1 line

Handle Errno::EADDRNOTAVAIL with Raspberry Pi environment.
------------------------------------------------------------------------
r60305 | k0kubun | 2017-10-22 01:01:48 +0900 (Sun, 22 Oct 2017) | 1 line

erb.1: add missing option in detailed description
------------------------------------------------------------------------
r60304 | knu | 2017-10-22 00:57:32 +0900 (Sun, 22 Oct 2017) | 3 lines

Use a mutex to make SortedSet.setup thread-safe

This should fix [Bug #13735].
------------------------------------------------------------------------
r60303 | knu | 2017-10-22 00:57:26 +0900 (Sun, 22 Oct 2017) | 1 line

Remove redundant use of module_eval
------------------------------------------------------------------------
r60302 | yui-knk | 2017-10-22 00:56:03 +0900 (Sun, 22 Oct 2017) | 8 lines

Remove not used node_type NODE_IASGN2

* compile.c (compile_massign_opt, iseq_compile_each0): This
  node_type has not been used since r11813.
* ext/objspace/objspace.c (count_nodes): ditto
* node.c (dump_node, rb_gc_mark_node): ditto
* node.h (node_type, NEW_IASGN2): ditto
* parse.y (node_assign_gen): ditto
------------------------------------------------------------------------
r60301 | k0kubun | 2017-10-22 00:45:32 +0900 (Sun, 22 Oct 2017) | 1 line

driver.rb: allow executing driver.rb directly
------------------------------------------------------------------------
r60300 | usa | 2017-10-22 00:43:05 +0900 (Sun, 22 Oct 2017) | 9 lines

The encoding of __FILE__ and __dir__ should be same

* ruby.c (process_options): convert the real path of the script to locale
  encoding if its encoding is not locale (maybe UTF-8) on Windows/OS X.
  this change makes the encoding of __dir__ to the same encoding of __FILE__
  when the script name is passed from commandline.

* test/ruby/test_options.rb (test___dir__encoding): test for this change.

------------------------------------------------------------------------
r60299 | k0kubun | 2017-10-22 00:39:35 +0900 (Sun, 22 Oct 2017) | 3 lines

driver.rb: add option to specify target with rbenv

[close GH-1724]
------------------------------------------------------------------------
r60298 | knu | 2017-10-22 00:38:38 +0900 (Sun, 22 Oct 2017) | 1 line

Allow a SortedSet to be frozen and still functional [Bug #12091]
------------------------------------------------------------------------
r60297 | akr | 2017-10-22 00:21:26 +0900 (Sun, 22 Oct 2017) | 13 lines

SecureRandom.alphanumeric implemented.

[ruby-core:68098] [Feature #10849] proposed by Andrew Butterfield.

SecureRandom.choose and SecureRandom.graph is not included.
(The implementation has SecureRandom.choose but it is private.)

I feel the method name, SecureRandom.choose, doesn't represent
the behavior well.

The actual use cases of SecureRandom.graph is not obvious.


------------------------------------------------------------------------
r60296 | svn | 2017-10-22 00:19:46 +0900 (Sun, 22 Oct 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r60295 | hsbt | 2017-10-22 00:19:45 +0900 (Sun, 22 Oct 2017) | 5 lines

Clarify return value for assignment methods.

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

  Patch by @sos4nt [fix GH-1682]
------------------------------------------------------------------------
r60294 | hsbt | 2017-10-22 00:16:54 +0900 (Sun, 22 Oct 2017) | 6 lines

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

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

  Patch by @takanabe [fix GH-1571]
  [Bug #11638][ruby-core:71277]
------------------------------------------------------------------------
r60293 | k0kubun | 2017-10-22 00:02:46 +0900 (Sun, 22 Oct 2017) | 15 lines

erb.rb: specify frozen_string_literal: true

for compilation performance.

$ ruby ./benchmark/driver.rb -e "trunk::/Users/k0kubun/.rbenv/versions/trunk/bin/ruby;modified::/Users/k0kubun/.rbenv/versions/modified/bin/ruby" -d ./benchmark -p app_erb

-----------------------------------------------------------
benchmark results:
Execution time (sec)
name    trunk   modified
app_erb 1.911      1.885

Speedup ratio: compare with the result of `trunk' (greater is better)
name    modified
app_erb    1.014
------------------------------------------------------------------------
r60292 | svn | 2017-10-22 00:02:26 +0900 (Sun, 22 Oct 2017) | 1 line

* 2017-10-22
------------------------------------------------------------------------
r60291 | hsbt | 2017-10-22 00:02:25 +0900 (Sun, 22 Oct 2017) | 9 lines

Update some words on README.md.

  * Remove space on double spaces.
  * Capitalization of "Ruby".
  * Use macOS instead of OS X.

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

  Patch by @bunkrich [fix GH-1610]
------------------------------------------------------------------------
r60290 | hsbt | 2017-10-21 23:55:22 +0900 (Sat, 21 Oct 2017) | 5 lines

Added explicitly require to example code.

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

  Patch by @guilherme [fix GH-1666]
------------------------------------------------------------------------
r60289 | yui-knk | 2017-10-21 23:51:07 +0900 (Sat, 21 Oct 2017) | 4 lines

Do not pass a not used argument

* parse.y (new_op_assign_gen): new_op_assign_gen for
  ripper does not need column information.
------------------------------------------------------------------------
r60288 | kazu | 2017-10-21 23:40:03 +0900 (Sat, 21 Oct 2017) | 1 line

Use caller with length to reduce unused strings
------------------------------------------------------------------------
r60287 | ko1 | 2017-10-21 23:35:19 +0900 (Sat, 21 Oct 2017) | 1 line

fix r60281
------------------------------------------------------------------------
r60286 | yui-knk | 2017-10-21 23:32:32 +0900 (Sat, 21 Oct 2017) | 4 lines

Define the macro separately for ruby parser and for ripper

* parse.y (new_op_assign): Define the macro separately
  for ruby parser and for ripper.
------------------------------------------------------------------------
r60285 | sonots | 2017-10-21 23:31:21 +0900 (Sat, 21 Oct 2017) | 5 lines

Add doxygen comments

* include/ruby/ruby.h (enum ruby_value_type): add doxygen comments
* internal.h (enum imemo_type, struct vm_svar): add doxygen comments
* method.h (rb_method_type_t, rb_method_iseq_t): add doxygen comments
------------------------------------------------------------------------
r60284 | glass | 2017-10-21 23:25:46 +0900 (Sat, 21 Oct 2017) | 4 lines

io.c: introduce copy offload to IO.copy_stream

io.c (rb_io_s_copy_stream): add copy offload feature (by using
copy_file_range(2) if available) to IO.copy_stream
------------------------------------------------------------------------
r60283 | kosaki | 2017-10-21 23:22:12 +0900 (Sat, 21 Oct 2017) | 1 line

test_pathname.rb#test_open should care about umask
------------------------------------------------------------------------
r60282 | kazu | 2017-10-21 23:22:04 +0900 (Sat, 21 Oct 2017) | 1 line

Fix r60271
------------------------------------------------------------------------
r60281 | kosaki | 2017-10-21 23:21:56 +0900 (Sat, 21 Oct 2017) | 1 line

test_cp_preserve_permissions should care about umask
------------------------------------------------------------------------
r60280 | akr | 2017-10-21 23:21:52 +0900 (Sat, 21 Oct 2017) | 9 lines

Describe recommended-methods.

Addrinfo.getaddrinfo is recommended instead of
Socket.gethostbyname.

Addrinfo#getnameinfo is recommended instead of
Socket.gethostbyaddr.


------------------------------------------------------------------------
r60279 | nobu | 2017-10-21 23:19:23 +0900 (Sat, 21 Oct 2017) | 7 lines

sysconfdir on Windows

* ext/etc/etc.c (etc_sysconfdir): mentioned special case on
  Windows.  [ruby-core:43110] [Bug #6121]

* win32/Makefile.sub (config.status): sysconfdir is not used on
  Windows.
------------------------------------------------------------------------
r60278 | hsbt | 2017-10-21 23:11:08 +0900 (Sat, 21 Oct 2017) | 5 lines

Removed obsoleted safe level checks on irb.

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

  Patch by @y-yagi [fix GH-1713]
------------------------------------------------------------------------
r60277 | nobu | 2017-10-21 23:06:22 +0900 (Sat, 21 Oct 2017) | 4 lines

fix up r60243

* tool/vcs.rb (VCS::GIT.get_revisions): use last revision also as
  changed revision when the head does not have svn ID.
------------------------------------------------------------------------
r60276 | svn | 2017-10-21 22:58:32 +0900 (Sat, 21 Oct 2017) | 1 line

* properties.
------------------------------------------------------------------------
r60275 | hsbt | 2017-10-21 22:58:31 +0900 (Sat, 21 Oct 2017) | 5 lines

Fixed unexpected behavior of `Resolv::MDNS#each_address` when given ".local" address.

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

  Patch by @elct9620 [fix GH-1484]
------------------------------------------------------------------------
r60274 | hsbt | 2017-10-21 22:49:39 +0900 (Sat, 21 Oct 2017) | 5 lines

Improve docs for `File.delete` exceptions.

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

  Patch by @mrtazz [fix GH-1505]
------------------------------------------------------------------------
r60273 | hsbt | 2017-10-21 22:40:12 +0900 (Sat, 21 Oct 2017) | 5 lines

Added sample code of merge! method in hash.c.

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

  Patch by @selmertsx [fix GH-1652]
------------------------------------------------------------------------
r60272 | knu | 2017-10-21 22:38:03 +0900 (Sat, 21 Oct 2017) | 1 line

Fix the issue reference to [Bug #13769], handled in r60270
------------------------------------------------------------------------
r60271 | knu | 2017-10-21 22:34:22 +0900 (Sat, 21 Oct 2017) | 1 line

Add a new test case for ipaddr 1.2.0 + drb/acl
------------------------------------------------------------------------
r60270 | knu | 2017-10-21 22:34:19 +0900 (Sat, 21 Oct 2017) | 8 lines

Import ipaddr 1.2.0

- Add IPAddr#prefix
- Add IPAddr#loopback?
- Add IPAddr#private? [Feature #11666]
- Add IPAddr#link_local? [Feature #10912]
- Reject invalid address mask [Bug #13399]
- Warn that IPAddr#ipv4_compat and #ipv4_compat? are deprecated [#Bug 13769]
------------------------------------------------------------------------
r60269 | hsbt | 2017-10-21 22:17:54 +0900 (Sat, 21 Oct 2017) | 3 lines

Rename spec/rspec to .bundle.

  It used without rspec installation for test-* task.
------------------------------------------------------------------------
r60268 | kosaki | 2017-10-21 22:15:23 +0900 (Sat, 21 Oct 2017) | 8 lines

kill "discards ?const? qualifier" warning

Kill following warning.

../../../ext/psych/yaml/emitter.c: In function ?yaml_emitter_write_block_scalar_hints?:
../../../ext/psych/yaml/emitter.c:2196:20: warning: assignment discards ?const? qualifier from pointer target type [enabled by default]
         chomp_hint = "-";
                    ^
------------------------------------------------------------------------
r60267 | kosaki | 2017-10-21 22:15:11 +0900 (Sat, 21 Oct 2017) | 8 lines

kill "discards ?const? qualifier" warning

Kill following warning.

../../../ext/psych/yaml/emitter.c: In function ?yaml_emitter_write_folded_scalar?:
../../../ext/psych/yaml/emitter.c:2283:5: warning: passing argument 2 of ?yaml_emitter_write_indicator? discards ?const? qualifier from pointer target type [enabled by default]
     if (!yaml_emitter_write_indicator(emitter, ">", 1, 0, 0))
     ^
------------------------------------------------------------------------
r60266 | akr | 2017-10-21 22:13:02 +0900 (Sat, 21 Oct 2017) | 46 lines

Deprecation document for gethostbyname,gethostbyaddr.

[Feature #13097]

I confirmed current ruby (Ruby 2.4 and trunk) uses
gethostbyname() and gethostbyaddr().

Socket.gethostbyname uses getaddrinfo() and gethostbyname().
Socket.gethostbyaddr uses gethostbyaddr().

Socket.gethostbyname uses gethostbyname() to obtain alias hostnames.

RFC 3493 defines getaddrinfo()/getnameinfo() and
describes the problems of gethostbyname()/gethostbyaddr().
The problems are difficult protocol handling and thread-unsafety.

Since Ruby has GVL, the thread-unsafety doesn't cause wrong result.
But it may block other threads until finishing DNS query.

Socket.gethostbyname has the protocol handling problem.
It returns only one address family:

```
% ruby -rpp -rsocket -e 'pp Socket.gethostbyname("www.wide.ad.jp")'
["www.wide.ad.jp",
 [],
 10,
 " \x01\x02\x00\r\xFF\xFF\xF1\x02\x16>\xFF\xFEKe\x1C",
 "\xCB\xB2\x89:"]
```

www.wide.ad.jp has one IPv6 address and one IPv4 address.
But Socket.gethostbyname returns only one address family, 10 (AF_INET6),
which is the address family of the first address.

Also, Socket.gethostbyname and Socket.gethostbyaddr uses
4-bytes binary IPv4 address and 16-bytes binary IPv6 address.
This is not usual in other socket API in Ruby.
(Most socket API uses binary sockaddr string or Addrinfo object)

I think Socket.gethostbyname and Socket.gethostbyaddr are too far
from recommendable API.

So, I added deprecation description for documents for them.


------------------------------------------------------------------------
r60265 | yui-knk | 2017-10-21 22:06:36 +0900 (Sat, 21 Oct 2017) | 4 lines

node.h: Remove a not used function prototype

* node.h (rb_node_newnode_longlife): The definition
  of this function was deleted r24490.
------------------------------------------------------------------------
r60264 | kosaki | 2017-10-21 22:02:04 +0900 (Sat, 21 Oct 2017) | 8 lines

kill "value computed is not used" warning

Currently, gcc claims your coding style is not good. Shut it up.

../../../ext/psych/yaml/emitter.c: In function ?yaml_emitter_write_plain_scalar?:
../../../ext/psych/yaml/emitter.c:28:6: warning: value computed is not used [-Wunused-value]
      && ((emitter->line_break == YAML_CR_BREAK ?                                \
      ^
------------------------------------------------------------------------
r60263 | kosaki | 2017-10-21 22:01:51 +0900 (Sat, 21 Oct 2017) | 8 lines

kill variable set but not used warning

Currently, dummy_mark variable makes following warnings. Let's fix it.

../../../ext/psych/yaml/parser.c: In function ?yaml_parser_parse_block_sequence_entry?:
../../../ext/psych/yaml/parser.c:762:21: warning: variable ?dummy_mark? set but not used [-Wunused-but-set-variable]
         yaml_mark_t dummy_mark;     /* Used to eliminate a compiler warning. */
                     ^
------------------------------------------------------------------------
r60262 | kosaki | 2017-10-21 21:57:14 +0900 (Sat, 21 Oct 2017) | 7 lines

kill "variable set but not used" warning

Currently, scanner.c makes following warning. Fix it.

../../../ext/psych/yaml/scanner.c: In function ?yaml_parser_decrease_flow_level?:
../../../ext/psych/yaml/scanner.c:1189:23: warning: variable ?dummy_key? set but not used [-Wunused-but-set-variable]
     yaml_simple_key_t dummy_key;    /* Used to eliminate a compiler warning. */
------------------------------------------------------------------------
r60261 | nobu | 2017-10-21 21:34:13 +0900 (Sat, 21 Oct 2017) | 7 lines

Fix bug about String#scanf("%a")

* lib/scanf.rb (extract_float, initialize): allow to omit a sign
  on the binary exponent.  [ruby-core:82435] [Bug #13833]
  [Fix GH-1689]

From: tarotaro0 <tarousann11922960@yahoo.co.jp>
------------------------------------------------------------------------
r60260 | akr | 2017-10-21 21:22:46 +0900 (Sat, 21 Oct 2017) | 2 lines

add example for Socket.gethostbyaddr.

------------------------------------------------------------------------
r60259 | nobu | 2017-10-21 21:18:38 +0900 (Sat, 21 Oct 2017) | 1 line

gc.c (rb_raw_obj_info): suppress a warning
------------------------------------------------------------------------
r60258 | nobu | 2017-10-21 21:18:35 +0900 (Sat, 21 Oct 2017) | 1 line

gc.c (rb_raw_obj_info): adjust indent
------------------------------------------------------------------------
r60257 | usa | 2017-10-21 21:12:52 +0900 (Sat, 21 Oct 2017) | 6 lines

Treat REG_NONE just like REG_BINARY

* ext/win32/lib/win32/registry.rb (read, write): treat REG_NONE just like
  REG_BINARY when reading and writing.
  cf. [Bug #7526]

------------------------------------------------------------------------
r60256 | kazu | 2017-10-21 20:59:08 +0900 (Sat, 21 Oct 2017) | 2 lines

Sync svn:ignore [ci skip]

------------------------------------------------------------------------
r60255 | naruse | 2017-10-21 19:44:13 +0900 (Sat, 21 Oct 2017) | 3 lines

Revert "Dir.glob with FNM_EXTGLOB is optimized [Feature #13873]"

This reverts commit r60253 because it causes on error on Linux.
------------------------------------------------------------------------
r60254 | sonots | 2017-10-21 19:33:25 +0900 (Sat, 21 Oct 2017) | 2 lines

* string.c (deleted_prefix_length, deleted_suffix_length):
  Add doxygen comment.
------------------------------------------------------------------------
r60253 | naruse | 2017-10-21 19:28:34 +0900 (Sat, 21 Oct 2017) | 3 lines

Dir.glob with FNM_EXTGLOB is optimized [Feature #13873]

The order of resulted array is changed in some cases.
------------------------------------------------------------------------
r60252 | tarui | 2017-10-21 19:26:31 +0900 (Sat, 21 Oct 2017) | 3 lines

fix comment abount IMEMO_FL_USHIFT


------------------------------------------------------------------------
r60251 | ko1 | 2017-10-21 19:23:59 +0900 (Sat, 21 Oct 2017) | 1 line

do not need to clear by NULL because of last commit
------------------------------------------------------------------------
r60250 | ko1 | 2017-10-21 19:21:31 +0900 (Sat, 21 Oct 2017) | 5 lines

imemo_mask (enum) -> IMEMO_MASK (immediate value).

* internal.h: imemo_mask is not a valid imemo type but
  switch statements show warnings.

------------------------------------------------------------------------
r60249 | knu | 2017-10-21 18:53:52 +0900 (Sat, 21 Oct 2017) | 4 lines

Make ACL::ACLEntry not suppress IPAddr::InvalidPrefixError

This is because it would be a user error because a pattern containing
a slash shouldn't be a host name pattern but an IP address pattern.
------------------------------------------------------------------------
r60248 | svn | 2017-10-21 18:50:37 +0900 (Sat, 21 Oct 2017) | 1 line

* properties.
------------------------------------------------------------------------
r60247 | hsbt | 2017-10-21 18:50:36 +0900 (Sat, 21 Oct 2017) | 4 lines

[EXPERIMENTAL] Added test-bundled-gems task.

  `test-bundled-gems` invoke test suite of bundled gems with
  build environment.
------------------------------------------------------------------------
r60246 | nobu | 2017-10-21 18:25:05 +0900 (Sat, 21 Oct 2017) | 4 lines

common.mk: preserve rest fields of bundled_gems

* common.mk (update-bundled_gems): preserve rest fields other than
  names and versions, for more extensions.
------------------------------------------------------------------------
r60245 | ko1 | 2017-10-21 18:24:59 +0900 (Sat, 21 Oct 2017) | 9 lines

add RUNRUBY_USE_GDB envvar for runruby.rb.

* tool/runruby.rb: add RUNRUBY_USE_GDB environment variable.
  If RUNRUBY_USE_GDB=true then use 'gdb --args'.
  If there is 'run.gdb' file (made by 'make run.gdb') on current directory,
  run gdb with this file ('gdb -x run.gdb --args').

  This envval is useful when you want to run test-all (and so on) with gdb.

------------------------------------------------------------------------
r60244 | nobu | 2017-10-21 18:10:42 +0900 (Sat, 21 Oct 2017) | 6 lines

fix up imemo_alloc

* internal.h (rb_imemo_alloc_struct), gc.c (gc_mark_imemo): turned
  next into the pointer to chain.

* parse.y (NEWHEAP): needs a cast.
------------------------------------------------------------------------
r60243 | nobu | 2017-10-21 17:56:58 +0900 (Sat, 21 Oct 2017) | 1 line

vcs.rb: try to extract revision number from tags
------------------------------------------------------------------------
r60242 | akr | 2017-10-21 17:44:56 +0900 (Sat, 21 Oct 2017) | 2 lines

RbConfig::LIMITS is provided by rbconfig/sizeof.

------------------------------------------------------------------------
r60241 | akr | 2017-10-21 17:41:59 +0900 (Sat, 21 Oct 2017) | 5 lines

declare variables once for each line in pathname.c.

This ease adding/deleting variables.


------------------------------------------------------------------------
r60240 | usa | 2017-10-21 17:41:22 +0900 (Sat, 21 Oct 2017) | 8 lines

Use GetSystemTimePreciseAsFileTime on recent Windows

* win32/win32.c (gettiemeofday, wutime): use GetSystemTimePreciseAsFileTime
  instead of GetSystemTimeAsFileTime if it is available.
  This patch is based on Takehiro Kubo <kubo@jiubao.org> 's one (change only
  the name of wrapper function).  Thanks! and sorry to late
  [ruby-dev:50167] [Feature #13732]

------------------------------------------------------------------------
r60239 | mame | 2017-10-21 17:40:28 +0900 (Sat, 21 Oct 2017) | 1 line

Replace NODE_ALLOCA with T_IMEMO (imemo_alloc)
------------------------------------------------------------------------
r60238 | akr | 2017-10-21 17:34:49 +0900 (Sat, 21 Oct 2017) | 4 lines

Pathname#glob method implemented.

[ruby-core:49373] [Feature #7360] proposed by Alexander E. Fischer.

------------------------------------------------------------------------
r60237 | usa | 2017-10-21 16:44:11 +0900 (Sat, 21 Oct 2017) | 5 lines

File.symlink is not potable

* test/fileutils/test_fileutils.rb: skip tests using File.symlink if it's not
  available.  this problem is reported by ko1.

------------------------------------------------------------------------
r60236 | akr | 2017-10-21 16:00:58 +0900 (Sat, 21 Oct 2017) | 7 lines

lib/open3.rb: accept IO-like object for :stdin_data argument.

Open3.capture3, Open3.capture2, Open3.capture2e accepts
IO-like object for :stdin_data argument.
[ruby-core:80936] [Feature #13527] proposed by janko.


------------------------------------------------------------------------
r60235 | k0kubun | 2017-10-21 15:57:04 +0900 (Sat, 21 Oct 2017) | 6 lines

vm.c, vm_insnhelper.h: export symbols of VM serials

This change is for future JIT compiler introduction.
See r60231 for the purpose.

[close GH-1721]
------------------------------------------------------------------------
r60234 | naruse | 2017-10-21 15:51:01 +0900 (Sat, 21 Oct 2017) | 1 line

[Feature #13712] String#start_with? supports regexp
------------------------------------------------------------------------
r60233 | akr | 2017-10-21 15:45:41 +0900 (Sat, 21 Oct 2017) | 2 lines

[DOC] describe methods used for src and dst argument.

------------------------------------------------------------------------
r60232 | akr | 2017-10-21 15:22:53 +0900 (Sat, 21 Oct 2017) | 2 lines

lib/open-uri.rb: accept :encoding option as well as encoding in mode string.

------------------------------------------------------------------------
r60231 | k0kubun | 2017-10-21 15:22:43 +0900 (Sat, 21 Oct 2017) | 10 lines

vm_core.h: export symbols of shared variables

vm_insnhelper.h: ditto.

All changes are for reducing changes required to introduce JIT compiler.
Unlike functions that can be inlined by header, those variables should
be shared with JIT-ed code. This will help reducing cost of rebase
against upstream.

[close GH-1720]
------------------------------------------------------------------------
r60230 | glass | 2017-10-21 15:11:01 +0900 (Sat, 21 Oct 2017) | 1 line

Update NEWS for Hash#slice
------------------------------------------------------------------------
r60229 | glass | 2017-10-21 15:08:33 +0900 (Sat, 21 Oct 2017) | 3 lines

hash.c: Add Hash#slice

* hash.c (rb_hash_slice): add Hash#slice [Feature #8499]
------------------------------------------------------------------------
r60228 | knu | 2017-10-21 14:18:40 +0900 (Sat, 21 Oct 2017) | 1 line

Replace `to_a[1..-1]` on a MatchData with `captures`
------------------------------------------------------------------------
r60227 | knu | 2017-10-21 14:18:38 +0900 (Sat, 21 Oct 2017) | 1 line

Remove redundant calls of String#chr
------------------------------------------------------------------------
r60226 | nobu | 2017-10-21 12:18:46 +0900 (Sat, 21 Oct 2017) | 1 line

assertion for r60225
------------------------------------------------------------------------
r60225 | yui-knk | 2017-10-21 11:50:38 +0900 (Sat, 21 Oct 2017) | 17 lines

Do not literal_flush if float is read correctly

* parse.y (parse_numeric): Do not literal_flush if
  float is read correctly. This will fix the first
  column of float.

before:
  ```
  1.2i1.1
         ^
  ```

after:
  ```
  1.2i1.1
      ^~~
  ```
------------------------------------------------------------------------
r60224 | nobu | 2017-10-21 10:06:25 +0900 (Sat, 21 Oct 2017) | 1 line

moved node generation for dregex_once to parse.y
------------------------------------------------------------------------
r60223 | yui-knk | 2017-10-21 09:14:32 +0900 (Sat, 21 Oct 2017) | 4 lines

Fix build on Windows

* parse.y (new_cdecl_gen): Rename local variable name
  from cdecl to nd_cdecl. We can not use cdecl on Windows.
------------------------------------------------------------------------
r60222 | svn | 2017-10-21 01:22:24 +0900 (Sat, 21 Oct 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r60221 | svn | 2017-10-21 01:22:24 +0900 (Sat, 21 Oct 2017) | 1 line

* 2017-10-21
------------------------------------------------------------------------
r60220 | yui-knk | 2017-10-21 01:22:22 +0900 (Sat, 21 Oct 2017) | 14 lines

Store token first column number on RNode

* node.c (A_NODE_HEADER): Print column number.
* node.h (nd_column, nd_set_column): Define getter/setter
  macros for column number of RNode.
* parse.y: Set first column number of tokens.

Notes:

* Use `@n` to get the location of token in parse.y.
* When we use `@n`, arguments of yyerror and yylex are
  changed.
* Initialize column of nodes with -1 to make it easy
  to detect nodes which we forget to set a column number.
------------------------------------------------------------------------
r60219 | hsbt | 2017-10-20 18:03:37 +0900 (Fri, 20 Oct 2017) | 3 lines

Merge rubygems master(ddbf3203f3857649abe95c73edefc7de7e6ecff4).

  It fixed: https://github.com/rubygems/rubygems/issues/2041
------------------------------------------------------------------------
r60218 | hsbt | 2017-10-20 16:03:11 +0900 (Fri, 20 Oct 2017) | 4 lines

Overwrite destination symlink file if `remove_destination` is set.

  [Bug #13914][ruby-core:82846] Patch by @mzp
  https://github.com/ruby/fileutils/pull/9
------------------------------------------------------------------------
r60217 | svn | 2017-10-20 10:03:19 +0900 (Fri, 20 Oct 2017) | 1 line

* 2017-10-20
------------------------------------------------------------------------
r60216 | nobu | 2017-10-20 10:03:18 +0900 (Fri, 20 Oct 2017) | 9 lines

Make Time.parse respect timezone offset seconds

DateTime.parse handles them correctly, and DateTime.parse.to_time
results in the correct time.  Time.parse doesn't handle them
correctly because Time.zone_offset uses a different regexp that
only considers hours and minutes, not seconds.
[ruby-core:83400] [Bug #14034]

From: Jeremy Evans <code@jeremyevans.net>
------------------------------------------------------------------------
r60215 | nobu | 2017-10-19 20:24:03 +0900 (Thu, 19 Oct 2017) | 5 lines

ruby.c: reject NUL in $0

* ruby.c (ruby_setproctitle): raise if the argument contains NUL
  char.  process title is a NUL-terminated string.
  [ruby-core:82425] [Bug #13829]
------------------------------------------------------------------------
r60214 | nobu | 2017-10-19 19:58:08 +0900 (Thu, 19 Oct 2017) | 7 lines

freeze Complex and Rational

* complex.c (nucomp_s_new_internal, nucomp_loader): Complex
  instances are always frozen now.  [Feature #13983]

* rational.c (nurat_s_new_internal, nurat_loader): Rational
  instances are always frozen now.  [Feature #13983]
------------------------------------------------------------------------
r60213 | nobu | 2017-10-19 14:10:38 +0900 (Thu, 19 Oct 2017) | 4 lines

parse.y: indent at '#'

* parse.y (parser_here_document): update indent at '#', which is
  not a space.  [ruby-core:83368] [Bug #14032]
------------------------------------------------------------------------
r60212 | nobu | 2017-10-19 13:25:30 +0900 (Thu, 19 Oct 2017) | 5 lines

lexer.rb: no dedent strings in middle

* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): dedent only
  strings at the beginning, not strings in middle.
  [ruby-core:83343] [Bug #14027]
------------------------------------------------------------------------
r60211 | normal | 2017-10-19 08:34:02 +0900 (Thu, 19 Oct 2017) | 6 lines

webrick: fix up r60172 and r60210

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

* lib/webrick/server.rb (start_thread): properly fix non-local return
  introduced in r60208 and r60210
------------------------------------------------------------------------
r60210 | normal | 2017-10-19 08:23:33 +0900 (Thu, 19 Oct 2017) | 6 lines

webrick: fix up r60172 and r60208

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

* lib/webrick/server.rb (start_thread): fix non-local return
  introduced in r60208
------------------------------------------------------------------------
r60209 | svn | 2017-10-19 06:45:35 +0900 (Thu, 19 Oct 2017) | 1 line

* 2017-10-19
------------------------------------------------------------------------
r60208 | normal | 2017-10-19 06:45:34 +0900 (Thu, 19 Oct 2017) | 9 lines

webrick: fix up r60172 and revert r60189

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

* lib/webrick/server.rb (start_thread): ignore ECONNRESET, ECONNABORTED,
  EPROTO, and EINVAL on TLS negotiation errors the same way they
  were ignored before r60172 in the accept_client method of the
  main acceptor thread.
  [Bug #14013] [Bug #14005]
------------------------------------------------------------------------
r60207 | nobu | 2017-10-18 22:08:53 +0900 (Wed, 18 Oct 2017) | 4 lines

parse.y: serial comparisons

* parse.y (rel_expr): warn sequence of comparisons, which would be
  probably unintentional.  [EXPERIMENTAL]
------------------------------------------------------------------------
r60206 | nobu | 2017-10-18 22:08:53 +0900 (Wed, 18 Oct 2017) | 3 lines

parse.y: relop

* parse.y (relop): extract to simplify comparisons.
------------------------------------------------------------------------
r60205 | svn | 2017-10-18 13:35:27 +0900 (Wed, 18 Oct 2017) | 1 line

* 2017-10-18
------------------------------------------------------------------------
r60204 | nobu | 2017-10-18 13:35:25 +0900 (Wed, 18 Oct 2017) | 1 line

Get rid of shadowing local variables
------------------------------------------------------------------------
r60203 | nobu | 2017-10-17 21:40:00 +0900 (Tue, 17 Oct 2017) | 4 lines

tempfile.rb: [DOC] all arguments [ci skip]

* lib/tempfile.rb (Tempfile.create): mention the other arguments
  too.  [ruby-core:83321] [Misc #14019]
------------------------------------------------------------------------
r60202 | nobu | 2017-10-17 21:30:12 +0900 (Tue, 17 Oct 2017) | 4 lines

node.c: all node types

* node.c (dump_node): moved rb_bug for unknown node outside to let
  unhandled node types be warned.
------------------------------------------------------------------------
r60201 | nobu | 2017-10-17 21:30:11 +0900 (Tue, 17 Oct 2017) | 1 line

node.c: adjust indent
------------------------------------------------------------------------
r60200 | nobu | 2017-10-17 21:05:32 +0900 (Tue, 17 Oct 2017) | 3 lines

compile.c: compile_for

* compile.c (compile_for): extract from iseq_compile_each.
------------------------------------------------------------------------
r60199 | nobu | 2017-10-17 21:05:30 +0900 (Tue, 17 Oct 2017) | 3 lines

compile.c: compile_iter

* compile.c (compile_iter): extract from iseq_compile_each.
------------------------------------------------------------------------
r60198 | kazu | 2017-10-17 20:58:51 +0900 (Tue, 17 Oct 2017) | 3 lines

Fix warning: assigned but unused variable

[Bug #14020][ruby-core:83313]
------------------------------------------------------------------------
r60197 | mame | 2017-10-17 20:38:16 +0900 (Tue, 17 Oct 2017) | 1 line

Improve some annotation names of output of parsetree-with-comment
------------------------------------------------------------------------
r60196 | yui-knk | 2017-10-17 20:13:53 +0900 (Tue, 17 Oct 2017) | 3 lines

node.c: Add NODE_OP_CDECL to dump node list.

* node.c (dump_node): Add NODE_OP_CDECL to dump node list.
------------------------------------------------------------------------
r60195 | mame | 2017-10-17 16:41:04 +0900 (Tue, 17 Oct 2017) | 1 line

Fix the leak in `TestRDocGeneratorDarkfish#test_generated_method_with_html_tag_yield`
------------------------------------------------------------------------
r60194 | mame | 2017-10-17 16:41:03 +0900 (Tue, 17 Oct 2017) | 12 lines

Suppress leak of file descriptors

`Bundler.ui=` in `Gem::TestCase#setup` creates `Bundler::UI::RGProxy`
which inherites `::Gem::SilentUI` whose `initialize` opens `/dev/null`,
and assigns it to `Gem::DefaultUserInteraction.ui`.
After that, `Gem::TestCase#setup` forces to overwrite
`Gem::DefaultUserInteraction.ui` with a mock.
Thus, the instance of `::Gem::SilentUI` is not closed, which leads to
the leak.

This commit keeps `Gem::DefaultUserInteraction.ui` and manually close it
in `teardown`.
------------------------------------------------------------------------
r60193 | nobu | 2017-10-17 08:11:40 +0900 (Tue, 17 Oct 2017) | 7 lines

Layout fixes in rdoc of lib/tempfile.rb [ci skip]

RDoc doesn't understand an asterisk inside the plus markers. Moving them
out of the markers looks better.
[Fix GH-1716]

From:    Herwin Weststrate <herwinw@herwinw.nl>
------------------------------------------------------------------------
r60192 | svn | 2017-10-17 04:42:34 +0900 (Tue, 17 Oct 2017) | 1 line

* 2017-10-17
------------------------------------------------------------------------
r60191 | normal | 2017-10-17 04:42:33 +0900 (Tue, 17 Oct 2017) | 3 lines

spec/ruby/optional/capi/io_spec.rb: speling fics

* spec/ruby/optional/capi/io_spec.rb: speling: s/writeable/writable/
------------------------------------------------------------------------
r60190 | nobu | 2017-10-16 14:00:21 +0900 (Mon, 16 Oct 2017) | 4 lines

configure.ac: fix SOEXT on Windows

* configure.ac (SOEXT): shoud be "dll" on Windows.
  [ruby-core:83208] [Bug #14002]
------------------------------------------------------------------------
r60189 | normal | 2017-10-16 13:33:53 +0900 (Mon, 16 Oct 2017) | 14 lines

webrick: fix up r60172

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

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

* lib/webrick/server.rb (start_thread): use SSL_accept properly
  with non-blocking socket.
  [Bug #14013] [Bug #14005]
------------------------------------------------------------------------
r60188 | nobu | 2017-10-16 13:19:48 +0900 (Mon, 16 Oct 2017) | 5 lines

test_complex.rb: NaN Complex

* test/ruby/test_complex.rb (test_finite_p): assertions for NaN
  Complex.  NaN is not an infinite nor a finite number.
  [ruby-core:83272] [Bug #14014]
------------------------------------------------------------------------
r60187 | nobu | 2017-10-16 13:15:19 +0900 (Mon, 16 Oct 2017) | 7 lines

fix missing variables in ruby.pc

* configure.ac (LIBRUBY_SO): get rid of referrence to
  LIBRUBY_SONAME which is not present in ruby.pc.

* template/ruby.pc.in (RUBY_API_VERSION, SOEXT): add new
  variables.  [ruby-core:83208] [Bug #14002]
------------------------------------------------------------------------
r60186 | svn | 2017-10-16 01:05:07 +0900 (Mon, 16 Oct 2017) | 1 line

* 2017-10-16
------------------------------------------------------------------------
r60185 | nobu | 2017-10-16 01:05:06 +0900 (Mon, 16 Oct 2017) | 4 lines

error.c: [DOC] fix typo [ci skip]

* error.c (RuntimeError): example code uses Kernel#raise instance
  method, not Kernel.raise singleton method.
------------------------------------------------------------------------
r60184 | nobu | 2017-10-15 11:31:29 +0900 (Sun, 15 Oct 2017) | 5 lines

configure.ac: fix SONAME

* configure.ac (RUBY_SO_NAME): revert $(RUBY_API_VERSION:.=) to
  $(MAJOR)$(MINOR), as a string in middle is not replaced.
  [ruby-core:83208] [Bug #14002]
------------------------------------------------------------------------
r60183 | nobu | 2017-10-15 11:20:20 +0900 (Sun, 15 Oct 2017) | 4 lines

envutil.rb: precommand in invoke_ruby [ci skip]

* test/lib/envutil.rb (invoke_ruby): add precommand option to
  invoke ruby via some other commands, e.g., sudo.
------------------------------------------------------------------------
r60182 | nobu | 2017-10-15 00:55:14 +0900 (Sun, 15 Oct 2017) | 5 lines

configure.ac: link Foundation framework

* configure.ac (XLDFLAGS): link against Foundation framework and
  let __NSPlaceholderDictionary initialize, to get rid of crash
  after fork on macOS High Sierra.  [ruby-core:83239] [Bug #14009]
------------------------------------------------------------------------
r60181 | svn | 2017-10-15 00:35:06 +0900 (Sun, 15 Oct 2017) | 1 line

* 2017-10-15
------------------------------------------------------------------------
r60180 | nobu | 2017-10-15 00:35:05 +0900 (Sun, 15 Oct 2017) | 5 lines

configure.ac: LIBRUBY_SONAME

* configure.ac (LIBRUBY_SONAME): add new variable for the name of
  the library name with compatibility version.
  [ruby-core:83208] [Bug #14002]
------------------------------------------------------------------------
r60179 | nobu | 2017-10-14 11:17:07 +0900 (Sat, 14 Oct 2017) | 6 lines

distinguish pass and fail by highlight [ci skip]

* tool/colorize.rb: remove highlight attribute from "pass" to make
  distinguishable from "fail" by other than red-green colors.

* tool/ifchange: ditto.
------------------------------------------------------------------------
r60178 | svn | 2017-10-14 10:59:48 +0900 (Sat, 14 Oct 2017) | 1 line

* 2017-10-14
------------------------------------------------------------------------
r60177 | nobu | 2017-10-14 10:59:47 +0900 (Sat, 14 Oct 2017) | 5 lines

configure.ac: no _objc_msgSend trick

* configure.ac (XLDFLAGS): _objc_msgSend is no longer needed to
  link CoreFoundation, that framework is always used for CFString
  functions.
------------------------------------------------------------------------
r60176 | nobu | 2017-10-13 17:29:52 +0900 (Fri, 13 Oct 2017) | 3 lines

defines.h: warn EXTERN

* include/ruby/defines.h (EXTERN): warn as deprecated.
------------------------------------------------------------------------
r60175 | nobu | 2017-10-13 10:34:52 +0900 (Fri, 13 Oct 2017) | 6 lines

error.c: infinite recursion at Warning#warn

* error.c (rb_warn_m): write the message to rb_stderr directly, to
  get rid of infinite recursion when called on Warning module
  itself, by super in redefined Warning#warn.
  [ruby-dev:50293] [Bug #14006]
------------------------------------------------------------------------
r60174 | nobu | 2017-10-13 10:26:51 +0900 (Fri, 13 Oct 2017) | 4 lines

rbinstall.rb: fix for --cmd-type=cmd

* tool/rbinstall.rb (PROLOG_SCRIPT): fix wrapper code for cmd
  script.  [Bug#13997]
------------------------------------------------------------------------
r60173 | svn | 2017-10-13 03:50:08 +0900 (Fri, 13 Oct 2017) | 1 line

* 2017-10-13
------------------------------------------------------------------------
r60172 | normal | 2017-10-13 03:50:07 +0900 (Fri, 13 Oct 2017) | 20 lines

webrick: do not hang acceptor on slow TLS connections

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

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

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

* lib/webrick/server.rb (accept_client): use TCPServer#accept_nonblock
  and remove OpenSSL::SSL::SSLSocket#accept call
* lib/webrick/server.rb (start_thread): call OpenSSL::SSL::SSLSocket#accept
* test/webrick/test_ssl_server.rb (test_slow_connect): new test
  [ruby-core:83221] [Bug #14005]
------------------------------------------------------------------------
r60171 | nobu | 2017-10-12 16:27:16 +0900 (Thu, 12 Oct 2017) | 4 lines

rbinstall.rb: shell code as comments

* tool/rbinstall.rb (PROLOG_SCRIPT): wrap shell code by
  =begin/=end as comments.  [ruby-core:83202] [Bug#13997]
------------------------------------------------------------------------
r60170 | svn | 2017-10-12 10:38:07 +0900 (Thu, 12 Oct 2017) | 1 line

* 2017-10-12
------------------------------------------------------------------------
r60169 | hsbt | 2017-10-12 10:38:07 +0900 (Thu, 12 Oct 2017) | 3 lines

Removed unnecessary gem locking for avoiding test warnings.

  It causes test failure: http://ci.rvm.jp/results/trunk@P895/111404
------------------------------------------------------------------------
r60167 | kazu | 2017-10-11 21:07:39 +0900 (Wed, 11 Oct 2017) | 2 lines

Sync .gitignore and svn:ignore [ci skip]

------------------------------------------------------------------------
r60166 | sonots | 2017-10-11 20:39:15 +0900 (Wed, 11 Oct 2017) | 4 lines

* .gitignore: ignore exe/ruby and exe/.time instead of bin/ruby
  because bin/ruby was renamed as exe/ruby at r59937.

follow-up: [Bug #13911]
------------------------------------------------------------------------
r60165 | nobu | 2017-10-11 17:14:50 +0900 (Wed, 11 Oct 2017) | 1 line

NEWS: refine the entry about RDoc [ci skip]
------------------------------------------------------------------------
r60164 | ko1 | 2017-10-11 17:11:16 +0900 (Wed, 11 Oct 2017) | 6 lines

revert a part of r60163.

* test/ruby/test_settracefunc.rb (test_trace_point_binding_in_ifunc):
  do not need other threads because this script is invoked by another
  ruby process (and also remove typo).

------------------------------------------------------------------------
r60163 | ko1 | 2017-10-11 16:49:03 +0900 (Wed, 11 Oct 2017) | 5 lines

check a thread on TracePoint.

* test/ruby/test_settracefunc.rb: skip if TracePoint probes are invoked by
  non-main thread.

------------------------------------------------------------------------
r60162 | nobu | 2017-10-11 15:16:04 +0900 (Wed, 11 Oct 2017) | 5 lines

socket.c: null byte at Socket.getnameinfo

* ext/socket/socket.c (sock_s_getnameinfo): check null byte.
  patched by tommy (Masahiro Tomita) in [ruby-dev:50286].
  [Bug #13994]
------------------------------------------------------------------------
r60161 | nobu | 2017-10-11 15:16:03 +0900 (Wed, 11 Oct 2017) | 4 lines

process.c: null byte at initgroups

* process.c (proc_initgroups): check null byte.  patched by
  tommy (Masahiro Tomita) in [ruby-dev:50287].  [Bug #13995]
------------------------------------------------------------------------
r60160 | nobu | 2017-10-11 14:34:24 +0900 (Wed, 11 Oct 2017) | 4 lines

parse.y: token info with BOM

* parse.y (parser_prepare): set token_info_enabled flag first,
  before returning at BOM.  [ruby-dev:50288] [Bug #13998]
------------------------------------------------------------------------
r60159 | nobu | 2017-10-11 13:45:08 +0900 (Wed, 11 Oct 2017) | 4 lines

file.c: ALT_SEPARATOR on cygwin

* file.c (file_alt_separator): define only on DOSISH platforms.
  File::ALT_SEPARATOR is nil on cygwin.
------------------------------------------------------------------------
r60158 | svn | 2017-10-11 12:44:36 +0900 (Wed, 11 Oct 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r60157 | svn | 2017-10-11 12:44:36 +0900 (Wed, 11 Oct 2017) | 1 line

* 2017-10-11
------------------------------------------------------------------------
r60156 | hsbt | 2017-10-11 12:44:35 +0900 (Wed, 11 Oct 2017) | 1 line

Added news entries of RDoc and Rubygems.
------------------------------------------------------------------------
r60155 | nobu | 2017-10-10 21:30:42 +0900 (Tue, 10 Oct 2017) | 4 lines

io.c: encoding of ARGF.inplace_mode

* io.c (argf_next_argv): encode inplace mode suffix to the path
  encoding.
------------------------------------------------------------------------
r60154 | nobu | 2017-10-10 19:42:52 +0900 (Tue, 10 Oct 2017) | 4 lines

io.c: path name conversion at ARGF

* io.c (argf_next_argv): the standard conversion to path name
  should take place.
------------------------------------------------------------------------
r60150 | svn | 2017-10-10 17:58:23 +0900 (Tue, 10 Oct 2017) | 1 line

* properties.
------------------------------------------------------------------------
r60149 | hsbt | 2017-10-10 17:58:22 +0900 (Tue, 10 Oct 2017) | 3 lines

Merge rubygems-2.6.14 changes.

  It fixed http://blog.rubygems.org/2017/10/09/unsafe-object-deserialization-vulnerability.html
------------------------------------------------------------------------
r60148 | hsbt | 2017-10-10 13:54:49 +0900 (Tue, 10 Oct 2017) | 3 lines

Removed obsoleted test for RubyToken.

  [Bug #13991][ruby-core:83188] Patch by MSP-Greg.
------------------------------------------------------------------------
r60147 | svn | 2017-10-10 11:01:01 +0900 (Tue, 10 Oct 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r60146 | hsbt | 2017-10-10 11:01:00 +0900 (Tue, 10 Oct 2017) | 6 lines

Merge rdoc-6.0.0.beta3.

  * It version introduced did you mean? feature for ri command:
    https://github.com/ruby/rdoc/pull/533
  * Removed obbsoleted ruby_token.rbb.
    [Bug #13990][ruby-core:83180]
------------------------------------------------------------------------
r60145 | svn | 2017-10-10 04:00:23 +0900 (Tue, 10 Oct 2017) | 1 line

* 2017-10-10
------------------------------------------------------------------------
r60144 | normal | 2017-10-10 04:00:22 +0900 (Tue, 10 Oct 2017) | 5 lines

webrick: avoid needless wakeup from IO.select

Since r51231 ("webrick/server.rb: stop immediately"),
there is no need to poll on the @status change every
two seconds.
------------------------------------------------------------------------
r60143 | kazu | 2017-10-09 20:20:00 +0900 (Mon, 09 Oct 2017) | 3 lines

Remove unused test files related `$SAFE>=2`

unused since r14024
------------------------------------------------------------------------
r60142 | svn | 2017-10-09 12:08:03 +0900 (Mon, 09 Oct 2017) | 1 line

* 2017-10-09
------------------------------------------------------------------------
r60141 | nobu | 2017-10-09 12:08:02 +0900 (Mon, 09 Oct 2017) | 5 lines

verconf.h.tmpl: site and vendor directories

* template/verconf.h.tmpl: disable site and vendor directories
  when removed.  based on the path by arnoldwald (arnold w) at
  [ruby-core:81563].  [Bug #13631]
------------------------------------------------------------------------
r60140 | hsbt | 2017-10-08 18:13:03 +0900 (Sun, 08 Oct 2017) | 3 lines

Removed unnecessary json loading.

  It causes test fail on http://ci.rvm.jp/results/trunk-test@frontier/101990
------------------------------------------------------------------------
r60139 | kazu | 2017-10-08 16:00:01 +0900 (Sun, 08 Oct 2017) | 1 line

Remove unnecessary `require 'thread'`
------------------------------------------------------------------------
r60138 | nobu | 2017-10-08 15:00:57 +0900 (Sun, 08 Oct 2017) | 4 lines

parse.y: fix a typo

* parse.y (f_kw): fix typo.  needs the argument value, not the
  label twice.  [ruby-core:83174] [Bug #13987]
------------------------------------------------------------------------
r60137 | nobu | 2017-10-08 14:14:18 +0900 (Sun, 08 Oct 2017) | 5 lines

.gdbinit: newline at rp_id [ci skip]

* .gdbinit (rp_id): add a newline.

* .gdbinit (print_id): should not print a newline here.
------------------------------------------------------------------------
r60136 | svn | 2017-10-08 10:32:22 +0900 (Sun, 08 Oct 2017) | 1 line

* properties.
------------------------------------------------------------------------
r60135 | svn | 2017-10-08 10:32:22 +0900 (Sun, 08 Oct 2017) | 1 line

* remove trailing spaces, append newline at EOF.
------------------------------------------------------------------------
r60134 | svn | 2017-10-08 10:32:20 +0900 (Sun, 08 Oct 2017) | 1 line

* 2017-10-08
------------------------------------------------------------------------
r60133 | hsbt | 2017-10-08 10:32:18 +0900 (Sun, 08 Oct 2017) | 4 lines

Merge rubygems master.

  This is RC version of Rubygems 2.7.0.
  https://github.com/rubygems/rubygems/commit/688fb7e83c13c3fe7c2bb03c49a2db4c82852aee
------------------------------------------------------------------------
r60132 | svn | 2017-10-07 11:23:28 +0900 (Sat, 07 Oct 2017) | 1 line

* 2017-10-07
------------------------------------------------------------------------
r60131 | nobu | 2017-10-07 11:23:27 +0900 (Sat, 07 Oct 2017) | 5 lines

zlib.c: ensure to free

* ext/zlib/zlib.c (zlib_gunzip): gz0 is a structure variable on
  the stack, no longer valid after exit by an exception.  ensure
  to free instead.  [Bug #13982]
------------------------------------------------------------------------
r60130 | nobu | 2017-10-06 22:41:37 +0900 (Fri, 06 Oct 2017) | 4 lines

zlib.c: memory leak in gunzip

* ext/zlib/zlib.c (zlib_gunzip): clear zstream to fix memory leak.
  [ruby-core:83162] [Bug #13982]
------------------------------------------------------------------------
r60129 | naruse | 2017-10-06 20:17:38 +0900 (Fri, 06 Oct 2017) | 6 lines

configure.ac: detect mandoc and set MANTYPE=doc

OpenBSD uses mandoc [Feature #13981] [ruby-core:83146]
Note: AC_PATH_PROGS_FEATURE_CHECK is autoconf 2.62 feature,
but current CRuby declares AC_PREREQ(2.67); it's safe to use.
Patched by kernigh (George Koehler)
------------------------------------------------------------------------
r60128 | nobu | 2017-10-06 15:11:25 +0900 (Fri, 06 Oct 2017) | 6 lines

.gdbinit: print_id in rp_id [ci skip]

* .gdbinit (rp_id): use print_id instead of calling
  lookup_id_str() in a debugger context.

* symbol.c (ID_ENTRY_UNIT): made visible to debuggers.
------------------------------------------------------------------------
r60127 | nobu | 2017-10-06 14:55:11 +0900 (Fri, 06 Oct 2017) | 7 lines

proc.c: super_method of included method

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

* vm_method.c (rb_callable_method_entry_without_refinements):
  return the defined class.
------------------------------------------------------------------------
r60126 | nobu | 2017-10-06 14:55:10 +0900 (Fri, 06 Oct 2017) | 1 line

proc.c: prefer name method result to inspect
------------------------------------------------------------------------
r60125 | nobu | 2017-10-06 09:15:08 +0900 (Fri, 06 Oct 2017) | 4 lines

No more ubygems in trunk

[Fix GH-1711]
Author:    MSP-Greg <MSP-Greg@users.noreply.github.com>
------------------------------------------------------------------------
r60124 | svn | 2017-10-06 06:53:54 +0900 (Fri, 06 Oct 2017) | 1 line

* 2017-10-06
------------------------------------------------------------------------
r60123 | normal | 2017-10-06 06:53:54 +0900 (Fri, 06 Oct 2017) | 7 lines

webrick: avoid unnecessary IO#sync= call

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

* lib/webrick/server.rb (accept_client): remove unnecessary
  IO#sync= call
------------------------------------------------------------------------
r60122 | hsbt | 2017-10-05 17:32:01 +0900 (Thu, 05 Oct 2017) | 8 lines

Fixed broken `bundle gem` command.

  This patch is provided by @gyugyu (Yusuke Yagyu)

  * Remove README* entry from no_install that there is no README* files except README.md.tt
  * Rename .travis.yml.tt to travis.yml.tt like gitignore.tt

  [Bug #13975][ruby-dev:50278][fix GH-1710]
------------------------------------------------------------------------
r60121 | nobu | 2017-10-05 11:35:58 +0900 (Thu, 05 Oct 2017) | 5 lines

io.c: [DOC] about buffering [ci skip]

* io.c (rb_file_initialize): [DOC] stated that non-tty file is
  buffered by the default, and added links to related methods.
  [ruby-core:83081] [Bug #13965]
------------------------------------------------------------------------
r60120 | nobu | 2017-10-05 10:53:22 +0900 (Thu, 05 Oct 2017) | 4 lines

parse.y: fix KWD2EID

* parse.y (KWD2EID): should respect the previous callback result
  for keywords.  [ruby-core:83106] [Bug #13971]
------------------------------------------------------------------------
r60119 | hsbt | 2017-10-05 10:43:47 +0900 (Thu, 05 Oct 2017) | 1 line

Fixed invalid gemspec.
------------------------------------------------------------------------
r60118 | svn | 2017-10-05 10:30:09 +0900 (Thu, 05 Oct 2017) | 1 line

* 2017-10-05
------------------------------------------------------------------------
r60117 | hsbt | 2017-10-05 10:30:08 +0900 (Thu, 05 Oct 2017) | 3 lines

Followed up [ruby-core:83093]. Update gemspec attributes.

  Added metadata for rubygems.org.
------------------------------------------------------------------------
r60116 | nobu | 2017-10-04 15:47:29 +0900 (Wed, 04 Oct 2017) | 13 lines

parse.y: fix var_field

* parse.y (mlhs_node): dispatch var_field as well as lhs.

* parse.y (lhs, var_hs): dispatch var_field before assignable
  check so it is inside assign_error at a wrong assignment, as
  well as backref_assign_error.

* parse.y (var_field_gen): wrap var_field value with the variable
  ID.

* parse.y (assignable_gen, const_decl_gen): return the callback
  result on a syntax error.
------------------------------------------------------------------------
r60115 | nobu | 2017-10-04 14:48:33 +0900 (Wed, 04 Oct 2017) | 4 lines

parse.y: reserved words as <id>

* parse.y (reswords): declare reserved words as <id> to remove
  extra cast.
------------------------------------------------------------------------
r60114 | nobu | 2017-10-04 14:30:44 +0900 (Wed, 04 Oct 2017) | 4 lines

test_sexp.rb: test for fname

* test/ripper/test_sexp.rb (test_def_fname): test for fname in def
  statement.  [ruby-core:83089] [Bug #13967]
------------------------------------------------------------------------
r60113 | nobu | 2017-10-04 13:43:00 +0900 (Wed, 04 Oct 2017) | 4 lines

parse.y: Revert r60102

* parse.y (op): do not set event ID here to dispatch on_op.
  [ruby-core:83089] [Bug #13967]
------------------------------------------------------------------------
r60112 | svn | 2017-10-04 09:04:52 +0900 (Wed, 04 Oct 2017) | 1 line

* properties.
------------------------------------------------------------------------
r60111 | normal | 2017-10-04 09:04:51 +0900 (Wed, 04 Oct 2017) | 23 lines

Dir.empty? releases GVL

This converts all slow syscalls in the Dir.empty? implementation
to release GVL.  We avoid unnecessarily GVL release and
reacquire for each slow call (opendir, readdir, closedir) and
instead only release and acquire the GVL once in the common
case.

Benchmark results show a small degradation in single-threaded
performance:
Execution time (sec)
name	trunk	built
dir_empty_p	0.689	0.758

Speedup ratio: compare with the result of `trunk' (greater is better)
name	built
dir_empty_p	0.909

* dir.c (rb_gc_for_fd_with_gvl): new function
  (nogvl_dir_empty_p): ditto
  (dir_s_empty_p): use new functions to release GVL
* benchmark/bm_dir_empty_p.rb: new benchmark
  [ruby-core:83071] [Feature #13958]
------------------------------------------------------------------------
r60110 | normal | 2017-10-04 08:47:53 +0900 (Wed, 04 Oct 2017) | 17 lines

file.c: release GVL around lstat(2)

Like stat(2), lstat(2) can be expensive on slow filesystems and
should not block other threads.  There should be a minor, but
not significant slowdowns in single-threaded performance similar
to benchmarks around the more-portable stat(2):
[ruby-core:83012] [Bug #13941]

* file.c (no_gvl_lstat): new function for rb_thread_call_without_gvl
  (lstat_without_gvl): new wrapper to replace lstat(2) calls
  (rb_file_s_lstat): s/lstat/&_without_gvl/
  (rb_file_lstat): ditto
  (rb_file_symlink_p): ditto
  (rb_file_s_ftype): ditto
  (rb_file_expand_path_internal): ditto
  (realpath_rec): ditto
  [ruby-core:83075] [Feature #13963]
------------------------------------------------------------------------
r60109 | svn | 2017-10-04 08:47:30 +0900 (Wed, 04 Oct 2017) | 1 line

* 2017-10-04
------------------------------------------------------------------------
r60108 | normal | 2017-10-04 08:47:29 +0900 (Wed, 04 Oct 2017) | 3 lines

file.c: release GVL in File.{setuid?,setgid?,sticky?}

* file.c (check3rdbyte): use rb_stat to release GVL
------------------------------------------------------------------------
r60107 | kazu | 2017-10-03 21:06:14 +0900 (Tue, 03 Oct 2017) | 1 line

Fix leaked file descriptor
------------------------------------------------------------------------
r60106 | nobu | 2017-10-03 16:51:37 +0900 (Tue, 03 Oct 2017) | 1 line

test_parser_events.rb: backref_assign_error
------------------------------------------------------------------------
r60105 | nobu | 2017-10-03 13:56:23 +0900 (Tue, 03 Oct 2017) | 5 lines

parse.y: extract callback results

* parse.y: stripping wrapping NODEs from ripper callback results,
  when storing in Array objects.  NODEs must not appear in Ruby
  level.
------------------------------------------------------------------------
r60104 | nobu | 2017-10-03 13:47:13 +0900 (Tue, 03 Oct 2017) | 1 line

parse.y: set ripper event IDs to keyword variables
------------------------------------------------------------------------
r60103 | svn | 2017-10-03 10:38:54 +0900 (Tue, 03 Oct 2017) | 1 line

* 2017-10-03
------------------------------------------------------------------------
r60102 | nobu | 2017-10-03 10:38:52 +0900 (Tue, 03 Oct 2017) | 1 line

parse.y: set ripper event ID symbols to operators
------------------------------------------------------------------------
r60101 | nobu | 2017-10-02 21:23:17 +0900 (Mon, 02 Oct 2017) | 1 line

use rb_hash_new_with_size()
------------------------------------------------------------------------
r60100 | nobu | 2017-10-02 20:43:36 +0900 (Mon, 02 Oct 2017) | 5 lines

test_call.rb: refine test_safe_call

* test/ruby/test_call.rb (test_safe_call): rhs should not be
  evaluated when the receiver is nil.  simplified the assertion
  for  [Bug #13964].
------------------------------------------------------------------------
r60099 | nobu | 2017-10-02 17:33:30 +0900 (Mon, 02 Oct 2017) | 5 lines

compile.c: fix stack consitency error

* compile.c (iseq_compile_each0): fix stack consitency error on
  attr-assign with safe navigation operator when the receiver is
  nil, should pop it too.  [ruby-core:83078] [Bug #13964]
------------------------------------------------------------------------
r60098 | glass | 2017-10-02 16:51:27 +0900 (Mon, 02 Oct 2017) | 3 lines

Revert "vm_eval.c: add rb_yield_assoc_or_values()"

This reverts commit r60095 to prevent performance degradation.
------------------------------------------------------------------------
r60097 | nobu | 2017-10-02 15:46:42 +0900 (Mon, 02 Oct 2017) | 5 lines

io.c: check null char

* io.c (ruby_set_inplace_mode): check if null is contained.  based
  on the patch by tommy (Masahiro Tomita) in [ruby-dev:50272].
  [Bug #13960]
------------------------------------------------------------------------
r60096 | nobu | 2017-10-02 15:46:41 +0900 (Mon, 02 Oct 2017) | 7 lines

test_argf.rb: indent here docs

* test/ruby/test_argf.rb (assert_src_expected): default line
  number to caller's location.

* test/ruby/test_argf.rb (test_lineno, test_lineno2): get rid of a
  bug of wrong indentation after $. in Emacs 25.3 ruby-mode.el
------------------------------------------------------------------------
r60095 | glass | 2017-10-02 14:29:11 +0900 (Mon, 02 Oct 2017) | 11 lines

vm_eval.c: add rb_yield_assoc_or_values()

The new function rb_yield_assoc_or_values() will reduce branching.

* vm_eval.c: add rb_yield_assoc_or_values()

* internal.h: ditto

* hash.c: use rb_yield_assoc_or_values()

* struct.c: ditto
------------------------------------------------------------------------
r60094 | nobu | 2017-10-02 13:06:55 +0900 (Mon, 02 Oct 2017) | 1 line

ruby-additional.el: shorten here-doc markers
------------------------------------------------------------------------
r60093 | ko1 | 2017-10-02 10:57:27 +0900 (Mon, 02 Oct 2017) | 5 lines

use `ra` instead of new variables.

* file.c (rb_file_s_rename): `struct rename_args ra` already has members
  which contain C ptrs. Pointed by MSP-Greg. Thanks!

------------------------------------------------------------------------
r60092 | ko1 | 2017-10-02 10:22:11 +0900 (Mon, 02 Oct 2017) | 4 lines

catch up r60088 for DOSISH.

* file.c (rb_file_s_rename): src and dst are used only on DOSISH env.

------------------------------------------------------------------------
r60091 | normal | 2017-10-02 06:29:27 +0900 (Mon, 02 Oct 2017) | 5 lines

NEWS: entries for GVL release in File and Dir

(more to come)

* NEWS: updates for [Bug #13941] and [Feature #13951]
------------------------------------------------------------------------
r60090 | svn | 2017-10-02 06:19:25 +0900 (Mon, 02 Oct 2017) | 1 line

* properties.
------------------------------------------------------------------------
r60089 | svn | 2017-10-02 06:19:25 +0900 (Mon, 02 Oct 2017) | 1 line

* 2017-10-02
------------------------------------------------------------------------
r60088 | normal | 2017-10-02 06:19:24 +0900 (Mon, 02 Oct 2017) | 23 lines

File#rename releases GVL

rename(2) requires two pathname resolution operations which can
take considerable time on slow filesystems, release the GVL so
operations on other threads may proceed.

On fast, local filesystems, this change results in some slowdown
as shown by the new benchmark.  I consider the performance trade
off acceptable as cases are avoided.

benchmark results:
minimum results in each 3 measurements.
Execution time (sec)
name	trunk	built
file_rename	2.648	2.804

Speedup ratio: compare with the result of `trunk' (greater is better)
name	built
file_rename	0.944

* file.c (no_gvl_rename): new function
  (rb_file_s_rename): release GVL for renames
* benchmark/bm_file_rename.rb: new benchmark
------------------------------------------------------------------------
r60087 | svn | 2017-10-01 22:44:50 +0900 (Sun, 01 Oct 2017) | 1 line

* properties.
------------------------------------------------------------------------
r60086 | glass | 2017-10-01 22:44:49 +0900 (Sun, 01 Oct 2017) | 7 lines

string.c: avoid unnecessary call of str_strlen()

* string.c (rb_strseq_index): refactor and avoid
  call of str_strlen() when offset == 0.
  it will improve performance of String#index and #include?

* benchmark/bm_string_index.rb: benchmark for this change
------------------------------------------------------------------------
r60085 | glass | 2017-10-01 13:26:25 +0900 (Sun, 01 Oct 2017) | 9 lines

use rb_hash_new_with_size()

* hash.c: use rb_hash_new_with_size().

* marshal.c: ditto

* struct.c: ditto

* vm_args.c: ditto
------------------------------------------------------------------------
r60084 | nobu | 2017-10-01 12:46:59 +0900 (Sun, 01 Oct 2017) | 1 line

common.mk (UNICODE_DOWNLOAD): set cache directory
------------------------------------------------------------------------
r60083 | nobu | 2017-10-01 11:39:22 +0900 (Sun, 01 Oct 2017) | 3 lines

generic_erb.rb: -i option

* tool/generic_erb.rb: -i option to merge multiple template files.
------------------------------------------------------------------------
r60082 | nobu | 2017-10-01 11:24:11 +0900 (Sun, 01 Oct 2017) | 5 lines

test_refinement.rb: test for r59946

* test/ruby/test_refinement.rb (test_dsym_literal): test for
  r59946, interning dynamic symbol should not be affected by
  refinements too.
------------------------------------------------------------------------
r60081 | normal | 2017-10-01 10:44:47 +0900 (Sun, 01 Oct 2017) | 12 lines

file.c: remove unnecessary volatile use

For apply2files, all callers use the `path' VALUE for
generating exceptions, so there is no need to guard it.
In realpath_rec, RB_GC_GUARD is already used on link_orig.

In rb_check_realpath_internal, RB_GC_GUARD is necessary and
preferable (see Appendix E. of doc/extension.rdoc)

* file.c (apply2files): remove unnecessary volatile
  (realpath_rec): ditto
  (rb_check_realpath_internal): ditto, and add RB_GC_GUARD
------------------------------------------------------------------------
r60080 | svn | 2017-10-01 06:50:42 +0900 (Sun, 01 Oct 2017) | 1 line

* 2017-10-01
------------------------------------------------------------------------
r60079 | normal | 2017-10-01 06:50:42 +0900 (Sun, 01 Oct 2017) | 6 lines

thread_pthread.c: do not wakeup inside child processes

* thread_pthread.c (rb_thread_wakeup_timer_thread): check
  ownership before incrementing
  (rb_thread_wakeup_timer_thread_low): ditto
  [Bug #13794] [ruby-core:83064]
------------------------------------------------------------------------
r60078 | glass | 2017-09-30 22:14:09 +0900 (Sat, 30 Sep 2017) | 1 line

hash.c: use rb_hash_new_with_size()
------------------------------------------------------------------------
r60077 | nobu | 2017-09-30 21:26:23 +0900 (Sat, 30 Sep 2017) | 4 lines

eval.c: check type

* eval.c (ignored_block): check argument type, which must be
  Module.  [ruby-dev:50270] [Bug #13956]
------------------------------------------------------------------------
r60076 | glass | 2017-09-30 20:58:33 +0900 (Sat, 30 Sep 2017) | 9 lines

hash.c: remove special treatments on deletion

st.c was improved in r56650 that it permits deletion during iteration.
In this commit, special treatments for previous implementation are
removed.

* hash.c: don't use *_check and *_safe functions in st.c

* internal.h: remove HASH_DELETED flag
------------------------------------------------------------------------
r60075 | nobu | 2017-09-30 20:50:14 +0900 (Sat, 30 Sep 2017) | 1 line

dbm.c: suppress unused-but-set-variable warning
------------------------------------------------------------------------
r60074 | nobu | 2017-09-30 20:06:05 +0900 (Sat, 30 Sep 2017) | 1 line

gdbm.c: use the default external encoding
------------------------------------------------------------------------
r60073 | glass | 2017-09-30 18:27:30 +0900 (Sat, 30 Sep 2017) | 4 lines

configure.ac: remove --enable-pthread option.

* configure.ac: remove --enable-pthread option.
  it was obsoleted in 2009.
------------------------------------------------------------------------
r60072 | nobu | 2017-09-30 18:07:13 +0900 (Sat, 30 Sep 2017) | 1 line

dbm.c: removed useless assignments
------------------------------------------------------------------------
r60071 | nobu | 2017-09-30 17:35:23 +0900 (Sat, 30 Sep 2017) | 3 lines

ext: check if null byte is contained

[ruby-dev:50267] [Bug #13953]
------------------------------------------------------------------------
r60070 | glass | 2017-09-30 15:45:24 +0900 (Sat, 30 Sep 2017) | 1 line

configure.ac: remove unused macro
------------------------------------------------------------------------
r60069 | nobu | 2017-09-30 15:42:24 +0900 (Sat, 30 Sep 2017) | 1 line

ripper/lexer.rb: remove double quotes
------------------------------------------------------------------------
r60068 | glass | 2017-09-30 15:30:44 +0900 (Sat, 30 Sep 2017) | 4 lines

configure.ac: use m4_version_prereq

* configure.ac: use m4_version_prereq to check
  running autoconf version.
------------------------------------------------------------------------
r60067 | ktsj | 2017-09-30 12:31:32 +0900 (Sat, 30 Sep 2017) | 4 lines

test_find.rb: improve branch coverage

* test/test_find.rb (test_to_path): add a test
  for to_path conversion.
------------------------------------------------------------------------
r60066 | nobu | 2017-09-30 09:01:23 +0900 (Sat, 30 Sep 2017) | 5 lines

string.c: fix ASCII-only on succ

* string.c (str_succ): clear coderange cache when no alpha-numeric
  character case, carried part may become ASCII-only.
  [ruby-core:83062] [Bug #13952]
------------------------------------------------------------------------
r60065 | nobu | 2017-09-30 08:41:19 +0900 (Sat, 30 Sep 2017) | 4 lines

sizes.c.tmpl: prototype

* template/sizes.c.tmpl (Init_limits): turned a K&R style
  declaration into a prototype declaration.
------------------------------------------------------------------------
r60064 | svn | 2017-09-30 02:19:38 +0900 (Sat, 30 Sep 2017) | 1 line

* 2017-09-30
------------------------------------------------------------------------
r60063 | sonots | 2017-09-30 02:19:37 +0900 (Sat, 30 Sep 2017) | 5 lines

test_etc.rb: fix test_getgrnam for duplicated group names

* test/etc/test_etc.rb: Etc.getgrnam would not return the first entry in the order of Etc.group for duplicated group names.

follow-up: [Bug #6935]
------------------------------------------------------------------------
r60062 | nobu | 2017-09-29 22:21:17 +0900 (Fri, 29 Sep 2017) | 8 lines

configure.ac

* configure.ac: renamed configure.in.  [Feature #13946]

* Makefile.in, common.mk, ext/rbconfig/sizeof/depend: use
  configure.ac.

* README.ja.md, README.md: update document for configure.ac.
------------------------------------------------------------------------
r60061 | kazu | 2017-09-29 20:00:00 +0900 (Fri, 29 Sep 2017) | 3 lines

Use unpack1 instead of unpack and `[0]`

[Feature #13943][ruby-core:83027]
------------------------------------------------------------------------
r60060 | nobu | 2017-09-29 17:15:50 +0900 (Fri, 29 Sep 2017) | 4 lines

string.c: ASCII-incompatible is not ASCII only

* string.c (tr_trans): ASCII-incompatible encoding strings cannot
  be ASCII-only even if valid.  [ruby-core:83056] [Bug #13950]
------------------------------------------------------------------------
r60059 | nobu | 2017-09-29 17:00:47 +0900 (Fri, 29 Sep 2017) | 4 lines

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

* pack.c (pack_unpack_internal): set ASCII only properly on "M",
  may be ASCII only.  [ruby-core:83055] [Bug #13949]
------------------------------------------------------------------------
r60058 | svn | 2017-09-29 16:43:23 +0900 (Fri, 29 Sep 2017) | 1 line

* 2017-09-29
------------------------------------------------------------------------
r60057 | nobu | 2017-09-29 16:43:22 +0900 (Fri, 29 Sep 2017) | 47 lines

array.c: improve operations on small arrays

[Feature #13884]

Reduce number of memory allocations for "and", "or" and "diff"
operations on small arrays

Very often, arrays are used to filter parameters and to select
interesting items from 2 collections and very often these
collections are small enough, for example:

```ruby
SAFE_COLUMNS = [:id, :title, :created_at]

def columns
  @all_columns & SAFE_COLUMNS
end
```

In this patch, I got rid of unnecessary memory allocations for
small arrays when "and", "or" and "diff" operations are performed.

name             | HEAD  | PATCH
-----------------+------:+------:
array_small_and  | 0.615 | 0.263
array_small_diff | 0.676 | 0.282
array_small_or   | 0.953 | 0.463

name             | PATCH
-----------------+------:
array_small_and  | 2.343
array_small_diff | 2.392
array_small_or   | 2.056

name             | HEAD  | PATCH
-----------------+------:+------:
array_small_and  | 1.429 | 1.005
array_small_diff | 1.493 | 0.878
array_small_or   | 1.672 | 1.152

name             | PATCH
-----------------+------:
array_small_and  | 1.422
array_small_diff | 1.700
array_small_or   | 1.452

Author:    Dmitry Bochkarev <dimabochkarev@gmail.com>
------------------------------------------------------------------------
r60056 | shirosaki | 2017-09-28 22:55:48 +0900 (Thu, 28 Sep 2017) | 6 lines

test_dln.rb: fix path separator on MinGW

* test/-ext-/win32/test_dln.rb (TestDln#test_check_imported):
  RbConfig::CONFIG["PATH_SEPARATOR"] is : which is a separator on
  msys2 shell building ruby. Use File::PATH_SEPARATOR ; on test.
  [Bug #13642] [ruby-core:81623]
------------------------------------------------------------------------
r60055 | shirosaki | 2017-09-28 22:43:21 +0900 (Thu, 28 Sep 2017) | 9 lines

io.c: fix segfault with closing socket on Windows

* io.c (fptr_finalize_flush): add an argument to keep GVL.
* io.c (fptr_finalize): adjust for above change.
* io.c (io_close_fptr): closing without GVL causes another
  exception while raising exception in another thread. This causes
  segfault on Windows. Keep GVL while closing when another thread
  raises.
  [Bug #13856] [ruby-core:82602]
------------------------------------------------------------------------
r60054 | naruse | 2017-09-28 19:51:37 +0900 (Thu, 28 Sep 2017) | 1 line

Net::HTTP.new: Support no_proxy parameter [Feature #11195]
------------------------------------------------------------------------
r60053 | naruse | 2017-09-28 19:51:31 +0900 (Thu, 28 Sep 2017) | 3 lines

URI::Generic: Separate no_proxy handling

To share with Net::HTTP. see #11195
------------------------------------------------------------------------
r60052 | svn | 2017-09-28 18:20:00 +0900 (Thu, 28 Sep 2017) | 1 line

* properties.
------------------------------------------------------------------------
r60051 | eregon | 2017-09-28 18:19:59 +0900 (Thu, 28 Sep 2017) | 1 line

Update to ruby/spec@691755d
------------------------------------------------------------------------
r60050 | eregon | 2017-09-28 18:19:19 +0900 (Thu, 28 Sep 2017) | 1 line

Update to ruby/mspec@c135328
------------------------------------------------------------------------
r60049 | nobu | 2017-09-28 11:51:41 +0900 (Thu, 28 Sep 2017) | 4 lines

test_io_console.rb: flush

* test/io/console/test_io_console.rb: flush to ensure the second
  data is sent.
------------------------------------------------------------------------
r60048 | svn | 2017-09-28 06:55:33 +0900 (Thu, 28 Sep 2017) | 1 line

* 2017-09-28
------------------------------------------------------------------------
r60047 | naruse | 2017-09-28 06:55:32 +0900 (Thu, 28 Sep 2017) | 4 lines

Remove DevKit path, change zlib link

by MSP-Greg <MSP-Greg@users.noreply.github.com>
fix https://github.com/ruby/ruby/pull/1708
------------------------------------------------------------------------
r60046 | kazu | 2017-09-27 21:32:57 +0900 (Wed, 27 Sep 2017) | 1 line

Fix exception class [ci skip]
------------------------------------------------------------------------
r60045 | duerst | 2017-09-27 16:47:13 +0900 (Wed, 27 Sep 2017) | 1 line

improve grammar in documentation of Array#bsearch [ci skip]
------------------------------------------------------------------------
r60044 | nobu | 2017-09-27 14:27:07 +0900 (Wed, 27 Sep 2017) | 1 line

pty.c: shrink repeated device names
------------------------------------------------------------------------
r60043 | nobu | 2017-09-27 14:27:06 +0900 (Wed, 27 Sep 2017) | 1 line

objspace_dump.c: remove unnecessary break
------------------------------------------------------------------------
r60042 | nobu | 2017-09-27 14:08:53 +0900 (Wed, 27 Sep 2017) | 1 line

ext: adjust indent [ci skip]
------------------------------------------------------------------------
r60041 | nobu | 2017-09-27 11:55:03 +0900 (Wed, 27 Sep 2017) | 4 lines

complex.c: no overflow

* complex.c (rb_complex_infinite_p): get rid of overflow and
  unnecessary multiplication.
------------------------------------------------------------------------
r60040 | nobu | 2017-09-27 11:38:51 +0900 (Wed, 27 Sep 2017) | 4 lines

complex.c: no overflow

* complex.c (rb_complex_finite_p): get rid of overflow and
  unnecessary multiplication.
------------------------------------------------------------------------
r60039 | svn | 2017-09-27 10:01:27 +0900 (Wed, 27 Sep 2017) | 1 line

* 2017-09-27
------------------------------------------------------------------------
r60038 | nobu | 2017-09-27 10:01:26 +0900 (Wed, 27 Sep 2017) | 1 line

* complex.c: fix Complex#infinite? return value. Because nucomp_abs never returns negative value.
------------------------------------------------------------------------
r60037 | nobu | 2017-09-27 08:28:07 +0900 (Wed, 27 Sep 2017) | 4 lines

Show rb_data_type_t definition [ci skip]

[Fix GH-1707]
Author:    hkdnet <hkdnet@users.noreply.github.com>
------------------------------------------------------------------------
r60036 | nobu | 2017-09-27 08:28:06 +0900 (Wed, 27 Sep 2017) | 4 lines

Fix a reference [ci skip]

[Fix GH-1706]
Author:    hkdnet <hkdnet@users.noreply.github.com>
------------------------------------------------------------------------
r60035 | naruse | 2017-09-26 23:00:25 +0900 (Tue, 26 Sep 2017) | 4 lines

Make retries for Net::HTTP configurable [Feature #10674]

by stereobooster
fix https://github.com/ruby/ruby/pull/1654
------------------------------------------------------------------------
r60034 | nobu | 2017-09-26 22:40:14 +0900 (Tue, 26 Sep 2017) | 1 line

parse.y: moved duplicate conditions
------------------------------------------------------------------------
r60033 | nobu | 2017-09-26 21:21:51 +0900 (Tue, 26 Sep 2017) | 1 line

Suppress warnings by other than self-assignments
------------------------------------------------------------------------
r60032 | k0kubun | 2017-09-26 20:50:07 +0900 (Tue, 26 Sep 2017) | 13 lines

erb.rb: drop unreachable method

This seems to be unreachable from first introduction at r21286.

In ERB implementation, `#empty?` is only called for each member of
return value of `String#scan`, and `ERB::Compiler::PercentLine` is never
returned from `String#scan`.

Also, in `ERB::Compiler#compile`, as it's yielded only when stag is nil,
methods called to `ERB::Compiler::PercentLine` object yielded from
`ERB::Compiler::TrimScanner#scan` are only: `#nil?`, `#==`, `to_s`.

Thus `ERB::Compiler::PercentLine#empty?` is never used.
------------------------------------------------------------------------
r60031 | k0kubun | 2017-09-26 20:30:45 +0900 (Tue, 26 Sep 2017) | 1 line

test_erb.rb: add test cases for uncovered methods
------------------------------------------------------------------------
r60030 | k0kubun | 2017-09-26 19:45:14 +0900 (Tue, 26 Sep 2017) | 3 lines

test_features.rb: fix unused variable warning

test/csv/test_features.rb:357: warning: assigned but unused variable - csv
------------------------------------------------------------------------
r60029 | mame | 2017-09-26 13:59:39 +0900 (Tue, 26 Sep 2017) | 1 line

run-lcov.rb: support overwritten tmpdir path
------------------------------------------------------------------------
r60028 | mame | 2017-09-26 13:51:09 +0900 (Tue, 26 Sep 2017) | 1 line

tool/run-lcov.rb: Filter tmp files out
------------------------------------------------------------------------
r60027 | nobu | 2017-09-26 13:13:37 +0900 (Tue, 26 Sep 2017) | 28 lines

Release gvl while doing (f)stat

At the moment rb_stat function is blocking. This patch changes the
behaviour to release the gvl while waiting for OS to return from
f(stat).

There is behaviour impact, but not significant (times are for 100000
iterations):

   $ ~/releaseruby_patch/bin/ruby bench.rb
Rehearsal ------------------------------------------------
File.exist?:   0.036412   0.056616   0.093028 (  0.093075)
--------------------------------------- total: 0.093028sec

                   user     system      total        real
File.exist?:   0.042953   0.049783   0.092736 (  0.092804)

   $ ~/releaseruby_no_patch/bin/ruby bench.rb
Rehearsal ------------------------------------------------
File.exist?:   0.056094   0.026293   0.082387 (  0.082389)
--------------------------------------- total: 0.082387sec

                   user     system      total        real
File.exist?:   0.037250   0.046702   0.083952 (  0.083956)

Based on the patch by Wolf <wolf@wolfsden.cz> at [ruby-core:83012],
with using `rb_thread_io_blocking_region` for `fstat`.
[Bug #13941]
------------------------------------------------------------------------
r60026 | nobu | 2017-09-26 09:07:41 +0900 (Tue, 26 Sep 2017) | 5 lines

test_drb.rb: removed extra spaces

* test/drb/test_drb.rb (TestDRbLarge#test_02_large_ary): removed
  unnecessary extra spaces which make the following parentheses an
  expression.
------------------------------------------------------------------------
r60025 | nobu | 2017-09-26 06:52:00 +0900 (Tue, 26 Sep 2017) | 4 lines

vm.c: unused function

* vm.c (rb_vm_jump_tag_but_local_jump): no longer used since
  r51292.
------------------------------------------------------------------------
r60024 | nobu | 2017-09-26 06:51:56 +0900 (Tue, 26 Sep 2017) | 5 lines

vm.c: fetch retval iff necessary

* vm.c (rb_vm_make_jump_tag_but_local_jump): get rid of fetching
  retval when it is not used.  it is necessary for local jump
  state only.
------------------------------------------------------------------------
r60023 | svn | 2017-09-26 02:38:43 +0900 (Tue, 26 Sep 2017) | 1 line

* 2017-09-26
------------------------------------------------------------------------
r60022 | naruse | 2017-09-26 02:38:42 +0900 (Tue, 26 Sep 2017) | 4 lines

Switch Build to use 2.4 with certs files

patched by MSP-Greg <MSP-Greg@users.noreply.github.com>
fix https://github.com/ruby/ruby/pull/1702
------------------------------------------------------------------------
r60021 | naruse | 2017-09-25 23:28:53 +0900 (Mon, 25 Sep 2017) | 1 line

HTTPHeader#add_field should allow binary [Bug #13926]
------------------------------------------------------------------------
r60020 | mame | 2017-09-25 23:04:59 +0900 (Mon, 25 Sep 2017) | 3 lines

tool/run-lcov.rb: Filter test files out

And refactoring.
------------------------------------------------------------------------
r60019 | naruse | 2017-09-25 17:19:10 +0900 (Mon, 25 Sep 2017) | 7 lines

Fix overflow detection for LLP64 arch [Bug #13748]

FIXNUMs are expected to fit into a long type, but the test is about a
VALUE type. Since long is < than VALUE on LLP64, the overflow is not
detected. As a result "2**31" evaluates to "-2147483648" on Windows with
gcc-7.1.0.
patched by Lars Kanis <lars@greiz-reinsdorf.de>
------------------------------------------------------------------------
r60018 | nobu | 2017-09-25 15:31:38 +0900 (Mon, 25 Sep 2017) | 6 lines

configure.in: install_name without teeny

* configure.in (RUBY_API_VERSION): remove teeny from install_name
  to allow link extension libraries for the same minor version.
  patched by kimuraw (Wataru Kimura) at [ruby-dev:50262].
  [Bug #13931]
------------------------------------------------------------------------
r60017 | naruse | 2017-09-25 15:20:10 +0900 (Mon, 25 Sep 2017) | 1 line

Time#at receives 3rd argument which specifies the unit of 2nd argument [Feature #13919]
------------------------------------------------------------------------
r60016 | sonots | 2017-09-25 15:05:52 +0900 (Mon, 25 Sep 2017) | 3 lines

thread.c: Use 'Class.new' instead of 'Class::new' in doc codes.

patched by Herwin [Fix GH-1700]
------------------------------------------------------------------------
r60015 | yui-knk | 2017-09-25 09:09:44 +0900 (Mon, 25 Sep 2017) | 8 lines

test/ruby/test_iseq.rb: Skip test_safe_call_chain if Coverage is running.

Follow up to r59990.
When Coverage is running, trace2 instructions are inserted
to take branch coverages for safe method invocations.
This insertion makes safe call chains unable to be optimized
and breaks this test case.
So we test it only when Coverage is not running.
------------------------------------------------------------------------
r60014 | svn | 2017-09-25 01:26:23 +0900 (Mon, 25 Sep 2017) | 1 line

* 2017-09-25
------------------------------------------------------------------------
r60013 | rhe | 2017-09-25 01:26:22 +0900 (Mon, 25 Sep 2017) | 32 lines

openssl: import e72d960db262

Sync with master branch of ruby/openssl.git to import changes in
v2.1.0.beta1..v2.0.6. The commit log since v2.1.0.beta1 which was
imported by r59734 can be found at:

	https://github.com/ruby/openssl/compare/v2.1.0.beta1...e72d960db262

----------------------------------------------------------------
Kazuki Yamaguchi (16):
      test/test_pair: fix test_write_nonblock{,_no_exceptions}
      x509name: fix a typo in docs
      test/test_fips: skip if setting FIPS mode fails
      test/test_asn1: fix possible failure in test_utctime
      test/test_ssl: suppress warning in test_alpn_protocol_selection_cancel
      test/test_pair: disable compression
      test/test_ssl: skip tmp_ecdh_callback test for LibreSSL >= 2.6.1
      test/test_ssl: do not run NPN tests for LibreSSL >= 2.6.1
      tool/ruby-openssl-docker: update
      test/test_pair: replace sleep with IO.select
      ssl: prevent SSLSocket#sysread* from leaking uninitialized data
      ossl.c: use struct CRYPTO_dynlock_value for non-dynamic locks
      ossl.c: make legacy locking callbacks reentrant
      test/test_engine: suppress stderr
      test/test_engine: check if RC4 is supported
      Ruby/OpenSSL 2.0.6

SHIBATA Hiroshi (1):
      To use upstream url of github

nobu (1):
      ruby.h: unnormalized Fixnum value
------------------------------------------------------------------------
r60012 | nobu | 2017-09-24 19:07:21 +0900 (Sun, 24 Sep 2017) | 3 lines

common.mk: force link exe/ruby

* common.mk (exe/ruby): force link exe/ruby with miniruby.
------------------------------------------------------------------------
r60011 | nobu | 2017-09-24 18:44:26 +0900 (Sun, 24 Sep 2017) | 4 lines

test_gc.rb: relax criterion

* test/ruby/test_gc.rb (TestGc#test_expand_heap): relax the
  criterion and compare by epsilon.
------------------------------------------------------------------------
r60010 | nobu | 2017-09-24 18:35:09 +0900 (Sun, 24 Sep 2017) | 4 lines

gem.rb: load rubygems.rb

* test/rubygems/test_gem.rb: load rubygems.rb explicitly, for the
  case configured as --disable-rubygems.
------------------------------------------------------------------------
r60009 | hsbt | 2017-09-24 17:10:08 +0900 (Sun, 24 Sep 2017) | 1 line

Added NEWS entry for r60008
------------------------------------------------------------------------
r60008 | hsbt | 2017-09-24 16:52:25 +0900 (Sun, 24 Sep 2017) | 5 lines

Removed ubygems.rb. rubygems.rb is always loaded now.

  * tool/sync_default_gems.rb: removed ubygems.rb from sync target.
  * test/rubygems/test_gem.rb: only enable "-rubygems" option when
    running under the Ruby 1.9.
------------------------------------------------------------------------
r60007 | nobu | 2017-09-24 14:22:23 +0900 (Sun, 24 Sep 2017) | 4 lines

load.c: fix rb_load_protect condition

* load.c (rb_load_protect): fix the condition to load the found
  file.  fixup of r59155.
------------------------------------------------------------------------
r60006 | nobu | 2017-09-24 10:48:25 +0900 (Sun, 24 Sep 2017) | 6 lines

ruby-runner.c: RUBYLIB

* ruby-runner.c (insert_env_path): extracted the function which
  insert path list to an environment variable.

* ruby-runner.c (main): append library paths to RUBYLIB.
------------------------------------------------------------------------
r60005 | nobu | 2017-09-24 09:15:02 +0900 (Sun, 24 Sep 2017) | 4 lines

common.mk: link exe/ruby

* common.mk (exe/ruby): make fixed name symbolic link exe/ruby to
  exe/$(PROGRAM), to run hardcoded bundler tests.
------------------------------------------------------------------------
r60004 | svn | 2017-09-24 08:58:25 +0900 (Sun, 24 Sep 2017) | 1 line

* 2017-09-24
------------------------------------------------------------------------
r60003 | mame | 2017-09-24 08:58:24 +0900 (Sun, 24 Sep 2017) | 4 lines

test/coverage/test_coverage.rb: Refactor coverage tests.

Add `assert_coverage` to invoke Ruby script under coverage measurement
and to compare the result with an expected value.
------------------------------------------------------------------------
r60002 | nobu | 2017-09-23 16:09:07 +0900 (Sat, 23 Sep 2017) | 6 lines

dup String#split return value

* string.c (rb_str_split): return duplicated receiver, when no
  splits.  patched by tompng (tomoya ishida) in [ruby-core:82911],
  and the test case by Seiei Miyagi <hanachin@gmail.com>.
  [Bug#13925] [Fix GH-1705]
------------------------------------------------------------------------
r60001 | nobu | 2017-09-23 16:09:06 +0900 (Sat, 23 Sep 2017) | 6 lines

dup String#rpartition return value

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

Author:    Seiei Miyagi <hanachin@gmail.com>
------------------------------------------------------------------------
r60000 | nobu | 2017-09-23 16:09:05 +0900 (Sat, 23 Sep 2017) | 6 lines

dup String#partition return value

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

Author:    Seiei Miyagi <hanachin@gmail.com>
------------------------------------------------------------------------
r59999 | nobu | 2017-09-23 15:49:35 +0900 (Sat, 23 Sep 2017) | 5 lines

parse.y: token type by identifer ID type

* parse.y (parse_ident): leave identifier type decision (local or
  const) to rb_enc_symname_type, and set the token type by ID
  type.
------------------------------------------------------------------------
r59998 | nobu | 2017-09-23 15:49:34 +0900 (Sat, 23 Sep 2017) | 3 lines

parse.y: missing semicolon

* parse.y (stmt_or_begin): fix missing semicolon.
------------------------------------------------------------------------
r59997 | hsbt | 2017-09-23 13:37:58 +0900 (Sat, 23 Sep 2017) | 3 lines

removed bin/bundle_ruby, It was ignored upstream gemspec.

  * spec/bundler/other/*: Marked exclude tags for ruby repository.
------------------------------------------------------------------------
r59996 | hsbt | 2017-09-23 11:57:12 +0900 (Sat, 23 Sep 2017) | 1 line

update section styles for psych, rubygems, bundler.
------------------------------------------------------------------------
r59995 | hsbt | 2017-09-23 11:55:07 +0900 (Sat, 23 Sep 2017) | 4 lines

Added sections of pysch library to LEGAL.

  * ext/psych/yaml/LICENSE: Integrate libyaml license to LEGAL and
    removed this file from repository.
------------------------------------------------------------------------
r59994 | hsbt | 2017-09-23 11:37:55 +0900 (Sat, 23 Sep 2017) | 1 line

Added bundler's license to LEGAL.
------------------------------------------------------------------------
r59993 | hsbt | 2017-09-23 11:26:10 +0900 (Sat, 23 Sep 2017) | 1 line

Added missing "ubygems.rb" file of rubygems to LEGAL.
------------------------------------------------------------------------
r59992 | hsbt | 2017-09-23 11:24:27 +0900 (Sat, 23 Sep 2017) | 1 line

Integrate LICENSE file of rubygems to LEGAL.
------------------------------------------------------------------------
r59991 | svn | 2017-09-23 09:17:36 +0900 (Sat, 23 Sep 2017) | 1 line

* 2017-09-23
------------------------------------------------------------------------
r59990 | yui-knk | 2017-09-23 09:17:35 +0900 (Sat, 23 Sep 2017) | 1 line

Enable to take branch coverages for safe method invocations
------------------------------------------------------------------------
r59989 | nobu | 2017-09-22 20:21:34 +0900 (Fri, 22 Sep 2017) | 8 lines

Update trick2013/yhara for Ruby 2.4

I need to raise LocalJumpError here (for the first "J" of the
output "JUST ANOTHER RUBY HACKER"), but this `return` does
not raise error in Ruby 2.4.

[Fix GH-1703]
Author:    Yutaka HARA <yutaka.hara+github@gmail.com>
------------------------------------------------------------------------
r59988 | nobu | 2017-09-22 13:56:24 +0900 (Fri, 22 Sep 2017) | 4 lines

numeric.c: reduced repeated calls

* numeric.c (rb_num2ll, rb_num2ull, fix_pow): turn repeated
  RFLOAT_VALUE calls into local variables.
------------------------------------------------------------------------
r59987 | svn | 2017-09-22 12:05:03 +0900 (Fri, 22 Sep 2017) | 1 line

* 2017-09-22
------------------------------------------------------------------------
r59986 | nobu | 2017-09-22 12:05:02 +0900 (Fri, 22 Sep 2017) | 5 lines

numeric.c: use NUM2DBL

* numeric.c (fix_fdiv_double), bignum.c (rb_big_fdiv_double): use
  NUM2DBL on unknown object.  RFLOAT_VALUE is only appliicable to
  T_FLOAT object.  [ruby-core:82924] [Bug #13928]
------------------------------------------------------------------------
r59985 | nobu | 2017-09-21 21:26:16 +0900 (Thu, 21 Sep 2017) | 4 lines

gmake.mk: order test-bundler

* defs/gmake.mk (ORDERED_TEST_TARGETS): order test-bundler too to
  get rid of mixing outputs.
------------------------------------------------------------------------
r59984 | nobu | 2017-09-21 16:29:20 +0900 (Thu, 21 Sep 2017) | 5 lines

load.c: real path to load

* load.c (rb_construct_expanded_load_path): expand load paths to
  real paths to get rid of duplicate loading from symbolic-linked
  directories.  [Feature #10222]
------------------------------------------------------------------------
r59983 | nobu | 2017-09-21 16:29:16 +0900 (Thu, 21 Sep 2017) | 5 lines

file.c: rb_check_realpath

* file.c (rb_check_realpath): returns real path which has no
  symbolic links.  similar to rb_realpath except for returning
  Qnil if any parts did not exist.
------------------------------------------------------------------------
r59982 | eregon | 2017-09-21 07:02:10 +0900 (Thu, 21 Sep 2017) | 4 lines

check_funcall_missing() should call respond_to_missing?(name, priv=true)

* Improve spec rather than constrain implementation.
* Coercion ignores visibility in Ruby.
------------------------------------------------------------------------
r59981 | eregon | 2017-09-21 06:50:14 +0900 (Thu, 21 Sep 2017) | 5 lines

Prefer adapting specs to complicating library code

* lib/net/ftp.rb (Net::FTP#initialize): simplify as per
  the original intent.
* spec/ruby/library/net/ftp/initialize_spec.rb: adapt specs.
------------------------------------------------------------------------
r59980 | eregon | 2017-09-21 05:19:54 +0900 (Thu, 21 Sep 2017) | 4 lines

Adapt tools to follow spec/rubyspec => spec/ruby rename

* [Misc #13792] [ruby-core:82287]
* Prefer test-spec over test-rubyspec in spec/README.
------------------------------------------------------------------------
r59979 | eregon | 2017-09-21 05:18:52 +0900 (Thu, 21 Sep 2017) | 4 lines

Move spec/rubyspec to spec/ruby for consistency

* Other ruby implementations use the spec/ruby directory.
  [Misc #13792] [ruby-core:82287]
------------------------------------------------------------------------
r59978 | svn | 2017-09-21 04:45:20 +0900 (Thu, 21 Sep 2017) | 1 line

* properties.
------------------------------------------------------------------------
r59977 | eregon | 2017-09-21 04:45:19 +0900 (Thu, 21 Sep 2017) | 1 line

Update to ruby/spec@e3b6811
------------------------------------------------------------------------
r59976 | svn | 2017-09-21 03:47:15 +0900 (Thu, 21 Sep 2017) | 1 line

* 2017-09-21
------------------------------------------------------------------------
r59975 | normal | 2017-09-21 03:47:14 +0900 (Thu, 21 Sep 2017) | 11 lines

process: block/unblock signals around fork

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

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

  Thanks to Russell Davis for the bug report and test case.
------------------------------------------------------------------------
r59974 | nobu | 2017-09-20 17:38:52 +0900 (Wed, 20 Sep 2017) | 4 lines

parse.y: literal term lex_state

* parse.y (parser_string_term, parser_parse_string): move setting
  lex_state operations from parser_yylex per each token types.
------------------------------------------------------------------------
r59973 | sonots | 2017-09-20 14:01:09 +0900 (Wed, 20 Sep 2017) | 1 line

ruby.c: show help messages of --dump
------------------------------------------------------------------------
r59972 | nobu | 2017-09-20 11:32:55 +0900 (Wed, 20 Sep 2017) | 4 lines

fix up r59949

* ext/ripper/lib/ripper/lexer.rb (List#inspect): splat self data
  to local variables same as members of Elem.
------------------------------------------------------------------------
r59971 | shugo | 2017-09-20 10:40:53 +0900 (Wed, 20 Sep 2017) | 3 lines

Add MonitorMinx#mon_locked? and #mon_owned? to check states of objects

Patched by Satoshi "Moris" Tagomori <tagomoris@gmail.com>.  [Fix GH-1699]
------------------------------------------------------------------------
r59970 | nobu | 2017-09-20 09:53:47 +0900 (Wed, 20 Sep 2017) | 5 lines

ruby.c: paragraph mode by -00

* ruby.c (proc_options): set to paragraph mode, if -00 is given,
  as well as perl and -R0 option in 0.49.
  [ruby-core:81987] [Bug #13736]
------------------------------------------------------------------------
r59969 | svn | 2017-09-20 08:09:11 +0900 (Wed, 20 Sep 2017) | 1 line

* 2017-09-20
------------------------------------------------------------------------
r59968 | nobu | 2017-09-20 08:09:10 +0900 (Wed, 20 Sep 2017) | 1 line

adjust indent
------------------------------------------------------------------------
r59967 | nagachika | 2017-09-19 23:56:03 +0900 (Tue, 19 Sep 2017) | 3 lines

fix a typo in NEWS at r59966.

	* NEWS: fix a typo.
------------------------------------------------------------------------
r59966 | knu | 2017-09-19 17:45:12 +0900 (Tue, 19 Sep 2017) | 5 lines

Alias Set#=== to #include?

* set.rb (Set#===): Added via [Feature #13801] by davidarnold.

Closes #1673.
------------------------------------------------------------------------
r59965 | normal | 2017-09-19 17:39:22 +0900 (Tue, 19 Sep 2017) | 5 lines

webrick: handle EAGAIN/EWOULDBLOCK on proxy connections

* lib/webrick/httpproxy.rb (do_CONNECT): high-level IO methods
  [ruby-core:82861] [Bug #12130]
  Patch by: Keisuke NISHI
------------------------------------------------------------------------
r59964 | hsbt | 2017-09-19 14:01:02 +0900 (Tue, 19 Sep 2017) | 5 lines

Fixup r59961. Use http for libffi downloading.

  A few environments couldn't handle https download.
    * https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20170919T032511Z.fail.html.gz
    * https://rubyci.org/logs/www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20170919T040500Z.fail.html.gz
------------------------------------------------------------------------
r59963 | nobu | 2017-09-19 11:42:08 +0900 (Tue, 19 Sep 2017) | 4 lines

thread.c: report then abort

* thread.c (thread_start_func_2): report then abort on exception,
  if both are set.  [ruby-core:79280] [Bug #13163]
------------------------------------------------------------------------
r59962 | hsbt | 2017-09-19 11:39:40 +0900 (Tue, 19 Sep 2017) | 4 lines

Added documentation
Added documentaiton for installation of bundled gems.

  [Bug #13724][ruby-core:81938]
------------------------------------------------------------------------
r59961 | hsbt | 2017-09-19 11:25:16 +0900 (Tue, 19 Sep 2017) | 1 line

Use https instead of ftp for libffi downloading.
------------------------------------------------------------------------
r59960 | hsbt | 2017-09-19 10:54:28 +0900 (Tue, 19 Sep 2017) | 3 lines

Define the MIME type for JSON in WEBrick::HTTPUtils::DefaultMimeTypes.

  [Feature #10798][ruby-core:67879]
------------------------------------------------------------------------
r59959 | hsbt | 2017-09-19 09:37:38 +0900 (Tue, 19 Sep 2017) | 4 lines

Enabled temporary disabled examples of bundler rspec.

  These are fails when merging at r59779. But these are
  working now.
------------------------------------------------------------------------
r59958 | svn | 2017-09-19 09:22:57 +0900 (Tue, 19 Sep 2017) | 1 line

* 2017-09-19
------------------------------------------------------------------------
r59957 | nobu | 2017-09-19 09:22:56 +0900 (Tue, 19 Sep 2017) | 4 lines

parse.y: lex by lvar

* parse.y (parse_ident): disable tLPAREN_ARG state by local
  variable.  [ruby-list:50578]
------------------------------------------------------------------------
r59956 | ktsj | 2017-09-18 17:21:08 +0900 (Mon, 18 Sep 2017) | 5 lines

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

* vm.c (invoke_bmethod): set FINISH flag just before calling vm_exec.
  [ruby-dev:50162] [Bug #13705]
------------------------------------------------------------------------
r59955 | nobu | 2017-09-18 17:05:53 +0900 (Mon, 18 Sep 2017) | 10 lines

error.c: KeyError#receiver and KeyError#key

* error.c: new method KeyError#receiver and KeyError#key.
  [Feature #12063]

* hash.c: make KeyError object with receiver and key.

* sprintf.c: ditto.

Author:    ksss <co000ri@gmail.com>
------------------------------------------------------------------------
r59954 | nobu | 2017-09-18 16:52:58 +0900 (Mon, 18 Sep 2017) | 1 line

configure.in: use newer libtool only
------------------------------------------------------------------------
r59953 | rhe | 2017-09-18 14:37:29 +0900 (Mon, 18 Sep 2017) | 3 lines

re.c: remove unused rb_memcmp() function

It is no longer used or exported as of r13641.
------------------------------------------------------------------------
r59952 | yui-knk | 2017-09-18 14:17:21 +0900 (Mon, 18 Sep 2017) | 5 lines

thread.c: Clear an array for method coverage

* thread.c (reset_coverage_i): Clear an
  array for method coverage just like
  line coverage and branch coverage.
------------------------------------------------------------------------
r59951 | nobu | 2017-09-18 14:16:37 +0900 (Mon, 18 Sep 2017) | 4 lines

intern instruction

* insns.def (intern): new instruction to turn string into symbol.
  opt_call_c_function can not dump.
------------------------------------------------------------------------
r59950 | nobu | 2017-09-18 11:27:13 +0900 (Mon, 18 Sep 2017) | 11 lines

refinements in string interpolation

* compile.c (iseq_compile_each0): insert to_s method call, so that
  refinements activated at the caller should take place.
  [Feature #13812]

* insns.def (tostring): fix up converted object to a string,
  infect and fallback.

* insns.def (branchiftype): new instruction for conversion.
  branches if TOS is an instance of the given type.
------------------------------------------------------------------------
r59949 | nobu | 2017-09-18 09:08:19 +0900 (Mon, 18 Sep 2017) | 7 lines

parse.y: ripper_lex_state_name

* parse.y (ripper_lex_state_name): represent lex_state as OR-ed
  form.

* ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer::Elem#to_a):
  lex_state for inspection.
------------------------------------------------------------------------
r59948 | svn | 2017-09-18 08:56:38 +0900 (Mon, 18 Sep 2017) | 1 line

* 2017-09-18
------------------------------------------------------------------------
r59947 | mame | 2017-09-18 08:56:37 +0900 (Mon, 18 Sep 2017) | 3 lines

ext/objspace/objspace.c: remove unneeded code clones.

`setup_hash` have already performed nil check and empty check.
------------------------------------------------------------------------
r59946 | nobu | 2017-09-17 18:28:58 +0900 (Sun, 17 Sep 2017) | 7 lines

literal symbol by intern

* compile.c (iseq_compile_each0): literal symbol should not be
  affected by redefinition of String#intern method.

* vm_insnhelper.c (rb_vm_str_intern): intern a string into a
  symbol directly.
------------------------------------------------------------------------
r59945 | nobu | 2017-09-17 18:21:47 +0900 (Sun, 17 Sep 2017) | 6 lines

compile.c: optimize unnecessary concatstrings

* compile.c (iseq_peephole_optimize): optimize away unnecessary
  concatenation of single string, following tostring which always
  puts a String instance.
  https://github.com/ruby/ruby/pull/1626#discussion_r139285653
------------------------------------------------------------------------
r59944 | mame | 2017-09-17 17:04:34 +0900 (Sun, 17 Sep 2017) | 3 lines

ext/io/console/lib/console/size.rb: Fix the context of method definition

`console_size` is not a instance method but a class method.
------------------------------------------------------------------------
r59943 | yui-knk | 2017-09-17 16:19:20 +0900 (Sun, 17 Sep 2017) | 5 lines

node.h: Remove a not used macro

* node.h (nd_refinements_): nd_refinements_ was
  introduced on r49894. But this macro has not been
  used since r49897.
------------------------------------------------------------------------
r59942 | nobu | 2017-09-17 15:50:31 +0900 (Sun, 17 Sep 2017) | 4 lines

make-snapshot: after-update

* tool/make-snapshot (package): fix missing after-update for
  libffi and so on.  [ruby-dev:50244] [Bug #13897]
------------------------------------------------------------------------
r59941 | nobu | 2017-09-17 14:51:15 +0900 (Sun, 17 Sep 2017) | 3 lines

suppress warnings

* compile.c: suppress maybe-uninitialized warnings by gcc7.
------------------------------------------------------------------------
r59940 | mame | 2017-09-17 13:30:30 +0900 (Sun, 17 Sep 2017) | 4 lines

run-lcov.rb: wrongly used unique ID as lineno

The second value of key of branch/method coverage is unique ID, not
lineno.
------------------------------------------------------------------------
r59939 | rhe | 2017-09-17 13:26:51 +0900 (Sun, 17 Sep 2017) | 5 lines

ext/date/extconf.rb: check for timezone and altzone

Instead of in configure.in. As of r28592 the HAVE_VAR_TIMEZONE and
HAVE_VAR_ALTZONE macros are only used by ext/date. ext/date doesn't care
whether they are int or long, so just check for the existence.
------------------------------------------------------------------------
r59938 | rhe | 2017-09-17 13:26:48 +0900 (Sun, 17 Sep 2017) | 4 lines

configure.in: don't check for existence of timezone()

HAVE_TIMEZONE and TIMEZONE_VOID macros are not used anymore as of r28592
("strftime.c: unused declarations removed.", 2010-07-09).
------------------------------------------------------------------------
r59937 | nobu | 2017-09-17 13:14:51 +0900 (Sun, 17 Sep 2017) | 5 lines

Rename bin/ruby as exe/ruby

* common.mk, configure.in: rename the bin directory to run build
  executable as exe, to get rid of overwriting true files at the
  installation.  [ruby-dev:50250] [Bug #13911]
------------------------------------------------------------------------
r59936 | svn | 2017-09-17 07:40:10 +0900 (Sun, 17 Sep 2017) | 1 line

* 2017-09-17
------------------------------------------------------------------------
r59935 | nobu | 2017-09-17 07:40:09 +0900 (Sun, 17 Sep 2017) | 1 line

test_fileutils.rb: rmdir should fail on nonexistent directory
------------------------------------------------------------------------
r59934 | nobu | 2017-09-16 20:59:47 +0900 (Sat, 16 Sep 2017) | 4 lines

fileutils.rb: error at rmdir

* lib/fileutils.rb (rmdir): should not ignore errors first, except
  for parent directories.  [ruby-dev:50236] [Bug #13889]
------------------------------------------------------------------------
r59933 | nobu | 2017-09-16 20:50:56 +0900 (Sat, 16 Sep 2017) | 5 lines

file.c: [DOC] separators at dirname and basename

* file.c (rb_file_s_basename, rb_file_s_dirname): [DOC] state
  that trailing separators will be stripped first, like as
  basename(1) and dirname(1).  [ruby-core:82828] [Bug #13908]
------------------------------------------------------------------------
r59932 | nobu | 2017-09-16 20:50:55 +0900 (Sat, 16 Sep 2017) | 1 line

common.mk: make bin directory
------------------------------------------------------------------------
r59931 | hsbt | 2017-09-16 08:46:46 +0900 (Sat, 16 Sep 2017) | 3 lines

To use github url for gemspec.

  [Bug #13906][ruby-core:82817]
------------------------------------------------------------------------
r59930 | nobu | 2017-09-16 04:25:46 +0900 (Sat, 16 Sep 2017) | 1 line

ruby-runner.c: reduce duplicate code
------------------------------------------------------------------------
r59929 | nobu | 2017-09-16 04:25:45 +0900 (Sat, 16 Sep 2017) | 1 line

Makefile.in: make wrappers for each name
------------------------------------------------------------------------
r59928 | nobu | 2017-09-16 02:47:50 +0900 (Sat, 16 Sep 2017) | 1 line

fixup r59927
------------------------------------------------------------------------
r59927 | nobu | 2017-09-16 02:42:00 +0900 (Sat, 16 Sep 2017) | 5 lines

rename ruby-runner as bin/ruby

* Makefile.in, configure.in, tool/runruby.rb: rename ruby-runner
  executable file as $(RUBY_INSTALL_NAME) under bin, to mimic
  dirty `#!/usr/bin/env` hack.
------------------------------------------------------------------------
r59926 | naruse | 2017-09-16 02:00:49 +0900 (Sat, 16 Sep 2017) | 13 lines

Find.find -> Use Dir.children instead of Dir.entries

Dir.children is available since Feature #11302.
Find.find can use of the new list (having no '.' neither '..' entries),
making now superflous an if statement.

This change can improve the performance of Find.find when the path
has lots of entries (thousands?).

https://bugs.ruby-lang.org/issues/11302
patched by Espartaco Palma <esparta@gmail.com>
https://github.com/ruby/ruby/pull/1697 fix GH-1697
[Feature #13896]
------------------------------------------------------------------------
r59925 | naruse | 2017-09-16 01:56:16 +0900 (Sat, 16 Sep 2017) | 4 lines

Fix test code of kconv

patched by tbpgr <tbpgr@tbpgr.jp>
https://github.com/ruby/ruby/pull/1696 fix GH-1696
------------------------------------------------------------------------
r59924 | svn | 2017-09-16 01:53:56 +0900 (Sat, 16 Sep 2017) | 1 line

* 2017-09-16
------------------------------------------------------------------------
r59923 | naruse | 2017-09-16 01:53:55 +0900 (Sat, 16 Sep 2017) | 4 lines

include query parameters in Net::HTTP.post

patched by Samuel Giddins <segiddins@segiddins.me>
https://github.com/ruby/ruby/pull/1686 fix GH-1686
------------------------------------------------------------------------
r59922 | kazu | 2017-09-15 21:03:42 +0900 (Fri, 15 Sep 2017) | 1 line

Fix typos [ci skip]
------------------------------------------------------------------------
r59921 | kazu | 2017-09-15 21:03:41 +0900 (Fri, 15 Sep 2017) | 1 line

Remove needless splat array
------------------------------------------------------------------------
r59920 | nobu | 2017-09-15 17:47:46 +0900 (Fri, 15 Sep 2017) | 4 lines

parse.y: use SET_LEX_STATE

* parse.y (f_arglist, parser_yylex): set lex_state via
  SET_LEX_STATE macro for yydebug messages.
------------------------------------------------------------------------
r59919 | nobu | 2017-09-15 11:01:59 +0900 (Fri, 15 Sep 2017) | 6 lines

object.c: fix conversion failure message

* object.c (convert_type_with_id): fix failure message for
  explicit conversion.  rb_convert_type_with_id and
  rb_check_convert_type_with_id are not only for implicit
  conversions.
------------------------------------------------------------------------
r59918 | nobu | 2017-09-15 09:59:35 +0900 (Fri, 15 Sep 2017) | 4 lines

rubyspec: jobserver fd may not be available

* spec/rubyspec/optional/capi/spec_helper.rb (compile_extension):
  rescue possible EBADF as jobserver fd may not be available.
------------------------------------------------------------------------
r59917 | nobu | 2017-09-15 09:59:34 +0900 (Fri, 15 Sep 2017) | 4 lines

rubyspec: use mock directory

* spec/rubyspec/core/dir/mkdir_spec.rb: the source directory may
  be on a read-only filesystem.
------------------------------------------------------------------------
r59916 | nobu | 2017-09-15 09:59:32 +0900 (Fri, 15 Sep 2017) | 9 lines

rubyspec: fix types

* spec/rubyspec/optional/capi/ext/fixnum_spec.c: FIX2INT and
  FXI2UINT return long, in spite of their names.

* spec/rubyspec/optional/capi/ext/range_spec.c: err is int.

* spec/rubyspec/optional/capi/ext/st_spec.c: st_index_t is larger
  than int.
------------------------------------------------------------------------
r59915 | yui-knk | 2017-09-15 09:40:38 +0900 (Fri, 15 Sep 2017) | 5 lines

ext/coverage/coverage.c (rb_coverage_start): Ensure `opt` is a hash

Ensure `opt` is a hash before using `rb_hash_lookup` to `opt`.
This will prevent SEGV when an inappropriate object (i.e. an array)
is passed to `opt`.
------------------------------------------------------------------------
r59911 | eregon | 2017-09-15 00:56:33 +0900 (Fri, 15 Sep 2017) | 1 line

Update to ruby/spec@a4bc1d8
------------------------------------------------------------------------
r59910 | svn | 2017-09-15 00:56:10 +0900 (Fri, 15 Sep 2017) | 1 line

* 2017-09-15
------------------------------------------------------------------------
r59909 | eregon | 2017-09-15 00:56:09 +0900 (Fri, 15 Sep 2017) | 1 line

Update to ruby/mspec@5bd9409
------------------------------------------------------------------------
r59908 | eregon | 2017-09-14 23:54:29 +0900 (Thu, 14 Sep 2017) | 1 line

time.c (Time#-): Fix documentation.
------------------------------------------------------------------------
r59897 | mame | 2017-09-14 20:16:23 +0900 (Thu, 14 Sep 2017) | 4 lines

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

It had failed to sanitize some type of exception messages.  Reported and
patched by Yusuke Endoh (mame) at https://hackerone.com/reports/223363
------------------------------------------------------------------------
r59896 | nobu | 2017-09-14 19:53:47 +0900 (Thu, 14 Sep 2017) | 8 lines

ripper: add states of scanner

* parse.y (ripper_state): add states of scanner to tokens from
  Ripper.lex and Ripper::Filter#on_*.  based on the patch by
  aycabta (Code Ahss) at [ruby-core:81789].  [Feature #13686]

* ext/ripper/tools/preproc.rb (prelude, usercode): generate EXPR_*
  constants from enums.
------------------------------------------------------------------------
r59895 | nobu | 2017-09-14 19:49:29 +0900 (Thu, 14 Sep 2017) | 1 line

parse.y: [DOC] fix call-seq [ci skip]
------------------------------------------------------------------------
r59894 | mame | 2017-09-14 19:45:04 +0900 (Thu, 14 Sep 2017) | 5 lines

ext/coverage/coverage.c: use long instead of int for coverage site id

Coverage generates unique ID numbers for each branch and each method.
Use long instead of int for the IDs.  I don't want to see 2^32 branches
and methods in one file, but just in case...
------------------------------------------------------------------------
r59893 | naruse | 2017-09-14 18:21:48 +0900 (Thu, 14 Sep 2017) | 1 line

fix the case High Sierra's mincore(2) may return -128 [Bug #13895]
------------------------------------------------------------------------
r59892 | nobu | 2017-09-14 17:04:30 +0900 (Thu, 14 Sep 2017) | 4 lines

compile.c: iseq_pop_newarray

* compile.c (iseq_pop_newarray): optimize array literal in
  condition.
------------------------------------------------------------------------
r59891 | mame | 2017-09-14 16:45:17 +0900 (Thu, 14 Sep 2017) | 1 line

ext/coverage/coverage.c (method_coverage): `id` was used uninitialized
------------------------------------------------------------------------
r59890 | mame | 2017-09-14 15:07:05 +0900 (Thu, 14 Sep 2017) | 10 lines

Measure branch and method coverage for `make test-all`

To measure coverage of C code:
`./configure --enable-gcov && make && make exam && make lcov`

To measure coverage of Ruby code:
`./configure && make && make exam COVERAGE=true && make lcov`

To measure coverage of both languages at a time:
`./configure --enable-gcov && make && make exam COVERAGE=true && make lcov`
------------------------------------------------------------------------
r59889 | mame | 2017-09-14 14:27:02 +0900 (Thu, 14 Sep 2017) | 4 lines

Introduce NODE_UNLESS for branch coverage

`unless` statement was a syntactic sugar for `if` statement,
which made the result of branch coverage hard to understand.
------------------------------------------------------------------------
r59888 | mame | 2017-09-14 14:12:34 +0900 (Thu, 14 Sep 2017) | 1 line

Add method coverage
------------------------------------------------------------------------
r59887 | hsbt | 2017-09-14 14:04:38 +0900 (Thu, 14 Sep 2017) | 8 lines

added workaround for APFS file format.

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

  [Bug #13816][ruby-core:82383]
------------------------------------------------------------------------
r59886 | mame | 2017-09-14 13:42:23 +0900 (Thu, 14 Sep 2017) | 1 line

Fix the lineno of case statement that has no expression
------------------------------------------------------------------------
r59885 | mame | 2017-09-14 13:32:58 +0900 (Thu, 14 Sep 2017) | 1 line

Add branch coverage for case-when statement
------------------------------------------------------------------------
r59878 | hsbt | 2017-09-14 12:57:22 +0900 (Thu, 14 Sep 2017) | 1 line

Removed needless operator.
------------------------------------------------------------------------
r59877 | mame | 2017-09-14 12:36:05 +0900 (Thu, 14 Sep 2017) | 1 line

Add branch coverage for while and until statements
------------------------------------------------------------------------
r59876 | mame | 2017-09-14 12:25:36 +0900 (Thu, 14 Sep 2017) | 1 line

Add branch coverage for if statement
------------------------------------------------------------------------
r59875 | mame | 2017-09-14 11:53:54 +0900 (Thu, 14 Sep 2017) | 1 line

ext/coverage/coverage.c: Fix the condition for non-experimental mode
------------------------------------------------------------------------
r59874 | mame | 2017-09-14 11:36:26 +0900 (Thu, 14 Sep 2017) | 24 lines

[EXPERIMENTAL] Extend the API of `Coverage.start` and `result`

The old API:

    Coverage.start
    load "foo.rb"
    p Coverage.result #=> {"foo.rb" => [1, 2, nil]}

The new API:

    ENV["COVERAGE_EXPERIMENTAL_MODE"] = "true"
    Coverage.start(lines: true)
    load "foo.rb"
    p Coverage.result #=> {"foo.rb" => {:lines => [1, 2, nil]}}

This new API allows us to add other measuring target types.

Notes:

* To keep compatibility, the old interface is still remained; passing no
  optional argument makes `Coverage.result` return the old format.
* This feature is still experimental.  So, to enable the new API, the
  environment variable `COVERAGE_EXPERIMENTAL_MODE` must be set.  I plan
  to activate this feature by Ruby 2.5.
------------------------------------------------------------------------
r59873 | hsbt | 2017-09-14 11:01:36 +0900 (Thu, 14 Sep 2017) | 4 lines

Update gemspec for gem released versions.

  * These are dbm, fcntl, io-console, sdbm, stringio, strscan, zlib,
    cmath, scanf.
------------------------------------------------------------------------
r59872 | ko1 | 2017-09-14 10:55:59 +0900 (Thu, 14 Sep 2017) | 3 lines

remove an unused variable (sometimes it fails test).


------------------------------------------------------------------------
r59871 | mame | 2017-09-14 10:55:30 +0900 (Thu, 14 Sep 2017) | 4 lines

Add a new instruction `trace2` for hooking with custom data

This is needed for passing to the hook function the measuring target
type (line/branch/method) and the site of coverage event fired.
------------------------------------------------------------------------
r59870 | nobu | 2017-09-14 02:07:19 +0900 (Thu, 14 Sep 2017) | 6 lines

test_rubyoptions.rb: keep paths if necessary

* test/ruby/test_rubyoptions.rb (TestRubyOptions#test_search):
  PATH must keep library loading paths on a platform where it is
  used for that purpose, for extra libraries.
  [ruby-core:81178] [Bug #13569] [Fix GH-1616]
------------------------------------------------------------------------
r59869 | svn | 2017-09-14 00:28:17 +0900 (Thu, 14 Sep 2017) | 1 line

* 2017-09-14
------------------------------------------------------------------------
r59868 | nobu | 2017-09-14 00:28:16 +0900 (Thu, 14 Sep 2017) | 4 lines

LIBPATHENV on Windows

* configure.in, win32/Makefile.sub: set LIBPATHENV to PATH on
  Windows, for extra DLLs.
------------------------------------------------------------------------
r59867 | suke | 2017-09-13 22:24:59 +0900 (Wed, 13 Sep 2017) | 3 lines

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

------------------------------------------------------------------------
r59866 | kazu | 2017-09-13 21:46:13 +0900 (Wed, 13 Sep 2017) | 3 lines

Random.urandom raises RuntimeError instead of returning nil

[ci skip]
------------------------------------------------------------------------
r59865 | hsbt | 2017-09-13 18:06:34 +0900 (Wed, 13 Sep 2017) | 1 line

Removed needless magic-comment for encodings.
------------------------------------------------------------------------
r59864 | hsbt | 2017-09-13 18:06:05 +0900 (Wed, 13 Sep 2017) | 1 line

Fixup r59856. Added workaround for JRuby.
------------------------------------------------------------------------
r59863 | hsbt | 2017-09-13 11:36:46 +0900 (Wed, 13 Sep 2017) | 3 lines

Added executable to bundler template.

  It's same as upstream permission.
------------------------------------------------------------------------
r59862 | hsbt | 2017-09-13 11:21:02 +0900 (Wed, 13 Sep 2017) | 1 line

Fix a typo.
------------------------------------------------------------------------
r59861 | ko1 | 2017-09-13 08:15:34 +0900 (Wed, 13 Sep 2017) | 13 lines

Use mutable strings for mutation tests.

* test/fiddle/test_func.rb (test_string): this test break String buffer
  by `strcpy` ("000" -> "123"). However, the string literal "000" with
  `frozen_string_literal: true` returns a string object from frozen
  string pool. So that after this test "000" from fstring pool becomes
  "123" (modified string). 'test/date/' uses "000" (as fstring) and tests
  are fails (we could check with `make test-all TESTS='fiddle date'`).

* test/fiddle/test_function.rb: ditto.

* test/fiddle/test_import.rb: ditto.

------------------------------------------------------------------------
r59860 | svn | 2017-09-13 03:41:06 +0900 (Wed, 13 Sep 2017) | 1 line

* 2017-09-13
------------------------------------------------------------------------
r59859 | normal | 2017-09-13 03:41:05 +0900 (Wed, 13 Sep 2017) | 3 lines

cont.c: update comment to match r59776 [ci skip]

* cont.c (fiber_switch): th->fiber => th->ec.fiber in comment
------------------------------------------------------------------------
r59858 | mame | 2017-09-12 22:57:36 +0900 (Tue, 12 Sep 2017) | 3 lines

Random.urandom raises an exception instead of returning nil when failed

Early failure looks better in this case.  Refs [Bugs #13885].
------------------------------------------------------------------------
r59857 | rhe | 2017-09-12 22:52:51 +0900 (Tue, 12 Sep 2017) | 10 lines

openssl: merge test fixes from upstream, part 2

This is a combined patch of the following two commits in maint:

	a09d8c78dd30 test/test_ssl: suppress warning in test_alpn_protocol_selection_cancel
	de965374ee85 test/test_pair: disable compression

This hopefully fixes the RubyCI gentoo failure:

	http://rubyci.s3.amazonaws.com/gentoo/ruby-trunk/log/20170912T033004Z.fail.html.gz
------------------------------------------------------------------------
r59856 | hsbt | 2017-09-12 21:51:43 +0900 (Tue, 12 Sep 2017) | 5 lines

Partly reverted r59845.

  All of environments on Ruby CI are fails rdoc generation.
  It may be caused by
  https://github.com/ruby/rdoc/commit/8cfa11d6f1cc7e74e45e42fd8d1d76c5a0646a6e
------------------------------------------------------------------------
r59855 | naruse | 2017-09-12 21:49:38 +0900 (Tue, 12 Sep 2017) | 1 line

output some strings without quotes
------------------------------------------------------------------------
r59854 | hsbt | 2017-09-12 20:52:23 +0900 (Tue, 12 Sep 2017) | 6 lines

Merge fiddle-1.0.0.beta2 from upstream.

  * ext/fiddle/closure.c: use directly declaration for standalone gem
    without internal.h.
  * Specify frozen string literal is true.
  * Update gemspec configuration for release version.
------------------------------------------------------------------------
r59853 | kazu | 2017-09-12 20:15:27 +0900 (Tue, 12 Sep 2017) | 1 line

Add *.gemspec to .editorconfig [ci skip]
------------------------------------------------------------------------
r59852 | kazu | 2017-09-12 20:15:26 +0900 (Tue, 12 Sep 2017) | 1 line

Sort properties in .editorconfig [ci skip]
------------------------------------------------------------------------
r59851 | kazu | 2017-09-12 20:15:25 +0900 (Tue, 12 Sep 2017) | 1 line

Fix problem when open in emacs [ci skip]
------------------------------------------------------------------------
r59850 | hsbt | 2017-09-12 19:40:58 +0900 (Tue, 12 Sep 2017) | 1 line

Fixed copy option for bundler sync
------------------------------------------------------------------------
r59849 | hsbt | 2017-09-12 17:38:06 +0900 (Tue, 12 Sep 2017) | 4 lines

Merge csv-0.1.0 from upstream.

  * csv.gemspec: Update release version.
  * lib/csv.rb: Remove superfluous private clause.
------------------------------------------------------------------------
r59848 | hsbt | 2017-09-12 14:19:20 +0900 (Tue, 12 Sep 2017) | 3 lines

Fixed install error with rdoc.gemspec

  "lib/rdoc" is only workds on rdoc repository structure.
------------------------------------------------------------------------
r59847 | svn | 2017-09-12 12:42:56 +0900 (Tue, 12 Sep 2017) | 1 line

* properties.
------------------------------------------------------------------------
r59846 | svn | 2017-09-12 12:42:55 +0900 (Tue, 12 Sep 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r59845 | hsbt | 2017-09-12 12:42:54 +0900 (Tue, 12 Sep 2017) | 4 lines

Merge rdoc-6.0.0.beta2 from upstream.

  * This version changed lexer used Ripper from lexer based IRB.
    see details: https://github.com/ruby/rdoc/pull/512
------------------------------------------------------------------------
r59844 | nobu | 2017-09-12 05:10:34 +0900 (Tue, 12 Sep 2017) | 4 lines

console.c: set winsize on Windows

* ext/io/console/console.c (console_set_winsize): retry shrinking
  window and screen buffer.  [ruby-core:82741] [Bug #13888]
------------------------------------------------------------------------
r59843 | svn | 2017-09-12 05:10:34 +0900 (Tue, 12 Sep 2017) | 1 line

* 2017-09-12
------------------------------------------------------------------------
r59842 | nobu | 2017-09-12 05:10:33 +0900 (Tue, 12 Sep 2017) | 5 lines

test_io_console.rb: test_set_winsize_console

* test/io/console/test_io_console.rb (test_set_winsize_console):
  split from test_get_winsize_console and enable the case when
  attached to a console already
------------------------------------------------------------------------
r59840 | mame | 2017-09-11 21:44:51 +0900 (Mon, 11 Sep 2017) | 9 lines

lib/securerandom.rb: test one byte to determine urandom or openssl

`SecureRandom#gen_random` determines whether urandom is available or not
by trying `Random.urandom(n)`.  But, when n = 0, `Random.urandom(0)`
always succeeds even if urandom is not available, which leads to a wrong
decision.

When failed, `Random.urandom` returns nil instead of returning a shorter
string than required.  So the check for `ret.length != n` is not needed.
------------------------------------------------------------------------
r59839 | hsbt | 2017-09-11 18:44:29 +0900 (Mon, 11 Sep 2017) | 6 lines

Backport test_realworld_default_gem test from Rubygems-2.6.13.

  But this test is always fail on ruby core repository. Because
  default gems is only availabled after installation of Ruby.

  I ignored this test at https://github.com/rubygems/rubygems/pull/1986
------------------------------------------------------------------------
r59838 | naruse | 2017-09-11 17:50:08 +0900 (Mon, 11 Sep 2017) | 1 line

Follow latest VM changes
------------------------------------------------------------------------
r59837 | naruse | 2017-09-11 17:50:07 +0900 (Mon, 11 Sep 2017) | 1 line

suppress unused argument warning
------------------------------------------------------------------------
r59836 | hsbt | 2017-09-11 15:12:40 +0900 (Mon, 11 Sep 2017) | 3 lines

Remove commented out code of URI::HTTP.new.

  [Misc #13871][ruby-core:82655] Patch by @aycabta
------------------------------------------------------------------------
r59835 | hsbt | 2017-09-11 15:11:37 +0900 (Mon, 11 Sep 2017) | 3 lines

Remove commented out code of SecureRandom.random_number.

  [Misc #13870][ruby-core:82654] Patch by @aycabta.
------------------------------------------------------------------------
r59834 | hsbt | 2017-09-11 12:05:07 +0900 (Mon, 11 Sep 2017) | 1 line

Fixed unterminated backquote for bundler sync task.
------------------------------------------------------------------------
r59833 | hsbt | 2017-09-11 11:29:11 +0900 (Mon, 11 Sep 2017) | 3 lines

Update bundled gems.

  * rake-12.1.0 from 12.0.0
------------------------------------------------------------------------
r59832 | hsbt | 2017-09-11 10:33:46 +0900 (Mon, 11 Sep 2017) | 1 line

Added [Feature #12733] to NEWS entry.
------------------------------------------------------------------------
r59831 | ko1 | 2017-09-11 04:00:08 +0900 (Mon, 11 Sep 2017) | 13 lines

store ec instead of thread in rb_context_t.

* cont.c (rb_context_t): introduce saved_ec instaad of saved_thread.
  We only need to transfer ec data (not all of thread data).

  Introduce `thread_value` field to point creation thread.
  To acccess this field, `cont_thread_value()` is introduced.

* vm.c (rb_execution_context_mark): remove `static` and use it
  from cont.c (use this function instead of `rb_thread_mark`).

* vm_insnhelper.c (rb_vm_push_frame): accept ec instead of th.

------------------------------------------------------------------------
r59830 | ko1 | 2017-09-11 03:37:55 +0900 (Mon, 11 Sep 2017) | 7 lines

avoid false positive on fiber_verify().

* cont.c (fiber_store): move `cont_save_machine_stack()` timing to
  avoid `fiber_verify()` false positive on `FIBER_USE_NATIVE == 0`
  and `GC.stress = true`.
  This patch is very dirty and it should be removed soon.

------------------------------------------------------------------------
r59829 | ko1 | 2017-09-11 02:30:16 +0900 (Mon, 11 Sep 2017) | 7 lines

clear `stack_end`.

* cont.c (cont_save_thread): clear only `stack_end`. Clearing tells
  GC mark function to ignore this macine stack (not allocated yet).
  `stack_start` will be used by machine stack store/restore phase
  (on FIBER_USE_NATIVE == 0), so that only `stack_end` is cleared.

------------------------------------------------------------------------
r59828 | nobu | 2017-09-11 01:19:40 +0900 (Mon, 11 Sep 2017) | 4 lines

compile.c: pop coverage trace

* compile.c (iseq_compile_each0): pop trace for coverage only and
  clear its corresponding line.  [ruby-core:82726] [Bug #13886]
------------------------------------------------------------------------
r59827 | nobu | 2017-09-11 01:19:39 +0900 (Mon, 11 Sep 2017) | 1 line

cont.c: fix typo [ci skip]
------------------------------------------------------------------------
r59826 | svn | 2017-09-11 00:49:46 +0900 (Mon, 11 Sep 2017) | 1 line

* 2017-09-11
------------------------------------------------------------------------
r59825 | ko1 | 2017-09-11 00:49:45 +0900 (Mon, 11 Sep 2017) | 18 lines

move th->machine to ec->machine.

* vm_core.h: move rb_thread_t::machine to rb_execution_context_t::machine.

* vm_core.h, gc.c (rb_gc_mark_machine_stack): accept ec instead of th.
  it enables to call this func from rb_execution_context_mark() in vm.c.

* cont.c (fiber_setcontext): catch up this fix.
  fiber_restore_thread() restores machine stack information too.

* gc.c: catch up structure layout changes.

* thread.c: ditto.

* thread_pthread.c: ditto.

* thread_win32.c: ditto.

------------------------------------------------------------------------
r59824 | nobu | 2017-09-10 21:35:06 +0900 (Sun, 10 Sep 2017) | 3 lines

merger.rb: separate logs

* tool/merger.rb: separate each commit logs by an empty line.
------------------------------------------------------------------------
r59821 | nobu | 2017-09-10 20:52:56 +0900 (Sun, 10 Sep 2017) | 6 lines

cli_spec.rb: prefer BUNDLE_RUBY

* spec/bundler/bundler/cli_spec.rb: prefer BUNDLE_RUBY over env
  hack.  on macOS 10.11 or later, some system commands, e.g.
  /bin/sh and /usr/bin/env, clear DYLD_LIBRARY_PATH environment
  variable which is necessary to run not-yet installed command.
------------------------------------------------------------------------
r59810 | hsbt | 2017-09-10 12:21:58 +0900 (Sun, 10 Sep 2017) | 5 lines

BUNDLER_SPECS rquires a relative path with srcdir.

  default targets are all of bundler specs. if you run only
  commands/add_spec.rb spec:
    make test-bundler BUNDLER_SPECS=commands/add_spec.rb
------------------------------------------------------------------------
r59804 | nobu | 2017-09-10 07:08:01 +0900 (Sun, 10 Sep 2017) | 3 lines

runruby.rb: set envvars for bundler

* tool/runruby.rb: set gem and bundler environment variables.
------------------------------------------------------------------------
r59803 | mame | 2017-09-10 00:19:19 +0900 (Sun, 10 Sep 2017) | 3 lines

Add a note to Random.urandom

The method may return nil for some reasons.
------------------------------------------------------------------------
r59802 | svn | 2017-09-10 00:12:11 +0900 (Sun, 10 Sep 2017) | 1 line

* 2017-09-10
------------------------------------------------------------------------
r59801 | mame | 2017-09-10 00:12:10 +0900 (Sun, 10 Sep 2017) | 5 lines

Update a test of SecureRandom according to r57384

SecureRandom uses urandom by default.  So the test for a case where
openssl is unavailable makes no sense.  Instead, a simple test for a
case where urandom is unavailable is added.
------------------------------------------------------------------------
r59794 | mame | 2017-09-09 22:09:21 +0900 (Sat, 09 Sep 2017) | 8 lines

Support LCOV visualization for both C and Ruby code

`./configure --enable-gcov && make exam && make lcov` will create
`lcov-c-out/index.html` for coverage of C code of the interpreter.
`make exam COVERAGE=true && make lcov` will create
`lcov-rb-out/index.html` for coverage of Ruby stdlib code.
Using both `--enable-gcov` and `COVERAGE=true` will create
`lcov-out/index.html` for total coverage.
------------------------------------------------------------------------
r59792 | nobu | 2017-09-09 20:30:32 +0900 (Sat, 09 Sep 2017) | 10 lines

spec/bundler/support: paths for ruby core

* spec/bundler/support/path.rb (Spec::Path#for_ruby_core?): helper
  method to tell whether running in Ruby Core or not.

* spec/bundler/support/helpers.rb (Spec::Helpers#bundle): use
  Path.bindir for ruby core case.

* spec/bundler/support/rubygems_ext.rb (Spec::Rubygems.setup):
  ditto.
------------------------------------------------------------------------
r59791 | nobu | 2017-09-09 20:30:31 +0900 (Sat, 09 Sep 2017) | 4 lines

Makefile.in: test-bundler-prepare

* Makefile.in (test-bundler-prepare): install with --install-dir
  option instead of GEM_HOME and GEM_PATH environment variables.
------------------------------------------------------------------------
r59790 | nobu | 2017-09-09 19:20:38 +0900 (Sat, 09 Sep 2017) | 4 lines

rubygems_ext.rb: use BUNDLE_GEM

* spec/bundler/support/rubygems_ext.rb (install_gems): use
  BUNDLE_GEM set in Makefile.in instead of the installed command.
------------------------------------------------------------------------
r59789 | nobu | 2017-09-09 18:16:59 +0900 (Sat, 09 Sep 2017) | 4 lines

sprintf.c: NULL as str

* sprintf.c (ruby_vsnprintf, ruby_snprintf): allow NULL as str,
  just count the expected buffer size.
------------------------------------------------------------------------
r59788 | nobu | 2017-09-09 18:16:56 +0900 (Sat, 09 Sep 2017) | 4 lines

compile.c: replaced switch by TYPE

* compile.c (int_param): prefer FIXNUM_P and NIL_P to switch by
  TYPE.
------------------------------------------------------------------------
r59787 | kazu | 2017-09-09 11:34:30 +0900 (Sat, 09 Sep 2017) | 2 lines

Sync .gitignore and svn:ignore and cleanup [ci skip]

------------------------------------------------------------------------
r59786 | svn | 2017-09-09 08:51:15 +0900 (Sat, 09 Sep 2017) | 1 line

* 2017-09-09
------------------------------------------------------------------------
r59785 | normal | 2017-09-09 08:51:14 +0900 (Sat, 09 Sep 2017) | 9 lines

fiber: fix machine stack marking when FIBER_USE_NATIVE is 0

* cont.c (cont_mark): mark Fiber machine stack correctly when
  FIBER_USE_NATIVE is 0
* test/ruby/test_fiber.rb (test_mark_fiber): new test
  [Bug #13875] [ruby-core:82681]

This bug appears to be introduced with r59557.
("refactoring Fiber status")
------------------------------------------------------------------------
r59781 | hsbt | 2017-09-08 17:50:57 +0900 (Fri, 08 Sep 2017) | 3 lines

Rollback to v1.15.4 version.

  In r59779, it contains current master version of bundler repository.
------------------------------------------------------------------------
r59780 | svn | 2017-09-08 17:45:47 +0900 (Fri, 08 Sep 2017) | 1 line

* properties.
------------------------------------------------------------------------
r59779 | hsbt | 2017-09-08 17:45:41 +0900 (Fri, 08 Sep 2017) | 15 lines

Merge bundler to standard libraries.

  rubygems 2.7.x depends bundler-1.15.x. This is preparation for
  rubygems and bundler migration.

  * lib/bundler.rb, lib/bundler/*: files of bundler-1.15.4
  * spec/bundler/*: rspec examples of bundler-1.15.4. I applied patches.
    * https://github.com/bundler/bundler/pull/6007
    * Exclude not working examples on ruby repository.
    * Fake ruby interpriter instead of installed ruby.
  * Makefile.in: Added test task named `test-bundler`. This task is only
    working macOS/linux yet. I'm going to support Windows environment later.
  * tool/sync_default_gems.rb: Added sync task for bundler.

  [Feature #12733][ruby-core:77172]
------------------------------------------------------------------------
r59778 | nobu | 2017-09-08 17:03:18 +0900 (Fri, 08 Sep 2017) | 7 lines

configure.in: moved flags

* configure.in (-DRUBY_DEVEL): moved from debugflags to XCFLAGS.
  this flags should be applied to the ruby core only.

* configure.in (-fno-fast-math): moved from optflags to CFLAGS.
  this flag is not for optimization.
------------------------------------------------------------------------
r59777 | nobu | 2017-09-08 16:22:47 +0900 (Fri, 08 Sep 2017) | 1 line

fix up r59776
------------------------------------------------------------------------
r59776 | ko1 | 2017-09-08 15:21:30 +0900 (Fri, 08 Sep 2017) | 5 lines

move th->fiber to ec->fiber.

* vm_core.h (rb_thread_t::fiber): move fiber field to
  rb_execution_context_t::fiber.

------------------------------------------------------------------------
r59775 | hsbt | 2017-09-08 14:33:12 +0900 (Fri, 08 Sep 2017) | 4 lines

Update latest bundled-gems.

  * minitest 5.10.3
  * test-unit 3.2.5
------------------------------------------------------------------------
r59774 | hsbt | 2017-09-08 14:18:18 +0900 (Fri, 08 Sep 2017) | 3 lines

fix a label for bundled gems.

  "bundle gems" is a wrong name.
------------------------------------------------------------------------
r59773 | usa | 2017-09-08 02:45:34 +0900 (Fri, 08 Sep 2017) | 5 lines

the working directory may not be srcdir

* test/runner.rb (COVERAGE): should use require_relative instead of require,
  because the working directory may not be srcdir.

------------------------------------------------------------------------
r59772 | svn | 2017-09-08 00:40:30 +0900 (Fri, 08 Sep 2017) | 1 line

* properties.
------------------------------------------------------------------------
r59771 | svn | 2017-09-08 00:40:30 +0900 (Fri, 08 Sep 2017) | 1 line

* 2017-09-08
------------------------------------------------------------------------
r59770 | mame | 2017-09-08 00:40:29 +0900 (Fri, 08 Sep 2017) | 20 lines

Measure the test coverage without SimpleCov

Now `make test-all COVERAGE=true` measures the test coverage by using
`coverage.so` directly, and visualize the result by simplecov-html.

There has been some problems in coverage measurement with SimpleCov.
(They are not SimpleCov's fault, though.)

(1) It is difficult to extract the measured data as a machine-readable
format, such as Marshal.  I want to visualize the coverage data with
other coverage tools, such as LCOV and Cobertura.
(I know we can use SimpleCov's formatter mechanism, but I don't want
to depend upon SimpleCov so much.)

(2) SimpleCov seems to miss some coverage data.  For example,
`lib/cgi.rb` and `lib/ostruct.rb` are dropped.  I don't know why.

(3) I have a plan to enhance `coverage.so` with branch coverage.
It would be difficult to continue to only use SimpleCov as is.
This is the most important reason.
------------------------------------------------------------------------
r59769 | mame | 2017-09-07 21:36:01 +0900 (Thu, 07 Sep 2017) | 11 lines

Remove unneeded trace instruction for coverage

When no instruction is emitted in `iseq_compile_each0`
(i.e., when the line has no significant code), trace
instruction for `RUBY_EVENT_LINE` has been optimized out.
But trace for `RUBY_EVENT_COVERAGE` has not been removed.
Now, it is also removed.

`TestISeq#test_to_a_lines` has failed a long time under
coverage measurement (`make test-all COVERAGE=true`).
This change makes it pass.
------------------------------------------------------------------------
r59768 | kazu | 2017-09-07 21:31:50 +0900 (Thu, 07 Sep 2017) | 1 line

Use `%i`-literal instead of array of symbols
------------------------------------------------------------------------
r59767 | nobu | 2017-09-07 17:25:13 +0900 (Thu, 07 Sep 2017) | 4 lines

common.mk: fix golf

* common.mk (golf): MAINOBJ must be single object file name, so
  moved golf_prelude to EXTOBJS.  [ruby-dev:50214] [Bug #13854]
------------------------------------------------------------------------
r59766 | svn | 2017-09-07 12:24:09 +0900 (Thu, 07 Sep 2017) | 1 line

* 2017-09-07
------------------------------------------------------------------------
r59765 | nobu | 2017-09-07 12:24:08 +0900 (Thu, 07 Sep 2017) | 4 lines

ruby.h: unnormalized Fixnum value

* include/ruby/ruby.h (ST2FIX): fix unnormalized Fixnum value bug
  on mingw/mswin.  [ruby-core:82687] [Bug #13877]
------------------------------------------------------------------------
r59764 | kazu | 2017-09-06 22:46:31 +0900 (Wed, 06 Sep 2017) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r59763 | nobu | 2017-09-06 22:11:44 +0900 (Wed, 06 Sep 2017) | 5 lines

string.c: fix false coderange

* string.c (rb_enc_str_scrub): enc can differ from the actual
  encoding of the string, the cached coderange is useless then.
  [ruby-core:82674] [Bug #13874]
------------------------------------------------------------------------
r59762 | nobu | 2017-09-06 21:50:10 +0900 (Wed, 06 Sep 2017) | 4 lines

string.c: optimize enumerate_grapheme_clusters

* string.c (rb_str_enumerate_grapheme_clusters): optimize when
  single byte only.
------------------------------------------------------------------------
r59761 | duerst | 2017-09-06 17:19:12 +0900 (Wed, 06 Sep 2017) | 3 lines

add mention of upgrade to Unicode 10.0.0 to NEWS file

(this completes [Feature #13685]; [ci skip])
------------------------------------------------------------------------
r59760 | duerst | 2017-09-06 17:12:02 +0900 (Wed, 06 Sep 2017) | 3 lines

remove Unicode 9.0.0-related files

We don't need these files anymore because we upgraded to Unicode 10.0.0.
------------------------------------------------------------------------
r59759 | duerst | 2017-09-06 16:56:41 +0900 (Wed, 06 Sep 2017) | 6 lines

update Ruby to Unicode 10.0.0

- In common.mk, set UNICODE_VERSION  to 10.0.0
- Generate and add enc/unicode/10.0.0/casefold.h and
  enc/unicode/10.0.0/name2ctype.h
- Update lib/unicode_normalize/tables.rb
------------------------------------------------------------------------
r59758 | mame | 2017-09-06 16:46:31 +0900 (Wed, 06 Sep 2017) | 4 lines

Update SimpleCov version (v0.10.0 -> v0.15.0)

To suppress warnings of Fixnum.
Also simplecov-html updated (v0.10.0 -> v0.10.2).
------------------------------------------------------------------------
r59757 | hsbt | 2017-09-06 12:53:25 +0900 (Wed, 06 Sep 2017) | 3 lines

Fixed compilationn error with VMDEBUG=3.

  [fix GH-1690] Patch from @musaprg(Kotaro Inoue)
------------------------------------------------------------------------
r59756 | ko1 | 2017-09-06 12:39:26 +0900 (Wed, 06 Sep 2017) | 9 lines

accept ec instead of th.

* vm.c: VM_EP_IN_HEAP_P() and vm_ep_in_heap_p_() only requires ec
  pointed from th.

* vm.c (rb_execution_context_mark): GET_THREAD() returns current
  running thread and we need to use marking thread here. Pass marking
  thread's ec instead of current thread.

------------------------------------------------------------------------
r59755 | ko1 | 2017-09-06 12:18:19 +0900 (Wed, 06 Sep 2017) | 1 line

th is not defined
------------------------------------------------------------------------
r59754 | ko1 | 2017-09-06 11:51:34 +0900 (Wed, 06 Sep 2017) | 1 line

thread_context -> execution_context
------------------------------------------------------------------------
r59753 | svn | 2017-09-06 11:47:00 +0900 (Wed, 06 Sep 2017) | 1 line

* 2017-09-06
------------------------------------------------------------------------
r59752 | ko1 | 2017-09-06 11:46:59 +0900 (Wed, 06 Sep 2017) | 4 lines

rb_execution_context_mark.

* vm.c (rb_execution_context_mark): separate from thread_mark().

------------------------------------------------------------------------
r59751 | rhe | 2017-09-05 18:47:59 +0900 (Tue, 05 Sep 2017) | 8 lines

openssl: merge test fixes from upstream

Fix platform-dependent or fragile test cases added by r59734. This is a
combined patch of the three commits below:

	4fc17977350a test/test_fips: skip if setting FIPS mode fails
	b25179fbeebf test/test_asn1: fix possible failure in test_utctime
	8ed81ff4b0a8 test/test_pair: fix test_write_nonblock{,_no_exceptions}
------------------------------------------------------------------------
r59750 | hsbt | 2017-09-05 17:25:26 +0900 (Tue, 05 Sep 2017) | 1 line

Update credentials for Travis/Slack integration.
------------------------------------------------------------------------
r59749 | mame | 2017-09-05 17:15:54 +0900 (Tue, 05 Sep 2017) | 3 lines

Hide NotImplementedError for windows

https://github.com/ruby/ruby/commit/440dc6b7e0b3b74db221eed81871516e301d4b3e#commitcomment-24074203
------------------------------------------------------------------------
r59748 | nobu | 2017-09-05 16:52:08 +0900 (Tue, 05 Sep 2017) | 4 lines

st.c: fix num_entries

* st.c (st_insert2): should manage num_entries when the key is
  undefined, as well as st_insert().
------------------------------------------------------------------------
r59747 | nobu | 2017-09-05 16:50:13 +0900 (Tue, 05 Sep 2017) | 6 lines

st.c: fix false assertions

* st.c: split assertion conditions.

* st.c (rb_hash_bulk_insert): the number of arguments should be
  even.
------------------------------------------------------------------------
r59746 | shyouhei | 2017-09-05 13:49:01 +0900 (Tue, 05 Sep 2017) | 7 lines

optimize rb_hash_bulk_insert to generally outperform 2.4.

Specialized routine for small linear-probling hash instances to
boost creation of such things [Bug #13861]

Signed-off-by: Urabe, Shyouhei <shyouhei@ruby-lang.org>

------------------------------------------------------------------------
r59745 | svn | 2017-09-05 13:48:19 +0900 (Tue, 05 Sep 2017) | 1 line

* 2017-09-05
------------------------------------------------------------------------
r59744 | shyouhei | 2017-09-05 13:48:19 +0900 (Tue, 05 Sep 2017) | 9 lines

add rb_hash_new_with_size()

Sometimes, size of a hash can be calcluated a priori.  By providing
such info to the constructor we can avoid unnecessary internal re-
allocations.  This can boost for instance creation of hash literals.
[Bug #13861]

Signed-off-by: Urabe, Shyouhei <shyouhei@ruby-lang.org>

------------------------------------------------------------------------
r59743 | nobu | 2017-09-04 23:04:54 +0900 (Mon, 04 Sep 2017) | 4 lines

string.c: grapheme clusters on frozen string

* string.c (rb_str_enumerate_grapheme_clusters): enumerate on
  shared frozen string.
------------------------------------------------------------------------
r59742 | nobu | 2017-09-04 23:04:50 +0900 (Mon, 04 Sep 2017) | 4 lines

string.c: enumerator_element

* string.c (enumerator_element): push or yield elements, and
  return 1 if needs checks.
------------------------------------------------------------------------
r59741 | mame | 2017-09-04 22:25:01 +0900 (Mon, 04 Sep 2017) | 3 lines

Improve line covearge of ext/io/nonblock/nonblock.c from 54.5% to 95.5%

Not so good test, but it would be better than nothing, I guess...
------------------------------------------------------------------------
r59740 | svn | 2017-09-04 21:15:07 +0900 (Mon, 04 Sep 2017) | 1 line

* 2017-09-04
------------------------------------------------------------------------
r59739 | kazu | 2017-09-04 21:15:06 +0900 (Mon, 04 Sep 2017) | 4 lines

gc.c: fix typo: nubmer -> number

Signed-off-by: Antonio Terceiro <terceiro@softwarelivre.org>
[Bug #13862]
------------------------------------------------------------------------
r59738 | mame | 2017-09-03 23:26:06 +0900 (Sun, 03 Sep 2017) | 8 lines

Refactor the internal data format for coverage measurement

To prepare new measuring targets: branch and method coverages.
So far, iseq->coverage was an array of counts executed for line coverage.
Now, it is a three-element array for each measuring target,
whose first element is an array for line coverage.
The second element is planned for branch coverage, and the third will be
for method coverage.
------------------------------------------------------------------------
r59737 | rhe | 2017-09-03 22:31:34 +0900 (Sun, 03 Sep 2017) | 3 lines

ext/.document: follow-up r59734

ext/openssl/ossl_pkcs5.c has been renamed to ossl_kdf.c.
------------------------------------------------------------------------
r59736 | nobu | 2017-09-03 22:21:07 +0900 (Sun, 03 Sep 2017) | 4 lines

string.c: make array in WANTARRAY

* string.c (WANTARRAY): make array for the result in method
  functions and pass it to enumerator functions.
------------------------------------------------------------------------
r59735 | svn | 2017-09-03 21:35:29 +0900 (Sun, 03 Sep 2017) | 1 line

* properties.
------------------------------------------------------------------------
r59734 | rhe | 2017-09-03 21:35:27 +0900 (Sun, 03 Sep 2017) | 112 lines

openssl: import v2.1.0.beta1

Import Ruby/OpenSSL 2.1.0.beta1. The full commit log since v2.0.5
(imported by r59567) can be found at:

	https://github.com/ruby/openssl/compare/v2.0.5...v2.1.0.beta1

----------------------------------------------------------------
Antonio Terceiro (1):
      test/test_ssl: explicitly accept TLS 1.1 in corresponding test

Colby Swandale (1):
      document using secure protocol to fetch git master in Bundler

Colton Jenkins (1):
      Add fips_mode_get to return fips_mode

Kazuki Yamaguchi (85):
      Start preparing for 2.1.0
      Remove support for OpenSSL 0.9.8 and 1.0.0
      bn: refine tests
      bn: implement unary {plus,minus} operators for OpenSSL::BN
      bn: implement OpenSSL::BN#negative?
      Don't define main() when built with --enable-debug
      test: let OpenSSL::TestCase include OpenSSL::TestUtils
      test: prepare test PKey instances on demand
      Add OpenSSL.print_mem_leaks
      Enable OSSL_MDEBUG on CI builds
      ssl: move default DH parameters from OpenSSL::PKey::DH
      Make exceptions with the same format regardless of OpenSSL.debug
      ssl: show reason of 'certificate verify error' in exception message
      ssl: remove OpenSSL::ExtConfig::TLS_DH_anon_WITH_AES_256_GCM_SHA384
      ssl: do not confuse different ex_data index registries
      ssl: assume SSL/SSL_CTX always have a valid reference to the Ruby object
      Fix RDoc markup
      ssl: suppress compiler warning
      ext/openssl/deprecation.rb: remove broken-apple-openssl
      extconf.rb: print informative message if OpenSSL can't be found
      Rakefile: compile the extension before test
      kdf: introduce OpenSSL::KDF module
      ossl.h: add NUM2UINT64T() macro
      kdf: add scrypt
      Expand rb_define_copy_func() macro
      Expand FPTR_TO_FD() macro
      Remove SafeGet*() macros
      cipher: rename GetCipherPtr() to ossl_evp_get_cipherbyname()
      digest: rename GetDigestPtr() to ossl_evp_get_digestbyname()
      Add ossl_str_new(), an exception-safe rb_str_new()
      bio: simplify ossl_membio2str() using ossl_str_new()
      Remove unused functions and macros
      Drop support for LibreSSL 2.3
      ocsp: add OpenSSL::OCSP::Request#signed?
      asn1: infinite length -> indefinite length
      asn1: rearrange tests
      ssl: remove a needless NULL check in SSL::SSLContext#ciphers
      ssl: return nil in SSL::SSLSocket#cipher if session is not started
      asn1: remove an unnecessary function prototype
      asn1: require tag information when instantiating generic type
      asn1: initialize 'unused_bits' attribute of BitString with 0
      asn1: check for illegal 'unused_bits' value of BitString
      asn1: disallow NULL to be passed to asn1time_to_time()
      asn1: avoid truncating OID in OpenSSL::ASN1::ObjectId#oid
      asn1: allow constructed encoding with definite length form
      asn1: prohibit indefinite length form for primitive encoding
      asn1: allow tag number to be >= 32 for universal tag class
      asn1: use ossl_asn1_tag()
      asn1: clean up OpenSSL::ASN1::Constructive#to_der
      asn1: harmonize OpenSSL::ASN1::*#to_der
      asn1: prevent EOC octets from being in the middle of the content
      asn1: do not treat EOC octets as part of content octets
      x509name: add 'loc' and 'set' kwargs to OpenSSL::X509::Name#add_entry
      ssl: do not call session_remove_cb during GC
      Backport "Merge branch 'topic/test-memory-leak'" to maint
      cipher: update the documentation for Cipher#auth_tag=
      Rakefile: let sync:to_ruby know about test/openssl/fixtures
      test: fix formatting
      test/utils: remove OpenSSL::TestUtils.silent
      test/utils: add SSLTestCase#tls12_supported?
      test/utils: have start_server yield only the port number
      test/utils: do not set ecdh_curves in start_server
      test/utils: let server_loop close socket
      test/utils: improve error handling in start_server
      test/utils: add OpenSSL::TestUtils.openssl? and .libressl?
      test/utils: do not use DSA certificates in SSL tests
      test/test_ssl: remove test_invalid_shutdown_by_gc
      test/test_ssl: move test_multibyte_read_write to test_pair
      test/test_ssl_session: rearrange tests
      test/test_pair, test/test_ssl: fix for TLS 1.3
      ssl: remove useless call to rb_thread_wait_fd()
      ssl: fix NPN support
      ssl: mark OpenSSL::SSL::SSLContext::DEFAULT_{1024,2048} as private
      ssl: use 2048-bit group in the default tmp_dh_cb
      ssl: ensure that SSL option flags are non-negative
      ssl: update OpenSSL::SSL::OP_* flags
      ssl: prefer TLS_method() over SSLv23_method()
      ssl: add SSLContext#min_version= and #max_version=
      ssl: rework SSLContext#ssl_version=
      test/test_x509name: change script encoding to ASCII-8BIT
      x509name: refactor OpenSSL::X509::Name#to_s
      x509name: add OpenSSL::X509::Name#to_utf8
      x509name: add OpenSSL::X509::Name#inspect
      x509name: update regexp in OpenSSL::X509::Name.parse
      Ruby/OpenSSL 2.1.0.beta1

Marcus Stollsteimer (1):
      Fix rdoc for core Integer class

nobu (4):
      [DOC] {read,write}_nonblock with exception: false
      [DOC] keyword argument _exception_
      [DOC] mark up literals
      Revert r57690 except for read_nonblock
------------------------------------------------------------------------
r59733 | rhe | 2017-09-03 21:35:25 +0900 (Sun, 03 Sep 2017) | 4 lines

vm_insnhelper.c: fix opt_regexpmatch2 instruction

A fix-up for r58390 ("split insns.def into functions", 2017-04-18) which
accidentally swapped the arguments.
------------------------------------------------------------------------
r59732 | nobu | 2017-09-03 11:08:55 +0900 (Sun, 03 Sep 2017) | 4 lines

string.c: enumerator_wantarray

* string.c (enumerator_wantarray): show warnings at method
  functions for proper method names.
------------------------------------------------------------------------
r59731 | nobu | 2017-09-03 10:47:19 +0900 (Sun, 03 Sep 2017) | 4 lines

string.c: fix for non-Unicode encodings

* string.c (rb_str_enumerate_grapheme_clusters): should enumerate
  chars for non-Unicode encodings.  [Feature #13780]
------------------------------------------------------------------------
r59730 | nobu | 2017-09-03 09:39:23 +0900 (Sun, 03 Sep 2017) | 4 lines

string.c: suppress a warning

* string.c (rb_str_enumerate_grapheme_clusters): suppress a
  maybe-uninitialized warning by old gcc.
------------------------------------------------------------------------
r59729 | nobu | 2017-09-03 09:32:27 +0900 (Sun, 03 Sep 2017) | 4 lines

default.mspec: suppress warnings

* spec/default.mspec: suppress tons of useless use of == in void
  context warnings.
------------------------------------------------------------------------
r59728 | nobu | 2017-09-03 09:25:01 +0900 (Sun, 03 Sep 2017) | 4 lines

test_io.rb: suppress a warning

* test/ruby/test_io.rb (test_single_exception_on_close): suppress
  ambiguous first argument warning with RUBYOPT=-w.
------------------------------------------------------------------------
r59727 | nobu | 2017-09-03 09:13:15 +0900 (Sun, 03 Sep 2017) | 7 lines

test_coverage.rb: suppress warnings

* test/coverage/test_coverage.rb (test_nonpositive_linenumber):
  suppress method redefinition warnings.

* test/coverage/test_coverage.rb (test_eval): suppress literal in
  void context warning.
------------------------------------------------------------------------
r59726 | svn | 2017-09-03 09:02:24 +0900 (Sun, 03 Sep 2017) | 1 line

* 2017-09-03
------------------------------------------------------------------------
r59725 | nobu | 2017-09-03 09:02:23 +0900 (Sun, 03 Sep 2017) | 6 lines

test_coverage.rb: use real path

* test/coverage/test_coverage.rb (test_restarting_coverage): use
  real directory path for the case $TMPDIR contains symlinks.  on
  macOS, it is defaulted to a path under /var which is a symlink
  to /private/var.
------------------------------------------------------------------------
r59724 | mame | 2017-09-02 22:55:12 +0900 (Sat, 02 Sep 2017) | 12 lines

test/coverage/test_coverage.rb: run the tests in separated processes

The tests had been disabled under coverage measurement (during
`ENV['COVERAGE']`), since they call `Coverage.result` which stops
coverage measurement.
So, we couldn't measure both C-level and Ruby-level coverage of Ruby
simultaneously.
In short, `./configure --enable-gcov && make exam COVERAGE=true`
misses some coverages.

Now, the test runs in another process.  They does not stop coverage
measurement, so we can now enable the tests under coverage measurement.
------------------------------------------------------------------------
r59723 | rhe | 2017-09-02 15:17:52 +0900 (Sat, 02 Sep 2017) | 1 line

proc.c: [DOC] fixup r59720
------------------------------------------------------------------------
r59722 | nobu | 2017-09-02 11:05:34 +0900 (Sat, 02 Sep 2017) | 4 lines

getoptlong.rb: multiline regexps

* lib/getoptlong.rb: make regexps multiline safe.
  [ruby-core:82627] [Bug #13858]
------------------------------------------------------------------------
r59721 | nobu | 2017-09-02 10:47:43 +0900 (Sat, 02 Sep 2017) | 4 lines

cont.c: fix root fiber to_s

* cont.c (fiber_to_s): fix Fiber#to_s on root fibers which have no
  procs.  [ruby-core:82629] [Bug #13859]
------------------------------------------------------------------------
r59720 | nobu | 2017-09-02 10:41:14 +0900 (Sat, 02 Sep 2017) | 6 lines

Add Method#original_name code example [ci skip]

* proc.c (method_original_name): [DOC] add code example.
  [Fix GH-1693]

Author:    Seiei Miyagi <hanachin@gmail.com>
------------------------------------------------------------------------
r59719 | nobu | 2017-09-02 10:08:27 +0900 (Sat, 02 Sep 2017) | 6 lines

Update Hash#compact! documentation [ci skip]

* hash.c (rb_hash_compact_bang): [DOC] update the case if no
  changes were made.  [ruby-core:82591] [Bug #13855] [Fix GH-1692]

Author:    Lucas Buchala <lucasbuchala@gmail.com>
------------------------------------------------------------------------
r59718 | svn | 2017-09-02 09:26:38 +0900 (Sat, 02 Sep 2017) | 1 line

* 2017-09-02
------------------------------------------------------------------------
r59717 | suke | 2017-09-02 09:26:37 +0900 (Sat, 02 Sep 2017) | 3 lines

* ext/win32ole/win32ole.c (fole_initialize): fix typo. thanks to Gray Wolf. 
  [Feature #13828]

------------------------------------------------------------------------
r59716 | mame | 2017-09-01 23:58:52 +0900 (Fri, 01 Sep 2017) | 5 lines

ext/coverage/coverage.c: add Coverage.enabled?

* ext/coverage/coverage.c (rb_coverage_running): add to quickly
check if coverage is enabled.  patched by Burke Libbey <burke AT
libbey.me> in [ruby-core:81726].  [Feature #13667]
------------------------------------------------------------------------
r59715 | duerst | 2017-09-01 19:22:09 +0900 (Fri, 01 Sep 2017) | 4 lines

replace copyrights by explanatory text in data files for GB2312/GB12345 mappings

Replace the copyrights and explanatory texts in the data files used for mapping
GB2312/GB12345 to/from Unicode with short explanatory texts. [Bug #12598] [ci skip]
------------------------------------------------------------------------
r59714 | rhe | 2017-09-01 17:16:38 +0900 (Fri, 01 Sep 2017) | 4 lines

object.c: fix potential oob write in rb_str_to_dbl()

Ensure space for the terminating NUL byte. Note that this code path is
reachable only when Ruby is compiled with SHARABLE_MIDDLE_SUBSTRING=1.
------------------------------------------------------------------------
r59713 | hsbt | 2017-09-01 12:34:18 +0900 (Fri, 01 Sep 2017) | 4 lines

Exclude Changelog files from documentation.

  Patch from larskanis (Lars Kanis).
  [Misc #13704][ruby-core:81878]
------------------------------------------------------------------------
r59712 | ko1 | 2017-09-01 11:09:02 +0900 (Fri, 01 Sep 2017) | 2 lines

skip unless PLATFORM is darwin.

------------------------------------------------------------------------
r59711 | svn | 2017-09-01 10:13:54 +0900 (Fri, 01 Sep 2017) | 1 line

* properties.
------------------------------------------------------------------------
r59710 | naruse | 2017-09-01 10:13:53 +0900 (Fri, 01 Sep 2017) | 3 lines

Fix C level backtrace on Darwin

SEGV caused by invalid instruction call.
------------------------------------------------------------------------
r59709 | nobu | 2017-09-01 09:58:52 +0900 (Fri, 01 Sep 2017) | 4 lines

compile.c: fix loading pathobj

* compile.c (ibf_load_iseq_each): location.pathobj may not be a
  mere string now.
------------------------------------------------------------------------
r59708 | nobu | 2017-09-01 09:43:00 +0900 (Fri, 01 Sep 2017) | 4 lines

compile.c: ensure after toplevel return

* compile.c (iseq_compile_each0): toplevel returns should fire
  ensures.  [ruby-core:82492] [Bug #13844]
------------------------------------------------------------------------
r59707 | svn | 2017-09-01 00:41:55 +0900 (Fri, 01 Sep 2017) | 1 line

* 2017-09-01
------------------------------------------------------------------------
r59706 | sorah | 2017-09-01 00:41:54 +0900 (Fri, 01 Sep 2017) | 7 lines

Skip test_open_tempfile_path on EINVAL

Looks like File::Constants::TMPFILE could be defined even when not
supported on system.  Just skip the test when we get EINVAL on open(2).

* test/ruby/test_file.rb(test_open_tempfile_path):
  Skip when EINVAL occured on File.open.
------------------------------------------------------------------------
r59705 | sorah | 2017-08-31 20:22:15 +0900 (Thu, 31 Aug 2017) | 1 line

add NEWS entry for [Feature #13568] r59704
------------------------------------------------------------------------
r59704 | sorah | 2017-08-31 20:14:36 +0900 (Thu, 31 Aug 2017) | 24 lines

File#path: Raise IOError when a file is O_TMPFILE

File#path for a file opened with O_TMPFILE has no meaning.

A filepath returned by this method isn't guarranteed about its accuracy,
but files opened with O_TMPFILE are known its recorded path has no
meaning. So let them not to return any pathname.

After a discussion in ruby-core, just returning Qnil makes guessing the
root cause difficult. Instead, this patch makes the method to raise an
error.

Other consideration is calling fnctl(2) on rb_file_path, but it adds a
overhead, and it's difficult to determine O_TMPFILE status  after fd has
been closed.

[Feature #13568]

* io.c(rb_file_open_generic): Set Qnil to fptr->pathv when opening a
  file using O_TMPFILE

* file.c(rb_file_path): Raise IOError when fptr->pathv is Qnil

* file.c(rb_file_path): [DOC] Update for the new behavior
------------------------------------------------------------------------
r59703 | naruse | 2017-08-31 17:33:35 +0900 (Thu, 31 Aug 2017) | 1 line

Added NEWS for r59702
------------------------------------------------------------------------
r59702 | naruse | 2017-08-31 17:29:38 +0900 (Thu, 31 Aug 2017) | 3 lines

Add Socket::Ifaddr.vhid on supported platforms [Feature #13803]

patched by Alan Somers
------------------------------------------------------------------------
r59701 | nobu | 2017-08-31 17:21:46 +0900 (Thu, 31 Aug 2017) | 6 lines

io.c: shrink read buffer

* io.c (io_setstrbuf): return true if the buffer is newly created.

* io.c (io_set_read_length): shrink the read buffer if it is a new
  object and is too large.  [ruby-core:81370] [Bug #13597]
------------------------------------------------------------------------
r59700 | nobu | 2017-08-31 17:07:59 +0900 (Thu, 31 Aug 2017) | 4 lines

string.c: adjust indent [ci skip]

* string.c (rb_str_enumerate_grapheme_clusters): adjust indent.
  [Feature #13780]
------------------------------------------------------------------------
r59699 | nobu | 2017-08-31 17:04:49 +0900 (Thu, 31 Aug 2017) | 4 lines

test_syntax.rb: suppress warnings

* test/ruby/test_syntax.rb (TestSyntax#test_return_toplevel):
  suppress unreachable statement warnings.
------------------------------------------------------------------------
r59698 | naruse | 2017-08-31 15:35:28 +0900 (Thu, 31 Aug 2017) | 3 lines

String#each_grapheme_cluster and String#grapheme_clusters

added to enumerate grapheme clusters [Feature #13780]
------------------------------------------------------------------------
r59697 | nobu | 2017-08-31 12:06:05 +0900 (Thu, 31 Aug 2017) | 4 lines

test_syntax.rb: assert output

* test/ruby/test_syntax.rb (TestSyntax#test_return_toplevel):
  assert expected output if given.
------------------------------------------------------------------------
r59696 | kazu | 2017-08-31 09:05:29 +0900 (Thu, 31 Aug 2017) | 3 lines

`$=` is no longer effective.  [ci skip]

* doc/globals.rdoc: [DOC] `$=` is no longer effective.
------------------------------------------------------------------------
r59695 | ko1 | 2017-08-31 07:23:45 +0900 (Thu, 31 Aug 2017) | 4 lines

to_str -> to_s

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

------------------------------------------------------------------------
r59694 | svn | 2017-08-31 02:24:05 +0900 (Thu, 31 Aug 2017) | 1 line

* 2017-08-31
------------------------------------------------------------------------
r59693 | naruse | 2017-08-31 02:24:05 +0900 (Thu, 31 Aug 2017) | 1 line

A HTTP Header value must not contain CR or LF.
------------------------------------------------------------------------
r59692 | nobu | 2017-08-30 17:26:16 +0900 (Wed, 30 Aug 2017) | 4 lines

array.c: refine binomial_coefficient

* array.c (binomial_coefficient): get rid of bignums by division
  after each multiplications.
------------------------------------------------------------------------
r59691 | nobu | 2017-08-30 16:55:19 +0900 (Wed, 30 Aug 2017) | 3 lines

array.c: refine descending_factorial

* array.c (descending_factorial): reduce factorial multipication.
------------------------------------------------------------------------
r59690 | svn | 2017-08-30 14:37:00 +0900 (Wed, 30 Aug 2017) | 1 line

* 2017-08-30
------------------------------------------------------------------------
r59689 | nobu | 2017-08-30 14:36:59 +0900 (Wed, 30 Aug 2017) | 10 lines

array.c: integer calculations

* array.c (rb_ary_cycle_size, descending_factorial): use
  rb_int_mul instead of rb_funcallv.

* array.c (binomial_coefficient): use rb_int_idiv instead of
  rb_funcallv.

* array.c (rb_ary_repeated_permutation_size): use
  rb_int_positive_pow.
------------------------------------------------------------------------
r59688 | nobu | 2017-08-29 21:13:37 +0900 (Tue, 29 Aug 2017) | 3 lines

array.c: use rb_check_array_type

* array.c (ary_join_1): simplified by rb_check_array_type.
------------------------------------------------------------------------
r59687 | svn | 2017-08-29 20:52:52 +0900 (Tue, 29 Aug 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r59686 | hsbt | 2017-08-29 20:52:50 +0900 (Tue, 29 Aug 2017) | 4 lines

Merge rdoc-6.0.0.beta1.

  This version fixed strange behavior of ruby code parser.
  We will list all of impromovement to Changelog when 6.0.0 releasing.
------------------------------------------------------------------------
r59685 | nobu | 2017-08-29 20:35:35 +0900 (Tue, 29 Aug 2017) | 4 lines

array.c: nested encoding

* array.c (ary_join_1): ignore encodings in nested arrays as an
  initial encoding.
------------------------------------------------------------------------
r59684 | nobu | 2017-08-29 19:49:40 +0900 (Tue, 29 Aug 2017) | 4 lines

array.c: join encoding

* array.c (ary_join_1): copy the encoding of the converted string
  of the first element by to_str too, as an initial encoding.
------------------------------------------------------------------------
r59683 | hsbt | 2017-08-29 19:22:47 +0900 (Tue, 29 Aug 2017) | 3 lines

Partly reverted r59642. Because IO#close is idempotent since Ruby 2.3.

  Reported by Eric Wong. Thank you.
------------------------------------------------------------------------
r59682 | nobu | 2017-08-29 16:11:52 +0900 (Tue, 29 Aug 2017) | 1 line

test/ruby: tweaked heredocs
------------------------------------------------------------------------
r59681 | ko1 | 2017-08-29 16:01:27 +0900 (Tue, 29 Aug 2017) | 1 line

fix error message.
------------------------------------------------------------------------
r59680 | sonots | 2017-08-29 15:24:31 +0900 (Tue, 29 Aug 2017) | 4 lines

.gitignore: ignore run.gdb

* .gitignore: ignore run.gdb which is assumed to be generated
  by make gdb and customized manually during development
------------------------------------------------------------------------
r59679 | glass | 2017-08-29 13:58:29 +0900 (Tue, 29 Aug 2017) | 1 line

resolv.rb: remove unnecessary require statement
------------------------------------------------------------------------
r59678 | nobu | 2017-08-29 08:25:56 +0900 (Tue, 29 Aug 2017) | 5 lines

win32.c: fix function pointer

* win32/win32.c (rb_w32_set_thread_description): fix the condition
  if the API function pointer is found.
  [ruby-core:82494] [Bug #13845]
------------------------------------------------------------------------
r59677 | svn | 2017-08-29 01:05:11 +0900 (Tue, 29 Aug 2017) | 1 line

* 2017-08-29
------------------------------------------------------------------------
r59676 | naruse | 2017-08-29 01:05:11 +0900 (Tue, 29 Aug 2017) | 5 lines

Increase STACKFRAME_FOR_CALL_CFUNC

On below env, miniruby requires 568 and ruby requires 838 to pass.
* ruby -v: ruby 2.5.0dev (2017-08-28 trunk 59670) [x86_64-freebsd10.3]
* gcc8 (FreeBSD Ports Collection) 8.0.0 20170828 (experimental)
------------------------------------------------------------------------
r59675 | nobu | 2017-08-28 23:21:40 +0900 (Mon, 28 Aug 2017) | 3 lines

compile.c: compile_if

* compile.c (compile_if): extract from iseq_compile_each.
------------------------------------------------------------------------
r59674 | kazu | 2017-08-28 20:20:08 +0900 (Mon, 28 Aug 2017) | 1 line

[DOC] Fix typo in rdoc of `transform_values!` [ci skip]
------------------------------------------------------------------------
r59673 | glass | 2017-08-28 19:55:37 +0900 (Mon, 28 Aug 2017) | 4 lines

string.c: fix potential bug in String#split

* string.c (rb_str_split_m): fix potential bug when rb_memsearch()
  matches a octet in the middle of a multi-byte character sequence.
------------------------------------------------------------------------
r59672 | hsbt | 2017-08-28 17:31:28 +0900 (Mon, 28 Aug 2017) | 4 lines

Merge rubygems-2.6.13.

  see details for this update:
  http://blog.rubygems.org/2017/08/27/2.6.13-released.html
------------------------------------------------------------------------
r59671 | glass | 2017-08-28 16:54:00 +0900 (Mon, 28 Aug 2017) | 3 lines

lib/csv.rb: refactor and optimize. This change
includes the patch from marshall-lee.
close #1168
------------------------------------------------------------------------
r59670 | nobu | 2017-08-28 01:18:17 +0900 (Mon, 28 Aug 2017) | 3 lines

compile.c: compile_ensure

* compile.c (compile_ensure): extract from iseq_compile_each.
------------------------------------------------------------------------
r59669 | nobu | 2017-08-28 01:15:19 +0900 (Mon, 28 Aug 2017) | 3 lines

compile.c: compile_resbody

* compile.c (compile_resbody): extract from iseq_compile_each.
------------------------------------------------------------------------
r59668 | svn | 2017-08-28 01:04:27 +0900 (Mon, 28 Aug 2017) | 1 line

* 2017-08-28
------------------------------------------------------------------------
r59667 | nobu | 2017-08-28 01:04:26 +0900 (Mon, 28 Aug 2017) | 3 lines

compile.c: compile_rescue

* compile.c (compile_rescue): extract from iseq_compile_each.
------------------------------------------------------------------------
r59666 | shugo | 2017-08-27 15:32:00 +0900 (Sun, 27 Aug 2017) | 4 lines

lib/net/imap.rb: Accept continuation requests without response text

The IMAP server of DOCOMO returns such continuation requests.
[ruby-list:50558]
------------------------------------------------------------------------
r59665 | suke | 2017-08-27 08:39:43 +0900 (Sun, 27 Aug 2017) | 2 lines

* ext/win32ole/win32ole.c (fole_initialize): support licensed COM server. Thanks to Gray Wolf. [Feature :#13828]

------------------------------------------------------------------------
r59664 | nobu | 2017-08-27 06:02:23 +0900 (Sun, 27 Aug 2017) | 3 lines

vcs.rb: refresh after dcommit

* tool/vcs.rb (VCS::GIT#commit): refresh until sync after dcommit.
------------------------------------------------------------------------
r59663 | svn | 2017-08-27 05:55:32 +0900 (Sun, 27 Aug 2017) | 1 line

* 2017-08-27
------------------------------------------------------------------------
r59662 | nobu | 2017-08-27 05:55:31 +0900 (Sun, 27 Aug 2017) | 1 line

NEWS: Thread#name= on Windows [ci skip]
------------------------------------------------------------------------
r59661 | nobu | 2017-08-26 23:22:31 +0900 (Sat, 26 Aug 2017) | 4 lines

win32.c: fix return value

* win32/win32.c (rb_w32_set_thread_description_str): return the
  result when name is nil.
------------------------------------------------------------------------
r59660 | nobu | 2017-08-26 09:30:03 +0900 (Sat, 26 Aug 2017) | 7 lines

thread_win32.c: set thread name

* thread_win32.c (native_set_another_thread_name): set thread name
  by SetThreadDescription.

* win32/win32.c (rb_w32_set_thread_description): dynamically try
  SetThreadDescription.
------------------------------------------------------------------------
r59659 | svn | 2017-08-26 00:47:05 +0900 (Sat, 26 Aug 2017) | 1 line

* 2017-08-26
------------------------------------------------------------------------
r59658 | kazu | 2017-08-26 00:47:04 +0900 (Sat, 26 Aug 2017) | 3 lines

`$IGNORECASE` is no longer effective.  [ci skip]

* lib/English.rb: [DOC] `$IGNORECASE` is no longer effective.
------------------------------------------------------------------------
r59657 | glass | 2017-08-25 17:13:32 +0900 (Fri, 25 Aug 2017) | 7 lines

csv.rb: optimize CSV::Table#to_a and #to_csv

* lib/csv.rb (CSV::Table#to_a, #to_csv): use Array#push instead of
  Array#concat for performance improvement. This performance improvement is
  proposed by zdennis <zach.dennis@gmail.com>. The patch is from
  Mau Magnaguagno <maumagnaguagno@gmail.com>.
  close #946
------------------------------------------------------------------------
r59656 | nobu | 2017-08-25 12:41:43 +0900 (Fri, 25 Aug 2017) | 4 lines

compile.c: unreachable chunk

* compile.c (iseq_peephole_optimize): remove unreachable chunk
  which appeared by useless jump elimination.
------------------------------------------------------------------------
r59655 | nobu | 2017-08-25 12:33:32 +0900 (Fri, 25 Aug 2017) | 4 lines

compile.c: useless jump elimination

* compile.c (iseq_peephole_optimize): eliminate useless if/unless
  just before jump.
------------------------------------------------------------------------
r59654 | svn | 2017-08-25 11:37:39 +0900 (Fri, 25 Aug 2017) | 1 line

* 2017-08-25
------------------------------------------------------------------------
r59653 | nobu | 2017-08-25 11:37:38 +0900 (Fri, 25 Aug 2017) | 4 lines

compile.c: moved comments [ci skip]

* compile.c (iseq_peephole_optimize): moved comments inside proper
  blocks.
------------------------------------------------------------------------
r59652 | nobu | 2017-08-24 16:31:56 +0900 (Thu, 24 Aug 2017) | 4 lines

compile.c: show failed instructions

* compile.c (iseq_set_sequence): show failed instructions at
  adjuststack mismatch.
------------------------------------------------------------------------
r59651 | svn | 2017-08-24 16:26:06 +0900 (Thu, 24 Aug 2017) | 1 line

* 2017-08-24
------------------------------------------------------------------------
r59650 | nobu | 2017-08-24 16:26:05 +0900 (Thu, 24 Aug 2017) | 1 line

compile.c: free before adjust error
------------------------------------------------------------------------
r59649 | nobu | 2017-08-23 13:01:39 +0900 (Wed, 23 Aug 2017) | 4 lines

gc.c: restore cfp at finalizer

* gc.c (run_finalizer): restore cfp for the case an exception
  raised in a finalizer.  [ruby-core:82432] [Bug #13832]
------------------------------------------------------------------------
r59648 | nobu | 2017-08-23 12:14:05 +0900 (Wed, 23 Aug 2017) | 1 line

skip unless finalizers run
------------------------------------------------------------------------
r59647 | nobu | 2017-08-23 11:26:02 +0900 (Wed, 23 Aug 2017) | 4 lines

gc.c: run all finalizers

* gc.c (run_finalizer): revert r59155 partially. finalizing loop
  should continue even after an exception is rescued.
------------------------------------------------------------------------
r59646 | svn | 2017-08-23 11:23:48 +0900 (Wed, 23 Aug 2017) | 1 line

* 2017-08-23
------------------------------------------------------------------------
r59645 | ko1 | 2017-08-23 11:23:47 +0900 (Wed, 23 Aug 2017) | 3 lines

remove debug code.


------------------------------------------------------------------------
r59644 | nobu | 2017-08-22 22:21:18 +0900 (Tue, 22 Aug 2017) | 4 lines

parse.y: primary should not be 0

* parse.y (primary): should not be 0, since it can be a receiver.
  [ruby-core:82447] [Bug #13836]
------------------------------------------------------------------------
r59643 | hsbt | 2017-08-22 15:57:00 +0900 (Tue, 22 Aug 2017) | 3 lines

Fixed regression to convert blank value at r45497.

  [Bug #11126][ruby-core:69088]
------------------------------------------------------------------------
r59642 | hsbt | 2017-08-22 15:40:59 +0900 (Tue, 22 Aug 2017) | 3 lines

Gracefully handle CSV IO when file descriptor closed.

  [Bug #10504][ruby-core:66240]
------------------------------------------------------------------------
r59641 | hsbt | 2017-08-22 15:34:27 +0900 (Tue, 22 Aug 2017) | 3 lines

Fixed equality method fails when given the object that doesn't support table method.

  [Bug #12422][ruby-core:75707]
------------------------------------------------------------------------
r59640 | hsbt | 2017-08-22 15:17:42 +0900 (Tue, 22 Aug 2017) | 3 lines

Fixed to write_headers option behavior when given no rows.

  [Bug #9988][ruby-core:63375]
------------------------------------------------------------------------
r59639 | hsbt | 2017-08-22 14:32:34 +0900 (Tue, 22 Aug 2017) | 5 lines

Escape skip_lines string before convert to Regexp.

  It ignored all of lines when given Regexp special characters.

  [Feature #9147][ruby-core:58549]
------------------------------------------------------------------------
r59638 | nobu | 2017-08-22 13:40:16 +0900 (Tue, 22 Aug 2017) | 1 line

pack insn_operand_info and insn_len_info
------------------------------------------------------------------------
r59637 | nobu | 2017-08-22 13:37:08 +0900 (Tue, 22 Aug 2017) | 1 line

pack insns_name_info
------------------------------------------------------------------------
r59636 | nobu | 2017-08-22 13:22:01 +0900 (Tue, 22 Aug 2017) | 1 line

tool/instruction.rb: move logics to templates
------------------------------------------------------------------------
r59635 | nobu | 2017-08-22 12:07:01 +0900 (Tue, 22 Aug 2017) | 4 lines

insns.inc.tmpl: ensure info size

* template/insns.inc.tmpl (ASSERT_VM_INSTRUCTION_SIZE): static
  assertion for VM instruction info tables.
------------------------------------------------------------------------
r59634 | nobu | 2017-08-22 11:46:16 +0900 (Tue, 22 Aug 2017) | 4 lines

signal.c: fatal stack

* signal.c (check_stack_overflow): raise fatal when the last tag
  is in danger zone.
------------------------------------------------------------------------
r59633 | nobu | 2017-08-22 11:42:23 +0900 (Tue, 22 Aug 2017) | 1 line

signal.c: removed raise_stack_overflow:
------------------------------------------------------------------------
r59632 | svn | 2017-08-22 09:41:25 +0900 (Tue, 22 Aug 2017) | 1 line

* 2017-08-22
------------------------------------------------------------------------
r59631 | ko1 | 2017-08-22 09:41:24 +0900 (Tue, 22 Aug 2017) | 5 lines

split out struct cont_saved_vm_stack.

* cont.c: introduce `struct cont_saved_vm_stack` which was part of
  `struct rb_context_struct`.

------------------------------------------------------------------------
r59630 | nobu | 2017-08-21 23:15:31 +0900 (Mon, 21 Aug 2017) | 7 lines

prevent stack overflow

* gc.c: enable PREVENT_STACK_OVERFLOW.

* vm.c (invoke_iseq_block_from_c): prevent stack overflow.

* vm_eval.c (stack_check): raise preallocated exception instance.
------------------------------------------------------------------------
r59629 | yui-knk | 2017-08-21 22:38:35 +0900 (Mon, 21 Aug 2017) | 6 lines

Remove a meaningless local variable assignment

* iseq.c (rb_iseq_disasm_insn): Remove a meaningless
  local variable assignment. `insn` is never changed
  in this function, so a result of `insn_op_types(insn)`
  is also never changed.
------------------------------------------------------------------------
r59628 | svn | 2017-08-21 15:46:47 +0900 (Mon, 21 Aug 2017) | 1 line

* 2017-08-21
------------------------------------------------------------------------
r59627 | nobu | 2017-08-21 15:46:46 +0900 (Mon, 21 Aug 2017) | 7 lines

vm_core.h: ruby_error_stackfatal

* vm_core.h (ruby_special_exceptions): rename sysstack_gc as
  stackfatal.

* eval.c (Init_eval): modified the message for stackfatal error as
  "critical region".
------------------------------------------------------------------------
r59626 | nobu | 2017-08-20 15:08:25 +0900 (Sun, 20 Aug 2017) | 6 lines

non-keywords hash

* class.c (rb_scan_args), include/ruby/ruby.h (rb_scan_args_set):
  return non-keywords elements only in the last hash when keyword
  arguments are extracted from it, as well as methods defined in
  ruby level.  [ruby-core:82427] [Bug #13830]
------------------------------------------------------------------------
r59625 | svn | 2017-08-20 08:39:04 +0900 (Sun, 20 Aug 2017) | 1 line

* 2017-08-20
------------------------------------------------------------------------
r59624 | nobu | 2017-08-20 08:39:03 +0900 (Sun, 20 Aug 2017) | 7 lines

ruby.h: fix rb_scan_args_trail_idx

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

* include/ruby/ruby.h (rb_scan_args_n_trail): ditto.
------------------------------------------------------------------------
r59623 | ktsj | 2017-08-19 19:02:57 +0900 (Sat, 19 Aug 2017) | 1 line

gems/bundled_gems: Update to power_assert 1.1.0
------------------------------------------------------------------------
r59622 | nobu | 2017-08-19 10:04:15 +0900 (Sat, 19 Aug 2017) | 4 lines

class.c: check kw hash

* class.c (rb_keyword_error_new): get rid of an intermediate
  string and check if keys are symbols.
------------------------------------------------------------------------
r59621 | svn | 2017-08-19 09:45:23 +0900 (Sat, 19 Aug 2017) | 1 line

* 2017-08-19
------------------------------------------------------------------------
r59620 | nobu | 2017-08-19 09:45:22 +0900 (Sat, 19 Aug 2017) | 1 line

class.c: call rb_hash_keys directly
------------------------------------------------------------------------
r59619 | nobu | 2017-08-18 21:44:30 +0900 (Fri, 18 Aug 2017) | 4 lines

vm_insnhelper.c: vm_cfp_consistent_p

* vm_insnhelper.c (vm_cfp_consistent_p): extracted the conditions
  for cfp consistency.
------------------------------------------------------------------------
r59618 | nobu | 2017-08-18 21:17:59 +0900 (Fri, 18 Aug 2017) | 4 lines

vm_insnhelper.c: raise ruby_error_sysstack_gc

* vm_insnhelper.c (rb_threadptr_stack_overflow): rb_fatal is not
  available during GC.  raise the preallocated fatal error.
------------------------------------------------------------------------
r59617 | shugo | 2017-08-18 14:16:05 +0900 (Fri, 18 Aug 2017) | 3 lines

test/net/imap/test_imap.rb: Use Addrinfo.tcp in case localhost is ::1.

[ruby-dev:50208] [Bug #13825]
------------------------------------------------------------------------
r59616 | nobu | 2017-08-18 08:31:41 +0900 (Fri, 18 Aug 2017) | 4 lines

Revert r59612

* method.h (rb_method_definition_t): rb_method_type_t should be
  unsigned as it needs 5bits at least for signed extension.
------------------------------------------------------------------------
r59615 | svn | 2017-08-18 01:34:40 +0900 (Fri, 18 Aug 2017) | 1 line

* 2017-08-18
------------------------------------------------------------------------
r59614 | naruse | 2017-08-18 01:34:40 +0900 (Fri, 18 Aug 2017) | 36 lines

Add optimization for creating zerofill string

```
require 'benchmark'
n = 1 * 1024 * 1024 * 1024
Benchmark.bmbm do |x|
  x.report("*") { 0.chr * n }
  x.report("ljust") { String.new(capacity: n).ljust(n, "\0") }
end
```

Before

```% ./ruby test.rb
Rehearsal -----------------------------------------
*       0.358396   0.392753   0.751149 (  1.134231)
ljust   0.203277   0.389223   0.592500 (  0.594816)
-------------------------------- total: 1.343649sec

            user     system      total        real
*       0.282647   0.304600   0.587247 (  0.589205)
ljust   0.201834   0.283801   0.485635 (  0.487617)
```

After

```% ./ruby test.rb
Rehearsal -----------------------------------------
*       0.000522   0.000021   0.000543 (  0.000534)
ljust   0.208551   0.321030   0.529581 (  0.542083)
-------------------------------- total: 0.530124sec

            user     system      total        real
*       0.000069   0.000006   0.000075 (  0.000069)
ljust   0.206698   0.301032   0.507730 (  0.517674)
```
------------------------------------------------------------------------
r59613 | nobu | 2017-08-17 23:58:11 +0900 (Thu, 17 Aug 2017) | 5 lines

vm_method.c: alias warning at refined method

* vm_method.c (rb_method_entry_make): suppress a warning at
  refined method which will not be redefined.
  [ruby-core:82385] [Bug #13817]
------------------------------------------------------------------------
r59612 | nobu | 2017-08-17 23:36:57 +0900 (Thu, 17 Aug 2017) | 4 lines

method.h: enum rb_method_definition_t::type

* method.h (rb_method_definition_t): define type as an enum for
  debugging.
------------------------------------------------------------------------
r59611 | nobu | 2017-08-17 21:33:41 +0900 (Thu, 17 Aug 2017) | 4 lines

parse.y: unexpected tINTEGER message

* parse.y (parser_number_literal_suffix): keep token after numeric
  suffix to show the value in an error message.
------------------------------------------------------------------------
r59610 | svn | 2017-08-17 21:31:11 +0900 (Thu, 17 Aug 2017) | 1 line

* 2017-08-17
------------------------------------------------------------------------
r59609 | kazu | 2017-08-17 21:31:10 +0900 (Thu, 17 Aug 2017) | 4 lines

Use `*` instead of `**` in .editorconfig

It seems `**` is same as `*` when no `/` exist.
[ci skip]
------------------------------------------------------------------------
r59608 | hsbt | 2017-08-16 18:45:58 +0900 (Wed, 16 Aug 2017) | 3 lines

Extract files variables of ipaddr.gemspec for non git environment.

  [Bug #13808][ruby-core:82358]
------------------------------------------------------------------------
r59607 | hsbt | 2017-08-16 18:37:03 +0900 (Wed, 16 Aug 2017) | 4 lines

Added gemspec of digest library.

  standalone repository is https://github.com/ruby/digest
  [Misc #13771][ruby-core:82179]
------------------------------------------------------------------------
r59606 | nobu | 2017-08-16 16:18:45 +0900 (Wed, 16 Aug 2017) | 5 lines

vm_insnhelper.c: cfp error at stack overflow

* vm_insnhelper.c (threadptr_stack_overflow): set stack overflow
  flag until handling execptions, to get rid of cfp consistency
  error when exec tag was rewound.  [ruby-core:80618] [Bug #13412]
------------------------------------------------------------------------
r59605 | naruse | 2017-08-16 06:39:38 +0900 (Wed, 16 Aug 2017) | 3 lines

Partially revert "suppress warning: assigned but unused variable - line"

revert unexpected changes
------------------------------------------------------------------------
r59604 | naruse | 2017-08-16 06:36:16 +0900 (Wed, 16 Aug 2017) | 1 line

suppress warning: assigned but unused variable - line
------------------------------------------------------------------------
r59603 | svn | 2017-08-16 06:33:44 +0900 (Wed, 16 Aug 2017) | 1 line

* 2017-08-16
------------------------------------------------------------------------
r59602 | naruse | 2017-08-16 06:33:43 +0900 (Wed, 16 Aug 2017) | 1 line

High Sierra's APFS cannot use invalid filenames [Bug #13816]
------------------------------------------------------------------------
r59601 | nobu | 2017-08-15 22:53:38 +0900 (Tue, 15 Aug 2017) | 4 lines

parse.y: removed useless check

* parse.y (singleton): literal nodes are always value expressions,
  no check is necessary.
------------------------------------------------------------------------
r59600 | yui-knk | 2017-08-15 22:12:39 +0900 (Tue, 15 Aug 2017) | 6 lines

Remove not exist arguments from comments of insns

is_local argument was introduced on r11639 and removed on r11813.

* insns.def (getinstancevariable, setinstancevariable): Remove a not
  exist argument.
------------------------------------------------------------------------
r59599 | naruse | 2017-08-15 22:05:18 +0900 (Tue, 15 Aug 2017) | 1 line

suppress warning: assigned but unused variable - line
------------------------------------------------------------------------
r59598 | nobu | 2017-08-15 10:05:50 +0900 (Tue, 15 Aug 2017) | 4 lines

ftp.rb: fix example format [ci skip]

* lib/uri/ftp.rb: [DOC] fix format of example URLs.  patched by
  aycabta (Code Ahss) at [ruby-core:82379].  [Bug #13814]
------------------------------------------------------------------------
r59597 | nobu | 2017-08-15 09:50:22 +0900 (Tue, 15 Aug 2017) | 5 lines

ripper.rb: fix License format [ci skip]

* ext/ripper/lib/ripper.rb: [DOC] fix format of the License
  description and the author.  patched by aycabta (Code Ahss) at
  [ruby-core:82376].  [Bug #13813]
------------------------------------------------------------------------
r59596 | nobu | 2017-08-15 09:45:14 +0900 (Tue, 15 Aug 2017) | 3 lines

compile.c: compile_retry

* compile.c (compile_retry): extract from iseq_compile_each.
------------------------------------------------------------------------
r59595 | nobu | 2017-08-15 09:45:13 +0900 (Tue, 15 Aug 2017) | 3 lines

compile.c: compile_redo

* compile.c (compile_redo): extract from iseq_compile_each.
------------------------------------------------------------------------
r59594 | nobu | 2017-08-15 09:18:47 +0900 (Tue, 15 Aug 2017) | 3 lines

compile.c: compile_next

* compile.c (compile_next): extract from iseq_compile_each.
------------------------------------------------------------------------
r59593 | nobu | 2017-08-15 08:55:34 +0900 (Tue, 15 Aug 2017) | 3 lines

compile.c: compile_break

* compile.c (compile_break): extract from iseq_compile_each.
------------------------------------------------------------------------
r59592 | svn | 2017-08-15 01:04:36 +0900 (Tue, 15 Aug 2017) | 1 line

* 2017-08-15
------------------------------------------------------------------------
r59591 | duerst | 2017-08-15 01:04:35 +0900 (Tue, 15 Aug 2017) | 2 lines

fix documentation of REXML::Formatters::Default (id_hack -> ie_hack) [ci skip]

------------------------------------------------------------------------
r59590 | nobu | 2017-08-14 23:25:27 +0900 (Mon, 14 Aug 2017) | 3 lines

compile.c: compile_loop

* compile.c (compile_loop): extract from iseq_compile_each.
------------------------------------------------------------------------
r59589 | nobu | 2017-08-14 23:18:29 +0900 (Mon, 14 Aug 2017) | 1 line

type is invariant inside this block
------------------------------------------------------------------------
r59588 | svn | 2017-08-14 22:26:38 +0900 (Mon, 14 Aug 2017) | 1 line

* 2017-08-14
------------------------------------------------------------------------
r59587 | yui-knk | 2017-08-14 22:26:37 +0900 (Mon, 14 Aug 2017) | 5 lines

Fix a class of a returned value

* ext/objspace/object_tracing.c (allocation_sourceline): Fix
  a class of a returned value. allocation_sourceline returns
  an integer.
------------------------------------------------------------------------
r59586 | nobu | 2017-08-13 22:43:36 +0900 (Sun, 13 Aug 2017) | 6 lines

script.rb: skip empty directories

* spec/mspec/lib/mspec/utils/script.rb (entries): skip empty
  directories so that at least one file would run.

Merged https://github.com/ruby/spec/issues/459
------------------------------------------------------------------------
r59585 | nobu | 2017-08-13 22:34:26 +0900 (Sun, 13 Aug 2017) | 8 lines

parse.y: set used flag in gettable

* parse.y (dvar_defined_ref, dvar_defined): rename macros.  only
  gettable uses the former.  assignable should not set LVAR_USED
  flag.

* parse.y (gettable_gen): set used flag on local/dynamic variables
  instead of setting in lexer.  [ruby-core:82368] [Bug #13809]
------------------------------------------------------------------------
r59584 | kou | 2017-08-13 21:14:24 +0900 (Sun, 13 Aug 2017) | 6 lines

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

[HackerOne:249295]

Reported by Andrea Jegher. Thanks!!!

------------------------------------------------------------------------
r59583 | nobu | 2017-08-13 16:53:04 +0900 (Sun, 13 Aug 2017) | 4 lines

stringio.c: suppress a warning [ci skip]

* ext/stringio/stringio.c (strio_read): suppress an
  implicit-fallthrough warning.
------------------------------------------------------------------------
r59582 | nobu | 2017-08-13 16:31:49 +0900 (Sun, 13 Aug 2017) | 4 lines

stringio.c: encoding at empty chomped result

* ext/stringio/stringio.c (strio_gets): should return string with
  the external encoding, at empty chomped result .
------------------------------------------------------------------------
r59581 | nobu | 2017-08-13 16:21:13 +0900 (Sun, 13 Aug 2017) | 4 lines

stringio.c: encoding at empty result

* ext/stringio/stringio.c (strio_gets): should return string with
  the external encoding, at empty result.
------------------------------------------------------------------------
r59580 | svn | 2017-08-13 02:41:49 +0900 (Sun, 13 Aug 2017) | 1 line

* 2017-08-13
------------------------------------------------------------------------
r59579 | naruse | 2017-08-13 02:41:48 +0900 (Sun, 13 Aug 2017) | 1 line

Suppress warning: shadowing outer local variable - klass
------------------------------------------------------------------------
r59578 | nobu | 2017-08-12 10:47:09 +0900 (Sat, 12 Aug 2017) | 5 lines

stringio.c: encoding at EOF

* ext/stringio/stringio.c (strio_read): should return string with
  the external encoding, at EOF too.
  [ruby-core:82349] [Bug #13806]
------------------------------------------------------------------------
r59577 | svn | 2017-08-12 10:34:14 +0900 (Sat, 12 Aug 2017) | 1 line

* 2017-08-12
------------------------------------------------------------------------
r59576 | nobu | 2017-08-12 10:34:13 +0900 (Sat, 12 Aug 2017) | 4 lines

test_stringio.rb: more assertions

* test/stringio/test_stringio.rb (test_read): add assertions
  of return value of read with a buffer string.
------------------------------------------------------------------------
r59575 | nobu | 2017-08-11 11:44:30 +0900 (Fri, 11 Aug 2017) | 1 line

enum.c: make constant argument static
------------------------------------------------------------------------
r59574 | nobu | 2017-08-11 11:05:24 +0900 (Fri, 11 Aug 2017) | 4 lines

re.c: options for sub-regexp

* re.c (rb_reg_to_s): needs embedded options to check syntax of
  sub-regexp.  [ruby-core:82328] [Bug #13798]
------------------------------------------------------------------------
r59573 | svn | 2017-08-11 10:27:25 +0900 (Fri, 11 Aug 2017) | 1 line

* 2017-08-11
------------------------------------------------------------------------
r59572 | nobu | 2017-08-11 10:27:24 +0900 (Fri, 11 Aug 2017) | 6 lines

separate hash literal and keyword arguments

* compile.c (compile_array_keyword_arg): separate keyword splat
  inside hash literal from argument list.

* parse.y (rparen): flag hash literal.
------------------------------------------------------------------------
r59571 | yui-knk | 2017-08-10 23:46:51 +0900 (Thu, 10 Aug 2017) | 5 lines

Fix types of function argument

* doc/extension.ja.rdoc: Fix types of rb_ary_aref argument

* doc/extension.rdoc: ditto
------------------------------------------------------------------------
r59570 | nagachika | 2017-08-10 21:57:07 +0900 (Thu, 10 Aug 2017) | 3 lines

fix a typo in comment.

	* cont.c (typedef struct rb_context_struct): fix a typo in comment.
------------------------------------------------------------------------
r59569 | knu | 2017-08-10 21:37:04 +0900 (Thu, 10 Aug 2017) | 3 lines

Import ruby-electric.el version 2.3.1 from upstream

It now supports [enh-ruby-mode](https://github.com/zenspider/enhanced-ruby-mode).
------------------------------------------------------------------------
r59568 | nobu | 2017-08-10 20:40:49 +0900 (Thu, 10 Aug 2017) | 4 lines

vm_core.h: unreachable VM_UNREACHABLE

* vm_core.h (VM_UNREACHABLE): tell unreachable if possible.
  suppress an invalid-noreturn warning at rb_fiber_start.
------------------------------------------------------------------------
r59567 | rhe | 2017-08-10 18:23:45 +0900 (Thu, 10 Aug 2017) | 26 lines

openssl: import v2.0.5

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

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

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

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

Lars Kanis (1):
      Add msys2 library dependency tag in gem metadata
------------------------------------------------------------------------
r59566 | ko1 | 2017-08-10 15:26:52 +0900 (Thu, 10 Aug 2017) | 2 lines

use VM_UNREACHABLE() instead of rb_bug().

------------------------------------------------------------------------
r59565 | ko1 | 2017-08-10 15:01:57 +0900 (Thu, 10 Aug 2017) | 6 lines

introduce fiber_restore_thread.

* cont.c (fiber_restore_thread): added (separate from cont_restore_thread).

* cont.c (fiber_setcontext): call fiber_restore_thread() directly.

------------------------------------------------------------------------
r59564 | nobu | 2017-08-10 14:54:56 +0900 (Thu, 10 Aug 2017) | 5 lines

ruby.c: ignore non-option in shebang line

* ruby.c (moreswitches): process all words as options only in
  an environment variable, but not in a shebang line.
  [ruby-core:82267] [Bug #13786]
------------------------------------------------------------------------
r59563 | ko1 | 2017-08-10 13:55:12 +0900 (Thu, 10 Aug 2017) | 6 lines

rename rb_execution_context_t::stack(_size) to vm_stack(_size).

* vm_core.h: Ruby processes run with two stacks, a machine stack and a
  VM stack. To make it clear, this fix renames
  rb_execution_context_t::stack(_size) to vm_stack(_size).

------------------------------------------------------------------------
r59562 | nobu | 2017-08-10 13:03:48 +0900 (Thu, 10 Aug 2017) | 1 line

cont.c: fix up r59557 for !FIBER_USE_NATIVE
------------------------------------------------------------------------
r59561 | ko1 | 2017-08-10 12:34:25 +0900 (Thu, 10 Aug 2017) | 3 lines

constify some variables.


------------------------------------------------------------------------
r59560 | ko1 | 2017-08-10 12:20:39 +0900 (Thu, 10 Aug 2017) | 7 lines

Define Thread#to_s (as Thread#inspect) and make alias `inspect` as `to_s`.

* thread.c: "Thread#to_s" is not defined without any reason. So this fix
  define "Thread#to_s" which returns a string with some thread information.
  Also this fix makes alias "inspect" which refers "to_s". This manner is
  same as other objects.

------------------------------------------------------------------------
r59559 | ko1 | 2017-08-10 12:09:51 +0900 (Thu, 10 Aug 2017) | 2 lines

remove additional newline.

------------------------------------------------------------------------
r59558 | ko1 | 2017-08-10 11:58:36 +0900 (Thu, 10 Aug 2017) | 7 lines

Fiber#to_s (#inspect) return richer information.

* cont.c (fiber_to_s): return with block and status information.

* proc.c (proc_to_s_): removed and introduce rb_block_to_s() function
  to return block information string.

------------------------------------------------------------------------
r59557 | ko1 | 2017-08-10 10:47:13 +0900 (Thu, 10 Aug 2017) | 16 lines

refactoring Fiber status.

* cont.c: revisit fiber status.
  "FIBER_RUNNING" status represents fiber is resumed or suspended.
  This fix separate these two status explicitly.
  FIBER_CREATED: Just after Fiber.new. Not resumed yet.
  FIBER_RESUMED (new): Fiber#resumed. Now this fiber is running.
  FIBER_SUSPENDED (new): Suspended by Fiber.yield. Not running.
  FIBER_TERMINATED: Terminated.

  Add sevral assertions to check consistency with these status.

* cont.c (fiber_status_set): added to change status.

* cont.c (FIBER_xxx_P): added to check fiber status.

------------------------------------------------------------------------
r59556 | nobu | 2017-08-10 09:50:45 +0900 (Thu, 10 Aug 2017) | 5 lines

compile.c: fix KW_SPLAT flag condition

* compile.c (compile_array_keyword_arg): fix the condition of
  KW_SPLAT flag.  splat is value node only without key node,
  simple assoc argument is not.  [ruby-core:82291] [Bug #13793]
------------------------------------------------------------------------
r59555 | svn | 2017-08-10 09:32:13 +0900 (Thu, 10 Aug 2017) | 1 line

* 2017-08-10
------------------------------------------------------------------------
r59554 | nobu | 2017-08-10 09:32:12 +0900 (Thu, 10 Aug 2017) | 5 lines

vm_args.c: prefer optarg to keyword splat

* vm_args.c (setup_parameters_complex): prefer optional argument
  to splat keyword arguments for backward compatibility.
  [ruby-core:82280] [Bug #13791]
------------------------------------------------------------------------
r59549 | nobu | 2017-08-09 20:03:55 +0900 (Wed, 09 Aug 2017) | 13 lines

ruby.c: origarg

* ruby.c (dladdr_path, ruby_set_argv): add guards for origarg.
  [ruby-core:82272] [Bug #13788]

* ruby.c (proc_options, process_options, ruby_process_options):
  set origarg if not set yet.

* ruby.c (process_options): prefer argv in the argument to origarg
  as program name.

* ruby.c (ruby_sysinit): set origarg only if argc and argv seem
  valid.
------------------------------------------------------------------------
r59536 | svn | 2017-08-09 17:17:53 +0900 (Wed, 09 Aug 2017) | 1 line

* 2017-08-09
------------------------------------------------------------------------
r59535 | usa | 2017-08-09 17:17:52 +0900 (Wed, 09 Aug 2017) | 4 lines

Missed `#` in usage

* tool/generate-backport-changelog.rb (usage): missed `#` in usage

------------------------------------------------------------------------
r59529 | nobu | 2017-08-08 19:43:19 +0900 (Tue, 08 Aug 2017) | 5 lines

dir.c: fix up r59527

* dir.c (glob_helper): fix up r59527, dot files other than current
  directory should not be included unless FNM_DOTMATCH is given.
  [ruby-core:82266] [Bug #13785]
------------------------------------------------------------------------
r59528 | svn | 2017-08-08 17:34:11 +0900 (Tue, 08 Aug 2017) | 1 line

* 2017-08-08
------------------------------------------------------------------------
r59527 | nobu | 2017-08-08 17:34:10 +0900 (Tue, 08 Aug 2017) | 5 lines

dir.c: fix up r59481 for old kernels

* dir.c (glob_helper): fix up r59481 for old kernels, which
  provide d_type member but just always set DT_UNKNOWN for any
  entries.  [ruby-core:82266] [Bug #13785]
------------------------------------------------------------------------
r59526 | nobu | 2017-08-07 13:15:19 +0900 (Mon, 07 Aug 2017) | 1 line

enum.c: optimize for integers
------------------------------------------------------------------------
r59525 | nobu | 2017-08-07 13:08:46 +0900 (Mon, 07 Aug 2017) | 1 line

enum.c: prefer rb_funcallv to rb_funcall
------------------------------------------------------------------------
r59524 | svn | 2017-08-07 12:45:33 +0900 (Mon, 07 Aug 2017) | 1 line

* 2017-08-07
------------------------------------------------------------------------
r59523 | nobu | 2017-08-07 12:45:32 +0900 (Mon, 07 Aug 2017) | 1 line

enum.c: use predefined IDs
------------------------------------------------------------------------
r59522 | svn | 2017-08-06 14:22:27 +0900 (Sun, 06 Aug 2017) | 1 line

* 2017-08-06
------------------------------------------------------------------------
r59521 | duerst | 2017-08-06 14:22:26 +0900 (Sun, 06 Aug 2017) | 1 line

add some more assertions to test_ill_formed_utf_8_replace 
------------------------------------------------------------------------
r59519 | nobu | 2017-08-05 15:58:44 +0900 (Sat, 05 Aug 2017) | 7 lines

splat keyword hash

* compile.c (compile_array_keyword_arg): set keyword splat flag if
  explicitly splatted.  [ruby-core:68124] [Bug #10856]

* vm_args.c (setup_parameters_complex): try keyword hash splat if
  given.
------------------------------------------------------------------------
r59518 | nobu | 2017-08-05 15:51:08 +0900 (Sat, 05 Aug 2017) | 4 lines

vm_core.h: vm_call_flag_bits

* vm_core.h (vm_call_flag_bits): define VM_CALL flags by using
  enum constants.
------------------------------------------------------------------------
r59509 | svn | 2017-08-05 02:05:44 +0900 (Sat, 05 Aug 2017) | 1 line

* 2017-08-05
------------------------------------------------------------------------
r59508 | eregon | 2017-08-05 02:05:43 +0900 (Sat, 05 Aug 2017) | 1 line

* man/ruby.1: Move paragraph which is related to -S, not -s.
------------------------------------------------------------------------
r59502 | ko1 | 2017-08-04 23:57:31 +0900 (Fri, 04 Aug 2017) | 13 lines

use stable sort.

* lib/rubygems/resolver.rb (sort_dependencies): use stable sort.
  TestGemRequestSetLockfile#test_to_s_gem_dependency_non_default
  fails because this method return unstable results.
  Note that Enumerable#sort_by is unstable.

  I'm not sure the "stable" nature is required for RubyGems.
  The fact is that using stable sort, the test passed on
  mswin64+VS2017 where the sort results was reverse (unstable) order.
  Also using `-i` instead of `i` (it means forcing unstable sort)
  this test fails on other platform where the test successed before.

------------------------------------------------------------------------
r59499 | kazu | 2017-08-04 21:00:00 +0900 (Fri, 04 Aug 2017) | 1 line

Fix `NameError: uninitialized constant Net`
------------------------------------------------------------------------
r59498 | kazu | 2017-08-04 20:59:59 +0900 (Fri, 04 Aug 2017) | 1 line

Use `register_scanner` instead of `regist_scanner`
------------------------------------------------------------------------
r59497 | kazu | 2017-08-04 20:59:57 +0900 (Fri, 04 Aug 2017) | 1 line

Add deprecated warning to ERB::Compiler::SimpleScanner2
------------------------------------------------------------------------
r59496 | nobu | 2017-08-04 13:39:53 +0900 (Fri, 04 Aug 2017) | 5 lines

string.c: improve String#scan

* string.c (rb_str_rstrip_bang): improve the performance in 50%
  for a string pattern, and in 10% for a regexp pattern.  get rid
  of making MatchData in middle, which is not used.
------------------------------------------------------------------------
r59495 | svn | 2017-08-04 13:25:13 +0900 (Fri, 04 Aug 2017) | 1 line

* 2017-08-04
------------------------------------------------------------------------
r59494 | nobu | 2017-08-04 13:25:12 +0900 (Fri, 04 Aug 2017) | 1 line

benchmarks for String#scan
------------------------------------------------------------------------
r59487 | kazu | 2017-08-03 21:31:21 +0900 (Thu, 03 Aug 2017) | 1 line

Use the same variable name as in dir.c
------------------------------------------------------------------------
r59486 | svn | 2017-08-03 18:39:26 +0900 (Thu, 03 Aug 2017) | 1 line

* properties.
------------------------------------------------------------------------
r59485 | naruse | 2017-08-03 18:39:25 +0900 (Thu, 03 Aug 2017) | 1 line

Add initial test for lldb extension
------------------------------------------------------------------------
r59484 | nobu | 2017-08-03 17:11:57 +0900 (Thu, 03 Aug 2017) | 1 line

disable rdoc for internal constants [ci skip]
------------------------------------------------------------------------
r59483 | nobu | 2017-08-03 17:09:24 +0900 (Thu, 03 Aug 2017) | 5 lines

ruby.h: NULL as empty array

* include/ruby/ruby.h (rb_yield_values, rb_funcall): call with
  NULL when no arguments, for clang which defines static array
  when an empty array is used.
------------------------------------------------------------------------
r59482 | nobu | 2017-08-03 16:08:00 +0900 (Thu, 03 Aug 2017) | 1 line

extract IDs
------------------------------------------------------------------------
r59481 | nobu | 2017-08-03 13:13:12 +0900 (Thu, 03 Aug 2017) | 5 lines

dir.c: reduce syscalls

* dir.c (glob_helper): utilize d_type even if no recursive
  pattern, to reduce stat/lstat syscalls in subsequent
  glob_helper.
------------------------------------------------------------------------
r59480 | nobu | 2017-08-03 12:41:50 +0900 (Thu, 03 Aug 2017) | 1 line

fix typo in help [ci skip]
------------------------------------------------------------------------
r59479 | nobu | 2017-08-03 12:39:33 +0900 (Thu, 03 Aug 2017) | 4 lines

dir.c: relative path Dir base

* dir.c (glob_helper): fix globbing based on a relative path Dir.
  [Feature #13056]
------------------------------------------------------------------------
r59478 | usa | 2017-08-03 12:31:38 +0900 (Thu, 03 Aug 2017) | 4 lines

Should show the entity of $PATH_SEPARATOR

* win32/configure.bat (--help): should show the entity of $PATH_SEPARATOR.

------------------------------------------------------------------------
r59477 | usa | 2017-08-03 12:25:46 +0900 (Thu, 03 Aug 2017) | 4 lines

Mention about `--with-opt-dir`

* win32/configure.bat (--help): mention about `--with-opt-dir`.

------------------------------------------------------------------------
r59476 | nobu | 2017-08-03 11:14:51 +0900 (Thu, 03 Aug 2017) | 4 lines

dir.c: relax base option

* dir.c (dir_glob_options): relax base option.  ignore when nil
  or an empty string as :base option.  [Feature #13056]
------------------------------------------------------------------------
r59475 | nobu | 2017-08-03 09:53:25 +0900 (Thu, 03 Aug 2017) | 5 lines

spec_helper.rb: pass jobserver fds

* spec/rubyspec/optional/capi/spec_helper.rb (compile_extension):
  pass jobserver fds explicitly, because other specs might have
  set close_on_exec flags on these fds.
------------------------------------------------------------------------
r59474 | ko1 | 2017-08-03 06:48:51 +0900 (Thu, 03 Aug 2017) | 12 lines

fix stack storing for root fibers.

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

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

------------------------------------------------------------------------
r59473 | kazu | 2017-08-03 00:10:43 +0900 (Thu, 03 Aug 2017) | 4 lines

Fix URI::FTP.build code example typo

ref https://github.com/rurema/doctree/pull/462
[ci skip]
------------------------------------------------------------------------
r59472 | kazu | 2017-08-03 00:10:42 +0900 (Thu, 03 Aug 2017) | 3 lines

Fix variable name in example of net/pop

[ci skip]
------------------------------------------------------------------------
r59471 | kazu | 2017-08-03 00:10:40 +0900 (Thu, 03 Aug 2017) | 4 lines

Fix net/pop code example syntax error

ref https://github.com/rurema/doctree/pull/455
[ci skip]
------------------------------------------------------------------------
r59470 | svn | 2017-08-03 00:10:39 +0900 (Thu, 03 Aug 2017) | 1 line

* 2017-08-03
------------------------------------------------------------------------
r59469 | kazu | 2017-08-03 00:10:38 +0900 (Thu, 03 Aug 2017) | 4 lines

Fix cgi/core code example missing comma

ref https://github.com/rurema/doctree/pull/448
[ci skip]
------------------------------------------------------------------------
r59468 | yugui | 2017-08-02 14:27:25 +0900 (Wed, 02 Aug 2017) | 3 lines

Port more commands from .gdbinit to lldb

* misc/lldb_cury.py (dump_node, SDR, rb_count_objects): added
------------------------------------------------------------------------
r59467 | nobu | 2017-08-02 12:02:22 +0900 (Wed, 02 Aug 2017) | 1 line

suppress warnings when RUBY_USE_SETJMPEX
------------------------------------------------------------------------
r59466 | nobu | 2017-08-02 11:40:29 +0900 (Wed, 02 Aug 2017) | 9 lines

eval.c: suppress warnings

* eval.c (exc_setup_message): setup exception message as an
  exception instance, and a cause from a previous exception.
  split from setup_exception to suppress a warning when
  RUBY_USE_SETJMPEX is enabled.

* eval.c (setup_exception): make state volatile to suppress a
  warning too.
------------------------------------------------------------------------
r59465 | knu | 2017-08-02 11:20:48 +0900 (Wed, 02 Aug 2017) | 1 line

ipaddr is now a default gem with an upstream at: https://github.com/ruby/ipaddr
------------------------------------------------------------------------
r59464 | hsbt | 2017-08-02 11:19:04 +0900 (Wed, 02 Aug 2017) | 1 line

Partly reverted email notification on travis configuration.
------------------------------------------------------------------------
r59463 | nobu | 2017-08-02 09:54:13 +0900 (Wed, 02 Aug 2017) | 4 lines

eval.c: fix state type

* eval.c (setup_exception): state is a raised thread flag, not for
  EXEC_TAG.
------------------------------------------------------------------------
r59462 | ko1 | 2017-08-02 09:50:42 +0900 (Wed, 02 Aug 2017) | 16 lines

release VM stack properly.

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

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

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

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

------------------------------------------------------------------------
r59461 | svn | 2017-08-02 09:20:42 +0900 (Wed, 02 Aug 2017) | 1 line

* 2017-08-02
------------------------------------------------------------------------
r59460 | kazu | 2017-08-02 09:20:41 +0900 (Wed, 02 Aug 2017) | 3 lines

Remove "make update-rubyspec"

because it is no-op for compatibility
------------------------------------------------------------------------
r59459 | nobu | 2017-08-01 20:59:45 +0900 (Tue, 01 Aug 2017) | 5 lines

assertions.rb: AllFailures#message encoding

* test/lib/test/unit/assertions.rb (AllFailures#message): put
  indented messages back to the original encoding, to get rid of
  Encoding::CompatibilityError when key has non-ASCII characters.
------------------------------------------------------------------------
r59458 | nobu | 2017-08-01 17:32:18 +0900 (Tue, 01 Aug 2017) | 4 lines

parse.y: simplify parse_ident

* parse.y (parse_ident): simplified selecting identifier types by
  the suffix.
------------------------------------------------------------------------
r59457 | ko1 | 2017-08-01 11:10:19 +0900 (Tue, 01 Aug 2017) | 9 lines

should not copy promoted flags.

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

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

------------------------------------------------------------------------
r59456 | svn | 2017-08-01 09:19:10 +0900 (Tue, 01 Aug 2017) | 1 line

* 2017-08-01
------------------------------------------------------------------------
r59455 | kazu | 2017-08-01 09:19:10 +0900 (Tue, 01 Aug 2017) | 1 line

Use `&.` instead of modifier if
------------------------------------------------------------------------
r59454 | nobu | 2017-07-31 13:04:10 +0900 (Mon, 31 Jul 2017) | 5 lines

configure.in: use libtool

* configure.in: use libtool on macOS to suppress a warning against
  debug_counter.o, which has no symbols unless USE_DEBUG_COUNTER
  is set to non-zero.
------------------------------------------------------------------------
r59453 | svn | 2017-07-31 12:35:23 +0900 (Mon, 31 Jul 2017) | 1 line

* 2017-07-31
------------------------------------------------------------------------
r59452 | kazu | 2017-07-31 12:35:22 +0900 (Mon, 31 Jul 2017) | 3 lines

Improve error message

ref [Bug #13761]
------------------------------------------------------------------------
r59451 | nobu | 2017-07-30 23:59:40 +0900 (Sun, 30 Jul 2017) | 5 lines

UNALIGNED_MEMBER_ACCESS only for clang

* eval_intern.h (UNALIGNED_MEMBER_ACCESS): enable only on clang.
  gcc does not complain about pointers to member of unaligned
  struct.
------------------------------------------------------------------------
r59450 | nobu | 2017-07-30 23:48:45 +0900 (Sun, 30 Jul 2017) | 4 lines

UNALIGNED_MEMBER_ACCESS

* eval_intern.h (UNALIGNED_MEMBER_ACCESS): suppress
  address-of-packed-member warnings by clang 4.0.
------------------------------------------------------------------------
r59449 | nobu | 2017-07-30 11:56:30 +0900 (Sun, 30 Jul 2017) | 5 lines

hash.c: refactor env_enc_str_new

* hash.c (env_enc_str_new): convert to the expected encoding
  without intermediate string, and set econv flags if default
  internal encoding is set too.
------------------------------------------------------------------------
r59448 | nobu | 2017-07-30 11:56:29 +0900 (Sun, 30 Jul 2017) | 5 lines

string.c: rb_str_initialize

* string.c (rb_str_initialize): new function to (re)initialize a
  string with data and encoding.  extracted from
  rb_external_str_new_with_enc.
------------------------------------------------------------------------
r59447 | svn | 2017-07-30 09:40:44 +0900 (Sun, 30 Jul 2017) | 1 line

* 2017-07-30
------------------------------------------------------------------------
r59446 | nobu | 2017-07-30 09:40:43 +0900 (Sun, 30 Jul 2017) | 4 lines

compile.c: replace adjuststack

* compile.c (iseq_set_sequence): replace adjuststack with pop, or
  remove if possible instead of two nops.
------------------------------------------------------------------------
r59445 | nobu | 2017-07-29 21:42:42 +0900 (Sat, 29 Jul 2017) | 7 lines

visibility of inherited method

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

Author:    Mon_Ouie (Mon ou?e) <mon.ouie@gmail.com>
------------------------------------------------------------------------
r59444 | nobu | 2017-07-29 21:42:41 +0900 (Sat, 29 Jul 2017) | 4 lines

adjust indent [ci skip]

* vm_insnhelper.c (vm_call_method_each_type): adjust indent of a
  block in switch.
------------------------------------------------------------------------
r59443 | nobu | 2017-07-29 21:11:51 +0900 (Sat, 29 Jul 2017) | 4 lines

file.c: [DOC] File.mkfifo

* file.c (rb_file_s_mkfifo): enclose rdoc by ifdef so it will be
  generated properly.
------------------------------------------------------------------------
r59442 | nobu | 2017-07-29 11:03:11 +0900 (Sat, 29 Jul 2017) | 5 lines

compile.c: fix flip-flop value

* compile.c (iseq_compile_each0): as compile_flip_flop always ends
  with a jump instruction, successive instruction is never reached,
  but caused stack consistency error without peephole optimization.
------------------------------------------------------------------------
r59441 | svn | 2017-07-29 01:47:51 +0900 (Sat, 29 Jul 2017) | 1 line

* 2017-07-29
------------------------------------------------------------------------
r59440 | odaira | 2017-07-29 01:47:50 +0900 (Sat, 29 Jul 2017) | 4 lines

Include sys/select.h when checking HAVE_RB_FD_INIT

* configure.in: include sys/select.h for fd_mask on AIX
  [Feature #13637]
------------------------------------------------------------------------
r59439 | kou | 2017-07-28 23:16:17 +0900 (Fri, 28 Jul 2017) | 6 lines

rexml: Remove needless document

[Fix GH-1671]

Patch by madblobfish. Thanks!!!

------------------------------------------------------------------------
r59438 | svn | 2017-07-28 16:46:21 +0900 (Fri, 28 Jul 2017) | 1 line

* 2017-07-28
------------------------------------------------------------------------
r59437 | glass | 2017-07-28 16:46:20 +0900 (Fri, 28 Jul 2017) | 10 lines

csv.rb: fix incompatibility introduced in r59428

* lib/csv.rb: fix incompatibility introduced in r59428.
              CSV.new takes options as keyword arguments.

* test/csv/test_features.rb: add a test to ensure it raises error againt
                             unknown options

* test/csv/test_features.rb: add a test to ensure row_sep option is properly
                             applied
------------------------------------------------------------------------
r59436 | nobu | 2017-07-27 21:54:55 +0900 (Thu, 27 Jul 2017) | 1 line

set auto-props to avoid commits setting properties
------------------------------------------------------------------------
r59435 | nobu | 2017-07-27 21:25:42 +0900 (Thu, 27 Jul 2017) | 4 lines

fix type

* spec/rubyspec/optional/capi/ext/io_spec.c (io_spec_rb_io_wait_readable):
  fix type of read(2).
------------------------------------------------------------------------
r59434 | nobu | 2017-07-27 21:17:56 +0900 (Thu, 27 Jul 2017) | 4 lines

vm_core.h: shrink trap_list size

* vm_core.h (rb_vm_struct): separate trap_list cmd and safe to
  each arrays, to shrink the size.
------------------------------------------------------------------------
r59433 | svn | 2017-07-27 21:10:42 +0900 (Thu, 27 Jul 2017) | 1 line

* properties.
------------------------------------------------------------------------
r59432 | eregon | 2017-07-27 21:10:41 +0900 (Thu, 27 Jul 2017) | 1 line

Update to ruby/spec@c3e6b90
------------------------------------------------------------------------
r59431 | svn | 2017-07-27 21:10:24 +0900 (Thu, 27 Jul 2017) | 1 line

* properties.
------------------------------------------------------------------------
r59430 | eregon | 2017-07-27 21:10:23 +0900 (Thu, 27 Jul 2017) | 1 line

Update to ruby/mspec@353605f
------------------------------------------------------------------------
r59429 | hsbt | 2017-07-27 20:56:54 +0900 (Thu, 27 Jul 2017) | 5 lines

Update configuration for slack notification.

  * Encrypted slack token.
  * Only notify when build fails and it recovered.
  * Only notify trunk build without pull requests.
------------------------------------------------------------------------
r59428 | glass | 2017-07-27 18:53:58 +0900 (Thu, 27 Jul 2017) | 5 lines

csv.rb: use keyword parameters

* lib/csv.rb: usb keyword parameters to receive options

* test/csv/test_features.rb: remove a test for checking options
------------------------------------------------------------------------
r59427 | svn | 2017-07-27 15:49:28 +0900 (Thu, 27 Jul 2017) | 1 line

* 2017-07-27
------------------------------------------------------------------------
r59426 | glass | 2017-07-27 15:49:27 +0900 (Thu, 27 Jul 2017) | 3 lines

csv.rb: use Array#to_h

* lib/csv.rb (CSV::Row#to_hash): use Array#to_h
------------------------------------------------------------------------
r59425 | nobu | 2017-07-26 21:44:12 +0900 (Wed, 26 Jul 2017) | 4 lines

vcs.rb: commit

* tool/vcs.rb (commit): do commit, reset svn revision to sync git
  mirror.
------------------------------------------------------------------------
r59424 | shugo | 2017-07-26 16:47:34 +0900 (Wed, 26 Jul 2017) | 3 lines

lib/net/imap.rb: support CHANGEDSINCE and MODSEQ

Patch by plehoux (Philippe-Antoine Lehoux).  [ruby-core:64272] [Feature #10119]
------------------------------------------------------------------------
r59423 | hsbt | 2017-07-26 15:06:33 +0900 (Wed, 26 Jul 2017) | 3 lines

To use slack notification instead of email notification.

  It's easily customize configuration of test notify.
------------------------------------------------------------------------
r59422 | hsbt | 2017-07-26 14:42:27 +0900 (Wed, 26 Jul 2017) | 3 lines

Removed definitions of mspec and ruby/spec.

  They are no longer used on ruby core repository.
------------------------------------------------------------------------
r59421 | hsbt | 2017-07-26 14:39:41 +0900 (Wed, 26 Jul 2017) | 1 line

Removed Ruby 2.1 from Travis CI. It's EOL status on 2017.
------------------------------------------------------------------------
r59420 | nobu | 2017-07-26 09:56:44 +0900 (Wed, 26 Jul 2017) | 6 lines

parse.y: brace after array literal arg

* parse.y (parser_yylex): array is another literal.  set state to
  END too not only ENDARG and after a literal, so that a left
  brace after it should be a primary block bound to the literal,
  which causes syntax error.  [ruby-core:81037] [Bug #13547]
------------------------------------------------------------------------
r59419 | svn | 2017-07-26 09:01:27 +0900 (Wed, 26 Jul 2017) | 1 line

* 2017-07-26
------------------------------------------------------------------------
r59418 | kazu | 2017-07-26 09:01:26 +0900 (Wed, 26 Jul 2017) | 1 line

Fix typos [ci skip]
------------------------------------------------------------------------
r59417 | nobu | 2017-07-25 17:30:11 +0900 (Tue, 25 Jul 2017) | 5 lines

parse.y: limit codepoint length

* parse.y (parser_tokadd_codepoint): limit Unicode codepoint
  length.  too long codepoint has been split unexpectedly since
  r57050.
------------------------------------------------------------------------
r59416 | normal | 2017-07-25 14:55:22 +0900 (Tue, 25 Jul 2017) | 10 lines

dir.c (ruby_brace_expand): RB_GC_GUARD safety

The lifetime of a String VALUE must match or exceed the lifetime
of its R*_PTR result; otherwise the GC can while reclaim the
VALUE while the R*_PTR result is in use.

* dir.c (ruby_brace_expand): add var parameter for GC guard
  (ruby_brace_glob_with_enc): adjust call
  (file_s_fnmatch): ditto
  (push_glob): remove misplaced GC guard
------------------------------------------------------------------------
r59415 | svn | 2017-07-25 10:08:52 +0900 (Tue, 25 Jul 2017) | 1 line

* 2017-07-25
------------------------------------------------------------------------
r59414 | nobu | 2017-07-25 10:08:51 +0900 (Tue, 25 Jul 2017) | 7 lines

socket: system getaddrinfo on Windows

* ext/socket/extconf.rb: use system getaddrinfo, getnameinfo, and
  freeaddrinfo on Windows if they are provided.  they conflict
  with addrinfo.h and cannot compile.  conftest.exe linked against
  msvcr90.dll segfaults when invoked in extconf.rb for unknown
  reason, and failed to check them.
------------------------------------------------------------------------
r59413 | svn | 2017-07-24 10:56:05 +0900 (Mon, 24 Jul 2017) | 1 line

* 2017-07-24
------------------------------------------------------------------------
r59412 | nobu | 2017-07-24 10:56:04 +0900 (Mon, 24 Jul 2017) | 5 lines

optparse.rb: case-sensitive candidate

* lib/optparse.rb (candidate): short options are case-sensitive by
  the default, should not match case-different options..
  https://github.com/mernen/completion-ruby/pull/9#issuecomment-317287946
------------------------------------------------------------------------
r59411 | svn | 2017-07-23 18:44:49 +0900 (Sun, 23 Jul 2017) | 1 line

* 2017-07-23
------------------------------------------------------------------------
r59410 | nobu | 2017-07-23 18:44:48 +0900 (Sun, 23 Jul 2017) | 4 lines

sprintf.c: width too big

* sprintf.c (rb_str_format): explicitly reject too big negative
  width, instead of an empty string.
------------------------------------------------------------------------
r59394 | svn | 2017-07-22 21:26:20 +0900 (Sat, 22 Jul 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r59393 | yugui | 2017-07-22 21:26:19 +0900 (Sat, 22 Jul 2017) | 1 line

Add Doxygen comments
------------------------------------------------------------------------
r59392 | kazu | 2017-07-22 17:07:58 +0900 (Sat, 22 Jul 2017) | 1 line

Fix documents
------------------------------------------------------------------------
r59391 | kazu | 2017-07-22 17:07:56 +0900 (Sat, 22 Jul 2017) | 1 line

Fix typos and indent
------------------------------------------------------------------------
r59390 | svn | 2017-07-22 15:30:54 +0900 (Sat, 22 Jul 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r59389 | yugui | 2017-07-22 15:30:53 +0900 (Sat, 22 Jul 2017) | 1 line

Add documents
------------------------------------------------------------------------
r59388 | nobu | 2017-07-22 15:01:38 +0900 (Sat, 22 Jul 2017) | 6 lines

compile.c: COMPILE_ERROR

* compile.c: raise COMPILE_ERROR instead of compile_bug which is
  very rarely (or never, actually) useful to debug instruction
  sequence.  COMPILE_ERROR is usually SyntaxError, or fatal error
  if compile_debug is enabled,
------------------------------------------------------------------------
r59387 | nobu | 2017-07-22 07:45:13 +0900 (Sat, 22 Jul 2017) | 3 lines

compile.c: dump iseq at adjust bug

* compile.c (fix_sp_depth): dump instructions at adjust bug too.
------------------------------------------------------------------------
r59386 | svn | 2017-07-22 04:06:08 +0900 (Sat, 22 Jul 2017) | 1 line

* 2017-07-22
------------------------------------------------------------------------
r59385 | normal | 2017-07-22 04:06:07 +0900 (Sat, 22 Jul 2017) | 12 lines

NEWS: add entries for thread_sync.c changes

I'm slightly worried about some external code subclassing
ConditionVariable, Queue, and SizedQueue and relying on them
being Structs.  However, they only started being Structs with
Ruby 2.1, and were implemented in pure Ruby before that; so
hopefully nobody notices that implementation detail.

Also, note the Mutex change as it may affect program design
when space can be saved.

* NEWS: entries for [Feature #13552] and [Feature #13517]
------------------------------------------------------------------------
r59384 | nobu | 2017-07-21 22:30:46 +0900 (Fri, 21 Jul 2017) | 5 lines

strscan.c: fix segfault in aref

* ext/strscan/strscan.c (strscan_aref): fix segfault after
  get_byte or getch which do not apply regexp.
  [ruby-core:82116] [Bug #13759]
------------------------------------------------------------------------
r59383 | nobu | 2017-07-21 17:31:47 +0900 (Fri, 21 Jul 2017) | 4 lines

optparse.rb: [DOC] fix keys

* lib/optparse.rb (getopts): [DOC] parameter keys are strings, not
  symbols.
------------------------------------------------------------------------
r59382 | rhe | 2017-07-21 13:29:46 +0900 (Fri, 21 Jul 2017) | 12 lines

ripper: add kwrest_param parser event

* parse.y (f_kwrest): Dispatch kwrest_param event. This is especially
  useful for unnamed kwrest parameter for which we expose the internal
  ID currently.  [ruby-core:75528] [Feature #12387]

* test/ripper/dummyparser.rb (on_kwrest_param): Add handler for
  kwrest_param parser event.

* test/ripper/test_parser_events.rb (test_params): Adapt to the change
  in DummyParser.
  (test_kwrest_param): Test that kwrest_param event handler is called.
------------------------------------------------------------------------
r59381 | kazu | 2017-07-21 08:34:03 +0900 (Fri, 21 Jul 2017) | 1 line

Use `unpack1` instead of `unpack` and `[0]`
------------------------------------------------------------------------
r59380 | sonots | 2017-07-21 01:47:26 +0900 (Fri, 21 Jul 2017) | 11 lines

logger.rb: Fix handling progname

Because progname was memoized with ||= a logger call that involved
outputting false would be nil. Example code:

  logger = Logger.new(STDOUT)
  logger.info(false)  # => nil

Perform an explicit nil check instead of ||= so that false will be output.

patched by Gavin Miller <gavingmiller@gmail.com> [Fix GH-1667]
------------------------------------------------------------------------
r59379 | sonots | 2017-07-21 01:29:20 +0900 (Fri, 21 Jul 2017) | 1 line

NEWS: Add String#delete_suffix and String#delete_suffix!
------------------------------------------------------------------------
r59378 | svn | 2017-07-21 01:29:20 +0900 (Fri, 21 Jul 2017) | 1 line

* 2017-07-21
------------------------------------------------------------------------
r59377 | sonots | 2017-07-21 01:29:19 +0900 (Fri, 21 Jul 2017) | 10 lines

string.c: add String#delete_suffix and String#delete_suffix!
to remove trailing suffix [Feature #13665] [Fix GH-1661]

* string.c (rb_str_delete_suffix_bang): add a new method
  to remove suffix destuctively.

* string.c (rb_str_delete_suffix): add a new method
  to remove suffix non-destuctively.

* test/ruby/test_string.rb: add tests.
------------------------------------------------------------------------
r59376 | yugui | 2017-07-20 20:00:39 +0900 (Thu, 20 Jul 2017) | 5 lines

Remove dead code

* eval.c (errinfo_setter): dead for 10 years since r13091.
  (rb_rubylevel_errinfo): not used and not exported.
  usually removed or hidden by linker.
------------------------------------------------------------------------
r59375 | nobu | 2017-07-20 14:48:26 +0900 (Thu, 20 Jul 2017) | 5 lines

parse.y: empty hash in defined

* parse.y (command): NODE_ARRAY with NULL is invalid.  traversal
  in defined_expr0 is simplified than iseq_compile_each0.
  [ruby-core:82113] [Bug #13756]
------------------------------------------------------------------------
r59374 | nobu | 2017-07-20 11:43:45 +0900 (Thu, 20 Jul 2017) | 5 lines

compile.c: restore stack at return

* compile.c (iseq_compile_each0): restore the stack depth after
  return to the previous depth, to fix the stack depth at
  returning from rescue iseq.  [ruby-core:82108] [Bug #13755]
------------------------------------------------------------------------
r59373 | shugo | 2017-07-20 08:38:31 +0900 (Thu, 20 Jul 2017) | 3 lines

lib/net/pop.rb: support timeout for TLS handshake

Patch by ahorek (Pavel Rosick?).  [ruby-core:80490] [Feature #13389]
------------------------------------------------------------------------
r59372 | shugo | 2017-07-20 08:08:34 +0900 (Thu, 20 Jul 2017) | 4 lines

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

Based on the patch by keysen (J?r?my Carlier).
[ruby-core:81641] [Bug #13649]
------------------------------------------------------------------------
r59371 | svn | 2017-07-20 00:01:01 +0900 (Thu, 20 Jul 2017) | 1 line

* 2017-07-20
------------------------------------------------------------------------
r59370 | kazu | 2017-07-20 00:01:01 +0900 (Thu, 20 Jul 2017) | 1 line

Sort entries [ci skip]
------------------------------------------------------------------------
r59369 | kazu | 2017-07-19 22:59:58 +0900 (Wed, 19 Jul 2017) | 3 lines

NEWS: Add Hash#transform_keys and Hash#transform_keys!

[Feature #13583] [ruby-core:81290] [ci skip]
------------------------------------------------------------------------
r59368 | nobu | 2017-07-19 12:16:58 +0900 (Wed, 19 Jul 2017) | 4 lines

random.c: ensure initialized

* random.c (get_rnd, try_get_rnd): ensure initialized to get rid
  of crash in forked processes.  [ruby-core:82100] [Bug #13753]
------------------------------------------------------------------------
r59367 | nobu | 2017-07-19 12:16:08 +0900 (Wed, 19 Jul 2017) | 4 lines

test_rand.rb: improved assert_fork_status

* test/ruby/test_rand.rb (assert_fork_status): deal with errors
  from children.
------------------------------------------------------------------------
r59366 | nobu | 2017-07-19 11:28:45 +0900 (Wed, 19 Jul 2017) | 1 line

st.c: adjust style
------------------------------------------------------------------------
r59365 | svn | 2017-07-19 10:35:05 +0900 (Wed, 19 Jul 2017) | 1 line

* 2017-07-19
------------------------------------------------------------------------
r59364 | normal | 2017-07-19 10:35:04 +0900 (Wed, 19 Jul 2017) | 4 lines

revert r59359, r59356, r59355, r59354

These caused numerous CI failures I haven't been able to
reproduce [ruby-core:82102]
------------------------------------------------------------------------
r59362 | hsbt | 2017-07-18 20:28:49 +0900 (Tue, 18 Jul 2017) | 4 lines

Copy openssl library finder for ext/digest from OpenSSL extention.

  * ext/digest/digest_conf.rb: Support to search variaous filenames of
    OpenSSL/LibreSSL libraries.
------------------------------------------------------------------------
r59361 | nobu | 2017-07-18 19:49:10 +0900 (Tue, 18 Jul 2017) | 1 line

fix typo
------------------------------------------------------------------------
r59360 | nobu | 2017-07-18 19:29:19 +0900 (Tue, 18 Jul 2017) | 4 lines

descriptive asssertions

* test/ruby/test_string.rb (test_uplus_minus): prefer more
  descriptive asssertions than assert_equal.
------------------------------------------------------------------------
r59359 | normal | 2017-07-18 18:52:55 +0900 (Tue, 18 Jul 2017) | 6 lines

string: preserve taint flag with String#-@ (uminus)

* string.c (tainted_fstr_update): move up
  (rb_fstring): support registering tainted strings
  (register_fstring_tainted): extract from rb_fstring_existing0
  (rb_tainted_fstring_existing): use register_fstring_tainted instead
------------------------------------------------------------------------
r59358 | nobu | 2017-07-18 17:31:02 +0900 (Tue, 18 Jul 2017) | 10 lines

vm_eval.c: rb_lambda_call

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

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

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

* vm_eval.c (rb_lambda_call): call method with lambda block.
------------------------------------------------------------------------
r59357 | nobu | 2017-07-18 16:48:37 +0900 (Tue, 18 Jul 2017) | 4 lines

proc.c: rb_block_min_max_arity

* proc.c (rb_block_min_max_arity): new function to get arity range
  from the current block.
------------------------------------------------------------------------
r59356 | normal | 2017-07-18 16:21:05 +0900 (Tue, 18 Jul 2017) | 4 lines

test/ruby/test_string.rb: ensure we do not have tainted strings

Trying to figure out [ruby-core:82092]
cf. https://gist.github.com/e2c899c453f3f66e7934095c32505486
------------------------------------------------------------------------
r59355 | normal | 2017-07-18 13:30:08 +0900 (Tue, 18 Jul 2017) | 9 lines

newhash insn reuses existing keys

This gives the newhash VM instruction the same string reuse
capabilities as rb_hash_aset.

* st.c (str_key): new wrapper function to call rb_fstring_existing
  (rb_hash_bulk_insert): use str_key
* test/ruby/test_optimization.rb (test_hash_reuse_fstring):
  ensure key reuse for newhash instructions
------------------------------------------------------------------------
r59354 | normal | 2017-07-18 11:29:59 +0900 (Tue, 18 Jul 2017) | 26 lines

hash: keep fstrings of tainted strings for string keys

The same hash keys may be loaded from tainted data sources
frequently (e.g. parsing headers from socket or loading
YAML data from a file).  If a non-tainted fstring already
exists (because the application expects the hash key),
cache and deduplicate the tainted version in the new
tainted_frozen_strings table.

For non-embedded strings, this also allows sharing with the
underlying malloc-ed data.

* vm_core.h (rb_vm_struct): add tainted_frozen_strings
* vm.c (ruby_vm_destruct): free tainted_frozen_strings
  (Init_vm_objects): initialize tainted_frozen_strings
  (rb_vm_tfstring_table): accessor for tainted_frozen_strings
* internal.h: declare rb_fstring_existing, rb_vm_tfstring_table
* hash.c (fstring_existing_str): remove (moved to string.c)
  (hash_aset_str): use rb_fstring_existing
* string.c (rb_fstring_existing): new, based on fstring_existing_str
  (tainted_fstr_update): new
  (rb_fstring_existing0): new, based on fstring_existing_str
  (rb_tainted_fstring_existing): new, special case for tainted strings
  (rb_str_free): delete from tainted_frozen_strings table
* test/ruby/test_optimization.rb (test_hash_reuse_fstring): new test
  [ruby-core:82012] [Bug #13737]
------------------------------------------------------------------------
r59353 | normal | 2017-07-18 11:10:50 +0900 (Tue, 18 Jul 2017) | 6 lines

doc/extension.rdoc: start documenting threading and IO APIs

This will hopefully be useful for folks writing C extensions.

* doc/extension.rdoc: start documenting threading and IO APIs
  [ruby-core:82016] [Feature #13740]
------------------------------------------------------------------------
r59352 | svn | 2017-07-18 10:59:29 +0900 (Tue, 18 Jul 2017) | 1 line

* 2017-07-18
------------------------------------------------------------------------
r59351 | normal | 2017-07-18 10:59:28 +0900 (Tue, 18 Jul 2017) | 8 lines

webrick: fix SNI support

* lib/webrick/https.rb: check ssl context of virtual host.
* lib/webrick/ssl.rb: ensure to return ssl context.
* test/webrick/test_https.rb: test returned cert is correct.
  [Feature #13729][ruby-dev:50173]

Author: Tietew <tietew@gmail.com>
------------------------------------------------------------------------
r59350 | nobu | 2017-07-17 10:16:07 +0900 (Mon, 17 Jul 2017) | 4 lines

gmake.mk: extract after update gems

* defs/gmake.mk (extract-gems): should wait for update-gems to
  finish when doing both.
------------------------------------------------------------------------
r59349 | nobu | 2017-07-17 09:11:38 +0900 (Mon, 17 Jul 2017) | 10 lines

parse.y: refine literal error messages

* parse.y (parser_yyerror): strip newline in error source which
  will not be printed, when lex_p has passed it.

* parse.y (parser_tokadd_utf8): unterminated Unicode escape even
  after invalid Unicode escape.

* parse.y (parser_parse_string): show the error source line when
  unterminated literal at end of file.
------------------------------------------------------------------------
r59348 | nobu | 2017-07-17 08:45:48 +0900 (Mon, 17 Jul 2017) | 7 lines

parse.y: refine invalid Unicode escape message

* parse.y (literal_flush): rename from numeric_literal_flush, as
  it is not just for numerics now.

* parse.y (parser_tokadd_codepoint): show invalid character
  position, but not the start of Unicode escape.
------------------------------------------------------------------------
r59347 | svn | 2017-07-17 00:28:51 +0900 (Mon, 17 Jul 2017) | 1 line

* 2017-07-17
------------------------------------------------------------------------
r59346 | nobu | 2017-07-17 00:28:50 +0900 (Mon, 17 Jul 2017) | 4 lines

assertions.rb: frozen string buffer

* test/lib/test/unit/assertions.rb (assert_pattern_list): make
  frozen string literals modifiable as buffers.
------------------------------------------------------------------------
r59345 | nobu | 2017-07-16 23:32:41 +0900 (Sun, 16 Jul 2017) | 1 line

parse.y (numeric_literal_flush): fix typo
------------------------------------------------------------------------
r59344 | nobu | 2017-07-16 22:39:18 +0900 (Sun, 16 Jul 2017) | 5 lines

parse.y: utf-8 codepoints

* parse.y (parser_tokadd_utf8): skip spaces in the current line,
  without advancing the line, to get rid of dangling pointer.
  [ruby-core:82029] [Bug #13742]
------------------------------------------------------------------------
r59343 | svn | 2017-07-16 20:35:27 +0900 (Sun, 16 Jul 2017) | 1 line

* 2017-07-16
------------------------------------------------------------------------
r59342 | nobu | 2017-07-16 20:35:27 +0900 (Sun, 16 Jul 2017) | 1 line

Use assert_syntax_error
------------------------------------------------------------------------
r59341 | nobu | 2017-07-15 17:29:03 +0900 (Sat, 15 Jul 2017) | 4 lines

parse.y: refine error messages

* parse.y (parser_read_escape, parser_tok_hex): refine error
  messages.  point from the backslash up to the invalid char.
------------------------------------------------------------------------
r59340 | yui-knk | 2017-07-15 16:24:12 +0900 (Sat, 15 Jul 2017) | 5 lines

test_lexer.rb: require ripper directly

* test/ripper/test_lexer.rb: This file does not use
  DummyParser, so requiring ripper directly instead of
  requiring dummyparser.
------------------------------------------------------------------------
r59339 | svn | 2017-07-15 13:35:19 +0900 (Sat, 15 Jul 2017) | 1 line

* 2017-07-15
------------------------------------------------------------------------
r59338 | kazu | 2017-07-15 13:35:18 +0900 (Sat, 15 Jul 2017) | 3 lines

Fix warning: shadowing outer local variable - a

[ci skip][Fix GH-1628]
------------------------------------------------------------------------
r59337 | nobu | 2017-07-14 22:50:00 +0900 (Fri, 14 Jul 2017) | 5 lines

zlib.c: fix unnormalized Fixnum

* ext/zlib/zlib.c (rb_gzfile_total_out): cast to long not to
  result in an unsigned long to normalized to Fixnum on LLP64
  platforms.  [ruby-core:81488]
------------------------------------------------------------------------
r59336 | nobu | 2017-07-14 19:53:35 +0900 (Fri, 14 Jul 2017) | 4 lines

io.c: textmode if newline decorator

* io.c (validate_enc_binmode): newline decorator implies text mode
  now.  [ruby-core:80270] [Bug #13350]
------------------------------------------------------------------------
r59335 | nobu | 2017-07-14 19:31:05 +0900 (Fri, 14 Jul 2017) | 7 lines

VPATH for ripper

* common.mk (ripper.c): pass the build directory path for id.h
  which may be generated there.

* ext/ripper/depend (ripper.y): search the top build directory and
  the top source directory.
------------------------------------------------------------------------
r59334 | rhe | 2017-07-14 18:41:05 +0900 (Fri, 14 Jul 2017) | 4 lines

hash.c: fix possible crash in Hash#transform_keys!

Fix up r59328. It is possible that the given block abuses
ObjectSpace.each_object to shrink the temporary array.
------------------------------------------------------------------------
r59333 | naruse | 2017-07-14 18:17:55 +0900 (Fri, 14 Jul 2017) | 3 lines

Zlib::GzipReader#pos underflows after calling #ungetbyte or #ungetc at start of file [Bug #13616]

patched by Andrew Haines <andrew@haines.org.nz> [ruby-core:81488]
------------------------------------------------------------------------
r59332 | knu | 2017-07-14 17:46:13 +0900 (Fri, 14 Jul 2017) | 1 line

Alias Set#to_s to #inspect [ruby-core:81753] [Feature #13676]
------------------------------------------------------------------------
r59331 | knu | 2017-07-14 17:46:10 +0900 (Fri, 14 Jul 2017) | 1 line

Make tests for Set#inspect more straightforward
------------------------------------------------------------------------
r59330 | hsbt | 2017-07-14 16:47:21 +0900 (Fri, 14 Jul 2017) | 1 line

Update gemspec for standalone gem that is ruby/date repository.
------------------------------------------------------------------------
r59329 | hsbt | 2017-07-14 16:13:17 +0900 (Fri, 14 Jul 2017) | 1 line

Fixup r59327. Forgot to update version number.
------------------------------------------------------------------------
r59328 | mrkn | 2017-07-14 15:44:00 +0900 (Fri, 14 Jul 2017) | 9 lines

hash.c: Add Hash#transform_keys and Hash#transform_keys!

* hash.c (transform_keys_i, rb_hash_transform_keys): Add Hash#transform_keys.
  [Feature #13583] [ruby-core:81290]

* hash.c (rb_hash_transform_keys_bang): Add Hash#transform_keys!.
  [Feature #13583] [ruby-core:81290]

* test/ruby/test_hash.rb: Add tests for above changes.
------------------------------------------------------------------------
r59327 | hsbt | 2017-07-14 15:15:58 +0900 (Fri, 14 Jul 2017) | 6 lines

Merge psych-3.0.0.beta3 from ruby/psych.

  * Rely on encoding tags to determine if string should be dumped as binary.
    https://github.com/ruby/psych/commit/8949a47b8cee31e03e21608406ba116adcf74054
  * Specify "frozen_string_literal: true".
  * Support to binary release for mingw32 platform.
------------------------------------------------------------------------
r59326 | hsbt | 2017-07-14 14:33:15 +0900 (Fri, 14 Jul 2017) | 1 line

Added psych entry to package table and fixed sync instructions.
------------------------------------------------------------------------
r59325 | nobu | 2017-07-14 13:43:16 +0900 (Fri, 14 Jul 2017) | 4 lines

process.c: null bytes

* process.c (rlimit_type_by_sym): prohibit null bytes in key
  names.  [ruby-core:82033] [Bug #13744]
------------------------------------------------------------------------
r59324 | kazu | 2017-07-14 08:55:41 +0900 (Fri, 14 Jul 2017) | 1 line

Use tr! instead of gsub!
------------------------------------------------------------------------
r59323 | svn | 2017-07-14 05:47:37 +0900 (Fri, 14 Jul 2017) | 1 line

* 2017-07-14
------------------------------------------------------------------------
r59322 | normal | 2017-07-14 05:47:36 +0900 (Fri, 14 Jul 2017) | 8 lines

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

* process.c (rb_execarg_addopt_rlimit): hoist out of rb_execarg_addopt
  (rlimit_type_by_sym): new wrapper for dynamic symbol
  (rb_execarg_addopt): check for dsym via rlimit_type_by_sym
* test/ruby/test_process.rb (test_execopts_rlimit): check dsym w/o pindown
  Add extra check for bogus rlimit args, too.
  [ruby-core:82033] [Bug #13744]
------------------------------------------------------------------------
r59321 | hsbt | 2017-07-13 18:46:16 +0900 (Thu, 13 Jul 2017) | 7 lines

Use Test::Unit::TestCase instead of MiniTest::Unit::TestCase. Because
tests of fiddle already used customized assertions of ruby core.

  * test/fiddle/helper.rb: Use Test::Unit::TestCase for base class of
    testcase.
  * test/fiddle/test_*.rb: Use assert_raise instead of assert_raises.
    Remove needless includes for Test::Unit::Assertions.
------------------------------------------------------------------------
r59320 | nobu | 2017-07-13 16:00:16 +0900 (Thu, 13 Jul 2017) | 4 lines

parse.y: flush debug output

* parse.y (parser_compile_error): flush debug output before
  compile error message, to keep the order.
------------------------------------------------------------------------
r59319 | normal | 2017-07-13 03:31:07 +0900 (Thu, 13 Jul 2017) | 5 lines

doc/extension.rdoc: update wikipedia link to HTTPS

Avoid the latency for HTTP -> HTTPS redirect

* doc/extension.rdoc: update wikipedia link to HTTPS
------------------------------------------------------------------------
r59318 | svn | 2017-07-13 00:02:10 +0900 (Thu, 13 Jul 2017) | 1 line

* 2017-07-13
------------------------------------------------------------------------
r59317 | kazu | 2017-07-13 00:02:09 +0900 (Thu, 13 Jul 2017) | 1 line

Fix indent [ci skip]
------------------------------------------------------------------------
r59315 | nobu | 2017-07-12 18:44:45 +0900 (Wed, 12 Jul 2017) | 1 line

disable r59314 on mswin
------------------------------------------------------------------------
r59314 | nobu | 2017-07-12 14:30:43 +0900 (Wed, 12 Jul 2017) | 5 lines

gc.c: restrict RGENGC_DEBUG

* gc.c (RGENGC_DEBUG_ENABLED): restrict runtime ruby_rgengc_debug
  level up to -RGENGC_DEBUG, to reduce runtime branches in inner
  loops.
------------------------------------------------------------------------
r59313 | svn | 2017-07-12 11:49:54 +0900 (Wed, 12 Jul 2017) | 1 line

* 2017-07-12
------------------------------------------------------------------------
r59312 | nobu | 2017-07-12 11:49:53 +0900 (Wed, 12 Jul 2017) | 4 lines

optparse.rb: get rid of eval

* lib/optparse.rb: try Float() and Integer() instead of eval,
  which does too much things.
------------------------------------------------------------------------
r59311 | svn | 2017-07-11 16:42:27 +0900 (Tue, 11 Jul 2017) | 1 line

* 2017-07-11
------------------------------------------------------------------------
r59310 | ko1 | 2017-07-11 16:42:27 +0900 (Tue, 11 Jul 2017) | 5 lines

tainted string should be tainted.

* hash.c (hash_aset_str): create frozen string for tainted objects.
  (should not use fsting table on this case).

------------------------------------------------------------------------
r59309 | nobu | 2017-07-10 20:42:07 +0900 (Mon, 10 Jul 2017) | 5 lines

compile.c: simplify defined_expr0

* compile.c (defined_expr0): exapnd defined_expr macro.

* compile.c (defined_expr0): reduce duplicate code.
------------------------------------------------------------------------
r59308 | nobu | 2017-07-10 16:37:18 +0900 (Mon, 10 Jul 2017) | 1 line

test_rubyoptions.rb: assert -00
------------------------------------------------------------------------
r59307 | takano32 | 2017-07-10 15:57:50 +0900 (Mon, 10 Jul 2017) | 7 lines

a64: fix crash on register stack mark/sweep pass

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

Author:    Sergei Trofimovich <slyfox@gentoo.org>

------------------------------------------------------------------------
r59306 | nobu | 2017-07-10 09:41:21 +0900 (Mon, 10 Jul 2017) | 1 line

hash.c: prefer value cast to pointer cast
------------------------------------------------------------------------
r59305 | svn | 2017-07-10 08:04:44 +0900 (Mon, 10 Jul 2017) | 1 line

* 2017-07-10
------------------------------------------------------------------------
r59304 | normal | 2017-07-10 08:04:43 +0900 (Mon, 10 Jul 2017) | 19 lines

Hash#[]= deduplicates string keys if (and only if) fstring exists

In typical applications, hash entries are read after being
written to.  Blindly writing to hashes which are never read
makes little sense. So, for any hash which is read from, an
fstring entry for the key should already exist for the key.

We no longer blindly create fstrings if the code is blindly
setting random hash keys, preventing the performance regression
in the reverted r43870.

Regarding <https://bugs.ruby-lang.org/issues/9188>, this has a
minimum impact on the bm_so_k_nucleotide where hash keys are set
and not reused, performance is within 1-2% of existing cases.

* hash.c: #include gc.h for rb_objspace_garbage_object_p
  (hash_aset_str): do read-only check of fstring table and
  reuse fstring if it exists and is still alive (not garbage)
  [ruby-core:81942] [Feature #13725]
------------------------------------------------------------------------
r59292 | nobu | 2017-07-09 13:49:15 +0900 (Sun, 09 Jul 2017) | 5 lines

downloader.rb: get rid of symlinks in dist files

* tool/downloader.rb: download to the target file directly if
  CACHE_SAVE=no, to get rid of symlinks in dist files.
  [ruby-core:81887] [Bug #13709]
------------------------------------------------------------------------
r59291 | nobu | 2017-07-09 13:20:48 +0900 (Sun, 09 Jul 2017) | 4 lines

make-snapshot: generate ChangeLog iff not exist

* tool/make-snapshot (package): ChangeLog had existed in pre-2.4
  revisions, but not doc/ChangeLog-YYYY.  fix for 2..3.
------------------------------------------------------------------------
r59290 | svn | 2017-07-09 13:17:50 +0900 (Sun, 09 Jul 2017) | 1 line

* 2017-07-09
------------------------------------------------------------------------
r59289 | nobu | 2017-07-09 13:17:49 +0900 (Sun, 09 Jul 2017) | 5 lines

make-snapshot: touch-unicode-files for 2.4

* tool/make-snapshot (package): fallback touch-unicode-files for
  2.4, which has been introduced to reduce downloads on CI.
  [ruby-core:81972] [Bug #13734]
------------------------------------------------------------------------
r59288 | nobu | 2017-07-08 21:31:55 +0900 (Sat, 08 Jul 2017) | 1 line

* template/exts.mk.tmpl: extract SUBMAKEOPTS from sub exts.mk files too.  [Bug #13730]
------------------------------------------------------------------------
r59287 | nobu | 2017-07-08 11:22:20 +0900 (Sat, 08 Jul 2017) | 6 lines

assertions.rb: syntax_check for other impl

* test/lib/test/unit/assertions.rb (syntax_check): use eval
  instead of RubyVM::InstructionSequence.compile so that other
  implementations can share the tests.
  [ruby-core:81935] [Bug #13723]
------------------------------------------------------------------------
r59285 | nobu | 2017-07-08 11:05:55 +0900 (Sat, 08 Jul 2017) | 1 line

.travis.yml: update dist to trusty
------------------------------------------------------------------------
r59284 | normal | 2017-07-08 02:59:09 +0900 (Sat, 08 Jul 2017) | 1 line

NEWS: note [Feature #13517] is Linux-only (no side-effects on _*nonblock)
------------------------------------------------------------------------
r59283 | normal | 2017-07-08 02:41:08 +0900 (Sat, 08 Jul 2017) | 1 line

NEWS: entry for WEBRick SNI support [Feature #13729]
------------------------------------------------------------------------
r59282 | svn | 2017-07-08 02:09:40 +0900 (Sat, 08 Jul 2017) | 1 line

* properties.
------------------------------------------------------------------------
r59281 | normal | 2017-07-08 02:09:39 +0900 (Sat, 08 Jul 2017) | 7 lines

webrick: add Server Name Indication (SNI)

* lib/webrick/https.rb: servername_cb implementation.
* lib/webrick/ssl.rb: abstract servername_cb.
* test/webrick/test_https.rb: test.
  [ruby-dev:50165] [Feature #13729]
  Author: Tietew <tietew@gmail.com>
------------------------------------------------------------------------
r59280 | svn | 2017-07-08 01:53:04 +0900 (Sat, 08 Jul 2017) | 1 line

* 2017-07-08
------------------------------------------------------------------------
r59279 | normal | 2017-07-08 01:53:03 +0900 (Sat, 08 Jul 2017) | 3 lines

webrick: become maintainer

<CAK6HhsrshX7s3qai4usbXknTQnA4GoRThJcQ_Ea=WgTG2Gu0QA@mail.gmail.com>
------------------------------------------------------------------------
r59278 | nobu | 2017-07-07 21:25:49 +0900 (Fri, 07 Jul 2017) | 5 lines

Run single downloader

* common.mk (update-unicode-property-files, update-unicode-files):
  download in single process for each targets, not for each files
  in parallel, to get rid of conflicts.
------------------------------------------------------------------------
r59276 | svn | 2017-07-07 11:14:58 +0900 (Fri, 07 Jul 2017) | 1 line

* 2017-07-07
------------------------------------------------------------------------
r59275 | usa | 2017-07-07 11:14:57 +0900 (Fri, 07 Jul 2017) | 3 lines

* tool/redmine-backporter.rb (show): just report and ignore if a feature ticket
  is specified instead of aborting.

------------------------------------------------------------------------
r59273 | nobu | 2017-07-06 20:49:03 +0900 (Thu, 06 Jul 2017) | 8 lines

Fix DecimalInteger converting to octal bug

Previously if the input started with a '0' then it will be converted
as octal even though it has been specified as a decimal. This commit
forces the number to be interpreted as a decimal.

[ruby-core:81927] [Bug #13722] [Fix GH-1665]
Author:    william <william.mccumstie@outlook.com>
------------------------------------------------------------------------
r59272 | rhe | 2017-07-06 16:21:17 +0900 (Thu, 06 Jul 2017) | 4 lines

string.c: preserve coderange in String#setbyte

Fix a wrong jump so replacing a byte in an ASCII-only string with an
ASCII character won't clear the coderange.
------------------------------------------------------------------------
r59271 | rhe | 2017-07-06 16:21:16 +0900 (Thu, 06 Jul 2017) | 3 lines

string.c: remove dead code in str_fill_term()

The length of a string never exceeds the capacity.
------------------------------------------------------------------------
r59270 | svn | 2017-07-06 13:12:52 +0900 (Thu, 06 Jul 2017) | 1 line

* 2017-07-06
------------------------------------------------------------------------
r59269 | nobu | 2017-07-06 13:12:51 +0900 (Thu, 06 Jul 2017) | 5 lines

lexer.rb: ignore dedented space

* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): replace an
  empty string content because of dedentation with :on_ignored_sp.
  an empty token makes the sorted order unstable.
------------------------------------------------------------------------
r59268 | rhe | 2017-07-05 18:05:53 +0900 (Wed, 05 Jul 2017) | 4 lines

un.rb: use OpenSSL::PKey.read instead of OpenSSL::PKey::RSA.new

Also, error out if --ssl-private-key option is not given, since
specifying only the certificate makes no sense.  [Feature #13714]
------------------------------------------------------------------------
r59266 | nobu | 2017-07-05 15:32:54 +0900 (Wed, 05 Jul 2017) | 1 line

debug.c: add FMODE constants
------------------------------------------------------------------------
r59265 | nobu | 2017-07-05 15:27:43 +0900 (Wed, 05 Jul 2017) | 5 lines

un.rb: support https

* lib/un.rb: add https support.  based on the patch by Flavio
  Castelli <flavio@castelli.name> in [ruby-core:81901].
  [Feature #13714]
------------------------------------------------------------------------
r59264 | normal | 2017-07-05 02:27:40 +0900 (Wed, 05 Jul 2017) | 5 lines

tool/mk_call_iseq_optimized.rb: fix generated comment

"tool/mkcall_iseq.rb" never existed in our repo.

* tool/mk_call_iseq_optimized.rb: fix generated comment
------------------------------------------------------------------------
r59263 | svn | 2017-07-05 01:02:20 +0900 (Wed, 05 Jul 2017) | 1 line

* properties.
------------------------------------------------------------------------
r59262 | mame | 2017-07-05 01:02:19 +0900 (Wed, 05 Jul 2017) | 5 lines

Use lcov visualizer for gcov statistics

This experimental feature is only for Ruby-core team, not for casual users.

Usage: `./configure --enable-gcov && make && make exam && make lcov`
------------------------------------------------------------------------
r59261 | svn | 2017-07-05 01:02:18 +0900 (Wed, 05 Jul 2017) | 1 line

* 2017-07-05
------------------------------------------------------------------------
r59260 | mame | 2017-07-05 01:02:18 +0900 (Wed, 05 Jul 2017) | 7 lines

tool/run-gcov.rb: ignore rubyspec_temp directory

rubyspec compiles the extension libraries for capi specs in a temporary
directory, and after that, deletes the directory.  gcov resurrects the
directory to save coverage statistics (.gcda files).  However, the
source and profiling artifacts (.gcno files) have been deleted.
So, we need to ignore the .gcda files.
------------------------------------------------------------------------
r59259 | nobu | 2017-07-04 14:42:04 +0900 (Tue, 04 Jul 2017) | 5 lines

vm_args.c: improve keyword argument errors

* vm_args.c (argument_arity_error): improve required keyword
  argument errors when non-keyword arguments given.
  [ruby-core:79439] [Bug #13196]
------------------------------------------------------------------------
r59258 | nobu | 2017-07-04 13:23:06 +0900 (Tue, 04 Jul 2017) | 6 lines

time.c: preserve marshalled timezone

* time.c (time_add): preserve timezone name restored by Marshal.
  [ruby-core:81892] [Bug #13710]

* time.c (time_mload): reset localtime if having timezone.
------------------------------------------------------------------------
r59257 | svn | 2017-07-04 08:42:13 +0900 (Tue, 04 Jul 2017) | 1 line

* 2017-07-04
------------------------------------------------------------------------
r59256 | nobu | 2017-07-04 08:42:12 +0900 (Tue, 04 Jul 2017) | 4 lines

win32.c: restrict cursor move

* win32/win32.c (constat_apply): restrict cursor move in visible
  screen only.  [ruby-core:81883] [Bug #13707]
------------------------------------------------------------------------
r59255 | nobu | 2017-07-03 19:56:21 +0900 (Mon, 03 Jul 2017) | 4 lines

win32.c: clear relative to screen

* win32/win32.c (constat_apply): clear visible screen only, not
  the entire buffer.  [ruby-core:81883] [Bug #13707]
------------------------------------------------------------------------
r59254 | nobu | 2017-07-03 19:22:15 +0900 (Mon, 03 Jul 2017) | 4 lines

win32.c: cursor relative to screen

* win32/win32.c (constat_apply): move relative to visible screen,
  not the entire buffer.  [ruby-core:81883] [Bug #13707]
------------------------------------------------------------------------
r59253 | naruse | 2017-07-03 17:08:29 +0900 (Mon, 03 Jul 2017) | 1 line

Suppress warning: method redefined; discarding old ==
------------------------------------------------------------------------
r59252 | svn | 2017-07-03 11:13:59 +0900 (Mon, 03 Jul 2017) | 1 line

* 2017-07-03
------------------------------------------------------------------------
r59251 | hsbt | 2017-07-03 11:13:59 +0900 (Mon, 03 Jul 2017) | 4 lines

Added sync to all of default gems command.

  * Fix command of FileUtils sync operation. test/fileutils is a directory.
  * When not given gem name option, do sync all of gems.
------------------------------------------------------------------------
r59250 | ktsj | 2017-07-02 19:38:38 +0900 (Sun, 02 Jul 2017) | 6 lines

Symbol#== should be able to be redefined

* vm.c (vm_init_redefined_flag): set redefinition flag for Symbol#==.
  The bug was introduced in r58895.

* test/ruby/test_symbol.rb: test for above.
------------------------------------------------------------------------
r59249 | svn | 2017-07-02 06:17:26 +0900 (Sun, 02 Jul 2017) | 1 line

* 2017-07-02
------------------------------------------------------------------------
r59248 | eregon | 2017-07-02 06:17:25 +0900 (Sun, 02 Jul 2017) | 1 line

Used a fixed seed in Random#rand spec
------------------------------------------------------------------------
r59246 | nobu | 2017-07-01 11:01:05 +0900 (Sat, 01 Jul 2017) | 4 lines

parse.y: f_margs parser events

* parse.y (f_margs): implemented parser events for massign
  formal arguments.  [ruby-core:81848] [Bug #13701]
------------------------------------------------------------------------
r59245 | nobu | 2017-07-01 10:51:17 +0900 (Sat, 01 Jul 2017) | 4 lines

parse.y: mlhs_add_post

* parse.y (mlhs_add_post): new parser event corresponding to
  POSTARG.
------------------------------------------------------------------------
r59244 | svn | 2017-07-01 10:29:23 +0900 (Sat, 01 Jul 2017) | 1 line

* 2017-07-01
------------------------------------------------------------------------
r59243 | nobu | 2017-07-01 10:29:22 +0900 (Sat, 01 Jul 2017) | 7 lines

test_parser_events.rb: simplify

* test/ripper/dummyparser.rb (DummyParser): simplified mlhs node
  representation.

* test/ripper/test_parser_events.rb (test_mlhs_add_star):
  simplified assertions.
------------------------------------------------------------------------
r59213 | nobu | 2017-06-30 13:19:12 +0900 (Fri, 30 Jun 2017) | 4 lines

main.c: RUBY_DEBUG_ENV in devel

* main.c (RUBY_DEBUG_ENV): default to enabled in the development
  version.
------------------------------------------------------------------------
r59212 | nobu | 2017-06-30 11:09:42 +0900 (Fri, 30 Jun 2017) | 7 lines

compile.c: dump iseq

* compile.c (append_compile_error): raise a fatal error when
  compile_debug is enabled.

* compile.c (COMPILE_ERROR): dump the disassembled instruction
  instruction sequence always.
------------------------------------------------------------------------
r59211 | nobu | 2017-06-30 10:56:53 +0900 (Fri, 30 Jun 2017) | 6 lines

vm_insnhelper.c: dump iseq

* vm_insnhelper.c (vm_stack_consistency_error): raise a fatal
  error with the disassembled instruction sequence, in the
  development version, instead of very rarely useful rb_bug in
  such case.
------------------------------------------------------------------------
r59210 | normal | 2017-06-30 07:40:36 +0900 (Fri, 30 Jun 2017) | 5 lines

array.c: more predefined IDs

* array.c (id_cmp): change to macro for OPTIMIZED_CMP
  (rb_ary_repeated_permutation_size): s/id_power/idPow/
  (Init_Array): remove id_cmp and id_power
------------------------------------------------------------------------
r59209 | svn | 2017-06-30 07:34:19 +0900 (Fri, 30 Jun 2017) | 1 line

* 2017-06-30
------------------------------------------------------------------------
r59208 | normal | 2017-06-30 07:34:19 +0900 (Fri, 30 Jun 2017) | 8 lines

remove unused rb_obj_basic_to_s_p function

This hasn't been used since r36709 (2012-08-15)
("Kernel#inspect: improve consistency and do not call #to_s.")
and was never part of public API in include/ruby/

* class.c (rb_obj_basic_to_s_p): remove function
* internal.h (rb_obj_basic_to_s_p): remove declaration
------------------------------------------------------------------------
r59207 | svn | 2017-06-29 23:35:39 +0900 (Thu, 29 Jun 2017) | 1 line

* properties.
------------------------------------------------------------------------
r59206 | svn | 2017-06-29 23:35:39 +0900 (Thu, 29 Jun 2017) | 1 line

* append newline at EOF.
------------------------------------------------------------------------
r59205 | eregon | 2017-06-29 23:35:37 +0900 (Thu, 29 Jun 2017) | 1 line

Update to ruby/spec@abf1700
------------------------------------------------------------------------
r59204 | svn | 2017-06-29 23:35:11 +0900 (Thu, 29 Jun 2017) | 1 line

* properties.
------------------------------------------------------------------------
r59203 | eregon | 2017-06-29 23:35:09 +0900 (Thu, 29 Jun 2017) | 1 line

Update to ruby/mspec@021a119
------------------------------------------------------------------------
r59202 | nobu | 2017-06-29 13:01:30 +0900 (Thu, 29 Jun 2017) | 6 lines

compile.c: disallow next in once

* compile.c (iseq_compile_each0): turned dregx context in "once"
  into "guarded" type from "block" type, to disallow `next`,
  `break`, `redo` as well as outside "once".
  [ruby-core:81805] [Bug #13690]
------------------------------------------------------------------------
r59201 | svn | 2017-06-29 00:25:31 +0900 (Thu, 29 Jun 2017) | 1 line

* 2017-06-29
------------------------------------------------------------------------
r59200 | ko1 | 2017-06-29 00:25:30 +0900 (Thu, 29 Jun 2017) | 8 lines

introduce rb_fiber_t::first_proc.

* cont.c (rb_fiber_t): add rb_fiber_t::first_proc and do not use
  rb_thread_t::first_proc which should be thread local.
  [Bug #13689]

* test/ruby/test_thread.rb: test for [Bug #13689].

------------------------------------------------------------------------
r59199 | ko1 | 2017-06-28 23:27:49 +0900 (Wed, 28 Jun 2017) | 7 lines

move fields to ec.

* vm_core.h (rb_thread.h): move errinfo and trace_arg to
  rb_execution_context_t.

* cont.c (fiber_switch, rb_cont_call): do not restore "trace_arg" here.

------------------------------------------------------------------------
r59198 | svn | 2017-06-28 19:18:04 +0900 (Wed, 28 Jun 2017) | 1 line

* properties.
------------------------------------------------------------------------
r59197 | hsbt | 2017-06-28 19:18:03 +0900 (Wed, 28 Jun 2017) | 1 line

Added sync tool for default gems from github master.
------------------------------------------------------------------------
r59196 | nobu | 2017-06-28 15:13:00 +0900 (Wed, 28 Jun 2017) | 4 lines

parse.y: fix token

* parse.y (parser_parse_string): return proper token tREGEXP_END
  at unterminated regexp.  [Bug #13363]
------------------------------------------------------------------------
r59195 | ko1 | 2017-06-28 15:09:06 +0900 (Wed, 28 Jun 2017) | 5 lines

move fields to ec.

* vm_core.h (rb_thread_t): move root_lep, root_svar and ensure_list
  to rb_execution_context_t.

------------------------------------------------------------------------
r59194 | nobu | 2017-06-28 14:38:27 +0900 (Wed, 28 Jun 2017) | 4 lines

parse.y: add ellipsis

* parse.y (parser_yyerror): add ellipsis properly when error line
  is truncated.
------------------------------------------------------------------------
r59193 | ko1 | 2017-06-28 13:57:02 +0900 (Wed, 28 Jun 2017) | 1 line

fix to check thread type
------------------------------------------------------------------------
r59192 | ko1 | 2017-06-28 13:49:30 +0900 (Wed, 28 Jun 2017) | 7 lines

introduce rb_thread_ptr() to replace GetThreadPtr().

* vm_core.h (rb_thread_ptr): added to replace GetThreadPtr() macro.

* thread.c (in some functions: use "target_th" instead of "th" to make clear
  that it is not a current thread.

------------------------------------------------------------------------
r59191 | nobu | 2017-06-28 13:08:51 +0900 (Wed, 28 Jun 2017) | 4 lines

parse.y: flush numeric token

* parse.y (parser_number_literal_suffix, parse_numeric): flush
  numeric token so following unexpected token part is marked.
------------------------------------------------------------------------
r59190 | ko1 | 2017-06-28 11:50:56 +0900 (Wed, 28 Jun 2017) | 4 lines

move storages to ec.

* vm_core.h (rb_thread_t): move storages to rb_execution_context_t.

------------------------------------------------------------------------
r59189 | duerst | 2017-06-28 11:28:00 +0900 (Wed, 28 Jun 2017) | 1 line

add two tests
------------------------------------------------------------------------
r59188 | nobu | 2017-06-28 11:02:38 +0900 (Wed, 28 Jun 2017) | 4 lines

parse.y: fix parser_yyerror

* parse.y (parser_yyerror): fix buffer overflow at truncation of
  error line.  [ruby-core:81790] [Bug #13687]
------------------------------------------------------------------------
r59187 | nobu | 2017-06-28 10:49:44 +0900 (Wed, 28 Jun 2017) | 1 line

parse.y: prefer enum yytokentype instead to int
------------------------------------------------------------------------
r59186 | svn | 2017-06-28 02:10:57 +0900 (Wed, 28 Jun 2017) | 1 line

* 2017-06-28
------------------------------------------------------------------------
r59185 | nobu | 2017-06-28 02:10:56 +0900 (Wed, 28 Jun 2017) | 4 lines

downloader.rb: get rid of symlinks

* tool/downloader.rb: do not save downloaded files to cache.
  [ruby-core:81780] [Bug #13684]
------------------------------------------------------------------------
r59184 | nobu | 2017-06-27 23:09:08 +0900 (Tue, 27 Jun 2017) | 5 lines

fix return in toplevel ensure

* compile.c (iseq_compile_each0): adjust stack after return in
  toplevel ensure, when the value is used.
  [ruby-core:81777] [Bug #13682]
------------------------------------------------------------------------
r59183 | nobu | 2017-06-27 15:57:34 +0900 (Tue, 27 Jun 2017) | 8 lines

fix return in toplevel rescue/ensure

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

* vm_insnhelper.c (vm_throw_start): allow return in toplevel
  rescue/ensure.
------------------------------------------------------------------------
r59182 | svn | 2017-06-27 12:45:56 +0900 (Tue, 27 Jun 2017) | 1 line

* 2017-06-27
------------------------------------------------------------------------
r59181 | nobu | 2017-06-27 12:45:55 +0900 (Tue, 27 Jun 2017) | 6 lines

vm_insnhelper.c: break in once

* vm_insnhelper.c (vm_throw_start): size of catch table has been
  included in iseq_catch_table struct, which could be NULL, since
  2.2.  e.g., proc-closure in `once'.
  [ruby-core:81775] [Bug #13680]
------------------------------------------------------------------------
r59180 | naruse | 2017-06-26 19:37:13 +0900 (Mon, 26 Jun 2017) | 1 line

webrick is _unmaintained_
------------------------------------------------------------------------
r59179 | nobu | 2017-06-26 19:31:34 +0900 (Mon, 26 Jun 2017) | 4 lines

parse.y: line number of bin op

* parse.y (call_bin_op_gen): adjust line number to the receiver,
  instead of the rhs.
------------------------------------------------------------------------
r59178 | nobu | 2017-06-26 18:40:39 +0900 (Mon, 26 Jun 2017) | 16 lines

parse.y: mark error token

* parse.y (parser_yyerror): mark the whole last token which caused
  the error, not only the end.

before:
  ```
  if end
        ^
  ```

after:
  ```
  if end
     ^~~
  ```
------------------------------------------------------------------------
r59177 | ko1 | 2017-06-26 16:56:44 +0900 (Mon, 26 Jun 2017) | 5 lines

move several fields from rb_thread_t to rb_execution_context_t.

* vm_core.h (rb_thread_t): move several fields which are copied at cont.c
  to rb_execution_context_t.

------------------------------------------------------------------------
r59176 | ko1 | 2017-06-26 16:46:11 +0900 (Mon, 26 Jun 2017) | 4 lines

copy ec on Fiber.

* cont.c (cont_restore_thread): on Fiber we only need to copy ec struct.

------------------------------------------------------------------------
r59175 | ko1 | 2017-06-26 14:36:10 +0900 (Mon, 26 Jun 2017) | 4 lines

add "FIBER_" prefix.

* cont.c (enum fiber_status): add "FIBER_" prefix for all names.

------------------------------------------------------------------------
r59174 | ko1 | 2017-06-26 14:30:07 +0900 (Mon, 26 Jun 2017) | 7 lines

Do not store/restore Thread#status on fiber switching.

* cont.c (cont_restore_thread): On Fiber switching, thread status shold be
  THREAD_RUNNABLE so that we don't need to store/restore this field.

* cont.c (cont_save_thread): ditto.

------------------------------------------------------------------------
r59173 | svn | 2017-06-26 09:59:25 +0900 (Mon, 26 Jun 2017) | 1 line

* 2017-06-26
------------------------------------------------------------------------
r59172 | nobu | 2017-06-26 09:59:24 +0900 (Mon, 26 Jun 2017) | 4 lines

compile.c: fix debug print

* compile.c (iseq_compile_each0): debugs/ruby_debug_printf do not
  support PRIsVALUE.
------------------------------------------------------------------------
r59171 | nobu | 2017-06-25 17:55:23 +0900 (Sun, 25 Jun 2017) | 4 lines

compile.c: fix_sp_depth

* compile.c (fix_sp_depth): separate fix-up of sp depth from code
  generation.
------------------------------------------------------------------------
r59170 | svn | 2017-06-25 14:10:49 +0900 (Sun, 25 Jun 2017) | 1 line

* 2017-06-25
------------------------------------------------------------------------
r59169 | nobu | 2017-06-25 14:10:48 +0900 (Sun, 25 Jun 2017) | 5 lines

compile.c: toplevel return in argument

* compile.c (iseq_compile_each0): adjust the stack before return
  in an evstr/argument (reported by Balazs <balazs@kutilovi.cz>)
  to fix stack consistency error.  [ruby-core:81761] [Bug #13678]
------------------------------------------------------------------------
r59168 | nobu | 2017-06-24 21:01:02 +0900 (Sat, 24 Jun 2017) | 1 line

Added version guards [Bug #12684]
------------------------------------------------------------------------
r59167 | nobu | 2017-06-24 12:35:29 +0900 (Sat, 24 Jun 2017) | 5 lines

Delegate to `eql?` [Fix GH-1564]

* lib/delegate.rb (eql?): Delegate to `eql?` of the inner object.
  based on the patch by giginet <giginet.net@gmail.com>.
  [ruby-core:76950] [Bug #12684]
------------------------------------------------------------------------
r59166 | nobu | 2017-06-24 10:44:49 +0900 (Sat, 24 Jun 2017) | 4 lines

mspec.rb: keep jobserver fds

* spec/mspec/lib/mspec/commands/mspec.rb (MSpecMain#run): do not
  close jobserver FDs for mspec-run.
------------------------------------------------------------------------
r59165 | normal | 2017-06-24 05:59:00 +0900 (Sat, 24 Jun 2017) | 7 lines

thread_sync.c: fix documentation for Queue#close

When Queue#closed? is true, using push/enq/<< will raise an
exception, and not return nil.

* thread_sync.c: fix documentation for Queue#close
  Thanks to John Anderson.  [ruby-core:81749] [Misc #13673]
------------------------------------------------------------------------
r59164 | svn | 2017-06-24 00:08:51 +0900 (Sat, 24 Jun 2017) | 1 line

* 2017-06-24
------------------------------------------------------------------------
r59163 | nobu | 2017-06-24 00:08:50 +0900 (Sat, 24 Jun 2017) | 4 lines

test_command_processor.rb: add suffix

* test/shell/test_command_processor.rb (test_option_type): Windows
  needs a suffix to execute.
------------------------------------------------------------------------
r59162 | nobu | 2017-06-23 20:56:48 +0900 (Fri, 23 Jun 2017) | 4 lines

parse.y: should not warn op method call

* parse.y (void_expr_gen): should warn operator expression style
  calls only, but not method style calls.  [Fix GH-1660]
------------------------------------------------------------------------
r59161 | nobu | 2017-06-23 20:20:29 +0900 (Fri, 23 Jun 2017) | 5 lines

parse.y: check multibyte char

* parse.y (parser_precise_mbclen): check invalid multibyte char at
  skipping strings following `?x` literal string, not to stuck in
  a infinite loop.  [ruby-core:81746] [Bug #13672]
------------------------------------------------------------------------
r59160 | nobu | 2017-06-23 20:15:26 +0900 (Fri, 23 Jun 2017) | 5 lines

vm_core.h: sandwich jmpbuf

* vm_core.h (rb_vm_tag): move jmpbuf which should be stored at the
  last in TH_PUSH_TAG, between tag and state so ensure to be
  accessible.  reapplied r40806.
------------------------------------------------------------------------
r59159 | ko1 | 2017-06-23 18:43:52 +0900 (Fri, 23 Jun 2017) | 5 lines

move "state" to rb_vm_tag.

* vm_core.h (rb_thread_t::tag_state): move to "rb_vm_tag::state".
  Lifetime of "state" should be same as current tag.

------------------------------------------------------------------------
r59158 | ko1 | 2017-06-23 17:48:41 +0900 (Fri, 23 Jun 2017) | 5 lines

rename th->state to th->tag_state.

* vm_core.h (rb_thread_t): rename rb_thread_t::state to tag_state
  to make it clear.

------------------------------------------------------------------------
r59157 | ko1 | 2017-06-23 17:24:54 +0900 (Fri, 23 Jun 2017) | 2 lines

rb_catch_protect() accepts enum ruby_tag_type *.

------------------------------------------------------------------------
r59156 | nobu | 2017-06-23 16:53:07 +0900 (Fri, 23 Jun 2017) | 4 lines

thread.c: suppress warning

* thread.c (exec_recursive): rb_catch_protect() uses `int*` as
  well as rb_protect.
------------------------------------------------------------------------
r59155 | ko1 | 2017-06-23 16:25:52 +0900 (Fri, 23 Jun 2017) | 12 lines

use "enum ruby_tag_type" and TAG_NONE.

Return value of EXEC_TAG() is saved by "int state".
Instead of "int", use "enum ruby_tag_type". First EXEC_TAG()
value should be 0, so that define TAG_NONE (= 0) and use it.

Some code used "status" instead of "state". To make them clear,
rename them to state.

We can change variable name from "state" to "tag_state", but this
ticket doesn't contain it.

------------------------------------------------------------------------
r59154 | ko1 | 2017-06-23 14:55:12 +0900 (Fri, 23 Jun 2017) | 1 line

use NULL instead of 0.
------------------------------------------------------------------------
r59153 | ko1 | 2017-06-23 14:52:28 +0900 (Fri, 23 Jun 2017) | 2 lines

skip on other threads (again).

------------------------------------------------------------------------
r59152 | ko1 | 2017-06-23 14:50:35 +0900 (Fri, 23 Jun 2017) | 2 lines

revert r59151 which introduce failures.

------------------------------------------------------------------------
r59151 | ko1 | 2017-06-23 14:45:50 +0900 (Fri, 23 Jun 2017) | 3 lines

skip on other threads.


------------------------------------------------------------------------
r59150 | glass | 2017-06-23 13:19:53 +0900 (Fri, 23 Jun 2017) | 3 lines

Revert "Allow IO#reopen to take a block"

This reverts r59142.
------------------------------------------------------------------------
r59149 | nobu | 2017-06-23 10:43:39 +0900 (Fri, 23 Jun 2017) | 4 lines

vm_insnhelper.c: vm_stack_consistency_error

* vm_insnhelper.c (vm_stack_consistency_error): extracted from
  insns.def for further info in the future.
------------------------------------------------------------------------
r59148 | svn | 2017-06-23 09:29:45 +0900 (Fri, 23 Jun 2017) | 1 line

* 2017-06-23
------------------------------------------------------------------------
r59147 | nobu | 2017-06-23 09:29:45 +0900 (Fri, 23 Jun 2017) | 9 lines

refinements.rdoc: [DOC] improved [Fix GH-1659]

* doc/syntax/refinements.rdocrefinements.rdoc: grammatical
  correction and code highlighting improved

* doc/syntax/refinements.rdocrefinements.rdoc: Fixnum replaced
  with Integer and Integer with Numeric

Author:    Shiva Bhusal <shivabhusal@users.noreply.github.com>
------------------------------------------------------------------------
r59146 | nobu | 2017-06-22 21:53:05 +0900 (Thu, 22 Jun 2017) | 5 lines

fix mortal_dynamic_symbol count

* test/objspace/test_objspace.rb (test_count_symbols): exclude a
  dynamic symbol which has been turned into immortal by
  define_method.
------------------------------------------------------------------------
r59145 | glass | 2017-06-22 19:56:49 +0900 (Thu, 22 Jun 2017) | 9 lines

Fix exception type in option type checker

* lib/shell/system-command.rb (SystemCommand#initialize):
  `def_e2message` wraps error message, but does not define new exception

* test/shell/test_command_processor.rb: add a test

This patch is authored by Kenichi Kamiya <kachick1@gmail.com>
close #1657
------------------------------------------------------------------------
r59144 | ko1 | 2017-06-22 17:37:53 +0900 (Thu, 22 Jun 2017) | 7 lines

use --dump option for parse rule.

* common.mk: use --dump=--dump=parsetree_with_comment,insns
  instead of tool/parse.rb. maybe nobody use this option so that
  I believe it is enough. previous "parse" rule doesn't run script
  but patched parse rule runs specified script (on miniruby).

------------------------------------------------------------------------
r59143 | ko1 | 2017-06-22 17:33:33 +0900 (Thu, 22 Jun 2017) | 7 lines

try to fix symbol duplication.

* test/objspace/test_objspace.rb (test_count_symbols): make more complex dynamic
  symbols to avoid conflict with other existing static symbols.
  Sometimes this test fails with "mortal_dynamic_symbol=>127".


------------------------------------------------------------------------
r59142 | glass | 2017-06-22 15:50:32 +0900 (Thu, 22 Jun 2017) | 8 lines

Allow IO#reopen to take a block

* io.c (rb_io_reopen): take a block and ensure the IO closed
  [Feature #2631]

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

* NEWS: add an entry for this change
------------------------------------------------------------------------
r59141 | svn | 2017-06-22 15:42:27 +0900 (Thu, 22 Jun 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r59140 | ko1 | 2017-06-22 15:42:26 +0900 (Thu, 22 Jun 2017) | 5 lines

introduce heap_allocatable_pages_set().

* gc.c (heap_allocatable_pages_set): added. This function set
  heap_allocatable_pages and sorted_list atomically.

------------------------------------------------------------------------
r59139 | ko1 | 2017-06-22 14:51:43 +0900 (Thu, 22 Jun 2017) | 3 lines

catch up frozen_string_literal: true.


------------------------------------------------------------------------
r59138 | ko1 | 2017-06-22 14:03:18 +0900 (Thu, 22 Jun 2017) | 5 lines

introduce GC_ASSERT().

* gc.c (GC_ASSERT()): added. GC_ASSERT() is similar to VM_ASSERT in
  vm_core.h but turn on by RGENGC_CHECK_MODE.

------------------------------------------------------------------------
r59137 | svn | 2017-06-22 09:59:55 +0900 (Thu, 22 Jun 2017) | 1 line

* 2017-06-22
------------------------------------------------------------------------
r59136 | nobu | 2017-06-22 09:59:54 +0900 (Thu, 22 Jun 2017) | 4 lines

gc.c: expand sorted pages

* gc.c (heap_page_allocate): expand sorted pages before inserting
  allocated new page.  [Bug #12670]
------------------------------------------------------------------------
r59135 | nobu | 2017-06-21 21:51:26 +0900 (Wed, 21 Jun 2017) | 4 lines

gc.c: FL_CHECK2

* gc.c (FL_TEST2, FL_SET2, FL_UNSET2): make error messages
  consitent.
------------------------------------------------------------------------
r59134 | eregon | 2017-06-21 19:06:44 +0900 (Wed, 21 Jun 2017) | 1 line

* NEWS: Fix typo.
------------------------------------------------------------------------
r59133 | sonots | 2017-06-21 16:43:27 +0900 (Wed, 21 Jun 2017) | 6 lines

test/ruby/test_string.rb: add tests to chomp substr

* test/ruby/test_string.rb (TestString#test_chomp): add tests
  to chomp substr

* test/ruby/test_string.rb (TestString#test_chomp!): ditto
------------------------------------------------------------------------
r59132 | sonots | 2017-06-21 16:43:26 +0900 (Wed, 21 Jun 2017) | 10 lines

string.c: add String#delete_prefix and String#delete_prefix!
to remove leading substr [Feature #12694] [fix GH-1632]

* string.c (rb_str_delete_prefix_bang): add a new method
  to remove prefix destuctively.

* string.c (rb_str_delete_prefix): add a new method
  to remove prefix non-destuctively.

* test/ruby/test_string.rb: add tests.
------------------------------------------------------------------------
r59131 | nobu | 2017-06-21 13:34:25 +0900 (Wed, 21 Jun 2017) | 8 lines

RUBY_DEVEL flag

* configure.in: define RUBY_DEVEL only in the trunk.

* gc.c: enable runtime rgengc debug if RUBY_DEVEL

* ruby.c (debug_option): enable RUBY_DEBUG in --debug option only
  if RUBY_DEVEL.
------------------------------------------------------------------------
r59130 | nobu | 2017-06-21 12:27:21 +0900 (Wed, 21 Jun 2017) | 1 line

configure.in: use AS_IF
------------------------------------------------------------------------
r59129 | nobu | 2017-06-21 11:44:23 +0900 (Wed, 21 Jun 2017) | 4 lines

ruby.c: debug options in command line

* ruby.c (debug_option): parse options in --debug command line
  option same as RUBY_DEBUG env.  available only in the trunk.
------------------------------------------------------------------------
r59128 | nobu | 2017-06-21 11:25:27 +0900 (Wed, 21 Jun 2017) | 6 lines

Fix Enumerable#uniq with non single yield arguments

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

Author:    Kenichi Kamiya <kachick1@gmail.com>
------------------------------------------------------------------------
r59127 | nobu | 2017-06-21 11:03:38 +0900 (Wed, 21 Jun 2017) | 1 line

KNOWNBUGS.rb: hung up on linux
------------------------------------------------------------------------
r59126 | nobu | 2017-06-21 10:34:34 +0900 (Wed, 21 Jun 2017) | 1 line

KNOWNBUGS.rb: deferred free
------------------------------------------------------------------------
r59125 | nobu | 2017-06-21 10:34:33 +0900 (Wed, 21 Jun 2017) | 1 line

bootstraptest/runner.rb: keyword argument
------------------------------------------------------------------------
r59124 | svn | 2017-06-21 00:23:51 +0900 (Wed, 21 Jun 2017) | 1 line

* 2017-06-21
------------------------------------------------------------------------
r59123 | eregon | 2017-06-21 00:23:50 +0900 (Wed, 21 Jun 2017) | 4 lines

Use a file under tmp for File.real{,dir}path specs on Windows

* The source file path could have pre-existing symlinks.
* See https://github.com/ruby/spec/issues/445.
------------------------------------------------------------------------
r59122 | hsbt | 2017-06-20 20:43:05 +0900 (Tue, 20 Jun 2017) | 1 line

Fixed missing handling for frozen object at r59121.
------------------------------------------------------------------------
r59121 | hsbt | 2017-06-20 20:10:37 +0900 (Tue, 20 Jun 2017) | 1 line

Specify frozen_string_literal: true.
------------------------------------------------------------------------
r59120 | nobu | 2017-06-20 17:23:25 +0900 (Tue, 20 Jun 2017) | 4 lines

gc.c: add newline to report [ci skip]

* gc.c (gc_sweep_finish): gc_report format should end with a
  newline, as gc_report_body does not append it.
------------------------------------------------------------------------
r59119 | svn | 2017-06-20 14:34:33 +0900 (Tue, 20 Jun 2017) | 1 line

* 2017-06-20
------------------------------------------------------------------------
r59118 | ko1 | 2017-06-20 14:34:33 +0900 (Tue, 20 Jun 2017) | 2 lines

skip unresolved issue.

------------------------------------------------------------------------
r59117 | nobu | 2017-06-19 23:36:18 +0900 (Mon, 19 Jun 2017) | 1 line

debug.c: rgengc debug option
------------------------------------------------------------------------
r59116 | nobu | 2017-06-19 23:36:17 +0900 (Mon, 19 Jun 2017) | 3 lines

test for [Bug #12670]

heap corruption by deferred free.
------------------------------------------------------------------------
r59115 | hsbt | 2017-06-19 22:03:06 +0900 (Mon, 19 Jun 2017) | 9 lines

Make string literal to frozen object on gemspec of defulte gems.

  Added following gemspecs.

    * extensions: date, dbm, etc, fiddle, gdbm, sdbm, stringio, strscan, zlib
    * pure ruby libraries: cmath, csv, fileutils, scanf, webrick

  psych and rdoc is out of scope of this commit. I will merge after
  upstream was change to `frozen_string_literal: true`.
------------------------------------------------------------------------
r59114 | svn | 2017-06-19 22:00:13 +0900 (Mon, 19 Jun 2017) | 1 line

* 2017-06-19
------------------------------------------------------------------------
r59113 | eregon | 2017-06-19 22:00:12 +0900 (Mon, 19 Jun 2017) | 3 lines

Adapt Time#zone spec to deal with differences of TZ validation on Windows

* [Bug #13591] [ruby-core:81347]
------------------------------------------------------------------------
r59112 | nobu | 2017-06-18 13:38:01 +0900 (Sun, 18 Jun 2017) | 5 lines

string.c: check just before modification

* string.c (rb_str_chomp_bang): check if modifiable after checking
  an argument and just before modification, as it can get frozen
  during the argument conversion to String.
------------------------------------------------------------------------
r59111 | nobu | 2017-06-18 13:29:05 +0900 (Sun, 18 Jun 2017) | 4 lines

test_string.rb: chomp! frozen string

* test/ruby/test_string.rb (TestString#test_chomp): should raise
  if frozen.
------------------------------------------------------------------------
r59110 | nobu | 2017-06-18 13:29:04 +0900 (Sun, 18 Jun 2017) | 5 lines

test/unit.rb: close jobserver

* test/lib/test/unit.rb (Test::Unit::Parallel#flush_job_tokens):
  close jobserver auth fds aflter flush, not to  release tokens
  more than acquired.
------------------------------------------------------------------------
r59109 | nobu | 2017-06-18 10:15:36 +0900 (Sun, 18 Jun 2017) | 5 lines

capi/spec_helper.rb: suppress logo

* spec/rubyspec/optional/capi/spec_helper.rb (compile_extension):
  suppress logo of nmake.exe to stderr.  we want to show compiler
  warnings only.
------------------------------------------------------------------------
r59108 | svn | 2017-06-18 10:15:36 +0900 (Sun, 18 Jun 2017) | 1 line

* 2017-06-18
------------------------------------------------------------------------
r59107 | nobu | 2017-06-18 10:15:35 +0900 (Sun, 18 Jun 2017) | 4 lines

appveyor.yml: num of jobs

* appveyor.yml (test_script): stop running too many workers to get
  rid of sporadic NoMemoryError.
------------------------------------------------------------------------
r59106 | nobu | 2017-06-17 09:18:33 +0900 (Sat, 17 Jun 2017) | 7 lines

capi/spec_helper.rb: pass jobserver fds

* spec/mspec/lib/mspec/commands/mspec.rb (MSpecMain#multi_exec):
  do not close GNU make jobserver auth fds.

* spec/rubyspec/optional/capi/spec_helper.rb (compile_extension):
  ditto.
------------------------------------------------------------------------
r59105 | nobu | 2017-06-17 09:10:54 +0900 (Sat, 17 Jun 2017) | 5 lines

capi/spec_helper.rb: use MAKE env

* spec/rubyspec/optional/capi/spec_helper.rb (compile_extension):
  prefer MAKE environment variable to hardcoded name if set by
  parent make.
------------------------------------------------------------------------
r59104 | svn | 2017-06-17 08:59:34 +0900 (Sat, 17 Jun 2017) | 1 line

* 2017-06-17
------------------------------------------------------------------------
r59103 | nobu | 2017-06-17 08:59:33 +0900 (Sat, 17 Jun 2017) | 4 lines

default.mspec: limit cores

* spec/default.mspec (MSpecScript::JobServer#cores): limit max
  number of processors, not to acquire tokens more than necessary.
------------------------------------------------------------------------
r59102 | nobu | 2017-06-16 23:44:01 +0900 (Fri, 16 Jun 2017) | 6 lines

pathname.rb: UNC root pathname needs a separator

* ext/pathname/lib/pathname.rb (Pathname#plus): UNC root pathname
  needs a separator.  File.basename returns "/" on UNC root, as
  well as sole drive letter, even if it does not end with a
  separator.  [ruby-core:80900] [Bug #13515]
------------------------------------------------------------------------
r59101 | hsbt | 2017-06-16 16:02:22 +0900 (Fri, 16 Jun 2017) | 9 lines

Merge psych-3.0.0.beta2 from https://github.com/ruby/psych

  It contains following changes from 3.0.0.beta1

    * Preserve time zone offset when deserializing times
      https://github.com/ruby/psych/pull/316

    * Enable YAML serialization of Ruby delegators
      https://github.com/ruby/psych/pull/158
------------------------------------------------------------------------
r59100 | ko1 | 2017-06-16 13:04:53 +0900 (Fri, 16 Jun 2017) | 4 lines

require 'bigdecimal'

* test/json/json_parser_test.rb: this test needs bigdecimal.

------------------------------------------------------------------------
r59099 | hsbt | 2017-06-16 12:04:46 +0900 (Fri, 16 Jun 2017) | 3 lines

Merge json-2.1.0 from https://github.com/flori/json

  https://github.com/flori/json/blob/master/CHANGES.md#2017-04-18-210
------------------------------------------------------------------------
r59098 | svn | 2017-06-16 10:53:16 +0900 (Fri, 16 Jun 2017) | 1 line

* 2017-06-16
------------------------------------------------------------------------
r59097 | nobu | 2017-06-16 10:53:15 +0900 (Fri, 16 Jun 2017) | 1 line

removed ruby_error_print
------------------------------------------------------------------------
r59096 | usa | 2017-06-15 23:04:29 +0900 (Thu, 15 Jun 2017) | 7 lines

Clear `DESTDIR` when running make

* spec/rubyspec/optional/capi/spec_helper.rb (compile_extension): `DESTDIR` is
  the drive letter of the ruby installed path as default on mswin, but not
  builddir of the ruby.  this causes spec errors if the drive letter is
  different in the installed path and builddir.

------------------------------------------------------------------------
r59095 | eregon | 2017-06-15 22:34:32 +0900 (Thu, 15 Jun 2017) | 1 line

Update to ruby/spec@c730f07
------------------------------------------------------------------------
r59094 | svn | 2017-06-15 21:48:54 +0900 (Thu, 15 Jun 2017) | 1 line

* properties.
------------------------------------------------------------------------
r59093 | eregon | 2017-06-15 21:48:52 +0900 (Thu, 15 Jun 2017) | 1 line

Update to ruby/spec@cd1b911
------------------------------------------------------------------------
r59092 | eregon | 2017-06-15 21:48:26 +0900 (Thu, 15 Jun 2017) | 1 line

Update to ruby/mspec@d900a49
------------------------------------------------------------------------
r59091 | nobu | 2017-06-15 20:51:39 +0900 (Thu, 15 Jun 2017) | 1 line

Revert r59084, see r57060
------------------------------------------------------------------------
r59090 | a_matsuda | 2017-06-15 19:43:17 +0900 (Thu, 15 Jun 2017) | 10 lines

Don't pollute toplevel by an IRB internal method

There actually are some libraries that requires 'irb' such as byebug, and when
'irb' is required, it requires irb/src_encoding.rb, then it defines the toplevel
default_src_encoding method that is visible from anywhere in the end users' apps.

Here's a quick oneliner that shows what's happening.

  % ruby -rpry-byebug -e 'p private_methods(false)'
  [:include, :using, :define_method, :public, :private, :DelegateClass, :default_src_encoding]
------------------------------------------------------------------------
r59089 | ko1 | 2017-06-15 16:16:17 +0900 (Thu, 15 Jun 2017) | 4 lines

Prohibit SystemStackError while GC.

* vm_insnhelper.c (rb_threadptr_stack_overflow): fatal on GC [Bug #13662]

------------------------------------------------------------------------
r59088 | nobu | 2017-06-15 12:12:32 +0900 (Thu, 15 Jun 2017) | 8 lines

common.mk: tweaked packages order

* common.mk (dist): tweaked packages order by $(DISTPKGS).
  .tar.gz comes first for the hash values in downloads page, then
  popular .zip.

* tool/make-snapshot: "all" in -packages means all of the rest
  package types now.
------------------------------------------------------------------------
r59087 | nobu | 2017-06-15 11:39:06 +0900 (Thu, 15 Jun 2017) | 1 line

make-snapshot: colorize [ci skip]
------------------------------------------------------------------------
r59086 | nobu | 2017-06-15 11:33:57 +0900 (Thu, 15 Jun 2017) | 1 line

make-snapshot: suppress output from 7z [ci skip]
------------------------------------------------------------------------
r59085 | svn | 2017-06-15 11:33:56 +0900 (Thu, 15 Jun 2017) | 1 line

* 2017-06-15
------------------------------------------------------------------------
r59084 | nobu | 2017-06-15 11:33:56 +0900 (Thu, 15 Jun 2017) | 1 line

make-snapshot: prefer default commands over 7z [ci skip]
------------------------------------------------------------------------
r59083 | nobu | 2017-06-14 23:02:33 +0900 (Wed, 14 Jun 2017) | 4 lines

proc.c: infect inspect result

* proc.c (method_inspect): the result should be infected by the
  object.
------------------------------------------------------------------------
r59082 | nobu | 2017-06-14 22:08:50 +0900 (Wed, 14 Jun 2017) | 1 line

test/ruby/test_method.rb: refined  [ruby-core:81666] [Bug #13656]
------------------------------------------------------------------------
r59081 | rhe | 2017-06-14 18:49:09 +0900 (Wed, 14 Jun 2017) | 36 lines

openssl: import v2.0.4

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

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

This contains the fix for [Bug #11033].

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

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

SHIBATA Hiroshi (1):
      Fix typos

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

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

usa (1):
      Search SSL libraries by testing various filename patterns
------------------------------------------------------------------------
r59080 | nobu | 2017-06-14 15:03:55 +0900 (Wed, 14 Jun 2017) | 5 lines

proc.c: skip prepended modules

* proc.c (method_super_method): skip prepended modules and
  continue from the super class of the original class.
  [ruby-core:81666] [Bug #13656]
------------------------------------------------------------------------
r59079 | nobu | 2017-06-14 14:10:30 +0900 (Wed, 14 Jun 2017) | 4 lines

compile.c: dump and error before allocation

* compile.c (iseq_set_sequence): separate instruction dump and
  error, before allocation of sequence.
------------------------------------------------------------------------
r59078 | ko1 | 2017-06-14 13:27:14 +0900 (Wed, 14 Jun 2017) | 5 lines

simply call xfree().

* compile.c (BADINSN_ERROR): mixing (void) and (int) will fail solaris
  compiler. [ruby-core:81668], [Bug #13658]

------------------------------------------------------------------------
r59077 | svn | 2017-06-14 11:26:19 +0900 (Wed, 14 Jun 2017) | 1 line

* 2017-06-14
------------------------------------------------------------------------
r59076 | ko1 | 2017-06-14 11:26:18 +0900 (Wed, 14 Jun 2017) | 6 lines

remove OPT_CALL_CFUNC_WITHOUT_FRAME.

* vm_core.h (OPT_CALL_CFUNC_WITHOUT_FRAME): removed because nobody use it.
  This optimization tries to call C-methods without pushing VM frames,
  however no big improvements compare with this complexity.

------------------------------------------------------------------------
r59075 | nobu | 2017-06-13 12:20:12 +0900 (Tue, 13 Jun 2017) | 2 lines

* compile.c (dump_disasm_list_with_cursor): replace with
  dump_disasm_list_with_cursor_dest.
------------------------------------------------------------------------
r59074 | ko1 | 2017-06-13 11:52:33 +0900 (Tue, 13 Jun 2017) | 5 lines

fix to free unallocated memory.

* compile.c (iseq_set_sequence): initialize with NULL for line_info_table
  and generated_iseq and check NULL at BADINSN_ERROR.

------------------------------------------------------------------------
r59073 | nobu | 2017-06-13 10:31:32 +0900 (Tue, 13 Jun 2017) | 4 lines

compile.c: refine error message

* compile.c (insn_set_sc_state): dump the whole instructions and
  mark the destination when label state mismatch.
------------------------------------------------------------------------
r59072 | svn | 2017-06-13 10:04:57 +0900 (Tue, 13 Jun 2017) | 1 line

* 2017-06-13
------------------------------------------------------------------------
r59071 | nobu | 2017-06-13 10:04:56 +0900 (Tue, 13 Jun 2017) | 1 line

compile.c: refine error messages
------------------------------------------------------------------------
r59070 | k0kubun | 2017-06-12 20:09:10 +0900 (Mon, 12 Jun 2017) | 5 lines

array.c: [DOC] Make it clear that #<< modifies receiver

This patch is sent from @selmertsx (morioka shuhei).

[fix GH-1646]
------------------------------------------------------------------------
r59069 | ko1 | 2017-06-12 16:58:23 +0900 (Mon, 12 Jun 2017) | 1 line

add a comment for rb_thread_mark()
------------------------------------------------------------------------
r59068 | ko1 | 2017-06-12 16:49:33 +0900 (Mon, 12 Jun 2017) | 8 lines

remove rb_blocking_region_buffer::oldubf.

* thread.c (rb_blocking_region_buffer): remove oldubf because ubf should be
  NULL just before ubf setting.

* thread.c (set_unblock_function, reset_unblock_function): rename to
  unblock_function_set() and unblock_function_clear() respectively.

------------------------------------------------------------------------
r59067 | nobu | 2017-06-12 15:31:02 +0900 (Mon, 12 Jun 2017) | 4 lines

unused functions

* thread_win32.c: native_cond_signal, native_cond_wait,
  native_cond_initialize, native_cond_destroy are not used now.
------------------------------------------------------------------------
r59066 | ko1 | 2017-06-12 13:52:25 +0900 (Mon, 12 Jun 2017) | 15 lines

remove ruby_kill() introduced for  [Bug #7951].

* thread.c (rbuy_kill): removed. This function is used
  with SIGSEGV, SIGBUS, SIGKILL, SIGILL, SIGFPE and SIGSTOP
  and these signals are affect immediately. So that `kill(2)'
  is enough for them.

* signal.c (rb_f_kill): ditto.

* vm_core.h (rb_thread_t::interrupt_cond): removed because
  only `ruby_kill()' uses this field.

* test/ruby/test_signal.rb: Without this patch sending SIGSTOP to own
  process wait another interrupt even if another process sends SIGCONT.

------------------------------------------------------------------------
r59065 | nobu | 2017-06-12 13:35:53 +0900 (Mon, 12 Jun 2017) | 3 lines

iseq.c: preserve encoding

* iseq.c (iseqw_inspect): preserve path encoding in the result.
------------------------------------------------------------------------
r59064 | nobu | 2017-06-12 13:35:52 +0900 (Mon, 12 Jun 2017) | 1 line

gc.c: duplicate rb_iseq_path by RSTRING_PTR
------------------------------------------------------------------------
r59063 | ko1 | 2017-06-12 11:20:09 +0900 (Mon, 12 Jun 2017) | 7 lines


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

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

------------------------------------------------------------------------
r59062 | svn | 2017-06-12 09:18:31 +0900 (Mon, 12 Jun 2017) | 1 line

* 2017-06-12
------------------------------------------------------------------------
r59061 | nobu | 2017-06-12 09:18:30 +0900 (Mon, 12 Jun 2017) | 4 lines

win32.c: rb_dir_getwd_ospath

* win32/win32.c (rb_dir_getwd_ospath): Windows implementation
  moved from dir.c.  get rid of freeing malloced memory by xfree.
------------------------------------------------------------------------
r59060 | nobu | 2017-06-11 20:21:01 +0900 (Sun, 11 Jun 2017) | 4 lines

expand ruby_sourcefile

* compile.c: expand ruby_sourcefile not to evaluate twice in
  RSTRING_PTR.
------------------------------------------------------------------------
r59059 | svn | 2017-06-11 14:36:57 +0900 (Sun, 11 Jun 2017) | 1 line

* 2017-06-11
------------------------------------------------------------------------
r59058 | nobu | 2017-06-11 14:36:56 +0900 (Sun, 11 Jun 2017) | 1 line

configure.in: link the DWARF debug information
------------------------------------------------------------------------
r59057 | svn | 2017-06-10 19:26:33 +0900 (Sat, 10 Jun 2017) | 1 line

* 2017-06-10
------------------------------------------------------------------------
r59056 | nobu | 2017-06-10 19:26:32 +0900 (Sat, 10 Jun 2017) | 7 lines

enumerator.c: fix nested maps

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

thread_pthread.c: workaround for valgrind on Mac

* thread.c: revert r59053.

* thread_pthread.c (rb_thread_create_timer_thread): needs more
  stack space for valgrind.
------------------------------------------------------------------------
r59054 | nobu | 2017-06-09 23:42:14 +0900 (Fri, 09 Jun 2017) | 1 line

signal.c: do not disable handlers to dump core
------------------------------------------------------------------------
r59053 | nobu | 2017-06-09 22:58:09 +0900 (Fri, 09 Jun 2017) | 9 lines

thread.c: workaround for valgrind on Mac OS X

Without this hack, pthread_join() in rb_thread_stop_timer_thread()
segfaults.

ProductName:	Mac OS X
ProductVersion:	10.11.6
BuildVersion:	15G1510
valgrind-3.12.0
------------------------------------------------------------------------
r59052 | nobu | 2017-06-09 22:02:13 +0900 (Fri, 09 Jun 2017) | 4 lines

signal.c: no sigsegv handler with valgrind

* signal.c: disable handling signals to dump core, if installing
  unreserved signals failed, not valgrind to hang on Mac OS.
------------------------------------------------------------------------
r59051 | nobu | 2017-06-09 17:30:24 +0900 (Fri, 09 Jun 2017) | 1 line

signal.c: warn at unresserved signals
------------------------------------------------------------------------
r59050 | hsbt | 2017-06-09 12:20:03 +0900 (Fri, 09 Jun 2017) | 5 lines

Update bundled gems to latest versions.

  * did_you_mean 1.1.2
  * minitest 5.10.2
  * xmlrpc 0.3.0
------------------------------------------------------------------------
r59049 | a_matsuda | 2017-06-09 10:31:36 +0900 (Fri, 09 Jun 2017) | 7 lines

Fix typo.

Patch by: Sarah Duve
Signed-off-by: Akira Matsuda <ronnie@dio.jp>

[Fix GH-1643]
[ci skip]
------------------------------------------------------------------------
r59048 | svn | 2017-06-09 05:58:04 +0900 (Fri, 09 Jun 2017) | 1 line

* 2017-06-09
------------------------------------------------------------------------
r59047 | normal | 2017-06-09 05:58:03 +0900 (Fri, 09 Jun 2017) | 13 lines

tool/runruby.rb: test with smallest possible machine stack

Lets ensure none of our C functions use too much stack space and
fix all excessive stack usage before releasing the next version.
Reducing C stack usage should reduce conservative GC scanning
time and improve performance.

If there are platform-dependent test failures; excessive stack
usage should be fixed; rather than increasing minimum values or
removing these envs from testing.

* tool/runruby.rb: use smallest possible machine stack size
  [ruby-core:81597] [Feature #13637]
------------------------------------------------------------------------
r59046 | nobu | 2017-06-08 16:41:38 +0900 (Thu, 08 Jun 2017) | 6 lines

signal.c: relax installation failure

* signal.c (install_sighandler): ignore failure at unreserved
  signals.  e.g., SIGUSR2 fails under valgrind.

* signal.c (install_sighandler_fail): refine [BUG] message.
------------------------------------------------------------------------
r59045 | ko1 | 2017-06-08 14:22:49 +0900 (Thu, 08 Jun 2017) | 5 lines

vm_block_handler_verify() should not return any value.

* vm_core.h (vm_block_handler_verify): this function only checks
  the given block handler with VM_ASSERT(). No need to return any value.

------------------------------------------------------------------------
r59044 | svn | 2017-06-08 13:13:52 +0900 (Thu, 08 Jun 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r59043 | ko1 | 2017-06-08 13:13:51 +0900 (Thu, 08 Jun 2017) | 18 lines

check break target correctly.

* compile.c (iseq_compile_each0): save target child_iseq in the catch-table
  for break. This iseq is not for continuation, but for search key at
  vm_throw_start().

* vm_insnhelper.c (vm_throw_start): check saved iseq first.

* iseq.h: add comment for it.

* test/ruby/test_iterator.rb (test_ljump): add a test for the issue:
    def call b; b.call; end
    call(Proc.new{break}){} #=> (1) should raise LocalJumpError
    call(Proc.new{break})   #=> (2) shoudd raies LocalJumpError, too.
  but (1) doesn't raise LocalJumpError.

  This issue is reported by Matz.

------------------------------------------------------------------------
r59042 | ko1 | 2017-06-08 13:06:07 +0900 (Thu, 08 Jun 2017) | 5 lines

use NULL instead of 0.

* compile.c: use NULL instead of 0 for ADD_CATCH_ENTRY()
  to specify don't pass iseq.

------------------------------------------------------------------------
r59041 | nobu | 2017-06-08 11:07:42 +0900 (Thu, 08 Jun 2017) | 4 lines

ruby.c: script name in UTF-8

* ruby.c (process_options): keep script name in UTF-8 if UTF8_PATH
  to get rid of loss by conversion.
------------------------------------------------------------------------
r59040 | nobu | 2017-06-08 10:58:44 +0900 (Thu, 08 Jun 2017) | 6 lines

file.c: realpath in OS path encoding

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

* file.c (rb_realpath_internal): work in the OS path encoding
------------------------------------------------------------------------
r59039 | nobu | 2017-06-08 10:58:42 +0900 (Thu, 08 Jun 2017) | 1 line

appveyor.yml: show encodings [ci skip]
------------------------------------------------------------------------
r59038 | nobu | 2017-06-08 10:19:44 +0900 (Thu, 08 Jun 2017) | 1 line

appveyor.yml: enable exam on AppVeyor
------------------------------------------------------------------------
r59037 | svn | 2017-06-08 07:25:24 +0900 (Thu, 08 Jun 2017) | 1 line

* 2017-06-08
------------------------------------------------------------------------
r59036 | odaira | 2017-06-08 07:25:23 +0900 (Thu, 08 Jun 2017) | 2 lines

* tool/make-snapshot: prefer to use a make command
  set in the MAKE or make env variable.
------------------------------------------------------------------------
r59035 | nobu | 2017-06-07 23:36:18 +0900 (Wed, 07 Jun 2017) | 4 lines

load.c: get rid of side effects

* load.c (rb_f_load, rb_require_internal): DTrace hooks should not
  have side effects, i.e., conversion to String.
------------------------------------------------------------------------
r59034 | svn | 2017-06-07 22:01:28 +0900 (Wed, 07 Jun 2017) | 1 line

* properties.
------------------------------------------------------------------------
r59033 | kou | 2017-06-07 22:01:28 +0900 (Wed, 07 Jun 2017) | 6 lines

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

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

Reported by Anton Sivakov. Thanks!!!

------------------------------------------------------------------------
r59032 | normal | 2017-06-07 09:32:07 +0900 (Wed, 07 Jun 2017) | 7 lines

common.mk: update dependencies after r58978

Using "tool/update-deps --fix"

* common.mk (file.$(OBJEXT)): depend on id.h
  (rational.$(OBJEXT)): ditto
  (string.$(OBJEXT)): sort alphabetically
------------------------------------------------------------------------
r59031 | svn | 2017-06-07 09:32:03 +0900 (Wed, 07 Jun 2017) | 1 line

* properties.
------------------------------------------------------------------------
r59030 | normal | 2017-06-07 09:32:02 +0900 (Wed, 07 Jun 2017) | 10 lines

thread.c: avoid busy looping on rb_thread_fd_close

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

* thread.c (rb_thread_fd_close): schedule other threads in loop
* ext/-test-/thread_fd_close/thread_fd_close.c: new file
* ext/-test-/thread_fd_close/depend: ditto
* ext/-test-/thread_fd_close/extconf.rb: ditto
* test/-ext-/thread_fd_close/test_thread_fd_close.rb: new test
------------------------------------------------------------------------
r59029 | svn | 2017-06-07 07:55:36 +0900 (Wed, 07 Jun 2017) | 1 line

* 2017-06-07
------------------------------------------------------------------------
r59028 | normal | 2017-06-07 07:55:35 +0900 (Wed, 07 Jun 2017) | 17 lines

IO#close: do not enqueue redundant interrupts (take #2)

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

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

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

* thread.c (rb_notify_fd_close): do not enqueue multiple interrupts
  [ruby-core:81581] [Bug #13632]
* test/ruby/test_io.rb (test_single_exception_on_close):
  new test based on script from Nikolay
------------------------------------------------------------------------
r59027 | nobu | 2017-06-06 21:30:17 +0900 (Tue, 06 Jun 2017) | 1 line

debug.c: fix breaking condtions
------------------------------------------------------------------------
r59026 | duerst | 2017-06-06 19:34:10 +0900 (Tue, 06 Jun 2017) | 10 lines

add test_ill_formed_utf_8_replace to test recommended number of \uFFFD

Add test method test_ill_formed_utf_8_replace to test/ruby/test_transcode.rb
to check for the recommended number of \uFFFD replacement characters.
This is the first part, using ill-formed prefixes, with suffixes up to
the length of the original UTF-8 structure (including overlongs and
the full 31-bit space.)

For more details, see Unicode 9.0.0, Section 3.9, Best Practices for Using U+FFFD.

------------------------------------------------------------------------
r59025 | ko1 | 2017-06-06 16:11:28 +0900 (Tue, 06 Jun 2017) | 1 line

re-revert r59020
------------------------------------------------------------------------
r59024 | ko1 | 2017-06-06 16:10:19 +0900 (Tue, 06 Jun 2017) | 1 line

revert r59023 because it contans unrelated developping code
------------------------------------------------------------------------
r59023 | ko1 | 2017-06-06 15:58:54 +0900 (Tue, 06 Jun 2017) | 1 line

revert r59020 because it may fail some tests sometimes on some environment (http://ci.rvm.jp/). This revert is to check the reason of failures.
------------------------------------------------------------------------
r59022 | nobu | 2017-06-06 12:45:02 +0900 (Tue, 06 Jun 2017) | 1 line

debug.c: parse locale and filesystem codepages
------------------------------------------------------------------------
r59021 | svn | 2017-06-06 09:13:48 +0900 (Tue, 06 Jun 2017) | 1 line

* 2017-06-06
------------------------------------------------------------------------
r59020 | normal | 2017-06-06 09:13:47 +0900 (Tue, 06 Jun 2017) | 10 lines

IO#close: do not enqueue redundant interrupts

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

* thread.c (rb_notify_fd_close): do not enqueue multiple interrupts
  [ruby-core:81581] [Bug #13632]
* test/ruby/test_io.rb (test_single_exception_on_close):
  new test based on script from Nikolay
------------------------------------------------------------------------
r59019 | nobu | 2017-06-05 16:26:15 +0900 (Mon, 05 Jun 2017) | 4 lines

win32.c: no locale

* win32/win32.c (skipspace, w32_cmdvector): get rid of iswspace(),
  which is locale dependent.
------------------------------------------------------------------------
r59018 | ko1 | 2017-06-05 16:03:27 +0900 (Mon, 05 Jun 2017) | 1 line

revert r59017 it fails ruby/test_lambda.rb
------------------------------------------------------------------------
r59017 | ko1 | 2017-06-05 15:57:20 +0900 (Mon, 05 Jun 2017) | 5 lines

do not inform ``is_lambda".

* vm_eval.c (yield_under): do not inform Proc is lambda or not.
  After that invoke_block_from_c_bh() checks it.

------------------------------------------------------------------------
r59016 | ko1 | 2017-06-05 15:15:28 +0900 (Mon, 05 Jun 2017) | 18 lines

rename functions and clean parameters.

* internal.h (rb_yield_lambda): rename to rb_yield_force_blockarg()
  because this function prohibt lambda arg setup (strict setup).

* vm.c (invoke_iseq_block_from_c): remove splattable argument because
  it is not used.

* vm.c (invoke_block_from_c_splattable): rename to invoke_block_from_c_bh()
  because `splattable` doesn't make sense on current this function.

  Also accept `force_blockarg' parameter instead of `splattable` parameter.
  It is more clear.

* vm.c (invoke_block_from_c_unsplattable): rename to
  invoke_block_from_c_proc() and accept `proc` instead of `block'.
  This function is used only by proc block invocation.

------------------------------------------------------------------------
r59015 | svn | 2017-06-05 14:43:59 +0900 (Mon, 05 Jun 2017) | 1 line

* 2017-06-05
------------------------------------------------------------------------
r59014 | ko1 | 2017-06-05 14:43:58 +0900 (Mon, 05 Jun 2017) | 5 lines

remove arg_setup_lambda.

* vm_args.c (enum arg_setup_type): remove arg_setup_lambda because it is
  same as arg_setup_method.

------------------------------------------------------------------------
r59013 | nobu | 2017-06-04 16:29:52 +0900 (Sun, 04 Jun 2017) | 1 line

load.c: encode to OS path outside PUSH_TAG
------------------------------------------------------------------------
r59012 | nobu | 2017-06-04 15:24:04 +0900 (Sun, 04 Jun 2017) | 6 lines

test_require.rb: fix expected path

* test/ruby/test_require.rb (test_require_with_unc): remove extra
  slash.  the result of File.expand_path has a slash just follows
  the drive letter.
  https://github.com/ruby/ruby/commit/4ef849bd9014746821402e21053a53ea61b3690d#commitcomment-22391133
------------------------------------------------------------------------
r59011 | stomar | 2017-06-04 05:17:00 +0900 (Sun, 04 Jun 2017) | 5 lines

array.c: docs for Array#{sort,sort!}

* array.c: [DOC] make example in the docs for Array#{sort,sort!}
  match the call-seq and description by using the same block vars.
  Based on a patch by Roque Pinel (repinel).  [Fix GH-1628]
------------------------------------------------------------------------
r59010 | svn | 2017-06-04 02:11:44 +0900 (Sun, 04 Jun 2017) | 1 line

* 2017-06-04
------------------------------------------------------------------------
r59009 | nobu | 2017-06-04 02:11:43 +0900 (Sun, 04 Jun 2017) | 5 lines

test_require.rb: ignore EPERM at UNC

* test/ruby/test_require.rb (test_require_with_unc): ignore EPERM.
  GetFileAttributes and CreateFile with backup semantics fail at a
  symlink in a shared folder to another shared folder.
------------------------------------------------------------------------
r59008 | nobu | 2017-06-03 23:40:05 +0900 (Sat, 03 Jun 2017) | 4 lines

file.c: preserve encoding

* file.c (path_check_0): preserve encoding of path name in warning
  message.
------------------------------------------------------------------------
r59007 | nobu | 2017-06-03 21:47:11 +0900 (Sat, 03 Jun 2017) | 4 lines

ruby.c: dladdr_path is not used on cygwin

* ruby.c (dladdr_path): dladdr is provided on recent cygwin, but
  GetModuleFileNameW is used instead of it.
------------------------------------------------------------------------
r59006 | ko1 | 2017-06-03 19:07:44 +0900 (Sat, 03 Jun 2017) | 7 lines


* vm_core.h: remove VM_FRAME_MAGIC_LAMBDA and introduce
  VM_FRAME_FLAG_LAMBDA. So that lambda block frame is
  VM_FRAME_MAGIC_BLOCK | VM_FRAME_FLAG_LAMBDA.

* vm_core.h: remvoe VM_FRAME_MAGIC_PROC because nobody uses it.

------------------------------------------------------------------------
r59005 | nobu | 2017-06-03 18:35:43 +0900 (Sat, 03 Jun 2017) | 1 line

test/ruby/test_require.rb: remove duplicate assertion
------------------------------------------------------------------------
r59004 | nobu | 2017-06-03 18:18:44 +0900 (Sat, 03 Jun 2017) | 5 lines

test_require.rb: untouch default internal encoding

* test/ruby/test_require.rb (assert_require_insecure_path): get
  rid of setting Encoding.default_internal, which affects load
  path conversion.
------------------------------------------------------------------------
r59003 | normal | 2017-06-03 10:04:30 +0900 (Sat, 03 Jun 2017) | 11 lines

test: attempt to reduce failures in assert_cpu_usage_low

Try to make this test less fragile by taking into account
the worst case kernel timing resolution.
[ruby-core:81540]

* test/lib/test/unit/assertions.rb (assert_cpu_usage_low):
  clamp measurement to minimum measurable time and warn
  about tests being too short to measure
* test/ruby/test_io.rb (test_copy_stream_no_busy_wait):
  remove pct kwarg and rely on assert_cpu_usage_low defaults
------------------------------------------------------------------------
r59002 | stomar | 2017-06-03 06:29:27 +0900 (Sat, 03 Jun 2017) | 5 lines

string.c: docs for String#split

* string.c: [DOC] clarify docs for String#split when called
  with limit and capture groups.
  Reported by Cichol Tsai.  [ruby-core:81505] [Bug #13621]
------------------------------------------------------------------------
r59001 | svn | 2017-06-03 00:38:29 +0900 (Sat, 03 Jun 2017) | 1 line

* 2017-06-03
------------------------------------------------------------------------
r59000 | nobu | 2017-06-03 00:38:28 +0900 (Sat, 03 Jun 2017) | 1 line

common.mk: show locale
------------------------------------------------------------------------
r58999 | nobu | 2017-06-02 23:52:49 +0900 (Fri, 02 Jun 2017) | 4 lines

test_require.rb: assert_require_insecure_path

* test/ruby/test_require.rb (assert_require_insecure_path): more
  tests for loading insecure path.
------------------------------------------------------------------------
r58998 | nobu | 2017-06-02 13:32:47 +0900 (Fri, 02 Jun 2017) | 4 lines

test_require.rb: fallback encoding

* test/ruby/test_require.rb (assert_require_nonascii_path):
  fallback when LANG=C.
------------------------------------------------------------------------
r58997 | nobu | 2017-06-02 13:10:36 +0900 (Fri, 02 Jun 2017) | 4 lines

test_require.rb: filesystem encoding

* test/ruby/test_require.rb (assert_require_nonascii_path): the
  path in error message is converted to filesystem encoding.
------------------------------------------------------------------------
r58996 | nobu | 2017-06-02 12:54:19 +0900 (Fri, 02 Jun 2017) | 4 lines

file.c: preserve encoding

* file.c (rb_find_file_safe): preserve encoding of path in
  SecurityError messages.
------------------------------------------------------------------------
r58995 | eregon | 2017-06-02 02:26:12 +0900 (Fri, 02 Jun 2017) | 1 line

Fix DRb.start_service to use any available port
------------------------------------------------------------------------
r58994 | eregon | 2017-06-02 02:26:00 +0900 (Fri, 02 Jun 2017) | 4 lines

Remove bad spec which cannot behave nicely in a multi-process environment

* A system port might be taken by another process at any time.
* There are no useful expectations in this spec.
------------------------------------------------------------------------
r58993 | eregon | 2017-06-02 02:25:48 +0900 (Fri, 02 Jun 2017) | 1 line

Remove empty files in drb specs
------------------------------------------------------------------------
r58992 | eregon | 2017-06-02 02:08:59 +0900 (Fri, 02 Jun 2017) | 3 lines

Create the file in the File::TMPFILE spec in its own directory

* Avoids failing the spec if rubyspec_temp is not empty.
------------------------------------------------------------------------
r58991 | eregon | 2017-06-02 02:08:47 +0900 (Fri, 02 Jun 2017) | 4 lines

Open files in binary modes for copying in MSpec's #cp

* See https://bugs.ruby-lang.org/issues/13570.
* Found by MSP-Greg (Greg L).
------------------------------------------------------------------------
r58990 | ko1 | 2017-06-02 00:18:51 +0900 (Fri, 02 Jun 2017) | 5 lines

make Dir object WB protected.

* dir.c (dir_data_type): set RUBY_TYPED_WB_PROTECTED.
  Insert WBs for dir_data::path.

------------------------------------------------------------------------
r58989 | svn | 2017-06-02 00:12:15 +0900 (Fri, 02 Jun 2017) | 1 line

* 2017-06-02
------------------------------------------------------------------------
r58988 | ko1 | 2017-06-02 00:12:14 +0900 (Fri, 02 Jun 2017) | 5 lines

make Binding object WB protected.

* proc.c (ruby_binding_data_type): set RUBY_TYPED_WB_PROTECTED.
  Insert write barriers (WBs) to all of writes.

------------------------------------------------------------------------
r58987 | nobu | 2017-06-01 22:05:54 +0900 (Thu, 01 Jun 2017) | 4 lines

load.c: convert by rb_get_path_check

* load.c (rb_require_internal): convert to path name with the
  given safe level, without setting global safe level.
------------------------------------------------------------------------
r58986 | nobu | 2017-06-01 21:58:02 +0900 (Thu, 01 Jun 2017) | 1 line

file.c: rb_check_funcall_default for fallback value
------------------------------------------------------------------------
r58985 | nobu | 2017-06-01 17:02:41 +0900 (Thu, 01 Jun 2017) | 7 lines

vm_eval.c: fix rb_check_funcall_default

* vm_eval.c (check_funcall_missing): revert r58984.  should call
  method_missing if respond_to_missing is not redefined.

* vm_eval.c (rb_check_funcall_default): return the default value
  if respond_to_missing and method_missing are not defined.
------------------------------------------------------------------------
r58984 | nobu | 2017-06-01 16:46:22 +0900 (Thu, 01 Jun 2017) | 4 lines

vm_eval.c: fix for rb_check_funcall_default

* vm_eval.c (check_funcall_missing): basic_obj_respond_to_missing
  returns Qundef if respond_to_missing is not redefined.
------------------------------------------------------------------------
r58983 | ko1 | 2017-06-01 13:48:05 +0900 (Thu, 01 Jun 2017) | 1 line

fix failure on r58981
------------------------------------------------------------------------
r58982 | nobu | 2017-06-01 13:43:03 +0900 (Thu, 01 Jun 2017) | 4 lines

debug.c: more enums

* debug.c (ruby_dummy_gdb_enums): add enums for RObject, RModule,
  RString, RArray.
------------------------------------------------------------------------
r58981 | duerst | 2017-06-01 13:38:03 +0900 (Thu, 01 Jun 2017) | 5 lines

improve English for a warning message

On DOSish systems, there is a warning message for \r\n line endings on shebang line.
Improve this message from "shebang line ends with \r may cause a problem"
to "shebang line ending with \r may cause problems".
------------------------------------------------------------------------
r58980 | svn | 2017-06-01 09:05:35 +0900 (Thu, 01 Jun 2017) | 1 line

* 2017-06-01
------------------------------------------------------------------------
r58979 | ko1 | 2017-06-01 09:05:33 +0900 (Thu, 01 Jun 2017) | 27 lines

rename absolute_path to realpath internally and introduce pathobj.

* vm_core.h: rename absolute_path to realpath because it is expected name.
  external APIs (#absolute_path methods) are remained.

* vm_core.h: remove rb_iseq_location_struct::path and
  rb_iseq_location_struct::absolute_path and introduce pathobj.
  if given path equals to given absolute_path (and most of case
  it is true), pathobj is simply given path String. If it is not same,
  pathobj is Array and pathobj[0] is path and pathobj[1] is realpath.

  This size optimization reduce 8 bytes and
  sizeof(struct rb_iseq_constant_body) is 200 bytes -> 192 bytes
  on 64bit CPU.

  To support this change, the following functions are introduced:
    * pathobj_path() (defined in vm_core.h)
    * pathobj_realpath() (ditto)
    * rb_iseq_path() (decl. in vm_core.h)
    * rb_iseq_realpath() (ditto)
    * rb_iseq_pathobj_new() (ditto)
    * rb_iseq_pathobj_set() (ditto)

* vm_core.h (rb_binding_t): use pathobj instead of path. If binding
  is given at eval methods, realpath (absolute_path) was caller's
  realpath. However, they should use binding's realpath.

------------------------------------------------------------------------
r58978 | watson1978 | 2017-05-31 21:30:57 +0900 (Wed, 31 May 2017) | 50 lines

Improve performance of implicit type conversion

To convert the object implicitly, it has had two parts in convert_type() which are
  1. lookink up the method's id
  2. calling the method

Seems that strncmp() and strcmp() in convert_type() are slightly heavy to look up
the method's id for type conversion.

This patch will add and use internal APIs (rb_convert_type_with_id, rb_check_convert_type_with_id)
to call the method without looking up the method's id when convert the object.

Array#flatten -> 19 % up
Array#+       ->  3 % up

[ruby-dev:50024] [Bug #13341] [Fix GH-1537]

### Before
       Array#flatten    104.119k (? 1.1%) i/s -    525.690k in   5.049517s
             Array#+      1.993M (? 1.8%) i/s -     10.010M in   5.024258s

### After
       Array#flatten    124.005k (? 1.0%) i/s -    624.240k in   5.034477s
             Array#+      2.058M (? 4.8%) i/s -     10.302M in   5.019328s

### Test Code
require 'benchmark/ips'

class Foo
  def to_ary
    [1,2,3]
  end
end

Benchmark.ips do |x|

  ary = []
  100.times { |i| ary << i }
  array = [ary]

  x.report "Array#flatten" do |i|
    i.times { array.flatten }
  end

  x.report "Array#+" do |i|
    obj = Foo.new
    i.times { array + obj }
  end

end
------------------------------------------------------------------------
r58977 | ko1 | 2017-05-31 15:46:57 +0900 (Wed, 31 May 2017) | 9 lines

add debug counters for local variable (lavr) access.

* debug_counter.h: add the following counters:
  * lvar_get: counter for lvar get.
  * lvar_get_dynamic: counter for lvar get from upper frames.
  * lvar_set: coutner for lvar set.
  * lvar_set_dynamic: coutner for lvar set from upper frames.
  * lvar_set_slowpath: counter for lavr set using slowpath.

------------------------------------------------------------------------
r58976 | nobu | 2017-05-31 15:40:49 +0900 (Wed, 31 May 2017) | 4 lines

Makefile.sub: set ENABLE_SHARED [ci skip]

* win32/Makefile.sub (LIBRUBY_LDSHARED): mswin build always
  enables shared.
------------------------------------------------------------------------
r58975 | nobu | 2017-05-31 15:03:13 +0900 (Wed, 31 May 2017) | 3 lines

common.mk: lldb [ci skip]

* common.mk (lldb, lldb-ruby): add targets to debug with lldb.
------------------------------------------------------------------------
r58974 | nobu | 2017-05-31 11:42:10 +0900 (Wed, 31 May 2017) | 4 lines

lldb_cruby.py: eval outside frames

* misc/lldb_cruby.py (lldb_rp): evaluate without frames when no
  process is running, and show error messages.
------------------------------------------------------------------------
r58973 | svn | 2017-05-31 03:17:56 +0900 (Wed, 31 May 2017) | 1 line

* 2017-05-31
------------------------------------------------------------------------
r58972 | stomar | 2017-05-31 03:17:55 +0900 (Wed, 31 May 2017) | 8 lines

object.c: improve docs

* object.c: [DOC] add an example for Object#yield_self that
  better illustrates its purpose; other small improvements.
  Reported by Vitaly Tatarintsev (ck3g).  Patch by Marcus Stollsteimer.
  [Fix GH-1637]

* object.c: [DOC] improve docs for Object#{itself,tap}.
------------------------------------------------------------------------
r58971 | nobu | 2017-05-30 22:12:22 +0900 (Tue, 30 May 2017) | 7 lines

enum.c: check if reentered

* enum.c (cmpint_reenter_check): extract from nmin_cmp and
  nmin_block_cmp.

* enum.c (nmin_cmp): check if reentered before rb_cmpint.
  [Feature #13437]
------------------------------------------------------------------------
r58970 | nobu | 2017-05-30 21:47:58 +0900 (Tue, 30 May 2017) | 1 line

enum.c: rb_check_funcall_default for fallback value
------------------------------------------------------------------------
r58969 | nobu | 2017-05-30 20:59:26 +0900 (Tue, 30 May 2017) | 1 line

test_rubyoptions.rb: ruby-runner sets $0 to install name now
------------------------------------------------------------------------
r58968 | watson1978 | 2017-05-30 18:00:56 +0900 (Tue, 30 May 2017) | 68 lines

Improve performance of Enumerable#{sort_by,min_by,max_by,minmax_by}

This is totally same approach with r58964.

enum.c (sort_by_cmp): use OPTIMIZED_CMP() to compare the objects instead of
    `<=>' method dispatching for Fixnum/Float/String object.

enum.c (nmin_cmp): ditto.
enum.c (min_by_i): ditto.
enum.c (max_by_i): ditto.
enum.c (minmax_by_i_update): ditto.
enum.c (minmax_by_i): ditto.

    Enumerable#sort_by   -> 51 % up
    Enumerable#min_by(n) -> 34 % up
    Enumerable#min_by    -> 37 % up
    Enumerable#max_by(n) -> 61 % up
    Enumerable#max_by    -> 40 % up
    Enumerable#minmax_by -> 67 % up

    [ruby-core:80689] [Bug #13437] [Fix GH-1584]

### Before
  Enumerable#sort_by      5.692k (? 2.2%) i/s -     28.611k in   5.028861s
Enumerable#min_by(n)      8.496k (? 0.5%) i/s -     43.146k in   5.078394s
   Enumerable#min_by      8.678k (? 0.5%) i/s -     43.911k in   5.060128s
Enumerable#max_by(n)      3.306k (? 3.0%) i/s -     16.562k in   5.014727s
   Enumerable#max_by      8.322k (? 2.8%) i/s -     42.400k in   5.099400s
Enumerable#minmax_by      6.769k (? 2.6%) i/s -     34.100k in   5.041354s

### After
  Enumerable#sort_by      8.591k (? 3.0%) i/s -     43.316k in   5.046836s
Enumerable#min_by(n)     11.489k (? 1.2%) i/s -     57.732k in   5.025504s
   Enumerable#min_by     11.835k (? 2.7%) i/s -     60.150k in   5.086450s
Enumerable#max_by(n)      5.322k (? 1.1%) i/s -     26.650k in   5.008289s
   Enumerable#max_by     11.705k (? 0.6%) i/s -     59.262k in   5.062997s
Enumerable#minmax_by     11.323k (? 1.3%) i/s -     57.018k in   5.036565s

### Test code
require 'benchmark/ips'

Benchmark.ips do |x|
  enum = (1..1000).to_a.to_enum

  x.report "Enumerable#sort_by" do
    enum.sort_by { |a| a }
  end

  x.report "Enumerable#min_by(n)" do
    enum.min_by(2) { |a| a }
  end

  x.report "Enumerable#min_by" do
    enum.min_by { |a| a }
  end

  x.report "Enumerable#max_by(n)" do
    enum.max_by(2) { |a| a }
  end

  x.report "Enumerable#max_by" do
    enum.max_by { |a| a }
  end

  x.report "Enumerable#minmax_by" do
    enum.minmax_by { |a| a }
  end
end
------------------------------------------------------------------------
r58967 | ko1 | 2017-05-30 16:05:58 +0900 (Tue, 30 May 2017) | 4 lines

add parameter names.

* vm_core.h: add parameter names for rb_iseq_new*.

------------------------------------------------------------------------
r58966 | naruse | 2017-05-30 15:50:35 +0900 (Tue, 30 May 2017) | 3 lines

Solaris 10 x86 raseis SEGV

http://rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20170527T221806Z.diff.html.gz
------------------------------------------------------------------------
r58965 | duerst | 2017-05-30 14:43:41 +0900 (Tue, 30 May 2017) | 5 lines

Change max byte length of UTF-8 to 4 bytes

In enc/utf_8.c, change maximum byte length of UTF-8 to 4 bytes (from 6)
to conform to definition of UTF-8. This closes issue #13590.
(This is a retry of r58954, after issue #13590 has been addressed.)
------------------------------------------------------------------------
r58964 | watson1978 | 2017-05-30 11:57:33 +0900 (Tue, 30 May 2017) | 32 lines

Improve performance of Range#{min,max}

range.c (range_min): use OPTIMIZED_CMP() to compare the objects instead of
    `<=>' method dispatching for Fixnum/Float/String object inside Range object.

range.c (range_max): ditto.

    Range#min -> 34 % up
    Range#max -> 44 % up

    [ruby-core:80713] [Bug #13443] [Fix GH-1585]

### Before
           Range#min      8.428M (? 1.3%) i/s -     42.141M in   5.000952s
           Range#max      8.157M (? 1.3%) i/s -     40.852M in   5.009297s

### After
           Range#min     11.269M (? 1.2%) i/s -     56.388M in   5.004611s
           Range#max     11.764M (? 1.3%) i/s -     58.856M in   5.003820s

### Test code
require 'benchmark/ips'

Benchmark.ips do |x|
  x.report "Range#min" do |i|
    i.times { (1..100).min }
  end

  x.report "Range#max" do |i|
    i.times { (1..100).max }
  end
end
------------------------------------------------------------------------
r58963 | svn | 2017-05-30 02:56:47 +0900 (Tue, 30 May 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58962 | eregon | 2017-05-30 02:56:46 +0900 (Tue, 30 May 2017) | 1 line

Clean up a bit the Process.setpriority specs
------------------------------------------------------------------------
r58961 | eregon | 2017-05-30 02:56:34 +0900 (Tue, 30 May 2017) | 1 line

Enable Process.setpriority for a single process on more platforms.
------------------------------------------------------------------------
r58960 | svn | 2017-05-30 00:34:46 +0900 (Tue, 30 May 2017) | 1 line

* 2017-05-30
------------------------------------------------------------------------
r58959 | nobu | 2017-05-30 00:34:45 +0900 (Tue, 30 May 2017) | 1 line

Run in separate process/pgrp [Bug #13609]
------------------------------------------------------------------------
r58958 | eregon | 2017-05-29 20:19:42 +0900 (Mon, 29 May 2017) | 1 line

Simplify, avoid extra exceptions and add test for concurrent mspec mkdir_p
------------------------------------------------------------------------
r58957 | k0kubun | 2017-05-29 19:53:54 +0900 (Mon, 29 May 2017) | 8 lines

rubyspec: Fix method redefinition warning

ruby/spec/rubyspec/library/erb/run_spec.rb:63: warning: method redefined; discarding old main
ruby/spec/rubyspec/library/erb/result_spec.rb:53: warning: previous definition of main was here
ruby/spec/rubyspec/library/erb/run_spec.rb:76: warning: method redefined; discarding old main1
ruby/spec/rubyspec/library/erb/result_spec.rb:67: warning: previous definition of main1 was here
ruby/spec/rubyspec/library/erb/run_spec.rb:81: warning: method redefined; discarding old main2
ruby/spec/rubyspec/library/erb/result_spec.rb:72: warning: previous definition of main2 was here
------------------------------------------------------------------------
r58956 | k0kubun | 2017-05-29 19:22:47 +0900 (Mon, 29 May 2017) | 3 lines

test/erb/test_erb.rb: Fix unused variable warning

ruby/test/erb/test_erb.rb:575: warning: assigned but unused variable - foo
------------------------------------------------------------------------
r58955 | duerst | 2017-05-29 17:59:41 +0900 (Mon, 29 May 2017) | 5 lines

revert r58954 temporarily

Revert change to maximum of 4 bytes for UTF-8 characters at r58954 temporarily.
This failed spec at https://travis-ci.org/ruby/ruby/builds/237086017, but it
is totally unclear why.
------------------------------------------------------------------------
r58954 | duerst | 2017-05-29 17:41:23 +0900 (Mon, 29 May 2017) | 4 lines

Change max byte length of UTF-8 to 4 bytes

In enc/utf_8.c, change maximum byte length of UTF-8 to 4 bytes (from 6)
to conform to definition of UTF-8. This closes issue #13590.
------------------------------------------------------------------------
r58953 | nobu | 2017-05-29 16:03:11 +0900 (Mon, 29 May 2017) | 4 lines

fix up r58952

* spec/mspec/lib/mspec/helpers/fs.rb (Object#mkdir_p): rescue
  File.stat when the target does not exist.
------------------------------------------------------------------------
r58952 | nobu | 2017-05-29 15:53:05 +0900 (Mon, 29 May 2017) | 4 lines

fix race condition

* spec/mspec/lib/mspec/helpers/fs.rb (Object#mkdir_p): fix race
  condition when multi_exec.
------------------------------------------------------------------------
r58951 | nobu | 2017-05-29 15:39:42 +0900 (Mon, 29 May 2017) | 1 line

tool/runruby.rb: exec ruby-runner
------------------------------------------------------------------------
r58950 | nobu | 2017-05-29 15:39:41 +0900 (Mon, 29 May 2017) | 1 line

ruby-runner.c: replace argv[0]
------------------------------------------------------------------------
r58949 | nobu | 2017-05-29 14:19:51 +0900 (Mon, 29 May 2017) | 5 lines

default.mspec: remove useless flags

* spec/default.mspec: removed -I options for useless or non-
  existent paths from flags.  there is no library scripts and .ext
  directory in the source directory.
------------------------------------------------------------------------
r58948 | naruse | 2017-05-29 01:41:31 +0900 (Mon, 29 May 2017) | 4 lines

suppress warning: ambiguous first argument; put parentheses or a space even after `-' operator

Introduced at r58905
http://rubyci.s3.amazonaws.com/ubuntu/ruby-trunk/log/20170526T153003Z.diff.html.gz
------------------------------------------------------------------------
r58947 | naruse | 2017-05-29 01:40:12 +0900 (Mon, 29 May 2017) | 3 lines

Revert "Update to ruby/spec@2a047c8"

This reverts commit 2531a1013b56a030f99ea4c2ee36e66dbf38a855.
------------------------------------------------------------------------
r58946 | svn | 2017-05-29 01:29:05 +0900 (Mon, 29 May 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58945 | svn | 2017-05-29 01:29:05 +0900 (Mon, 29 May 2017) | 1 line

* 2017-05-29
------------------------------------------------------------------------
r58944 | naruse | 2017-05-29 01:29:04 +0900 (Mon, 29 May 2017) | 8 lines

Revert r58939 and r58942

This reverts following commits because it breaks mswinci
* Update to ruby/spec@2a047c8
* Update to ruby/spec@ca32ae2

see also the result:
http://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20170528T140014Z.fail.html.gz
------------------------------------------------------------------------
r58943 | nobu | 2017-05-28 23:17:25 +0900 (Sun, 28 May 2017) | 4 lines

lldb_cruby.py: constants from the target

* misc/lldb_cruby.py (lldb_init): get constants from
  ruby_dummy_gdb_enums in the target.
------------------------------------------------------------------------
r58942 | eregon | 2017-05-28 21:02:08 +0900 (Sun, 28 May 2017) | 1 line

Update to ruby/spec@ca32ae2
------------------------------------------------------------------------
r58941 | svn | 2017-05-28 20:30:57 +0900 (Sun, 28 May 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58940 | eregon | 2017-05-28 20:30:55 +0900 (Sun, 28 May 2017) | 1 line

Add tool to pull latest mspec/spec when commits have been synchronized
------------------------------------------------------------------------
r58939 | eregon | 2017-05-28 20:30:42 +0900 (Sun, 28 May 2017) | 1 line

Update to ruby/spec@2a047c8
------------------------------------------------------------------------
r58938 | nobu | 2017-05-28 18:49:30 +0900 (Sun, 28 May 2017) | 4 lines

ruby.c: file in load_file argument

* ruby.c (load_file): move opened file to an argument, to reduce
  open/close calls in the near future.
------------------------------------------------------------------------
r58937 | nobu | 2017-05-28 18:49:29 +0900 (Sun, 28 May 2017) | 5 lines

ruby.c: shrink ruby_cmdline_options_t

* ruby.c (ruby_cmdline_options_t): reordered members and turned
  simple flags into bit fields to reduce the size (136->104 on
  LP64).
------------------------------------------------------------------------
r58936 | normal | 2017-05-28 14:39:29 +0900 (Sun, 28 May 2017) | 14 lines

test/ruby/test_io.rb: adjust CPU usage check to 10%

I miscalculated for r58934, since we sleep 100ms, and
the worst possible case is 100 Hz in the kernel meaning
we only have 10ms resolution.  So, we need to increase
our CPU percentage to >= 10% for this.

This should be more than enough for our CI machines which
have 300 Hz kernels [ruby-core:81429]:

 http://ci.rvm.jp/results/trunk-test@sasada-8core/1495942555

* test/ruby/test_io.rb (test_copy_stream_no_busy_wait):
  override default percentage
------------------------------------------------------------------------
r58935 | k0kubun | 2017-05-28 10:48:11 +0900 (Sun, 28 May 2017) | 44 lines

process.c: Use getrusage(2) in Process.times

if getrusage(2) is available, to improve precision of Process.times and
its user like lib/benchmark.rb.

On macOS, since getrusage(2) has better precision than times(3),
they are much improved like:

* Before

Process.times
=> #<struct Process::Tms utime=0.56, stime=0.35, cutime=0.04, cstime=0.03>

puts Benchmark.measure { "a" * 1_000_000_000 }
  0.340000   0.310000   0.650000 (  0.674025)

* After

Process.times
=> #<struct Process::Tms utime=0.561899, stime=0.35076, cutime=0.046483, cstime=0.038929>

puts Benchmark.measure { "a" * 1_000_000_000 }
  0.343223   0.310037   0.653260 (  0.674025)

On Linux, since struct rusage from getrusage(2) is used instead of struct tms
from times(2), they are slightly improved like:

* Before

Process.times
=> #<struct Process::Tms utime=0.43, stime=0.11, cutime=0.0, cstime=0.0>

puts Benchmark.measure { "a" * 1_000_000_000 }
  0.120000   0.040000   0.170000 (  0.171621)

* After

Process.times
=> #<struct Process::Tms utime=0.432, stime=0.116, cutime=0.0, cstime=0.0>

puts Benchmark.measure { "a" * 1_000_000_000 }
  0.124000   0.048000   0.172000 (  0.171621)

[ruby-dev:49471] [Feature #11952]
------------------------------------------------------------------------
r58934 | normal | 2017-05-28 10:43:38 +0900 (Sun, 28 May 2017) | 11 lines

tests: increase CPU percentage threshold for assert_cpu_usage_low

When sleeping for the tick rate of 100ms (defined in
thread_pthread.c) as we do in test/ruby/test_io.rb
(test_copy_stream_no_busy_wait), it may not be possible to
measure with <= 10ms resolution on 100HZ systems (CONFIG_HZ in
the Linux kernel).  So increase the threshold to 15ms (10ms +
5ms slack for slow systems).

* test/lib/test/unit/assertions.rb (assert_cpu_usage_low):
  increase pct default value [ruby-core:81427]
------------------------------------------------------------------------
r58933 | svn | 2017-05-28 06:55:03 +0900 (Sun, 28 May 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58932 | svn | 2017-05-28 06:55:03 +0900 (Sun, 28 May 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r58931 | eregon | 2017-05-28 06:55:02 +0900 (Sun, 28 May 2017) | 1 line

Update to ruby/spec@2795010
------------------------------------------------------------------------
r58930 | eregon | 2017-05-28 06:54:38 +0900 (Sun, 28 May 2017) | 1 line

Update to ruby/mspec@6c95759
------------------------------------------------------------------------
r58929 | svn | 2017-05-28 02:04:32 +0900 (Sun, 28 May 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58928 | svn | 2017-05-28 02:04:32 +0900 (Sun, 28 May 2017) | 1 line

* 2017-05-28
------------------------------------------------------------------------
r58927 | naruse | 2017-05-28 02:04:31 +0900 (Sun, 28 May 2017) | 1 line

Initial commit of LLDB port of debug utility
------------------------------------------------------------------------
r58926 | k0kubun | 2017-05-27 22:54:09 +0900 (Sat, 27 May 2017) | 3 lines

bootstraptest/test_insns.rb: Fix typo

on test message. "torexp" insn does not exist.
------------------------------------------------------------------------
r58925 | normal | 2017-05-27 17:26:47 +0900 (Sat, 27 May 2017) | 13 lines

rb_wait_for_single_fd: do not OOM or segfault with invalid FD on select()

Instead, match the poll() implementation used on Linux for now;
as the Linux poll(2) manpage describes using negative FD to
easily ignore an FD in a larger FD set while (sleeping the given
timeout).  I'm not entirely sure if matching poll() behavior
is a good idea for a single FD, but it's better than segfaulting
or NoMemoryError.

* thread.c (init_set_fd): ignore negative FD
* test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb
  (test_wait_for_invalid_fd): check values which may trigger
  segfaults or OOM
------------------------------------------------------------------------
r58924 | normal | 2017-05-27 16:23:02 +0900 (Sat, 27 May 2017) | 8 lines

test for IO.copy_stream CPU usage (r58534)

I'm likely to make similar mistakes in the future when working
on Fiber auto-scheduling.  Start adding assertions for existing
code, first.

* test/ruby/test_io.rb (test_copy_stream_no_busy_wait): added
* test/lib/test/unit/assertions.rb (assert_cpu_usage_low): added
------------------------------------------------------------------------
r58923 | normal | 2017-05-27 16:18:52 +0900 (Sat, 27 May 2017) | 4 lines

Revert "common: "test-all" depends on "exts" target"

This reverts r58919.
Apparently skipping exts is intentional since r58759
------------------------------------------------------------------------
r58922 | watson1978 | 2017-05-27 14:41:02 +0900 (Sat, 27 May 2017) | 67 lines

Improve performance of some Time & Rational methods

rational.c (i_gcd): replace GCD algorithm from Euclidean algorithm to Stein
    algorithm (https://en.wikipedia.org/wiki/Binary_GCD_algorithm).

    Some Time methods will call internal quov() function and it calls
    Rational#quo -> f_muldiv() -> i_gcd() in rational.c
    And some Rational methods also call i_gcd().

    The implementation of Euclidean algorithm spent a long time at modulo
    operation (ie "x = y % x;").
    The Stein algorithm will replace with shift operation which is faster
    than modulo.

    Time#subsec -> 36 % up
    Time#to_r   -> 26 % up
    Rational#+  -> 14 % up
    Rational#-  -> 15 % up
    Rational#*  -> 13 % up

    [ruby-core:80843] [Bug #13503] [Fix GH-1596]

### Before
         Time#subsec      2.142M (? 9.8%) i/s -     10.659M in   5.022659s
           Time#to_r      2.003M (? 9.1%) i/s -      9.959M in   5.012445s
          Rational#+      3.843M (? 0.9%) i/s -     19.274M in   5.016254s
          Rational#-      3.820M (? 1.3%) i/s -     19.149M in   5.014137s
          Rational#*      5.198M (? 1.4%) i/s -     26.016M in   5.005664s
* After
         Time#subsec      2.902M (? 2.9%) i/s -     14.505M in   5.001815s
           Time#to_r      2.503M (? 4.8%) i/s -     12.512M in   5.011454s
          Rational#+      4.390M (? 1.2%) i/s -     22.001M in   5.012413s
          Rational#-      4.391M (? 1.2%) i/s -     22.013M in   5.014584s
          Rational#*      5.872M (? 2.2%) i/s -     29.369M in   5.003666s

* Test code
require 'benchmark/ips'

Benchmark.ips do |x|
  x.report "Time#subsec" do |t|
    time = Time.now
    t.times { time.subsec }
  end

  x.report "Time#to_r" do |t|
    time = Time.now
    t.times { time.to_r }
  end

  x.report "Rational#+" do |t|
    rat1 = 1/2r
    rat2 = 1/3r
    t.times { rat1 + rat2 }
  end

  x.report "Rational#-" do |t|
    rat1 = 1/3r
    rat2 = 1/2r
    t.times { rat1 - rat2 }
  end

  x.report "Rational#*" do |t|
    rat1 = 1/3r
    rat2 = 1/2r
    t.times { rat1 * rat2 }
  end
end
------------------------------------------------------------------------
r58921 | watson1978 | 2017-05-27 14:41:00 +0900 (Sat, 27 May 2017) | 51 lines

Improve performance of some Time methods

internal.h : add rb_numeric_quo() as internal API.
rational.c : rename numeric_quo() to rb_numeric_quo() as internal API.
time.c (quov): optimize by invoking rb_numeric_quo() to retrieve a value of
    Numeric#quo instead of method dispatching via rb_funcall().

    Time#subsec ->  7 % up
    Time#-      -> 26 % up
    Time#to_f   -> 30 % up
    Time#to_r   ->  7 % up

    [ruby-core:80915] [Bug #13519] [Fix GH-1601]

### Before
         Time#subsec      2.024M (? 8.7%) i/s -     10.062M in   5.009762s
              Time#-      5.049M (? 4.7%) i/s -     25.186M in   5.002379s
           Time#to_f      5.625M (? 4.2%) i/s -     28.066M in   5.000749s
           Time#to_r      1.880M (? 9.7%) i/s -      9.361M in   5.027527s

### After
         Time#subsec      2.155M (? 9.7%) i/s -     10.724M in   5.022579s
              Time#-      6.362M (? 2.0%) i/s -     31.824M in   5.004625s
           Time#to_f      7.287M (? 4.8%) i/s -     36.402M in   5.010983s
           Time#to_r      2.020M (? 9.4%) i/s -     10.059M in   5.021852s

### Test code
require 'benchmark/ips'

Benchmark.ips do |x|
  x.report "Time#subsec" do |t|
    time = Time.now
    t.times { time.subsec }
  end

  x.report "Time#-" do |t|
    time1 = Time.now
    time2 = Time.now
    t.times { time1 - time2 }
  end

  x.report "Time#to_f" do |t|
    time = Time.now
    t.times { time.to_f }
  end

  x.report "Time#to_r" do |t|
    time = Time.now
    t.times { time.to_r }
  end
end
------------------------------------------------------------------------
r58920 | nobu | 2017-05-27 14:18:52 +0900 (Sat, 27 May 2017) | 1 line

.travis.yml: exts is not needed for tests here
------------------------------------------------------------------------
r58919 | normal | 2017-05-27 13:35:41 +0900 (Sat, 27 May 2017) | 8 lines

common: "test-all" depends on "exts" target

This allows me to test changes to ext/ more easily by only typing:

  make test-all TESTS=/path/to/ext/test_foo.rb

I spent a few minutes wondering what was wrong before I realized
changes to exts were not taking effect.
------------------------------------------------------------------------
r58918 | nobu | 2017-05-27 12:43:02 +0900 (Sat, 27 May 2017) | 6 lines

mspec/commands/mspec.rb: formatter for multi_exec

* spec/mspec/lib/mspec/commands/mspec.rb (MSpecMain#multi_exec):
  as multi_exec children must run with yaml formatter, append the
  option for it after other options to override another formatter
  option with a warning if it is given.
------------------------------------------------------------------------
r58917 | nobu | 2017-05-27 12:14:04 +0900 (Sat, 27 May 2017) | 1 line

.travis.yml: get number of processors at runtime
------------------------------------------------------------------------
r58916 | k0kubun | 2017-05-27 12:06:55 +0900 (Sat, 27 May 2017) | 12 lines

erb.rb: Use str_uplus instead of rb_str_dup

to skip unnecessary string allocation on frozen_string_literal: false.
str_uplus can bypass calling rb_str_dup when OBJ_FROZEN is true.

* Before

erb_render      1.064

* Afete

erb_render      0.909
------------------------------------------------------------------------
r58915 | k0kubun | 2017-05-27 11:47:11 +0900 (Sat, 27 May 2017) | 6 lines

benchmark: Rename to bm_erb_render.rb

from bm_app_erb_render.rb.

I'm told from ko1 that bm_app_* is namespace for Ruby applications,
not for ERB and we should use bm_erb_* for ERB benchmark instead.
------------------------------------------------------------------------
r58914 | ko1 | 2017-05-27 11:01:41 +0900 (Sat, 27 May 2017) | 1 line

apply timeout scale
------------------------------------------------------------------------
r58913 | nobu | 2017-05-27 10:26:31 +0900 (Sat, 27 May 2017) | 4 lines

numeric.c: fix for small number

* numeric.c (flo_floor, flo_ceil): should not return zero for small
  number.  [ruby-core:81394] [Bug #13599]
------------------------------------------------------------------------
r58912 | nobu | 2017-05-27 10:04:23 +0900 (Sat, 27 May 2017) | 4 lines

dir.c: fix FD leaks

* dir.c (do_opendir): close FD when fdopendir failed, e.g.,
  ENOTDIR.  [Feature#13056]
------------------------------------------------------------------------
r58911 | nobu | 2017-05-27 02:11:15 +0900 (Sat, 27 May 2017) | 3 lines

numeric.c: remove duplicate code

* numeric.c (flo_to_i): use dbl2ival and reduce duplicate code.
------------------------------------------------------------------------
r58910 | svn | 2017-05-27 02:10:03 +0900 (Sat, 27 May 2017) | 1 line

* 2017-05-27
------------------------------------------------------------------------
r58909 | watson1978 | 2017-05-27 02:10:01 +0900 (Sat, 27 May 2017) | 24 lines

Improve Array#concat performance if only one argument is given

* array.c (rb_ary_concat_multi): concatenate the array without generating
    temporary Array object if only one argument is given.
    This is very similar with r58886.

    Array#concat will be faster around 19%.
    [Fix GH-1634]

### Before
        Array#concat      2.187M (? 3.5%) i/s -     10.926M in   5.002829s

### After
        Array#concat      2.598M (? 1.8%) i/s -     13.008M in   5.008201s

### Test code
require 'benchmark/ips'

Benchmark.ips do |x|
  x.report "Array#concat" do |i|
    other = [4]
    i.times { [1, 2, 3].concat(other) }
  end
end
------------------------------------------------------------------------
r58908 | k0kubun | 2017-05-26 23:17:55 +0900 (Fri, 26 May 2017) | 11 lines

erb.rb: Tiny improvement of compiling cost

by reducing string allocation.

* Before

app_erb 0.687

* After

app_erb 0.679
------------------------------------------------------------------------
r58907 | k0kubun | 2017-05-26 22:58:36 +0900 (Fri, 26 May 2017) | 3 lines

erb.rb: [DOC] Follow compiled code's change

introduced in r58905.
------------------------------------------------------------------------
r58906 | svn | 2017-05-26 22:49:36 +0900 (Fri, 26 May 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58905 | k0kubun | 2017-05-26 22:49:35 +0900 (Fri, 26 May 2017) | 34 lines

erb.rb: Generate static string with opt_str_uminus

to skip object allocation for static string.

We can't always enable frozen_string_literal pragma because we can't
freeze string literals embedded by user for backward compatibility.
So we need to use fstring for each static string.

Since adding ".freeze" to string literals in #content_dump is slow
on compiling, I used unary "-" operator instead.

benchmark/bm_app_erb_render.rb: Added rendering-only benchmark to
test rendering performance on production environment.

This benchmark is created to reproduce the behavior on Sinatra (Tilt).
Thus it doesn't use ERB#result to skip parsing compiled code.
It doesn't use ERB#def_method too to regard `title` and `content` as
local variables. If we use #def_method, `title` and `content` needs
to be method call. I wanted to avoid it.

This patch's benchmark results is:

* Before

app_erb_render  1.250
app_erb 0.704

* After

app_erb_render  1.066
app_erb 0.686

This patch optimizes rendering performance (app_erb_render) without
spoiling (total of rendering +) compiling performance (app_erb).
------------------------------------------------------------------------
r58904 | k0kubun | 2017-05-26 21:12:13 +0900 (Fri, 26 May 2017) | 80 lines

erb.rb: Use script encoding instead of force_encoding

The original intention of introducing `_erbout.force_encoding`
in r21170 was:

- "returns a string in the same character encoding as the input string."
- "When the input string has a magic comment, however, it returns a string
  in the encoding specified by the magic comment."

And they are tested by test/erb/test_erb_m17n.rb well and this patch
passes the test.
Since magic comment is always added in ERB compiled code, using ''.dup
instead of String.new will set correct encoding without calling
force_encoding method.

The benchmark results are:

* Before

$ ./ruby benchmark/run.rb --matzruby=./ruby -m bm_app_erb
MatzRuby:
ruby 2.5.0dev (2017-05-26 skip-force-enc.. 58903) [x86_64-linux]
last_commit=Skip force_encoding in compiled code of erb
Ruby:

app_erb:
matz 0.715

* After

$ ./ruby benchmark/run.rb --matzruby=./ruby -m bm_app_erb
MatzRuby:
ruby 2.5.0dev (2017-05-26 skip-force-enc.. 58903) [x86_64-linux]
last_commit=Skip force_encoding in compiled code of erb
Ruby:

app_erb:
matz 0.672

And perf(1) results are:

* Before

$ sudo perf stat ./ruby benchmark/bm_app_erb.rb

 Performance counter stats for './ruby benchmark/bm_app_erb.rb':

        709.571746      task-clock (msec)         #    1.000 CPUs utilized
                 5      context-switches          #    0.007 K/sec
                 1      cpu-migrations            #    0.001 K/sec
             1,337      page-faults               #    0.002 M/sec
     3,088,936,521      cycles                    #    4.353 GHz
   <not supported>      stalled-cycles-frontend
   <not supported>      stalled-cycles-backend
     4,849,564,282      instructions              #    1.57  insns per cycle
     1,027,042,087      branches                  # 1447.411 M/sec
        19,983,456      branch-misses             #    1.95% of all branches

       0.709747823 seconds time elapsed

* After

$ sudo perf stat ./ruby benchmark/bm_app_erb.rb

 Performance counter stats for './ruby benchmark/bm_app_erb.rb':

        693.494673      task-clock (msec)         #    1.000 CPUs utilized
                 7      context-switches          #    0.010 K/sec
                 1      cpu-migrations            #    0.001 K/sec
             1,316      page-faults               #    0.002 M/sec
     3,025,639,349      cycles                    #    4.363 GHz
   <not supported>      stalled-cycles-frontend
   <not supported>      stalled-cycles-backend
     4,694,848,271      instructions              #    1.55  insns per cycle
       994,496,704      branches                  # 1434.037 M/sec
        19,693,239      branch-misses             #    1.98% of all branches

       0.693724345 seconds time elapsed

[fix GH-1147]
------------------------------------------------------------------------
r58903 | nobu | 2017-05-26 18:49:20 +0900 (Fri, 26 May 2017) | 4 lines

remove extra call to OleInitialize

[Fix GH-1629]
Signed-off-by: Matt Wrock <matt@mattwrock.com>
------------------------------------------------------------------------
r58902 | normal | 2017-05-26 16:28:23 +0900 (Fri, 26 May 2017) | 9 lines

attempt to fix rb_alloc_tmp_buffer2 for ALLOCV_N

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

* include/ruby/ruby.h (rb_alloc_tmp_buffer2): attempt to fix
  [ruby-core:81388] [ruby-core:81391] [Bug #13595]
------------------------------------------------------------------------
r58901 | nobu | 2017-05-26 16:04:43 +0900 (Fri, 26 May 2017) | 4 lines

dir.c: yield without base part

* dir.c (glob_helper): yield globbed part only without the base
  directory path part if the base is given.  [Feature#13056]
------------------------------------------------------------------------
r58900 | nobu | 2017-05-26 16:02:51 +0900 (Fri, 26 May 2017) | 5 lines

runruby.rb: no PRELOAD on multiarch [ci skip]

* tool/runruby.rb: do not set environment to preload on multiarch
  platforms, otherwise other external commands (e.g., /bin/sh)
  fail to run.
------------------------------------------------------------------------
r58899 | sonots | 2017-05-26 15:42:11 +0900 (Fri, 26 May 2017) | 2 lines

* lib/uri/common.rb: [DOC] add rdoc to describe
  URI.unescape is obsolete [ci-skip] [fix GH-1630]
------------------------------------------------------------------------
r58898 | nobu | 2017-05-26 15:39:49 +0900 (Fri, 26 May 2017) | 4 lines

sprintf.c: remove redundant condition

* sprintf.c (rb_str_format): when `t + 1 == end` (or `t < end`),
  `*t == '%'` is always true.  [ruby-core:80153] [Bug #13315]
------------------------------------------------------------------------
r58897 | nobu | 2017-05-26 15:39:06 +0900 (Fri, 26 May 2017) | 1 line

string.c: adjust style [ci skip]
------------------------------------------------------------------------
r58896 | nobu | 2017-05-26 15:28:38 +0900 (Fri, 26 May 2017) | 7 lines

Symbol support for opt_eql_func too

* vm_insnhelper.c (comparable_by_identity): extract the condition
  where comparable by identity.  currently both are same types,
  Fixnum, Flonum, or Symbol.

* vm_insnhelper.c (opt_eql_func): support Symbol too.
------------------------------------------------------------------------
r58895 | ko1 | 2017-05-26 14:26:57 +0900 (Fri, 26 May 2017) | 5 lines

Symbol support for opt_eq_func.

* vm_insnhelper.c (opt_eq_func): optimize for symbol comparison.
  [Bug #13330] [fix GH-1540]

------------------------------------------------------------------------
r58894 | rhe | 2017-05-26 10:50:20 +0900 (Fri, 26 May 2017) | 4 lines

compile.c: fix possible use of uninitialized value

LABEL::unremovable added by r58810 is not initialized by
new_label_body(), making the optimization unstable.
------------------------------------------------------------------------
r58893 | ko1 | 2017-05-26 08:43:33 +0900 (Fri, 26 May 2017) | 7 lines

use timeout scale.

* test/lib/envutil.rb: introduce EnvUtil.apply_timeout_scale to use
  this scale from outside.

* test/ruby/test_thread.rb (test_fork_in_thread): respect timeout scale.

------------------------------------------------------------------------
r58892 | k0kubun | 2017-05-26 00:43:49 +0900 (Fri, 26 May 2017) | 3 lines

NEWS: Add entry for ERB#result_with_hash

See r58891.
------------------------------------------------------------------------
r58891 | k0kubun | 2017-05-26 00:38:25 +0900 (Fri, 26 May 2017) | 3 lines

erb.rb: Add ERB#result_with_hash

[ruby-core:55985] [Feature #8631] [fix GH-1623]
------------------------------------------------------------------------
r58890 | eregon | 2017-05-26 00:33:28 +0900 (Fri, 26 May 2017) | 5 lines

Raise ArgumentError if sprintf format string ends with %

* Add tests and specs. See ruby/spec#401.
  Patch by Yuta Iwama and Shintaro Morikawa.
  [ruby-core:80153] [Bug #13315] [Fix GH-1560]
------------------------------------------------------------------------
r58889 | svn | 2017-05-26 00:14:39 +0900 (Fri, 26 May 2017) | 1 line

* 2017-05-26
------------------------------------------------------------------------
r58888 | stomar | 2017-05-26 00:14:38 +0900 (Fri, 26 May 2017) | 4 lines

hash.c: docs for Hash#transform_values

* hash.c: [DOC] fix return value in call-seq of Hash#transform_values;
  other small fixes.
------------------------------------------------------------------------
r58887 | k0kubun | 2017-05-25 20:41:45 +0900 (Thu, 25 May 2017) | 3 lines

insns.def: [DOC] Fix description of tostring

rb_obj_as_string() calls not #to_str (idTo_str) but #to_s (idTo_s).
------------------------------------------------------------------------
r58886 | k0kubun | 2017-05-25 20:14:40 +0900 (Thu, 25 May 2017) | 31 lines

string.c: Optimize String#concat when argc is 1

Optimize performance regression introduced in r56021.

* Benchmark (i7-4790K @ 4.00GH, x86_64 GNU/Linux)

Benchmark.ips do |x|
  x.report("String#concat (1)") { "a".concat("b") }
  if RUBY_VERSION >= "2.4.0"
    x.report("String#concat (2)") { "a".concat("b", "c") }
  end
end

* Ruby 2.3

Calculating -------------------------------------
   String#concat (1)      6.003M (? 5.2%) i/s -     30.122M in   5.031646s

* Ruby 2.4 (Before this patch)

Calculating -------------------------------------
   String#concat (1)      4.458M (? 8.9%) i/s -     22.298M in   5.058084s
   String#concat (2)      3.660M (? 5.6%) i/s -     18.314M in   5.020527s

* Ruby 2.4 (After this patch)

Calculating -------------------------------------
   String#concat (1)      6.448M (? 5.2%) i/s -     32.215M in   5.010833s
   String#concat (2)      3.633M (? 9.0%) i/s -     18.056M in   5.022603s

[fix GH-1631]
------------------------------------------------------------------------
r58885 | stomar | 2017-05-25 17:34:13 +0900 (Thu, 25 May 2017) | 4 lines

dir.c: document base keyword argument of Dir.glob

* dir.c: [DOC] document the new `base` keyword argument of Dir.glob
  [Feature #13056]; also improve docs for Dir.glob and Dir[].
------------------------------------------------------------------------
r58884 | stomar | 2017-05-25 16:50:20 +0900 (Thu, 25 May 2017) | 3 lines

dir.c: docs for Dir.each_child and Dir.children

* dir.c: [DOC] fix examples for Dir.each_child and Dir.children.
------------------------------------------------------------------------
r58883 | nobu | 2017-05-25 16:36:47 +0900 (Thu, 25 May 2017) | 1 line

vm_insnhelper.c: remove redefinitions and undefine after used
------------------------------------------------------------------------
r58882 | nobu | 2017-05-25 14:29:35 +0900 (Thu, 25 May 2017) | 4 lines

vm_insnhelper.c: rb_eql_opt should call eql?

* vm_insnhelper.c (rb_eql_opt): should call #eql? on Float and
  String, not #==.
------------------------------------------------------------------------
r58881 | watson1978 | 2017-05-25 13:25:39 +0900 (Thu, 25 May 2017) | 37 lines

Improve performance of rb_eql()

This improvement is similar with https://github.com/ruby/ruby/pull/1552

internal.h: add declaration of rb_eql_opt() API.

vm_insnhelper.c (rb_eql_opt): add rb_eql_opt() API which provides optimized
    path for #eql? method such as rb_equal_opt().

object.c (rb_eql): optimize using rb_eql_opt() such as rb_equal().
    Array#eql? and some methods have used rb_eql() and Array#eql? will be faster
    around 20%.

    [ruby-core:80761] [Bug #13447] [Fix GH-#1589]

### Before
       user     system      total        real
   1.570000   0.000000   1.570000 (  1.569754)

### After
       user     system      total        real
   1.300000   0.000000   1.300000 (  1.303624)

### Test code
require 'benchmark'

Benchmark.bmbm do |x|
  ary1 = Array.new(1000) { rand(1000) }
  ary2 = Array.new(1000) { rand(1000) }

  x.report do
    5000000.times do
      ary1.eql?(ary2)
    end
  end

end
------------------------------------------------------------------------
r58880 | watson1978 | 2017-05-25 13:25:37 +0900 (Thu, 25 May 2017) | 62 lines

Improve performance of rb_equal()

* object.c (rb_equal): add optimized path to compare the objects using
    rb_equal_opt(). Previously, if not same objects were given, rb_equal() would
    call `==' method via rb_funcall() which took a long time.

    rb_equal_opt() has provided faster comparing for Fixnum/Float/String objects.
    Now, Time#eql? uses rb_equal() to compare with argument object and it will
    be faster around 40% on 64-bit environment.

* array.c (rb_ary_index): remove redundant rb_equal_opt() calling.
    Now, rb_equal() was optimized using rb_equal_opt().
    If rb_equal_opt() returns Qundef, it will invoke rb_equal() -> rb_equal_opt(),
    and it will cause the performance regression.

    So, this patch will remove first redundant rb_equal_opt() calling.

* array.c (rb_ary_rindex): ditto.
* array.c (rb_ary_includes): ditto.

    [ruby-core:80360] [Bug #13365] [Fix GH-#1552]

### Before
Time#eql? with other      7.309M (? 1.4%) i/s -     36.647M in   5.014964s
    Array#index(val)      1.433M (? 1.2%) i/s -      7.207M in   5.030942s
   Array#rindex(val)      1.418M (? 1.6%) i/s -      7.103M in   5.009164s
 Array#include?(val)      1.451M (? 0.9%) i/s -      7.295M in   5.026392s

### After
Time#eql? with other     10.321M (? 1.9%) i/s -     51.684M in   5.009203s
    Array#index(val)      1.474M (? 0.9%) i/s -      7.433M in   5.044384s
   Array#rindex(val)      1.449M (? 1.7%) i/s -      7.292M in   5.034436s
 Array#include?(val)      1.466M (? 1.7%) i/s -      7.373M in   5.030047s

### Test code
require 'benchmark/ips'

Benchmark.ips do |x|
  t1 = Time.now
  t2 = Time.now

  x.report "Time#eql? with other" do |i|
    i.times { t1.eql?(t2) }
  end

  # Benchmarks to check whether it didn't introduce the regression
  obj = Object.new
  x.report "Array#index(val)" do |i|
    ary = [1, 2, true, false, obj]
    i.times { ary.index(obj) }
  end

  x.report "Array#rindex(val)" do |i|
    ary = [1, 2, true, false, obj].reverse
    i.times { ary.rindex(obj) }
  end

  x.report "Array#include?(val)" do |i|
    ary = [1, 2, true, false, obj]
    i.times { ary.include?(obj) }
  end
end
------------------------------------------------------------------------
r58879 | nobu | 2017-05-25 11:50:21 +0900 (Thu, 25 May 2017) | 5 lines

dir.c: Dir.each_child and Dir.children

* dir.c (dir_s_each_child, dir_s_children): Dir.each_child and
  Dir.children which are similar to Dir.foreach and Dir.entries
  respectively, except to exclude "."  and "..".  [Feature #11302]
------------------------------------------------------------------------
r58878 | nobu | 2017-05-25 11:50:20 +0900 (Thu, 25 May 2017) | 4 lines

test_dir.rb: test Dir.entries

* test/ruby/test_dir.rb (test_entries): test class singleton
  method Dir.entries too.
------------------------------------------------------------------------
r58877 | nobu | 2017-05-25 10:46:36 +0900 (Thu, 25 May 2017) | 3 lines

dir.c: dir_each_entries

* dir.c (dir_each_entries): expand entries without method calls.
------------------------------------------------------------------------
r58876 | normal | 2017-05-25 06:26:14 +0900 (Thu, 25 May 2017) | 3 lines

string.c: fix String#crypt leak introduced in r58866

* string.c (rb_str_crypt): define LARGE_CRYPT_DATA when allocating
------------------------------------------------------------------------
r58875 | svn | 2017-05-25 03:59:25 +0900 (Thu, 25 May 2017) | 1 line

* 2017-05-25
------------------------------------------------------------------------
r58874 | normal | 2017-05-25 03:59:24 +0900 (Thu, 25 May 2017) | 14 lines

thread_pthread: retry timer thread creation w/o attr on EINVAL

Setting a small stack size can fail due to having 3rd-party
libraries (e.g. libkqueue) loaded, if those libraries use
thread-local-storage (__thread) heavily.  This causes
pthread_create to fail with small stacks; even if our
timer_thread function does not hit any of the TLS-using code
paths.

Today, some RubyGems are capable of using libkqueue (or __thread
storage directly), and future versions of Ruby may use kqueue
internally.

cf. https://www.akkadia.org/drepper/tls.pdf
------------------------------------------------------------------------
r58873 | nobu | 2017-05-24 23:26:09 +0900 (Wed, 24 May 2017) | 4 lines

dir.c: prefer NAMLEN to d_name

* dir.c (glob_helper): prefer NAMLEN, do not assume d_name is NUL
  terminated everywhere.
------------------------------------------------------------------------
r58872 | nobu | 2017-05-24 22:30:54 +0900 (Wed, 24 May 2017) | 4 lines

test_http.rb: fix r58855

* test/net/http/test_http.rb (test_s_start): git rid of error when
  failed to start a connection.
------------------------------------------------------------------------
r58871 | nobu | 2017-05-24 17:00:42 +0900 (Wed, 24 May 2017) | 4 lines

enum.c: respect method visibility

* enum.c (ary_inject_op): should respect method visibility, do not
  optimize uncallable method.  [ruby-core:81349] [Bug #13592]
------------------------------------------------------------------------
r58870 | nobu | 2017-05-24 16:57:19 +0900 (Wed, 24 May 2017) | 4 lines

test_enum.rb: test_inject_array_op_redefined

* test/ruby/test_enum.rb (test_inject_array_op_redefined): test
  other operators too.  [Bug#12178]
------------------------------------------------------------------------
r58869 | nobu | 2017-05-24 16:57:18 +0900 (Wed, 24 May 2017) | 4 lines

assertions.rb: AllFailures#foreach

* test/lib/test/unit/assertions.rb (AllFailures#foreach):
  shortcircuit for `each` and `AllFailures#for`.
------------------------------------------------------------------------
r58868 | nobu | 2017-05-24 16:11:41 +0900 (Wed, 24 May 2017) | 4 lines

duplicate method

* test/ruby/test_enum.rb (assert_float_equal): remove overridden
  definition.
------------------------------------------------------------------------
r58867 | watson1978 | 2017-05-24 15:57:08 +0900 (Wed, 24 May 2017) | 65 lines

Improve performance in where push the element into non shared Array object

* array.c (ary_ensure_room_for_push): use rb_ary_modify_check() instead of
    rb_ary_modify() to check whether the object can be modified for non shared
    Array object. rb_ary_modify() has the codes for shared Array object too.
    In here, it has condition branch for shared / non shared Array object and
    it can use rb_ary_modify_check() which is smaller function than
    rb_ary_modify() for non shared object.

    rb_ary_modify_check() will be expand as inline function.
    If it will compile with GCC, Array#<< will be faster around 8%.

    [ruby-core:81082] [Bug #13553] [Fix GH-1609]

## Clang 802.0.42
### Before
            Array#<<      9.353M (? 1.7%) i/s -     46.787M in   5.004123s
          Array#push      7.702M (? 1.1%) i/s -     38.577M in   5.009338s
     Array#values_at      6.133M (? 1.9%) i/s -     30.699M in   5.007772s

### After
            Array#<<      9.458M (? 2.0%) i/s -     47.357M in   5.009069s
          Array#push      7.921M (? 1.8%) i/s -     39.665M in   5.009151s
     Array#values_at      6.377M (? 2.3%) i/s -     31.881M in   5.001888s

### Result
Array#<<        -> 1.2% faster
Array#push      -> 2.8% faster
Array#values_at -> 3.9% faster

## GCC 7.1.0
### Before
            Array#<<     10.497M (? 1.1%) i/s -     52.665M in   5.017601s
          Array#push      8.527M (? 1.6%) i/s -     42.777M in   5.018003s
     Array#values_at      7.621M (? 1.7%) i/s -     38.152M in   5.007910s

### After
            Array#<<     11.403M (? 1.3%) i/s -     57.028M in   5.001849s
          Array#push      8.924M (? 1.3%) i/s -     44.609M in   4.999940s
     Array#values_at      8.291M (? 1.4%) i/s -     41.487M in   5.004727s

### Result
Array#<<        -> 8.3% faster
Array#push      -> 4.3% faster
Array#values_at -> 8.7% faster

## Test code
require 'benchmark/ips'

Benchmark.ips do |x|

  x.report "Array#<<" do |i|
    i.times { [1,2] << 3 }
  end

  x.report "Array#push" do |i|
    i.times { [1,2].push(3) }
  end

  x.report "Array#values_at" do |i|
    ary = [1, 2, 3, 4, 5]
    i.times { ary.values_at(0, 2, 4) }
  end

end
------------------------------------------------------------------------
r58866 | nobu | 2017-05-24 15:55:09 +0900 (Wed, 24 May 2017) | 4 lines

string.c: for small crypt_data

* string.c (rb_str_crypt): struct crypt_data defined in
  missing/crypt.h is small enough.
------------------------------------------------------------------------
r58865 | ko1 | 2017-05-24 15:46:44 +0900 (Wed, 24 May 2017) | 14 lines

Add debug counters.

* debug_counter.h: add the following counters to measure object types.
  obj_free: freed count
  obj_str_ptr: freed count of Strings they have extra buff.
  obj_str_embed: freed count of Strings they don't have extra buff.
  obj_str_shared: freed count of Strings they have shared extra buff.
  obj_str_nofree: freed count of Strings they are marked as nofree.
  obj_str_fstr: freed count of Strings they are marked as fstr.
  obj_ary_ptr: freed count of Arrays they have extra buff.
  obj_ary_embed: freed count of Arrays they don't have extra buff.
  obj_obj_ptr: freed count of Objects (T_OBJECT) they have extra buff.
  obj_obj_embed: freed count of Objects they don't have extra buff.

------------------------------------------------------------------------
r58864 | normal | 2017-05-24 12:01:44 +0900 (Wed, 24 May 2017) | 4 lines

string.c (rb_str_crypt): fix excessive stack use with crypt_r

"struct crypt_data" is 131232 bytes on x86-64 GNU/Linux,
making it unsafe to use tiny Fiber stack sizes.
------------------------------------------------------------------------
r58863 | normal | 2017-05-24 09:34:12 +0900 (Wed, 24 May 2017) | 14 lines

rubyspec/core/io/popen_spec: avoid lingering "ruby -e sleep" process

The ruby_cmd helper blindly escapes code blocks passed to it,
causing "sleep" to be quoted in the command-line.  This quoting
results in IO.popen using a subshell (/bin/sh) to run the given
string command instead of invoking the Ruby executable directly.

Thus, IO.popen would only see the PID of the subshell via
IO#pid, and merely sending SIGKILL to the subshell would not
result in the child ("ruby -e sleep") being killed.

This problem with lingering ruby processes was easier to
reproduce on slow or heavily-loaded systems using low-scheduling
priority (e.g. "chrt -i 0 make test-rubyspec")
------------------------------------------------------------------------
r58862 | svn | 2017-05-24 01:51:48 +0900 (Wed, 24 May 2017) | 1 line

* 2017-05-24
------------------------------------------------------------------------
r58861 | naruse | 2017-05-24 01:51:48 +0900 (Wed, 24 May 2017) | 5 lines

skip on Solaris 11

On Solaris 11, MSG_OOB is in readfds?
http://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20170523T152403Z.fail.html.gz
http://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20170523T152503Z.fail.html.gz
------------------------------------------------------------------------
r58860 | nobu | 2017-05-23 23:34:12 +0900 (Tue, 23 May 2017) | 4 lines

Dir as base option

* dir.c (glob_helper): support Dir instance as `base` option.
  [Feature#13056]
------------------------------------------------------------------------
r58859 | nobu | 2017-05-23 22:54:10 +0900 (Tue, 23 May 2017) | 4 lines

test_dir.rb: sort

* test/ruby/test_dir.rb (test_glob_base): sort the globbed result
  to compare.
------------------------------------------------------------------------
r58858 | nobu | 2017-05-23 22:47:36 +0900 (Tue, 23 May 2017) | 4 lines

Dir.glob base option

* dir.c (dir_s_aref, dir_s_glob): add new optional keyword
  argument, `base`.  [Feature#13056]
------------------------------------------------------------------------
r58857 | nobu | 2017-05-23 22:18:45 +0900 (Tue, 23 May 2017) | 3 lines

readonly srcdir

.travis.yml: make srcdir unwritable during build and tests.
------------------------------------------------------------------------
r58856 | nobu | 2017-05-23 21:42:40 +0900 (Tue, 23 May 2017) | 3 lines

out-of-place on travis

* .travis.yml (before_script, script): out-of-place build.
------------------------------------------------------------------------
r58855 | nobu | 2017-05-23 21:38:01 +0900 (Tue, 23 May 2017) | 4 lines

fix FD leaks

* test/net/http/test_http.rb (test_s_start): finish connections to
  get rid of FD leaks.
------------------------------------------------------------------------
r58854 | nobu | 2017-05-23 21:11:57 +0900 (Tue, 23 May 2017) | 3 lines

LABEL_FORMAT

* compile.c (LABEL_FORMAT): extract format string for labels.
------------------------------------------------------------------------
r58853 | nobu | 2017-05-23 20:35:54 +0900 (Tue, 23 May 2017) | 3 lines

unused member

* vsnprintf.c (__sFILE): _lbfsize is not used.
------------------------------------------------------------------------
r58852 | kou | 2017-05-23 15:02:20 +0900 (Tue, 23 May 2017) | 2 lines

Use test-unit 3.2.4

------------------------------------------------------------------------
r58851 | nobu | 2017-05-23 10:04:09 +0900 (Tue, 23 May 2017) | 3 lines

readonly srcdir

appveyor.yml: make srcdir unwritable during build and tests.
------------------------------------------------------------------------
r58850 | nobu | 2017-05-23 10:04:07 +0900 (Tue, 23 May 2017) | 1 line

appveyor.yml: remove unused UNICODE_DATA_DIR
------------------------------------------------------------------------
r58849 | svn | 2017-05-23 08:41:51 +0900 (Tue, 23 May 2017) | 1 line

* 2017-05-23
------------------------------------------------------------------------
r58848 | normal | 2017-05-23 08:41:50 +0900 (Tue, 23 May 2017) | 7 lines

variable.c (autoload_sleep_done): avoid needless list_node init

We do not need list_del_init in ensure callbacks, only list_del,
since it can only ever be called after list_del_init in
autoload_reset.  So avoid the needless re-initialization.

* variable.c (autoload_sleep_done): s/list_del_init/list_del/
------------------------------------------------------------------------
r58847 | nobu | 2017-05-22 23:25:56 +0900 (Mon, 22 May 2017) | 1 line

source directory may not be writable
------------------------------------------------------------------------
r58846 | normal | 2017-05-22 16:36:00 +0900 (Mon, 22 May 2017) | 9 lines

lib/net/protocol.rb: account read_bytes before caller sees it

Users may modify the chunk yielded to them in Net::HTTPResponse#read_body.
This will allow users to reduce memory usage by calling
String#clear on the buffer once they're done using it.

* lib/net/protocol.rb (read): increment read_bytes earlier
  (read_all): ditto
* test/net/http/test_httpresponse.rb (test_read_body_block_mod): new test
------------------------------------------------------------------------
r58845 | rhe | 2017-05-22 16:13:06 +0900 (Mon, 22 May 2017) | 4 lines

hash.c: [DOC] fix docs for Hash#transform_values!

Hash#transform_values! returns the receiver rather than a new Hash
object.
------------------------------------------------------------------------
r58844 | shugo | 2017-05-22 15:13:11 +0900 (Mon, 22 May 2017) | 4 lines

net/imap: separate @continuation_request_exception from @exception

Otherwise literal data will be sent even if NO response is returned
because @exception is set to nil in receive_responses.
------------------------------------------------------------------------
r58843 | nobu | 2017-05-22 13:10:51 +0900 (Mon, 22 May 2017) | 6 lines

downloader.rb: true symlink on cygwin

* tool/downloader.rb (Downloader.link_cache): on Cygwin, make true
  symlink only, which is provided by the OS.  as mingw/mswin ruby
  can't follow cygwin's pseudo symlink, it will fail on the same
  source tree.
------------------------------------------------------------------------
r58842 | k0kubun | 2017-05-22 12:56:16 +0900 (Mon, 22 May 2017) | 23 lines

erb.rb: Skip creating regexp

if stags and etags are not changed from default.

:putobject insn (of regexp) will be used instead of :toregexp insn.
This means that the regexp won't be compiled for every
`SimpleScanner#scan` call.

It may not be a good idea to apply this kind of optimization for all cases.
But I applied this because it is default scanner and used frequently and has
relatively large impact for benchmark like this:

* Before
app_erb 1.023

* After
app_erb 0.781

This commit fixes only the bottleneck of performance regression introduced
in r53412. For maintainability, I won't fix other small regressions like
additional overhead of method calls.

[ruby-core:73820] [Bug #12074]
------------------------------------------------------------------------
r58841 | nobu | 2017-05-22 12:18:17 +0900 (Mon, 22 May 2017) | 4 lines

fix r58833

* tool/downloader.rb (Downloader.download): just link to the cache
  when downloaded to the cache but not the target file.
------------------------------------------------------------------------
r58840 | normal | 2017-05-22 08:52:08 +0900 (Mon, 22 May 2017) | 34 lines

lib/net/protocol: clear short-lived read buffer

Using a parallel Net::HTTP downloader, this reduced memory usage
from around 120MB to 50MB on my 32-bit x86 system.

* lib/net/protocol.rb (rbuf_fill): clear temporary buffer

Test script I used:

  require 'net/http'
  require 'uri'
  require 'digest/sha1'
  url = 'http://80x24.org/git-i-forgot-to-pack/objects/pack/pack-97b25a76c03b489d4cbbd85b12d0e1ad28717e55.idx'
  uri = URI(url)
  use_ssl = "https" == uri.scheme
  thrs = 30.times.map do
    Thread.start do
      cur = Thread.current.object_id
      Net::HTTP.start(uri.host, uri.port, use_ssl: use_ssl) do |http|
        req = Net::HTTP::Get.new(uri)
        http.request(req) do |res|
          dig = Digest::SHA1.new
          res.read_body do |buf|
            dig.update(buf)
            #buf.clear # most Ruby programmers don't do this :<
          end
          warn "#{Time.now} #{cur} #{dig.hexdigest}\n"
        end
      end
      :done
    end
  end

  p thrs.map(&:value)
------------------------------------------------------------------------
r58839 | stomar | 2017-05-22 04:31:37 +0900 (Mon, 22 May 2017) | 3 lines

String#casecmp no longer raises TypeError

* See https://bugs.ruby-lang.org/issues/13312
------------------------------------------------------------------------
r58838 | stomar | 2017-05-22 04:29:58 +0900 (Mon, 22 May 2017) | 1 line

NEWS: String#{casecmp,casecmp?} [Bug #13312]
------------------------------------------------------------------------
r58837 | stomar | 2017-05-22 04:28:48 +0900 (Mon, 22 May 2017) | 9 lines

string.c: fix String#{casecmp,casecmp?} for non-string arguments

* string.c: make String#{casecmp,casecmp?} return nil for
  non-string arguments instead of raising a TypeError.

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

Reported by Marcus Stollsteimer.  Based on a patch by Shingo Morita.
[ruby-core:80145] [Bug #13312]
------------------------------------------------------------------------
r58836 | stomar | 2017-05-22 04:27:08 +0900 (Mon, 22 May 2017) | 4 lines

test_string.rb,test_symbol.rb: add some tests

* test/ruby/test_string.rb: add more test cases for String#casecmp.
* test/ruby/test_symbol.rb: ditto for Symbol#{casecmp,casecmp?}.
------------------------------------------------------------------------
r58835 | stomar | 2017-05-22 04:25:19 +0900 (Mon, 22 May 2017) | 1 line

Use should_receive expectation instead of singleton method
------------------------------------------------------------------------
r58834 | svn | 2017-05-22 01:45:36 +0900 (Mon, 22 May 2017) | 1 line

* 2017-05-22
------------------------------------------------------------------------
r58833 | nobu | 2017-05-22 01:45:35 +0900 (Mon, 22 May 2017) | 3 lines

downloader cache

* tool/downloader.rb (Downloader.download): manage download cache.
------------------------------------------------------------------------
r58832 | nobu | 2017-05-21 23:29:00 +0900 (Sun, 21 May 2017) | 1 line

remove verify option
------------------------------------------------------------------------
r58831 | nobu | 2017-05-21 17:30:50 +0900 (Sun, 21 May 2017) | 4 lines

downloader.rb: utilize dir argument

* tool/downloader.rb (Downloader::RubyGems.download): utilize
  `dir` argument of Downloader.download.
------------------------------------------------------------------------
r58830 | kazu | 2017-05-21 16:13:11 +0900 (Sun, 21 May 2017) | 8 lines

Add missing word in transform_values methods description

Explicitly says that the methods return a new hash rather than just
stating it return a new something we don't know.

[ci skip]
[Fix GH-1619]
Author:    Nicolas Cavigneaux <nico@bounga.org>
------------------------------------------------------------------------
r58829 | watson1978 | 2017-05-21 12:36:31 +0900 (Sun, 21 May 2017) | 42 lines

Improve Time#+ & Time#- performance

* time.c (wadd): use internal addv() function to calculate internal value in
    Time object. On 64-bit machine, Time object might have Fixnum object
    internally by default and addv() can calculate Fixnum objects directly.

* time.c (wsub): use internal subv() function due the same reason in above.

    Time#+ & Time#- will be faster around 15%.

    [ruby-dev:50036] [Bug #13357] [Fix GH-1547]

### Before
             user     system      total        real
Time#+   0.820000   0.000000   0.820000 (  0.818081)
Time#-   0.810000   0.000000   0.810000 (  0.813835)

### After
             user     system      total        real
Time#+   0.710000   0.000000   0.710000 (  0.710241)
Time#-   0.710000   0.010000   0.720000 (  0.714151)

### Test code
require 'benchmark'

Benchmark.bmbm do |x|

  x.report "Time#+" do
    t = Time.now
    2000000.times do
      t + 1
    end
  end

  x.report "Time#-" do
    t = Time.now
    2000000.times do
      t - 1
    end
  end

end
------------------------------------------------------------------------
r58828 | watson1978 | 2017-05-21 12:36:30 +0900 (Sun, 21 May 2017) | 48 lines

Improve Time#<=> performance

* time.c (wcmp): use internal cmp() function for comparing internal Fixnum value
    in Time objects. On 64-bit machine, Time object might have Fixnum object
    internally by default and cmp() can compare the Fixnum objects directly.

    Time#<=> will be faster around 60% on 64-bit machine.

* time.c (cmp): add optimized path for comparing internal Bignum value by using
    rb_big_cmp() API. On 32-bit machine, Time object might have Bignum object
    internally by default.

    Time#<=> will be faster around 50% on 32-bit machine.

    [ruby-dev:50034] [Bug #13354] [Fix GH-1546]

### Before
             user     system      total        real
Fixnum   1.410000   0.000000   1.410000 (  1.407848)
Bignum   1.550000   0.000000   1.550000 (  1.549145)

### After
             user     system      total        real
Fixnum   0.880000   0.000000   0.880000 (  0.886662)
Bignum   1.050000   0.000000   1.050000 (  1.047994)

### Test code
require 'benchmark'

Benchmark.bmbm do |x|

  x.report "Fixnum" do
    t1 = Time.now
    t2 = Time.now
    10000000.times do
      t1 <=> t2
    end
  end

  x.report "Bignum" do
    t1 = Time.at(2 ** 64)
    t2 = Time.at(2 ** 64 + 1)
    10000000.times do
      t1 <=> t2
    end
  end

end
------------------------------------------------------------------------
r58827 | kazu | 2017-05-21 10:01:10 +0900 (Sun, 21 May 2017) | 4 lines

Remove redundant square brackets

Use character class directly instead of
character class in character class.
------------------------------------------------------------------------
r58826 | k0kubun | 2017-05-21 02:36:09 +0900 (Sun, 21 May 2017) | 3 lines

erb.rb: Allow trimming CR in all trim_modes

to unify a behavior with r58823 and r58825.
------------------------------------------------------------------------
r58825 | k0kubun | 2017-05-21 02:17:22 +0900 (Sun, 21 May 2017) | 5 lines

erb.rb: Allow explicit trimming carriage return

when trim_mode is "-", for Windows environments.

[ruby-core:39625] [Bug #5339]
------------------------------------------------------------------------
r58824 | k0kubun | 2017-05-21 02:03:01 +0900 (Sun, 21 May 2017) | 4 lines

doc/maintainers.rdoc: Add me to ERB maintainers

The current maintainer suggested this in ruby-dev:50113.
Please ping me if an issue happens in ERB.
------------------------------------------------------------------------
r58823 | k0kubun | 2017-05-21 01:50:33 +0900 (Sun, 21 May 2017) | 5 lines

erb.rb: Allow trimming carriage return

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

[Bug #11464]
------------------------------------------------------------------------
r58822 | k0kubun | 2017-05-21 01:20:07 +0900 (Sun, 21 May 2017) | 3 lines

erb.rb: Prevent potential unexpected rescue

of LoadError in some method calls, not from `require "strscan"`.
------------------------------------------------------------------------
r58821 | svn | 2017-05-21 00:58:17 +0900 (Sun, 21 May 2017) | 1 line

* 2017-05-21
------------------------------------------------------------------------
r58820 | naruse | 2017-05-21 00:58:16 +0900 (Sun, 21 May 2017) | 1 line

Clean proxy
------------------------------------------------------------------------
r58819 | k0kubun | 2017-05-20 23:55:33 +0900 (Sat, 20 May 2017) | 9 lines

erb.rb: Drop unused scanner implementation

Original `SimpleScanner` was used only in tests.
Since `SimpleScanner` and `SimpleScanner2` work in the same way, I want
to drop the one which can't be used in a normal situation.

The only difference was `SimpleScanner` can be loaded without strscan
dependency but I think there's no situation that strscan is unavailable
because it's a standard library.
------------------------------------------------------------------------
r58818 | svn | 2017-05-20 22:00:42 +0900 (Sat, 20 May 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58817 | mame | 2017-05-20 22:00:41 +0900 (Sat, 20 May 2017) | 5 lines

Add coverage measurement mode by using gcov

This experimental feature is only for Ruby-core team, not for casual users.

Usage: `./configure --enable-gcov && make && make exam && make gcov`
------------------------------------------------------------------------
r58816 | mame | 2017-05-20 21:23:27 +0900 (Sat, 20 May 2017) | 5 lines

ripper.c should have `#line "ripper.c"`, not `#line "parse.c"`

The order of sed commands in Makefile of ripper was wrong: it tries to
replace `y.tab.c` with `ripper.c`, but before that, ytab.sed replaced
`y.tab.c` with `parse.c`, which led to a wrong result.
------------------------------------------------------------------------
r58815 | nobu | 2017-05-20 20:40:57 +0900 (Sat, 20 May 2017) | 4 lines

compile.c: optimize branches

* compile.c (compile_branch_condition, iseq_compile_each0):
  eliminate unreachable branches in NODE_IF.
------------------------------------------------------------------------
r58814 | nobu | 2017-05-20 19:27:27 +0900 (Sat, 20 May 2017) | 5 lines

compile.c: binary logop check

* compile.c (compile_branch_condition): turn recursion at binary
  logical operator into loop by goto, and check the result of RHS
  of NODE_OR.
------------------------------------------------------------------------
r58813 | stomar | 2017-05-20 19:21:44 +0900 (Sat, 20 May 2017) | 5 lines

prime.rb: remove alias after timeout test

* test/test_prime.rb: remove alias after timeout test.

* lib/prime.rb: fix typo.
------------------------------------------------------------------------
r58812 | normal | 2017-05-20 18:47:14 +0900 (Sat, 20 May 2017) | 31 lines

speed up IO#close with many threads

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

  Execution time (sec)
  name            trunk   after
  vm_thread_close 4.276   3.018

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

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

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

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

I am now kicking myself for not thinking about this 3 years ago
when I introduced ccan/list in [Feature #9632] to optimize this
same function :<
------------------------------------------------------------------------
r58811 | watson1978 | 2017-05-20 18:23:46 +0900 (Sat, 20 May 2017) | 32 lines

Improve Hash#merge performance

* hash.c (rb_hash_merge): use rb_hash_dup() instead of rb_obj_dup() to duplicate
    Hash object. rb_hash_dup() is faster duplicating function for Hash object
    which got rid of Hash#initialize_dup method calling.

    Hash#merge will be faster around 60%.
    [ruby-dev:50026] [Bug #13343] [Fix GH-1533]

### Before
                 user     system      total        real
Hash#merge   0.160000   0.020000   0.180000 (  0.182357)

### After
                 user     system      total        real
Hash#merge   0.110000   0.010000   0.120000 (  0.114404)

### Test code
require 'benchmark'

Benchmark.bmbm do |x|
  hash1 = {}
  100.times { |i| hash1[i.to_s] = i }
  hash2 = {}
  100.times { |i| hash2[(i*2).to_s] = i*2 }

  x.report "Hash#merge" do
    10000.times do
      hash1.merge(hash2)
    end
  end
end
------------------------------------------------------------------------
r58810 | nobu | 2017-05-20 11:11:24 +0900 (Sat, 20 May 2017) | 4 lines

compile.c: fix catch-table labels optimization

* compile.c (remove_unreachable_chunk): do not eliminate chunks
  followed by labels in catch-table entries.
------------------------------------------------------------------------
r58809 | marcandre | 2017-05-20 09:36:55 +0900 (Sat, 20 May 2017) | 6 lines

lib/prime: Fix primality of some large integers [#13492].

* lib/prime.rb: Use accurate sqrt to insure all factors are tested.
  Patch by Marcus Stollsteimer.

* test/test_prime.rb: Adapt test for timeout
------------------------------------------------------------------------
r58808 | hsbt | 2017-05-20 08:39:58 +0900 (Sat, 20 May 2017) | 3 lines

Merge gemspec from ruby/fileutils.

  * Replaced homepage option to source code location as github.
------------------------------------------------------------------------
r58807 | normal | 2017-05-20 06:34:04 +0900 (Sat, 20 May 2017) | 1 line

fix off-by-one in r58806
------------------------------------------------------------------------
r58806 | normal | 2017-05-20 06:33:15 +0900 (Sat, 20 May 2017) | 4 lines

test/ruby/test_io.rb: new test for IO.select exception set

Ensure this rarely-used feature of IO.select continues
to work properly.
------------------------------------------------------------------------
r58805 | normal | 2017-05-20 03:53:11 +0900 (Sat, 20 May 2017) | 34 lines

thread_sync.c: rewrite the rest using using ccan/list

The performance improvement increases as the number of waiters
increases, due to avoiding the O(n) behavior of rb_ary_delete on
the waiting thread.  Uncontended queues and condition variables
performance is not altered significantly.

Function entry cost is slightly increased for ConditionVariable,
since the data pointer is separately allocated and not embedded
into the RVALUE slot.

[ruby-core:81235] [Feature #13552]

name                  |trunk  |built
----------------------|------:|------:
vm_thread_condvar1    |  0.858|  0.858
vm_thread_condvar2    |  1.003|  0.804
vm_thread_queue       |  0.131|  0.129
vm_thread_sized_queue |  0.265|  0.251
vm_thread_sized_queue2|  0.892|  0.859
vm_thread_sized_queue3|  0.879|  0.845
vm_thread_sized_queue4|  0.599|  0.486

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

name                  |built
----------------------|------:
vm_thread_condvar1    |  0.999
vm_thread_condvar2    |  1.246
vm_thread_queue       |  1.020
vm_thread_sized_queue |  1.057
vm_thread_sized_queue2|  1.039
vm_thread_sized_queue3|  1.041
vm_thread_sized_queue4|  1.233
------------------------------------------------------------------------
r58804 | normal | 2017-05-20 03:34:38 +0900 (Sat, 20 May 2017) | 4 lines

thread_sync.c: rename mutex_waiter struct to sync_waiter

We will reuse this struct for ConditionVariable, Queue, and SizedQueue,
so it is no longer Mutex-specific.
------------------------------------------------------------------------
r58803 | naruse | 2017-05-20 01:19:46 +0900 (Sat, 20 May 2017) | 1 line

Define classes for r58800
------------------------------------------------------------------------
r58802 | svn | 2017-05-20 01:06:26 +0900 (Sat, 20 May 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58801 | naruse | 2017-05-20 01:06:25 +0900 (Sat, 20 May 2017) | 5 lines

Net::HTTP::STATUS_CODES is added as HTTP Status Code Repository [Misc #12935]

Note that 418 I'm a teapot doesn't exist because RFC 2324 and
RFC 7168 are not registered in IANA repository.
https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
------------------------------------------------------------------------
r58800 | naruse | 2017-05-20 01:06:18 +0900 (Sat, 20 May 2017) | 1 line

Add more HTTP status classes
------------------------------------------------------------------------
r58799 | svn | 2017-05-20 00:13:42 +0900 (Sat, 20 May 2017) | 1 line

* 2017-05-20
------------------------------------------------------------------------
r58798 | naruse | 2017-05-20 00:13:42 +0900 (Sat, 20 May 2017) | 3 lines

Net::HTTP#start now pass :ENV to p_addr by default [Bug #13351]

To avoid this, pass nil explicitly.
------------------------------------------------------------------------
r58797 | nobu | 2017-05-19 23:58:38 +0900 (Fri, 19 May 2017) | 4 lines

compile.c: dump_disasm_list_with_cursor

* compile.c (dump_disasm_list_with_cursor): improve disassemble
  list.  show whole elemetns and mark the current element.
------------------------------------------------------------------------
r58796 | naruse | 2017-05-19 23:14:52 +0900 (Fri, 19 May 2017) | 3 lines

Merge latest dtoa.c [Bug #13545]

Apply some part of http://www.netlib.org/fp/dtoa.c with my eyes...
------------------------------------------------------------------------
r58795 | usa | 2017-05-19 21:44:46 +0900 (Fri, 19 May 2017) | 5 lines

Of course, opened file is not able to unlink on Windows

* test/test_tempfile.rb (test_create_with_block): close the tempfile before
  unlink.  fixed a failure on Windows introduced at r58791.

------------------------------------------------------------------------
r58794 | nobu | 2017-05-19 18:36:34 +0900 (Fri, 19 May 2017) | 1 line

tempfile.rb: do not call File.identical? on closed stream
------------------------------------------------------------------------
r58793 | svn | 2017-05-19 18:25:53 +0900 (Fri, 19 May 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r58792 | shugo | 2017-05-19 18:25:52 +0900 (Fri, 19 May 2017) | 3 lines

net/imap: Net::IMAP#append should not block when NO response is received

[ruby-dev:50129] [Bug#13579]
------------------------------------------------------------------------
r58791 | nobu | 2017-05-19 18:20:14 +0900 (Fri, 19 May 2017) | 4 lines

tempfile.rb: remove in Tempfile.create

* lib/tempfile.rb (Tempfile.create): should not fail even if the
  temporary file has been removed in the block, just ignore.
------------------------------------------------------------------------
r58790 | duerst | 2017-05-19 17:19:02 +0900 (Fri, 19 May 2017) | 1 line

add specs for Unicode-wide case conversions introduced in Ruby 2.4
------------------------------------------------------------------------
r58789 | duerst | 2017-05-19 17:05:56 +0900 (Fri, 19 May 2017) | 1 line

improve examples, fix one improbably should_not value
------------------------------------------------------------------------
r58788 | ko1 | 2017-05-19 16:54:04 +0900 (Fri, 19 May 2017) | 5 lines

specify unsigned (fix r58784).

* method.h (rb_method_definition_t#type): specify unsigned explicitly.
 Some compilers (includes VC) returns negative value.

------------------------------------------------------------------------
r58787 | nobu | 2017-05-19 16:34:05 +0900 (Fri, 19 May 2017) | 1 line

fix syntax error
------------------------------------------------------------------------
r58786 | nobu | 2017-05-19 16:12:45 +0900 (Fri, 19 May 2017) | 4 lines

eval_error.c: enrich backtrace

* eval_error.c (print_backtrace): add frame number when printing
  in reverse order.  [Feature #8661]
------------------------------------------------------------------------
r58785 | naruse | 2017-05-19 15:14:43 +0900 (Fri, 19 May 2017) | 1 line

Add NEWS about [Feature #8661]
------------------------------------------------------------------------
r58784 | normal | 2017-05-19 15:00:53 +0900 (Fri, 19 May 2017) | 14 lines

method.h: pack rb_method_definition_t struct

We only have 12 method types, so 4 bits is enough for
rb_method_type_t.

Size reductions:

- x86-64     48 => 40 bytes
- x86        28 => 24 bytes

* method.h (enum method_optimized_type): split out for CPP
  (struct rb_method_definition struct): pack on unaligned systems
  (rb_method_definition_t): split typedef to help ctags
  [ruby-core:81236] [Feature #13494]
------------------------------------------------------------------------
r58783 | k0kubun | 2017-05-19 00:13:30 +0900 (Fri, 19 May 2017) | 4 lines

Fix strange indentation

which I introduced at r58773.
Hard tabs and spaces are mixed...
------------------------------------------------------------------------
r58782 | svn | 2017-05-19 00:06:48 +0900 (Fri, 19 May 2017) | 1 line

* 2017-05-19
------------------------------------------------------------------------
r58781 | nobu | 2017-05-19 00:06:47 +0900 (Fri, 19 May 2017) | 5 lines

common.mk: path in parse.c

* common.mk (parse.c): replace source file name in #line pragmas
  with the path in the source directory, so that binary utilities,
  e.g. gcov, can find it.
------------------------------------------------------------------------
r58780 | nobu | 2017-05-18 20:29:42 +0900 (Thu, 18 May 2017) | 5 lines

potential memory leak

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

* util.c (ruby_getcwd): ditto.
------------------------------------------------------------------------
r58779 | hsbt | 2017-05-18 14:29:04 +0900 (Thu, 18 May 2017) | 1 line

Fix a wrong repository name of simplecov.
------------------------------------------------------------------------
r58778 | svn | 2017-05-18 11:42:17 +0900 (Thu, 18 May 2017) | 1 line

* 2017-05-18
------------------------------------------------------------------------
r58777 | hsbt | 2017-05-18 11:42:16 +0900 (Thu, 18 May 2017) | 47 lines

Improve CSV parsing performance.

  Patch by @joshpencheon (Josh Pencheon)
  [fix GH-1607]

  #### benchmark-ips results
  ```
  trunk:
  Warming up --------------------------------------
                         4.000  i/100ms
  Calculating -------------------------------------
                         39.661  (?10.1%) i/s -      2.352k in 60.034781s
  with-patch:
  Warming up --------------------------------------
                         5.000  i/100ms
  Calculating -------------------------------------
                         60.521  (? 9.9%) i/s -      3.595k in 60.047157s
  ```

  #### memory_profiler resuts

  ```
  trunk:
  allocated memory by class
  -----------------------------------
    35588490  String
     7454320  Array
      294000  MatchData
       37340  Regexp
       11840  Hash
        2400  CSV
        1600  Proc
        1280  Method
         800  StringIO
  with-patch:
  allocated memory by class
  -----------------------------------
    18788490  String
     3454320  Array
      294000  MatchData
       37340  Regexp
       11840  Hash
        2400  CSV
        1600  Proc
        1280  Method
         800  StringIO
  ```
------------------------------------------------------------------------
r58776 | ko1 | 2017-05-17 23:43:22 +0900 (Wed, 17 May 2017) | 6 lines

modify r58771.

* spec/rubyspec/command_line/dash_upper_s_spec.rb: enable tests on vboxsf
  (VirtualBox shared directory) and change tests to match /success$/ to
  ignore warnings. This technique is suggested by @unak.

------------------------------------------------------------------------
r58775 | k0kubun | 2017-05-17 23:11:01 +0900 (Wed, 17 May 2017) | 5 lines

spec/rubyspec: Add `ruby_version_is` guard

for future backport to ruby/spec repository.

See r58772 r58773 r58774.
------------------------------------------------------------------------
r58774 | k0kubun | 2017-05-17 22:21:09 +0900 (Wed, 17 May 2017) | 1 line

spec/rubyspec: Fix rubyspec for tilde unescape
------------------------------------------------------------------------
r58773 | k0kubun | 2017-05-17 21:34:59 +0900 (Wed, 17 May 2017) | 5 lines

cgi/util.rb: Don't escape tilde in #escape

to make it compatible with ERB::Util.url_encode.

ext/cgi/escape/escape.c: ditto.
------------------------------------------------------------------------
r58772 | k0kubun | 2017-05-17 20:58:09 +0900 (Wed, 17 May 2017) | 7 lines

erb.rb: Don't encode tilde in #url_encode

Based on patch by madeofcode (Mark Dodwell).
[ruby-core:46168] [Bug #6696] [Fix GH-54]

`~` is a unreserved character.
https://tools.ietf.org/html/rfc3986#section-2.3
------------------------------------------------------------------------
r58771 | ko1 | 2017-05-17 18:31:34 +0900 (Wed, 17 May 2017) | 4 lines

skip some tests on vboxsf.

* spec/rubyspec/command_line/dash_upper_s_spec.rb:

------------------------------------------------------------------------
r58770 | hsbt | 2017-05-17 16:56:27 +0900 (Wed, 17 May 2017) | 18 lines

Optimize CSV#shift.

  [Bug #12373][ruby-core:75462]
  Patch by Yuki Kurihara.

  Benchmark:
  ```
  Warming up --------------------------------------
           csv_shift     1.000  i/100ms
       new_csv_shift     1.000  i/100ms
Calculating -------------------------------------
           csv_shift      1.192  (? 0.0%) i/s -      6.000  in 5.034250s
       new_csv_shift      1.527  (? 0.0%) i/s -      8.000  in 5.243446s

Comparison:
       new_csv_shift:        1.5 i/s
           csv_shift:        1.2 i/s - 1.28x  slower
  ```
------------------------------------------------------------------------
r58769 | naruse | 2017-05-17 16:13:47 +0900 (Wed, 17 May 2017) | 1 line

Treat NULL reference case [Bug #13566]
------------------------------------------------------------------------
r58768 | naruse | 2017-05-17 14:38:37 +0900 (Wed, 17 May 2017) | 3 lines

Merge Onigmo 6.1.2

https://github.com/k-takata/Onigmo/commit/1364ae3488cac0acbf2d61ef3ce2b62fe0c0f528
------------------------------------------------------------------------
r58767 | nobu | 2017-05-17 13:47:05 +0900 (Wed, 17 May 2017) | 4 lines

ruby.c: encode script name

* ruby.c (process_options): encode script name to locale encoding
  instead of associate, if UTF-8 path.
------------------------------------------------------------------------
r58766 | nobu | 2017-05-17 13:44:12 +0900 (Wed, 17 May 2017) | 4 lines

.gdbinit: fix nd_tree

* .gdbinit (nd_tree): use rb_str_tmp_new to get rid of
  `__extension__'.
------------------------------------------------------------------------
r58765 | nobu | 2017-05-17 09:28:01 +0900 (Wed, 17 May 2017) | 6 lines

test_dir_m17n.rb: read in filesystem encoding

* test/ruby/test_dir_m17n.rb (test_entries_compose): read in
  filesystem encoding instead of default external encoding on
  Windows too.  these two encodings may differ on some
  environments.
------------------------------------------------------------------------
r58764 | normal | 2017-05-17 08:59:01 +0900 (Wed, 17 May 2017) | 4 lines

Revert "test/test_extilibs.rb: do not check the existence of fiddle"

This reverts r58761 since fiddle is considered critical.
[ruby-core:81201] [ruby-core:81203]
------------------------------------------------------------------------
r58763 | usa | 2017-05-17 08:15:56 +0900 (Wed, 17 May 2017) | 5 lines

ENV["HOME"] is prior as home on Windows

* spec/rubyspec/core/dir/home_spec.rb: ENV["HOME"] is prior as home on Windows.
  reported by ko1.

------------------------------------------------------------------------
r58762 | nobu | 2017-05-17 08:09:34 +0900 (Wed, 17 May 2017) | 4 lines

gmake.mk: test dependency

* defs/gmake.mk (TEST_DEPENDS): check and more tests targets need
  all to be built.
------------------------------------------------------------------------
r58761 | normal | 2017-05-17 07:05:39 +0900 (Wed, 17 May 2017) | 6 lines

test/test_extilibs.rb: do not check the existence of fiddle

libffi is not installed on all systems, and is not needed
for most of the tests.

Tested on a fresh FreeBSD 11.0 VM
------------------------------------------------------------------------
r58760 | usa | 2017-05-17 01:16:47 +0900 (Wed, 17 May 2017) | 9 lines

Should require at spec file, not fixture file

Fixed ERRORs at non-Windows platforms.

* spec/rubyspec/library/win32ole/fixtures/classes.rb (require): removed.

* spec/rubyspec/library/win32ole/win32ole/ole_get_methods_spec.rb (require):
  forgotten to require 'win32ole'.

------------------------------------------------------------------------
r58759 | nobu | 2017-05-17 00:47:44 +0900 (Wed, 17 May 2017) | 1 line

run tests without exts
------------------------------------------------------------------------
r58758 | usa | 2017-05-17 00:45:25 +0900 (Wed, 17 May 2017) | 5 lines

Should require WIN32OLE

* spec/rubyspec/library/win32ole/fixtures/classes.rb: should require WIN32OLE
  here because this file causes NameError in parallel spec.

------------------------------------------------------------------------
r58757 | svn | 2017-05-17 00:17:40 +0900 (Wed, 17 May 2017) | 1 line

* 2017-05-17
------------------------------------------------------------------------
r58756 | nobu | 2017-05-17 00:17:39 +0900 (Wed, 17 May 2017) | 4 lines

test/unit.rb: fix returning job tokens

* test/lib/test/unit.rb (_run_parallel): flush job tokens after
  quitting workers when normally finished too.
------------------------------------------------------------------------
r58755 | nobu | 2017-05-16 23:53:04 +0900 (Tue, 16 May 2017) | 5 lines

test_process.rb: compare in UTF-8

* test/ruby/test_process.rb (test_execopts_open_chdir_m17n_path):
  compare directory name in UTF-8.  encoding of `Dir.pwd` is
  affected by filesystem encoding.
------------------------------------------------------------------------
r58754 | nobu | 2017-05-16 22:57:18 +0900 (Tue, 16 May 2017) | 1 line

Use raise_error block
------------------------------------------------------------------------
r58753 | nobu | 2017-05-16 22:51:17 +0900 (Tue, 16 May 2017) | 1 line

Mac OS raises EADDRNOTAVAIL but not ECONNREFUSED
------------------------------------------------------------------------
r58752 | nobu | 2017-05-16 22:51:15 +0900 (Tue, 16 May 2017) | 1 line

Multiple exception classes at raise_error
------------------------------------------------------------------------
r58751 | usa | 2017-05-16 22:50:51 +0900 (Tue, 16 May 2017) | 2 lines

* common.mk (help): get rid of make error with nmake.

------------------------------------------------------------------------
r58750 | ko1 | 2017-05-16 22:22:42 +0900 (Tue, 16 May 2017) | 1 line

restore yes-test-rubyspec
------------------------------------------------------------------------
r58749 | nobu | 2017-05-16 22:15:12 +0900 (Tue, 16 May 2017) | 1 line

follow test-spec
------------------------------------------------------------------------
r58748 | eregon | 2017-05-16 21:29:44 +0900 (Tue, 16 May 2017) | 1 line

Avoid using a class variable in socket specs
------------------------------------------------------------------------
r58747 | eregon | 2017-05-16 21:29:30 +0900 (Tue, 16 May 2017) | 3 lines

Use a reserved port to test for a non-existing TCP server

* Avoids a race between finding an available port and another process starting a server on it.
------------------------------------------------------------------------
r58746 | usa | 2017-05-16 21:15:48 +0900 (Tue, 16 May 2017) | 5 lines

Rename rubyspec to spec

* common.mk (*-rubyspec): rename to *-spec because rubyspec is historical name.
  of course, *-rubyspec are still available for compatibility.

------------------------------------------------------------------------
r58745 | nobu | 2017-05-16 19:25:56 +0900 (Tue, 16 May 2017) | 6 lines

rb_w32_ugetcwd: UTF-8 version getcwd

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

* win32/win32.c (w32_getcwd): codepage aware getcwd using
  GetCurrentDirectoryW.
------------------------------------------------------------------------
r58744 | hsbt | 2017-05-16 18:32:32 +0900 (Tue, 16 May 2017) | 3 lines

Strip punctuation from CSV headers in symbol converter.

  Patch by @cllns. [Fix GH-957]
------------------------------------------------------------------------
r58743 | hsbt | 2017-05-16 18:17:09 +0900 (Tue, 16 May 2017) | 3 lines

Added accessor of original line when parsing.

  [Feature #11865][ruby-core:72452][fix GH-1170]
------------------------------------------------------------------------
r58742 | usa | 2017-05-16 17:03:53 +0900 (Tue, 16 May 2017) | 5 lines

Search SSL libraries by testing various filename patterns

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

------------------------------------------------------------------------
r58741 | nobu | 2017-05-16 14:47:53 +0900 (Tue, 16 May 2017) | 4 lines

fix tempfile leaks on Windows

* lib/rubygems/ext/ext_conf_builder.rb (build): needs to close
  before unlink on Windows.
------------------------------------------------------------------------
r58740 | naruse | 2017-05-16 14:02:23 +0900 (Tue, 16 May 2017) | 1 line

fix words
------------------------------------------------------------------------
r58739 | ko1 | 2017-05-16 13:23:10 +0900 (Tue, 16 May 2017) | 2 lines

skip openssl related tests.

------------------------------------------------------------------------
r58738 | svn | 2017-05-16 09:15:55 +0900 (Tue, 16 May 2017) | 1 line

* 2017-05-16
------------------------------------------------------------------------
r58737 | nobu | 2017-05-16 09:15:54 +0900 (Tue, 16 May 2017) | 4 lines

enable ruby_w32_codepage on cygwin

* debug.c, localeinit.c: enable ruby_w32_codepage on cygwin too.
  [ruby-core:81163] [Bug #13567]
------------------------------------------------------------------------
r58736 | ko1 | 2017-05-15 23:40:07 +0900 (Mon, 15 May 2017) | 16 lines

refresh Gem at the end of `teardown`.

* lib/rubygems/test_case.rb (teardown): call `Gem::refresh()` at the
  end of `teardown`.
  On parallel test sometimes fails test process. The reason
  is:
  (1) previous tests remains `Gem::Specification@@stubs` value
      which points to temporary directories and the directories
      are removed by `teardown` method of previous test.
  (2) `require 'rubygems/gem_runner'` in `test_gem_gem_runner.rb`
      tries to require test utility file. However, with strange `@@stubs`
      RubyGems tries to load specification from removed directory.
      `StubSpecification#to_spec` returns `nil` and error will occur.
  The solution this patch employs is to refresh all of parameters
  includes `Gem::Specification@@stubs` by `Gem::refresh()`.

------------------------------------------------------------------------
r58735 | k0kubun | 2017-05-15 22:38:02 +0900 (Mon, 15 May 2017) | 5 lines

erb.rb: Use String#<< instead of #concat

to optimize String concatenation on rendering.

[fix GH-1612]
------------------------------------------------------------------------
r58734 | sorah | 2017-05-15 21:18:55 +0900 (Mon, 15 May 2017) | 7 lines

[DOC] File#path result can be inaccurate

* file.c(rb_file_path): [DOC] Note that the pathname returned by this
  method can be inaccurate, for instance file gets moved, renamed,
  deleted or is created with File::TMPFILE option.

  Relates to [Feature #13568]
------------------------------------------------------------------------
r58733 | nobu | 2017-05-15 20:32:35 +0900 (Mon, 15 May 2017) | 4 lines

optional/capi: use LIBRUBYARG_SHARED

* spec/rubyspec/optional/capi/spec_helper.rb (compile_extension):
  use LIBRUBYARG_SHARED for LDSHARED.
------------------------------------------------------------------------
r58732 | nobu | 2017-05-15 20:25:56 +0900 (Mon, 15 May 2017) | 1 line

thread_spec.c: use rb_w32_pipe
------------------------------------------------------------------------
r58731 | nobu | 2017-05-15 20:19:12 +0900 (Mon, 15 May 2017) | 1 line

io_spec.c: suppress unused-variable warning
------------------------------------------------------------------------
r58730 | nobu | 2017-05-15 20:16:27 +0900 (Mon, 15 May 2017) | 4 lines

configure.in: negative time_t for mingw

* configure.in: mingw also uses MSVCRT accepts negative time_t.
  c.f. r58681.
------------------------------------------------------------------------
r58729 | nobu | 2017-05-15 20:16:26 +0900 (Mon, 15 May 2017) | 1 line

configure.in: remove dynamic option in LDSHARED
------------------------------------------------------------------------
r58728 | nobu | 2017-05-15 20:16:25 +0900 (Mon, 15 May 2017) | 5 lines

optional/capi: fix link on mingw

* spec/rubyspec/optional/capi/spec_helper.rb (compile_extension):
  LIBRUBYARG is always necessary unless dynamic lookup is allowed.
  strip $(DEFFILE) from DLDFLAGS on mingw.
------------------------------------------------------------------------
r58727 | nobu | 2017-05-15 19:32:30 +0900 (Mon, 15 May 2017) | 1 line

default.mspec: ignore unavailable FDs
------------------------------------------------------------------------
r58726 | usa | 2017-05-15 16:35:26 +0900 (Mon, 15 May 2017) | 8 lines

Should call `ln_s` only when symlink is available

* test/fileutils/test_fileutils.rb (test_ln_s): skip if symlink is not
  available.

* test/fileutils/test_fileutils.rb (test_ln_s): remove created symlink
  certainly.

------------------------------------------------------------------------
r58725 | normal | 2017-05-15 16:33:10 +0900 (Mon, 15 May 2017) | 4 lines

test/socket/test_basicsocket.rb (socks): bind explicitly to localhost

Binding to a potentially public IP in a test can cause problems
if hit by a random port scanner or something...
------------------------------------------------------------------------
r58724 | nobu | 2017-05-15 16:04:48 +0900 (Mon, 15 May 2017) | 1 line

define RUBY_DEBUG_ENV only for main.c
------------------------------------------------------------------------
r58723 | ko1 | 2017-05-15 16:02:33 +0900 (Mon, 15 May 2017) | 3 lines

add information for debugging.


------------------------------------------------------------------------
r58722 | svn | 2017-05-15 15:17:30 +0900 (Mon, 15 May 2017) | 1 line

* 2017-05-15
------------------------------------------------------------------------
r58721 | nobu | 2017-05-15 15:17:29 +0900 (Mon, 15 May 2017) | 1 line

refer flag variables regardless RUBY_DEBUG_ENV
------------------------------------------------------------------------
r58720 | nobu | 2017-05-14 23:27:07 +0900 (Sun, 14 May 2017) | 1 line

fix typo
------------------------------------------------------------------------
r58719 | svn | 2017-05-14 23:09:58 +0900 (Sun, 14 May 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58718 | eregon | 2017-05-14 23:09:56 +0900 (Sun, 14 May 2017) | 1 line

Update to ruby/spec@032022ca
------------------------------------------------------------------------
r58717 | svn | 2017-05-14 23:09:30 +0900 (Sun, 14 May 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58716 | eregon | 2017-05-14 23:09:29 +0900 (Sun, 14 May 2017) | 1 line

Update to ruby/mspec@4b980493
------------------------------------------------------------------------
r58715 | nobu | 2017-05-14 22:01:46 +0900 (Sun, 14 May 2017) | 4 lines

suppress a warning [ci skip]

* thread_sync.c (rb_mutex_num_waiting): suppress warning C4700 by
  VC, uninitialized local variable.
------------------------------------------------------------------------
r58714 | nobu | 2017-05-14 20:45:00 +0900 (Sun, 14 May 2017) | 7 lines

object.c: use a sized enumerator with #yield_self

* object.c (rb_obj_size): The #yield_self Enumerator instance
  always has a #count of `1`.  This provides a lazy #size of `1`
  to match the count instead of `nil`.  [Fix GH-1615]

Author:    Shannon Skipper <shannonskipper@gmail.com>
------------------------------------------------------------------------
r58713 | naruse | 2017-05-14 20:36:01 +0900 (Sun, 14 May 2017) | 3 lines

Don't read non .rb file as a spec

To avoid reading `core` file on reading core/ specs.
------------------------------------------------------------------------
r58712 | nobu | 2017-05-14 12:53:59 +0900 (Sun, 14 May 2017) | 4 lines

suppress warning

* spec/rubyspec/optional/capi/ext/fixnum_spec.c: suppress
  unused-but-set-variable warning.
------------------------------------------------------------------------
r58711 | nobu | 2017-05-14 12:33:01 +0900 (Sun, 14 May 2017) | 4 lines

exts.mk.tmpl: fix multiple rubies

* template/exts.mk.tmpl: get rid of making multiple rubies
  simultaneously.  it can cause making libruby in parallel.
------------------------------------------------------------------------
r58710 | nobu | 2017-05-14 10:03:15 +0900 (Sun, 14 May 2017) | 4 lines

tgamma on mingw

* configure.in: get rid of unreliable tgamma() implemented of
  mingw, which returns NaN unexpectedly.
------------------------------------------------------------------------
r58709 | nobu | 2017-05-14 09:21:00 +0900 (Sun, 14 May 2017) | 4 lines

string.c: cut down intermediate string

* string.c (rb_external_str_new_with_enc): cut down intermediate
  string for conversion source, by appending with conversion.
------------------------------------------------------------------------
r58708 | nobu | 2017-05-14 01:04:05 +0900 (Sun, 14 May 2017) | 1 line

revert r58703 & r58705
------------------------------------------------------------------------
r58707 | svn | 2017-05-14 00:23:39 +0900 (Sun, 14 May 2017) | 1 line

* 2017-05-14
------------------------------------------------------------------------
r58706 | usa | 2017-05-14 00:23:38 +0900 (Sun, 14 May 2017) | 4 lines

The exception raised when exec/spawn unexecutable file on Windows is various

It seems that depend on OS version or filesystem

------------------------------------------------------------------------
r58705 | nobu | 2017-05-13 23:20:19 +0900 (Sat, 13 May 2017) | 6 lines

string.c: fix up r58703

* string.c (rb_external_str_new_with_enc): fix the case of
  conversion failure.  when conversion failed for some reason,
  just ignores the default internal encoding and returns in the
  given encoding.
------------------------------------------------------------------------
r58704 | nobu | 2017-05-13 22:54:52 +0900 (Sat, 13 May 2017) | 5 lines

remove wrong expectation

* spec/rubyspec/core/kernel/itself_spec.rb: `object_id` may return
  different objects for each calls, and the expectation of object
  identity is done by `equal` matcher which uses `equal?` method.
------------------------------------------------------------------------
r58703 | nobu | 2017-05-13 22:34:39 +0900 (Sat, 13 May 2017) | 4 lines

string.c: cut down intermediate string

* string.c (rb_external_str_new_with_enc): cut down intermediate
  string for conversion source, by appending with conversion.
------------------------------------------------------------------------
r58702 | nobu | 2017-05-13 21:31:01 +0900 (Sat, 13 May 2017) | 4 lines

string.c: fix one-off bug

* string.c (rb_str_cat_conv_enc_opts): fix one-off bug.  `ofs`
  equals `olen` when appending at the end.
------------------------------------------------------------------------
r58701 | nobu | 2017-05-13 18:55:23 +0900 (Sat, 13 May 2017) | 4 lines

make test-rubyspec-precheck

* common.mk (yes-test-rubyspec): make test-rubyspec-precheck for
  fake.rb to setup build configuration.
------------------------------------------------------------------------
r58700 | shugo | 2017-05-13 11:05:40 +0900 (Sat, 13 May 2017) | 1 line

test/net/imap: fix race condition in test_exception_during_idle
------------------------------------------------------------------------
r58699 | nobu | 2017-05-13 10:16:36 +0900 (Sat, 13 May 2017) | 1 line

thread_win32.c: disable currently unused functions
------------------------------------------------------------------------
r58698 | nobu | 2017-05-13 10:05:30 +0900 (Sat, 13 May 2017) | 4 lines

math.c: check argument to lgamma_r

* math.c (math_lgamma): check the argument before calling math
  function `lgamma_r` for edge cases.
------------------------------------------------------------------------
r58697 | nobu | 2017-05-13 09:50:20 +0900 (Sat, 13 May 2017) | 4 lines

math.c: check argument to tgamma

* math.c (math_gamma): check the argument before calling math
  function `tgamma` for edge cases.
------------------------------------------------------------------------
r58696 | normal | 2017-05-13 06:52:04 +0900 (Sat, 13 May 2017) | 26 lines

autoload: always wait on loading thread

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

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

* variable.c (check_autoload_required): do not assume a provided
  feature means autoload is complete, always wait if autoload is
  being performed by another thread.
  [ruby-core:81105] [Bug #11384] Thanks to <s.wanabe@gmail.com>
------------------------------------------------------------------------
r58695 | usa | 2017-05-13 05:10:16 +0900 (Sat, 13 May 2017) | 4 lines

`notepad.exe` does not always exist in `C:\Windows`

Use `%WINDIR%\system32\drivers\etc\services` instead of `notepad.exe`.

------------------------------------------------------------------------
r58694 | nobu | 2017-05-13 02:23:46 +0900 (Sat, 13 May 2017) | 4 lines

array.c: fix position in message

* array.c (rb_ary_insert): fix the position in error message, when
  it is less than -1.
------------------------------------------------------------------------
r58693 | nobu | 2017-05-13 02:02:48 +0900 (Sat, 13 May 2017) | 4 lines

array.c: check position to insert

* array.c (rb_ary_insert): check position to insert even if no
  elements to be inserted.  [ruby-core:81125] [Bug #13558]
------------------------------------------------------------------------
r58692 | naruse | 2017-05-13 02:02:25 +0900 (Sat, 13 May 2017) | 1 line

show GEM_HOME
------------------------------------------------------------------------
r58691 | nobu | 2017-05-13 01:12:46 +0900 (Sat, 13 May 2017) | 7 lines

fix tgamma for inifity

* configure.in: do not use buggy tgamma() of mingw.

* missing/tgamma.c (tgamma): merge fix for inifity from
  ruby_tgamma.  since msvcr120.dll and later have tgamma, this
  implementation will not be used.
------------------------------------------------------------------------
r58690 | svn | 2017-05-13 01:01:18 +0900 (Sat, 13 May 2017) | 1 line

* 2017-05-13
------------------------------------------------------------------------
r58689 | nobu | 2017-05-13 01:01:17 +0900 (Sat, 13 May 2017) | 1 line

tgamma.c: unify versions with/without lgamma_r
------------------------------------------------------------------------
r58688 | nobu | 2017-05-13 00:29:55 +0900 (Sat, 13 May 2017) | 4 lines

string.c: remove bare Unicode.

* string.c (rb_str_unicode_normalize): remove bare Unicode.  do
  not assume that all compilers can handle UTF-8.
------------------------------------------------------------------------
r58687 | usa | 2017-05-12 20:49:05 +0900 (Fri, 12 May 2017) | 5 lines

Encoding.default_internal should affect ENV on Windows like other platforms

* hash.c (env_str_transcode): call rb_external_str_with_enc() if
  default_internal is available.

------------------------------------------------------------------------
r58686 | usa | 2017-05-12 19:37:41 +0900 (Fri, 12 May 2017) | 2 lines

Windows does not know Unix style timezone

------------------------------------------------------------------------
r58685 | usa | 2017-05-12 19:31:52 +0900 (Fri, 12 May 2017) | 5 lines

Math.gamma(Float::INFINITY) should return +INF

* math.c (tgamma): it seems that the implementaion of mswin has similar problem
  with mingw.

------------------------------------------------------------------------
r58684 | usa | 2017-05-12 19:23:53 +0900 (Fri, 12 May 2017) | 2 lines

On LLP64 platform (mswin64), the return value of String#hash is fixnum.

------------------------------------------------------------------------
r58683 | usa | 2017-05-12 19:10:15 +0900 (Fri, 12 May 2017) | 4 lines

Skip specs which make non-socket fd nonblocking on Windows

because Windows does not support nonblocking mode except sockets.

------------------------------------------------------------------------
r58682 | usa | 2017-05-12 19:05:48 +0900 (Fri, 12 May 2017) | 2 lines

Support bulding the extension on Windows

------------------------------------------------------------------------
r58681 | usa | 2017-05-12 18:46:45 +0900 (Fri, 12 May 2017) | 2 lines

It seems that MSVCRT accepts negative time_t

------------------------------------------------------------------------
r58680 | shugo | 2017-05-12 18:39:23 +0900 (Fri, 12 May 2017) | 4 lines

net/imap: Revert read_tiemout in r58549.

get_response is called in a receiver thread, so there may be no pending
commands when get_response is called.
------------------------------------------------------------------------
r58679 | usa | 2017-05-12 18:36:57 +0900 (Fri, 12 May 2017) | 2 lines

unistd.h is only available when HAVE_UNISTD_H is 1

------------------------------------------------------------------------
r58678 | usa | 2017-05-12 18:17:10 +0900 (Fri, 12 May 2017) | 2 lines

Skip the spec which uses `fork` on Windows

------------------------------------------------------------------------
r58677 | usa | 2017-05-12 17:45:20 +0900 (Fri, 12 May 2017) | 6 lines

The title of "Desktop" may be localized

* spec/rubyspec/library/win32ole/win32ole/_invoke_spec.rb: the title of
  "Desktop" may be localized.  then, use "System32" because it seems not to be
  localized.

------------------------------------------------------------------------
r58676 | usa | 2017-05-12 17:11:35 +0900 (Fri, 12 May 2017) | 5 lines

Skip on Windows because it always fails

On Windows, when invoking ruby via runruby.rb, the pid of invoker and of invokee
are diffrent.  Therefore, this spec always fails.

------------------------------------------------------------------------
r58675 | nobu | 2017-05-12 17:10:36 +0900 (Fri, 12 May 2017) | 6 lines

remove code old versions

* spec/rubyspec/optional/capi/spec_helper.rb (compile_extension):
  remove code old versions.  `RbConfig::CONFIG["rubyhdrdir"]` is
  since 1.9, and `RbConfig::CONFIG["rubyarchhdrdir"]` is since
  2.0.0.
------------------------------------------------------------------------
r58674 | nobu | 2017-05-12 16:48:08 +0900 (Fri, 12 May 2017) | 5 lines

gc.c: checks of sizes

* gc.c (ruby_xmalloc, ruby_xmalloc2, ruby_xcalloc): move checks of
  sizes from objspace_xmalloc, objspace_xmalloc2, objspace_xcalloc,
  respectively.
------------------------------------------------------------------------
r58673 | nobu | 2017-05-12 16:48:05 +0900 (Fri, 12 May 2017) | 4 lines

gc.c: objspace_malloc_fixup

* gc.c (objspace_malloc_fixup): include allocated size
  managements.
------------------------------------------------------------------------
r58672 | usa | 2017-05-12 15:48:53 +0900 (Fri, 12 May 2017) | 2 lines

spec has been merged, then should run it in love

------------------------------------------------------------------------
r58671 | usa | 2017-05-12 15:39:43 +0900 (Fri, 12 May 2017) | 5 lines

Support building exts of spec on mswin

* spec/rubyspec/optional/capi/spec_helper.rb: building command of extensions on
  mswin differs from Unixen's one.

------------------------------------------------------------------------
r58670 | nobu | 2017-05-12 15:19:00 +0900 (Fri, 12 May 2017) | 4 lines

vm.c: free by ruby_xfree

* vm.c (ruby_vm_run_at_exit_hooks): should free by `ruby_xfree`
  memories allocated by `ALLOC`.
------------------------------------------------------------------------
r58669 | stomar | 2017-05-12 03:59:45 +0900 (Fri, 12 May 2017) | 3 lines

string.c: docs for String#match

* string.c: [DOC] add example for String#match with pos argument.
------------------------------------------------------------------------
r58668 | stomar | 2017-05-12 03:58:27 +0900 (Fri, 12 May 2017) | 4 lines

string.c: docs for Symbol

* string.c: [DOC] adopt call-seq's for Symbol#{match,match?} from
  String methods; other small improvements for Symbol docs.
------------------------------------------------------------------------
r58667 | svn | 2017-05-12 03:56:33 +0900 (Fri, 12 May 2017) | 1 line

* 2017-05-12
------------------------------------------------------------------------
r58666 | stomar | 2017-05-12 03:56:32 +0900 (Fri, 12 May 2017) | 4 lines

string.c: docs for Symbol#{match,match?}

* string.c: [DOC] mention pos argument for Symbol#{match,match?}.
  Patch by Yuki Kurihara (ksss).  [Fix GH-1606]
------------------------------------------------------------------------
r58665 | nobu | 2017-05-11 23:28:38 +0900 (Thu, 11 May 2017) | 4 lines

gc.c: skip unnecessary check

* gc.c (wmap_aset): skip unnecessary size check.
  `2*sizeof(VALUE)` is static and should never overflow.
------------------------------------------------------------------------
r58664 | nobu | 2017-05-11 23:28:37 +0900 (Thu, 11 May 2017) | 4 lines

gc.c: use the argument objspace

* gc.c (objspace_xrealloc): use the argument objspace, instead of
  the default object space.
------------------------------------------------------------------------
r58663 | shugo | 2017-05-11 16:56:52 +0900 (Thu, 11 May 2017) | 1 line

net/imap: Net::IMAP#disconnect need not do anything if already disconnected
------------------------------------------------------------------------
r58662 | nobu | 2017-05-11 11:38:09 +0900 (Thu, 11 May 2017) | 4 lines

process.c: fix error check

* process.c (obj2uid, obj2gid): check the error number returned by
  `getpwnam_r()` and `getgrnam_r()`, instead of `errno`.
------------------------------------------------------------------------
r58661 | nobu | 2017-05-11 08:52:14 +0900 (Thu, 11 May 2017) | 4 lines

fix up r57167

* test/lib/minitest/unit.rb (MiniTest::Unit#_run_anything): stop
  if any errors or failures.
------------------------------------------------------------------------
r58660 | naruse | 2017-05-11 08:38:28 +0900 (Thu, 11 May 2017) | 1 line

pass as exception
------------------------------------------------------------------------
r58659 | nobu | 2017-05-11 08:34:33 +0900 (Thu, 11 May 2017) | 1 line

.
------------------------------------------------------------------------
r58658 | nobu | 2017-05-11 08:18:07 +0900 (Thu, 11 May 2017) | 5 lines

process.c: temporary string for buffer

* process.c (obj2uid, obj2gid): use temporary string as the buffer
  instead of `rb_alloc_tmp_buffer`, which is `NODE_ALLOCA` since
  r51492.  [ruby-core:81084] [Bug #13554]
------------------------------------------------------------------------
r58657 | naruse | 2017-05-11 04:19:38 +0900 (Thu, 11 May 2017) | 1 line

Show garbages if requiring gem_runner is failed
------------------------------------------------------------------------
r58656 | svn | 2017-05-11 04:03:07 +0900 (Thu, 11 May 2017) | 1 line

* 2017-05-11
------------------------------------------------------------------------
r58655 | stomar | 2017-05-11 04:03:07 +0900 (Thu, 11 May 2017) | 4 lines

lib/uri/generic.rb: fix typos

* lib/uri/generic.rb: [DOC] fix typos in URI::Generic#== docs.
  Patch by Alyssa Ross (alyssais).  [Fix GH-1604]
------------------------------------------------------------------------
r58654 | eregon | 2017-05-10 23:35:38 +0900 (Wed, 10 May 2017) | 1 line

Use environment values to find ruby and flags instead of an argument
------------------------------------------------------------------------
r58653 | eregon | 2017-05-10 23:35:24 +0900 (Wed, 10 May 2017) | 1 line

Use ruby_cmd instead of the RUBY_EXE constant in specs
------------------------------------------------------------------------
r58652 | nobu | 2017-05-10 23:25:03 +0900 (Wed, 10 May 2017) | 1 line

gc.c: check of size in ruby_sized_xrealloc
------------------------------------------------------------------------
r58651 | eregon | 2017-05-10 23:18:23 +0900 (Wed, 10 May 2017) | 1 line

Use the Mutex to know whether we entered the signal handler in Process#kill specs
------------------------------------------------------------------------
r58650 | eregon | 2017-05-10 23:18:10 +0900 (Wed, 10 May 2017) | 1 line

Process.getpgrp and Process.setsid must be available for Process#kill group specs
------------------------------------------------------------------------
r58649 | eregon | 2017-05-10 23:17:58 +0900 (Wed, 10 May 2017) | 1 line

Use #system directly with multiple arguments in Process#kill specs
------------------------------------------------------------------------
r58648 | naruse | 2017-05-10 16:23:06 +0900 (Wed, 10 May 2017) | 1 line

confirm current process equals to gemhome's pid
------------------------------------------------------------------------
r58647 | nobu | 2017-05-10 15:38:30 +0900 (Wed, 10 May 2017) | 4 lines

test_exception.rb: test_machine_stackoverflow_by_trace

* test/ruby/test_exception.rb (test_machine_stackoverflow_by_trace):
  move from test_trace.rb and rename, to be excluded by the default.
------------------------------------------------------------------------
r58646 | nobu | 2017-05-10 09:39:26 +0900 (Wed, 10 May 2017) | 1 line

adjust styles [ci skip]
------------------------------------------------------------------------
r58645 | nobu | 2017-05-10 09:20:02 +0900 (Wed, 10 May 2017) | 1 line

math.c (ruby_lgamma_r): reduce duplicate code
------------------------------------------------------------------------
r58644 | normal | 2017-05-10 04:52:10 +0900 (Wed, 10 May 2017) | 11 lines

test/thread: relax internal implementation check in error message

Queue, SizedQueue, and ConditionVariable internal implementation
should not be tied to using arrays.  Implementation details can
change and I am working on a change to remove the dependency on
arrays (as others may attempt, too) by using ccan/list for the
waiter list.

* test/thread/test_cv.rb (test_dump): remove check for Array
* test/thread/test_queue.rb (test_dump): ditto
  [ruby-core:81001] [Misc #13541]
------------------------------------------------------------------------
r58643 | stomar | 2017-05-10 03:56:22 +0900 (Wed, 10 May 2017) | 7 lines

date_core.c: fix docs for %Z format

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

  Reported by Damon Timm.  Based on a patch by nano.
  [ruby-core:79602] [Bug #13231] [Fix GH-1565]
------------------------------------------------------------------------
r58642 | naruse | 2017-05-10 02:41:10 +0900 (Wed, 10 May 2017) | 1 line

dump stub specifications if nil
------------------------------------------------------------------------
r58641 | nobu | 2017-05-10 02:20:00 +0900 (Wed, 10 May 2017) | 7 lines

parse.y: brace after literal arg

* parse.y (symbol, dsym, parser_set_number_literal, parser_yylex):
  set state to END too not only ENDARG and after a literal, so
  that a left brace after it should be a primary block bound to
  the literal, which causes syntax error.
  [ruby-core:81037] [Bug #13547]
------------------------------------------------------------------------
r58640 | nobu | 2017-05-10 02:12:43 +0900 (Wed, 10 May 2017) | 6 lines

parse.y: do after cmdarg in paren

* parse.y (parser_yylex): set state to ENDARG after a string
  literal, so that `do` after a literal should be `do_block` and
  bound to the outer method, as well as a numeric/symbol literal.
  [ruby-core:72482] [Bug #11873]
------------------------------------------------------------------------
r58639 | svn | 2017-05-10 02:02:08 +0900 (Wed, 10 May 2017) | 1 line

* 2017-05-10
------------------------------------------------------------------------
r58638 | nobu | 2017-05-10 02:02:07 +0900 (Wed, 10 May 2017) | 4 lines

test_syntax.rb: test_brace_after_local_variable

* test/ruby/test_syntax.rb (test_brace_after_local_variable):
  another test using braces.  [Bug #11873]
------------------------------------------------------------------------
r58621 | nobu | 2017-05-09 23:11:46 +0900 (Tue, 09 May 2017) | 4 lines

string.c: fix r58618

* string.c (unicode_normalize_common): aggregation type cannot be
  initialized with dynamic values, in C89.
------------------------------------------------------------------------
r58618 | duerst | 2017-05-09 20:13:45 +0900 (Tue, 09 May 2017) | 6 lines

replace hand-written argument check by call to rb_scan_args in unicode_normalize_common

In string.c, replace hand-written argument count check by call to rb_scan_args.
This allows to use rb_funcallv once, rather than using rb_funcall twice.
Thanks to Hanmac (Hans Mackowiak) for the idea, see
https://bugs.ruby-lang.org/issues/11078#note-7.
------------------------------------------------------------------------
r58617 | duerst | 2017-05-09 19:45:46 +0900 (Tue, 09 May 2017) | 6 lines

add explanations about status of module UnicodeNormalize

In lib/unicode_normalize/normalize.rb, add explanations and clarifications
about the status of the files and the module. [ci skip]
This is in response to discussions at https://github.com/ruby/spec/pull/433
and https://bugs.ruby-lang.org/issues/5481#note-58.
------------------------------------------------------------------------
r58616 | naruse | 2017-05-09 16:47:28 +0900 (Tue, 09 May 2017) | 1 line

Add one more guard to avoid mixing nil into latest_specs
------------------------------------------------------------------------
r58615 | normal | 2017-05-09 15:17:01 +0900 (Tue, 09 May 2017) | 3 lines

fixup r58614 for raspi3 and maybe other systems with odd compile

[ruby-core:81048]
------------------------------------------------------------------------
r58614 | normal | 2017-05-09 14:06:41 +0900 (Tue, 09 May 2017) | 7 lines

rb_execution_context_t: move stack, stack_size and cfp from rb_thread_t

The goal is to reduce rb_context_t and rb_fiber_t size
by removing the need to store the entire rb_thread_t in
there.

[ruby-core:81045] Work-in-progress: soon, we will move more fields here.
------------------------------------------------------------------------
r58613 | nobu | 2017-05-09 11:55:51 +0900 (Tue, 09 May 2017) | 5 lines

Ignore fail on non empty ext and gems [ci skip]

* Makefile.in ({ext,gems}/{distclean,realclean}): ignore fail on
  removal of non empty directories.  these directories should not
  be empty when in-place build.
------------------------------------------------------------------------
r58612 | svn | 2017-05-09 01:00:02 +0900 (Tue, 09 May 2017) | 1 line

* 2017-05-09
------------------------------------------------------------------------
r58611 | kazu | 2017-05-09 01:00:00 +0900 (Tue, 09 May 2017) | 1 line

Add mspec and rubyspec to LEGAL [ci skip]
------------------------------------------------------------------------
r58610 | hsbt | 2017-05-08 22:14:24 +0900 (Mon, 08 May 2017) | 3 lines

Translate missing rdoc comment for opt_send_without_block.

  fix [GH-1608], Patch by @k0kubun
------------------------------------------------------------------------
r58609 | nobu | 2017-05-08 14:31:02 +0900 (Mon, 08 May 2017) | 4 lines

separate constdefs.c and constdefs.h

* ext/socket/depend: separate constdefs.c and constdefs.h so that
  only one process will run when parallel building.
------------------------------------------------------------------------
r58608 | normal | 2017-05-08 10:59:17 +0900 (Mon, 08 May 2017) | 10 lines

reduce rb_mutex_t size from 80 bytes to 72 bytes on 64-bit

We can use existing RVALUE flags to avoid adding a 4-byte
integer to store a boolean flag.  This integer cost us 8 bytes
due to default (lack of) struct packing on x86-64

* thread_sync.c (MUTEX_ALLOW_TRAP): define as FL_USER1
  (struct rb_mutex_struct): remove allow_trap
  (rb_mutex_lock): adjust for flag check
  (rb_mutex_allow_trap): adjust for flag set/unset
------------------------------------------------------------------------
r58607 | svn | 2017-05-08 10:59:13 +0900 (Mon, 08 May 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58606 | normal | 2017-05-08 10:59:12 +0900 (Mon, 08 May 2017) | 5 lines

benchmark/bm_vm2_fiber_switch.rb: check for fiber performance

There are currently no benchmarks for Fiber performance, I
should've committed this years ago when [Feature #10341] was
implemented.
------------------------------------------------------------------------
r58605 | svn | 2017-05-08 09:18:54 +0900 (Mon, 08 May 2017) | 1 line

* 2017-05-08
------------------------------------------------------------------------
r58604 | normal | 2017-05-08 09:18:53 +0900 (Mon, 08 May 2017) | 57 lines

reduce rb_mutex_t size from 160 to 80 bytes on 64-bit

Instead of relying on a native condition variable and mutex for
every Ruby Mutex object, use a doubly linked-list to implement a
waiter queue in the Mutex.  The immediate benefit of this is
reducing the size of every Mutex object, as some projects have
many objects requiring synchronization.

In the future, this technique using a linked-list and on-stack
list node (struct mutex_waiter) should allow us to easily
transition to M:N threading model, as we can avoid the native
thread dependency to implement Mutex.

We already do something similar for autoload in variable.c,
and this was inspired by the Linux kernel wait queue (as
ccan/list is inspired by the Linux kernel linked-list).

Finaly, there are big performance improvements for Mutex
benchmarks, especially in contended cases:

measure target: real

name            |trunk  |built
----------------|------:|------:
loop_whileloop2 |  0.149|  0.148
vm2_mutex*      |  0.893|  0.651
vm_thread_mutex1|  0.809|  0.624
vm_thread_mutex2|  2.608|  0.628
vm_thread_mutex3| 28.227|  0.881

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

name            |built
----------------|------:
loop_whileloop2 |  1.002
vm2_mutex*      |  1.372
vm_thread_mutex1|  1.297
vm_thread_mutex2|  4.149
vm_thread_mutex3| 32.044

Tested on AMD FX-8320 8-core at 3.5GHz

* thread_sync.c (struct mutex_waiter): new on-stack struct
  (struct rb_mutex_struct): remove native lock/cond, use ccan/list
  (rb_mutex_num_waiting): new function for debug_deadlock_check
  (mutex_free): remove native_*_destroy
  (mutex_alloc): initialize waitq, remove native_*_initialize
  (rb_mutex_trylock): remove native_mutex_{lock,unlock}
  (lock_func): remove
  (lock_interrupt): remove
  (rb_mutex_lock): rewrite waiting path to use native_sleep + ccan/list
  (rb_mutex_unlock_th): rewrite to wake up from native_sleep
  using rb_threadptr_interrupt
  (rb_mutex_abandon_all): empty waitq
* thread.c (debug_deadlock_check): update for new struct
  (rb_check_deadlock): ditto
  [ruby-core:80913] [Feature #13517]
------------------------------------------------------------------------
r58603 | nobu | 2017-05-07 23:21:10 +0900 (Sun, 07 May 2017) | 4 lines

relative path as VPATH

* common.mk (ripper.c): use relative path as VPATH instead of
  absolute path of the current working directory.
------------------------------------------------------------------------
r58602 | nobu | 2017-05-07 23:03:52 +0900 (Sun, 07 May 2017) | 1 line

parse.y: export rb_parser_fatal for ripper
------------------------------------------------------------------------
r58601 | nobu | 2017-05-07 22:40:56 +0900 (Sun, 07 May 2017) | 3 lines

stale targets

* common.mk (update-mspec, update-rubyspec): empty stale targets.
------------------------------------------------------------------------
r58600 | nobu | 2017-05-07 22:06:34 +0900 (Sun, 07 May 2017) | 4 lines

extract prereq.status

* tool/make-snapshot (package): extract static config values for
  prereq and override dynamic values at runtime.
------------------------------------------------------------------------
r58599 | eregon | 2017-05-07 21:26:25 +0900 (Sun, 07 May 2017) | 1 line

Update specs to follow newlines added by r58596
------------------------------------------------------------------------
r58598 | eregon | 2017-05-07 21:17:21 +0900 (Sun, 07 May 2017) | 1 line

Rename spec/README to spec/README.md
------------------------------------------------------------------------
r58597 | svn | 2017-05-07 21:05:45 +0900 (Sun, 07 May 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58596 | svn | 2017-05-07 21:05:36 +0900 (Sun, 07 May 2017) | 1 line

* remove trailing spaces, append newline at EOF.
------------------------------------------------------------------------
r58595 | eregon | 2017-05-07 21:04:49 +0900 (Sun, 07 May 2017) | 8 lines

Add in-tree mspec and ruby/spec

* For easier modifications of ruby/spec by MRI developers.
* .gitignore: track changes under spec.
* spec/mspec, spec/rubyspec: add in-tree mspec and ruby/spec.
  These files can therefore be updated like any other file in MRI.
  Instructions are provided in spec/README.
  [Feature #13156] [ruby-core:79246]
------------------------------------------------------------------------
r58594 | eregon | 2017-05-07 21:01:26 +0900 (Sun, 07 May 2017) | 3 lines

make update-rubyspec is no longer needed

* Kept a no-op for compatibility.
------------------------------------------------------------------------
r58593 | eregon | 2017-05-07 21:01:12 +0900 (Sun, 07 May 2017) | 1 line

Update README about ruby/spec
------------------------------------------------------------------------
r58592 | eregon | 2017-05-07 21:00:58 +0900 (Sun, 07 May 2017) | 2 lines

* spec/default.mspec: only require rbconfig if is it not already.
  Useful when running spec/mspec/bin/mspec directly.
------------------------------------------------------------------------
r58591 | normal | 2017-05-07 17:06:02 +0900 (Sun, 07 May 2017) | 17 lines

vm_core.h (rb_thread_t): use 32-bit running_time_us

The current range based current values of:

	TIME_QUANTUM_USEC=100000
	RUBY_THREAD_PRIORITY_MAX=3
	RUBY_THREAD_PRIORITY_MIN=-3

Gives a range of 12500..800000, plenty enough for a 32-bit
integer.  Clamping this also reduces potential implementation
bugs between 32-bit and 64-bit platforms.

I may consider a further reduction to uint16_t in the future
for M:N threading, but some users may want slightly larger
time quantums.

* vm_core.h (rb_thread_t): use 32-bit running_time_us
------------------------------------------------------------------------
r58590 | normal | 2017-05-07 16:38:30 +0900 (Sun, 07 May 2017) | 7 lines

io.c (do_fcntl): update max FD for F_DUPFD_CLOEXEC, too

Somebody may pass 1030 (the value of F_DUPFD_CLOEXEC) to IO#fcntl
because they copied code from somewhere else.  Ensure we know
about FDs created that way.

* io.c (do_fcntl): update max FD for F_DUPFD_CLOEXEC, too
------------------------------------------------------------------------
r58589 | stomar | 2017-05-07 16:18:10 +0900 (Sun, 07 May 2017) | 1 line

NEWS: Integer#{round,floor,ceil,truncate} [Bug #13420]
------------------------------------------------------------------------
r58588 | svn | 2017-05-07 13:26:38 +0900 (Sun, 07 May 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58587 | normal | 2017-05-07 13:26:37 +0900 (Sun, 07 May 2017) | 10 lines

variable.c: cleanup waitq upon thread death

* variable.c (autoload_reset): use idempotent list_del_init
  (autoload_sleep): moved code from rb_autoload_load
  (autoload_sleep_done): cleanup for use with rb_ensure
  (rb_autoload_load): ensure list delete happens in case the
  thread dies during sleep
* test/ruby/bug-13526.rb: new script for separate execution
* test/ruby/test_autoload.rb (test_bug_13526): new test
  [ruby-core:81016] [Bug #13526]
------------------------------------------------------------------------
r58586 | stomar | 2017-05-07 04:58:12 +0900 (Sun, 07 May 2017) | 12 lines

make Integer#{round,floor,ceil,truncate} always return integer

* numeric.c (int_round): return integer (self) instead of float
  for Integer#round with positive ndigits argument, because
  conversion to float introduces errors for large integers.
* numeric.c (int_floor): ditto for Integer#floor.
* numeric.c (int_ceil): ditto for Integer#ceil.
* numeric.c (int_truncate): ditto for Integer#truncate.

* test/ruby/test_integer.rb: adjust test cases and add some more.

[ruby-core:80645] [Bug #13420]
------------------------------------------------------------------------
r58585 | svn | 2017-05-07 00:14:59 +0900 (Sun, 07 May 2017) | 1 line

* 2017-05-07
------------------------------------------------------------------------
r58584 | nobu | 2017-05-07 00:14:58 +0900 (Sun, 07 May 2017) | 6 lines

ripper/lexer.rb: nested indented heredoc

* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): insert
  stripped leading spaces as `on_ignored_sp` elements, so that the
  original source can be reconsructed.
  [ruby-core:80977] [Bug #13536]
------------------------------------------------------------------------
r58583 | nobu | 2017-05-06 23:12:30 +0900 (Sat, 06 May 2017) | 4 lines

fix up r58573

* common.mk: make the directory for extension shared library with
  the timestamp directory.
------------------------------------------------------------------------
r58582 | stomar | 2017-05-06 16:28:40 +0900 (Sat, 06 May 2017) | 3 lines

math.c: improve docs for Math.sqrt

* math.c: [DOC] mention Integer.sqrt in docs for Math.sqrt.
------------------------------------------------------------------------
r58581 | stomar | 2017-05-06 16:18:49 +0900 (Sat, 06 May 2017) | 4 lines

numeric.c: remove mention of Bignum from docs

* numeric.c: [DOC] remove mention of Bignum from Integer#{+,-,*,/},
  the return type does not depend on magnitude anymore.
------------------------------------------------------------------------
r58580 | stomar | 2017-05-06 16:17:41 +0900 (Sat, 06 May 2017) | 9 lines

numeric.c: revise docs

* numeric.c: [DOC] revise docs for Numeric, Integer, Float:
  * nodoc Numeric#singleton_method_added
  * mention that result for Integer#** might also be Complex
  * add / simplify / fix some examples
  * mention aliases
  * fix rdoc formatting, typos, grammar
  * clarifications and other improvements
------------------------------------------------------------------------
r58579 | duerst | 2017-05-06 13:42:58 +0900 (Sat, 06 May 2017) | 2 lines

delete enc/prelude.rb, because no longer needed

------------------------------------------------------------------------
r58578 | duerst | 2017-05-06 12:12:26 +0900 (Sat, 06 May 2017) | 3 lines

delete lib/unicode_normalize.rb, because no longer needed

(all content has been moved to string.c)
------------------------------------------------------------------------
r58577 | duerst | 2017-05-06 11:54:02 +0900 (Sat, 06 May 2017) | 5 lines

remove enc/prelude.rb from list of prelude files in common.mk

(This is a retry of r58559, it should work now that rubyspec does
no longer check for unicode_normalized to be required. See also
https://github.com/ruby/spec/commit/41176ead68b14011658c8abd0ebd67df2ae632fb.)
------------------------------------------------------------------------
r58576 | nobu | 2017-05-06 10:33:04 +0900 (Sat, 06 May 2017) | 5 lines

share `@@accept_charset`

* lib/cgi/{core,util}.rb: include CGI::Util not only extending, to
  share `@@accept_charset` class variable, so that it is always
  accessible.  [ruby-core:80986] [Bug #13539]
------------------------------------------------------------------------
r58575 | nobu | 2017-05-06 10:01:52 +0900 (Sat, 06 May 2017) | 6 lines

string.c: fix types

* string.c (id_normalize, id_normalized_p): fix types, IDs should
  be ID.

* string.c (unicode_normalize_common): ditto.
------------------------------------------------------------------------
r58574 | svn | 2017-05-06 09:54:23 +0900 (Sat, 06 May 2017) | 1 line

* 2017-05-06
------------------------------------------------------------------------
r58573 | nobu | 2017-05-06 09:54:22 +0900 (Sat, 06 May 2017) | 4 lines

timestamp for extensions

* common.mk: use the same timestamp file for architecture specific
  directory as the file used in Makefiles under ext.
------------------------------------------------------------------------
r58572 | svn | 2017-05-05 01:47:18 +0900 (Fri, 05 May 2017) | 1 line

* 2017-05-05
------------------------------------------------------------------------
r58571 | normal | 2017-05-05 01:47:17 +0900 (Fri, 05 May 2017) | 10 lines

benchmark/bm_vm_thread_pass_flood.rb: add comment

I was about to write off this benchmark while working on GVL
improvements on multi-core systems.

However I noticed it exposes a weakness in my work-in-progress
code when I tested on an old single CPU system.  Further testing
reveals setting CPU affinity ("schedtool -a 0x1" on Linux) on a
modern multi-core system is enough to reproduce the problem
exposed by this benchmark.
------------------------------------------------------------------------
r58570 | mame | 2017-05-04 22:42:47 +0900 (Thu, 04 May 2017) | 5 lines

time.c: avoid taking a pointer to a member of packed struct

clang 4.0.0 emitted a warning: "taking address of packed member
'subsecx' of class or structure 'vtm' may result in an unaligned
pointer value [-Waddress-of-packed-member]".
------------------------------------------------------------------------
r58569 | stomar | 2017-05-04 22:19:43 +0900 (Thu, 04 May 2017) | 1 line

string.c: [DOC] improve docs for String.new
------------------------------------------------------------------------
r58568 | ktsj | 2017-05-04 19:17:12 +0900 (Thu, 04 May 2017) | 3 lines

internal.h (rb_gc_resurrect): remove stale declaration

rb_gc_resurrect is no longer defined since r47444.
------------------------------------------------------------------------
r58567 | ktsj | 2017-05-04 17:59:01 +0900 (Thu, 04 May 2017) | 1 line

string.c: [DOC] Properly refer to keyword argument by its name
------------------------------------------------------------------------
r58566 | ktsj | 2017-05-04 17:58:59 +0900 (Thu, 04 May 2017) | 9 lines

dir.c: [DOC] Properly refer to keyword argument by its name [Fix GH-1543]

enc is the name of the variable used in the example, not the name of the
keyword argument (encoding).

The documentation used to wrongly suggest that the keyword argument name was
"enc" which could cause people try try to call `Dir.open("thing", enc: "utf-8")`

Author: Olivier Lacan <hi@olivierlacan.com>
------------------------------------------------------------------------
r58565 | normal | 2017-05-04 17:55:54 +0900 (Thu, 04 May 2017) | 15 lines

benchmark/bm_vm1_gc_wb_*.rb: fix GC.start args for invalid keyword

"lazy_sweep" does not appear to have ever been a valid kwarg
for GC.start, however the opposite of "lazy_sweep" appears
to be "immediate_sweep".  So use immediate_sweep, and flip
the boolean value of each arg.

I guess this only started failing with r56981 in Dec 2016
("class.c: missing unknown_keyword_error",
 commit e3f0cca2f26ba44c810ac980cdff7dda129ae533)

* benchmark/bm_vm1_gc_wb_ary.rb: "lazy_sweep: false" => "immediate_sweep: true"
* benchmark/bm_vm1_gc_wb_ary_promoted.rb: ditto
* benchmark/bm_vm1_gc_wb_obj.rb: ditto
* benchmark/bm_vm1_gc_wb_obj_promoted.rb: ditto
------------------------------------------------------------------------
r58564 | ktsj | 2017-05-04 17:13:17 +0900 (Thu, 04 May 2017) | 1 line

gems/bundled_gems: Update to power_assert 1.0.2
------------------------------------------------------------------------
r58563 | normal | 2017-05-04 16:18:33 +0900 (Thu, 04 May 2017) | 5 lines

.gitignore: ignore benchmark/bm_require.data

Followup-to r58562 in SVN

* .gitignore: ignore benchmark/bm_require.data
------------------------------------------------------------------------
r58562 | normal | 2017-05-04 16:08:39 +0900 (Thu, 04 May 2017) | 2 lines

benchmark: ignore bm_require.data/

------------------------------------------------------------------------
r58561 | nobu | 2017-05-04 15:54:11 +0900 (Thu, 04 May 2017) | 5 lines

parse.y: make shared string modifiable

* parse.y (dedent_string): ensure that the string is modifiable,
  not to set the length of shared string.
  [ruby-core:80987] [Bug #13540]
------------------------------------------------------------------------
r58560 | duerst | 2017-05-04 14:07:20 +0900 (Thu, 04 May 2017) | 1 line

revert 58559, because it fails on travis (rubyspec problem)
------------------------------------------------------------------------
r58559 | duerst | 2017-05-04 13:53:33 +0900 (Thu, 04 May 2017) | 1 line

remove enc/prelude.rb from list of prelude files in common.mk
------------------------------------------------------------------------
r58558 | duerst | 2017-05-04 11:16:27 +0900 (Thu, 04 May 2017) | 6 lines

refactor common parts of unicode normalization functions into unicode_normalize_common

In string.c, refactor the common parts (requiring of unicode_normalize/normalize.rb,
check of number of arguments) of the unicode normalization functions
(rb_str_unicode_normalize, rb_str_unicode_normalize_bang, rb_str_unicode_normalized_p)
into the new function unicode_normalize_common.
------------------------------------------------------------------------
r58557 | svn | 2017-05-04 11:13:12 +0900 (Thu, 04 May 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58556 | normal | 2017-05-04 11:13:11 +0900 (Thu, 04 May 2017) | 8 lines

benchmark: new single-threaded read/write benchmark with pipe

This is currently for testing GVL performance in the uncontended
case: IO#write and IO#read unconditionally release GVL for
blocking I/O with pipe.

It will also be interesting to see how this changes if we switch
to M:N threading model.
------------------------------------------------------------------------
r58555 | duerst | 2017-05-04 11:00:19 +0900 (Thu, 04 May 2017) | 9 lines

move definition of String#unicode_normalized? to C to make sure it is documented

* lib/unicode_normalize.rb: Remove definition of String#unicode_normalized?
  (including documentation). Leave a comment explaining that the file is now empty.
* string.c: Define String#unicode_normalized? in rb_str_unicode_normalized_p in C,
  (including documentation)
* lib/unicode_normalize/normalize.rb: Remove (re)definition of
  String#unicode_normalized? to avoid warnings (when $VERBOSE==true) and
  problems when String is frozen
------------------------------------------------------------------------
r58554 | svn | 2017-05-04 10:36:53 +0900 (Thu, 04 May 2017) | 1 line

* 2017-05-04
------------------------------------------------------------------------
r58553 | duerst | 2017-05-04 10:36:52 +0900 (Thu, 04 May 2017) | 9 lines

move definition of String#unicode_normalize! to C to make sure it is documented

* lib/unicode_normalize.rb: Remove definition of String#unicode_normalize!
  (including documentation)
* string.c: Define String#unicode_normalize! in rb_str_unicode_normalize_bang in C,
  (including documentation)
* lib/unicode_normalize/normalize.rb: Remove (re)definition of
  String#unicode_normalize! to avoid warnings (when $VERBOSE==true) and
  problems when String is frozen
------------------------------------------------------------------------
r58552 | kou | 2017-05-03 21:25:17 +0900 (Wed, 03 May 2017) | 8 lines

rss: Accept empty text element as valid element

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

Reported by stefano frabetti. Thanks!!!

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

------------------------------------------------------------------------
r58551 | svn | 2017-05-03 21:18:37 +0900 (Wed, 03 May 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r58550 | duerst | 2017-05-03 21:18:37 +0900 (Wed, 03 May 2017) | 9 lines

move definition of String#unicode_normalize to C to make sure it is documented

* lib/unicode_normalize.rb: Remove definition of String#unicode_normalize
  (including documentation)
* string.c: Define String#unicode_normalize in rb_str_unicode_normalize in C,
  (including documentation)
* lib/unicode_normalize/normalize.rb: Remove (re)definition of
  String#unicode_normalize to avoid warnings (when $VERBOSE==true) and
  problems when String is frozen
------------------------------------------------------------------------
r58549 | shugo | 2017-05-03 20:32:22 +0900 (Wed, 03 May 2017) | 3 lines

net/imap: handle timeouts

Patch by Pavel Rosick?.  [Feature #13379] [ruby-core:80440]
------------------------------------------------------------------------
r58548 | kazu | 2017-05-03 11:02:50 +0900 (Wed, 03 May 2017) | 3 lines

Use `dd` instead of `head -c`

[Bug #13538] [ruby-dev:50106]
------------------------------------------------------------------------
r58547 | kazu | 2017-05-03 10:44:52 +0900 (Wed, 03 May 2017) | 1 line

Fix NoMethodError [ci skip]
------------------------------------------------------------------------
r58546 | svn | 2017-05-03 02:48:10 +0900 (Wed, 03 May 2017) | 1 line

* 2017-05-03
------------------------------------------------------------------------
r58545 | nobu | 2017-05-03 02:48:10 +0900 (Wed, 03 May 2017) | 5 lines

ripper/lexer.rb: nested indented heredoc

* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): fix for
  nested indedented here documents, where `Elem`s are nested too.
  [ruby-core:80977] [Bug #13536]
------------------------------------------------------------------------
r58544 | nobu | 2017-05-02 22:16:04 +0900 (Tue, 02 May 2017) | 4 lines

.travis.yml: tweek after-update

* .travis.yml (before_script): get rid of making miniruby at
  after-update.
------------------------------------------------------------------------
r58543 | nobu | 2017-05-02 21:45:07 +0900 (Tue, 02 May 2017) | 1 line

mkconfig.rb: remove cross_compiling
------------------------------------------------------------------------
r58542 | nobu | 2017-05-02 21:45:04 +0900 (Tue, 02 May 2017) | 4 lines

common.mk: BOOTSTRAPRUBY for enc.mk

* common.mk ($(ENC_MK)): use $(BOOTSTRAPRUBY) as well as $(RBCONFIG),
  instead of $(MINIRUBY).
------------------------------------------------------------------------
r58541 | kazu | 2017-05-02 20:26:28 +0900 (Tue, 02 May 2017) | 1 line

Use `\A` and `\z` instead of `^` and `$` [ci skip]
------------------------------------------------------------------------
r58540 | nobu | 2017-05-02 16:35:20 +0900 (Tue, 02 May 2017) | 4 lines

internal.h: rb_raise_static

* internal.h (rb_raise_static): raise with a static message string
  literal.
------------------------------------------------------------------------
r58539 | duerst | 2017-05-02 14:46:31 +0900 (Tue, 02 May 2017) | 6 lines

remove unnecessary conditions in lib/unicode_normalize.rb

Because the methods in lib/unicode_normalize.rb are overwritten
by those in lib/unicode_normalize/normalize.rb as soon as one
of them is called, the check for whether UnicodeNormalized is
defined or not is no longer necessary.
------------------------------------------------------------------------
r58538 | duerst | 2017-05-02 14:34:25 +0900 (Tue, 02 May 2017) | 5 lines

rework definition of String#unicode_normalize! and #unicode_normalized?

simplify String#unicode_normalize! and #unicode_normalized?
in lib/unicode_normalize.rb by redefining them
in lib/unicode_normalize/normalize.rb
------------------------------------------------------------------------
r58537 | duerst | 2017-05-02 14:15:04 +0900 (Tue, 02 May 2017) | 4 lines

rework definition of String#unicode_normalize

simplify String#unicode_normalize in lib/unicode_normalize.rb
by redefining it in lib/unicode_normalize/normalize.rb
------------------------------------------------------------------------
r58536 | svn | 2017-05-02 11:40:47 +0900 (Tue, 02 May 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58535 | normal | 2017-05-02 11:40:46 +0900 (Tue, 02 May 2017) | 11 lines

more benchmarks for SizedQueue and ConditionVariable

I'm working on patches to improve everything in thread_sync.c,
add these to track progress.

* benchmark/bm_vm_thread_sized_queue.rb: add description
* benchmark/bm_vm_thread_condvar1.rb: new benchmark
* benchmark/bm_vm_thread_condvar2.rb: ditto
* benchmark/bm_vm_thread_sized_queue2.rb: ditto
* benchmark/bm_vm_thread_sized_queue3.rb: ditto
* benchmark/bm_vm_thread_sized_queue4.rb: ditto
------------------------------------------------------------------------
r58534 | kosaki | 2017-05-02 11:19:32 +0900 (Tue, 02 May 2017) | 4 lines

nogvl_wait_for_single_fd must wait as its name

poll(fds, n, 0) mean no timeout and immediately return. If you want to
wait something, you need to use -1 instead.
------------------------------------------------------------------------
r58533 | svn | 2017-05-02 00:17:33 +0900 (Tue, 02 May 2017) | 1 line

* 2017-05-02
------------------------------------------------------------------------
r58532 | nobu | 2017-05-02 00:17:32 +0900 (Tue, 02 May 2017) | 4 lines

thread.c: suppress warnings [ci skip]

* thread.c (fill_thread_id_string): cast to void pointer to
  suppress warnings when pthread_t is not pointer type.
------------------------------------------------------------------------
r58531 | svn | 2017-05-01 20:40:47 +0900 (Mon, 01 May 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r58530 | hsbt | 2017-05-01 20:40:46 +0900 (Mon, 01 May 2017) | 11 lines

Merge rubygems-2.6.12 from rubygems/rubygems.

  * Details of changes:
    https://github.com/rubygems/rubygems/blob/009080040279282d7b8ddd09acab41719cb4ba00/History.txt#L3

  * I kept ko1's commmit related thread issue. It's not merged 2.6 branch on rubygems.
    https://github.com/ruby/ruby/commit/1721dfa0ea963a85d4ac1e3415eb18ef427d4d36

  * I removed test_realworld_default_gem from rubygems-2.6.12. It fails on
    Ruby trunk. Because it's differences of test suite and environment.
    https://github.com/rubygems/rubygems/pull/1899
------------------------------------------------------------------------
r58529 | hsbt | 2017-05-01 19:20:35 +0900 (Mon, 01 May 2017) | 4 lines

Merge gemspec from ruby/webrick.

  * Bump version to 1.4.0.beta1. Because https://rubygems.org/gems/webrick
    is already reserved old version of webrick.
------------------------------------------------------------------------
r58528 | nobu | 2017-05-01 16:50:53 +0900 (Mon, 01 May 2017) | 5 lines

object.c: Kernel#yield_self

* object.c (rb_obj_yield_self): new method which yields the
  receiver and returns the result.
  [ruby-core:46320] [Feature #6721]
------------------------------------------------------------------------
r58527 | kazu | 2017-05-01 11:42:34 +0900 (Mon, 01 May 2017) | 4 lines

Fix typo in documentation [ci skip]

[Fix GH-1599]
Author:    Liam Sean Brady <liamseanbrady@gmail.com>
------------------------------------------------------------------------
r58526 | nobu | 2017-05-01 11:01:38 +0900 (Mon, 01 May 2017) | 5 lines

zlib.c: no buf_filled in zstream

* ext/zlib/zlib.c (zstream): manage capacity and size of `buf`
  instead of size and separated member `buf_filled`.  reported by
  Christian Jalio (jalio) at https://hackerone.com/reports/211958
------------------------------------------------------------------------
r58525 | nobu | 2017-05-01 09:35:02 +0900 (Mon, 01 May 2017) | 4 lines

zlib.c: zstream_buffer_ungetbyte

* ext/zlib/zlib.c (zstream_buffer_ungetbyte): simplify by using
  zstream_buffer_ungets().
------------------------------------------------------------------------
r58524 | nobu | 2017-05-01 09:35:00 +0900 (Mon, 01 May 2017) | 5 lines

zlib.c: zstream_expand_buffer_non_stream

* ext/zlib/zlib.c (zstream_expand_buffer_non_stream): rename from
  zstream_expand_buffer_without_gvl() and replace duplicate code
  in zstream_expand_buffer().
------------------------------------------------------------------------
r58523 | nobu | 2017-05-01 09:32:56 +0900 (Mon, 01 May 2017) | 7 lines

rational.c: canonicalization case

* rational.c (float_numerator, float_denominator): fix for
  canonicalization case where `Float#to_r` could return an Integer
  not a Rational.  although mathn.rb has been removed in the
  trunk, fix for the backport purpose.
  [ruby-core:80942] [Bug #13528]
------------------------------------------------------------------------
r58521 | svn | 2017-05-01 06:18:31 +0900 (Mon, 01 May 2017) | 1 line

* 2017-05-01
------------------------------------------------------------------------
r58520 | usa | 2017-05-01 06:18:31 +0900 (Mon, 01 May 2017) | 4 lines

setup.mak have to handle `GIT` and `HAVE_GIT`

* win32/setup.mak: seems to be forgotten to commit at r58295.

------------------------------------------------------------------------
r58514 | usa | 2017-04-30 22:34:18 +0900 (Sun, 30 Apr 2017) | 4 lines

Typo

* tool/generate-backport-changelog.rb: fixed a typo.

------------------------------------------------------------------------
r58512 | nobu | 2017-04-30 19:53:42 +0900 (Sun, 30 Apr 2017) | 4 lines

git-refresh: fix for Solaris

* tool/git-refresh: expand for each words.
  [ruby-dev:50102] [Bug #13522]
------------------------------------------------------------------------
r58511 | normal | 2017-04-30 18:06:39 +0900 (Sun, 30 Apr 2017) | 3 lines

thread_sync.c: document SizedQueue#clear correctly [ci skip]

* thread_sync.c (rb_szqueue_clear): fix class name in RDoc
------------------------------------------------------------------------
r58510 | svn | 2017-04-30 16:24:37 +0900 (Sun, 30 Apr 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58509 | normal | 2017-04-30 16:24:36 +0900 (Sun, 30 Apr 2017) | 4 lines

new benchmark for SizedQueue

The performance of SizedQueue is a bit more complex than
regular Queue, so it deserves a separate benchmark.
------------------------------------------------------------------------
r58508 | svn | 2017-04-30 12:52:07 +0900 (Sun, 30 Apr 2017) | 1 line

* 2017-04-30
------------------------------------------------------------------------
r58507 | nobu | 2017-04-30 12:52:06 +0900 (Sun, 30 Apr 2017) | 5 lines

git-refresh: fix for Solaris

* tool/git-refresh: unset variable `branch` if it is null, to get
  rid of substitutions which are not supported old Solaris.
  [ruby-dev:50102] [Bug #13522]
------------------------------------------------------------------------
r58506 | normal | 2017-04-29 19:50:59 +0900 (Sat, 29 Apr 2017) | 8 lines

load.c: remove a redundant rb_str_freeze call

rb_file_expand_path_fast already performs the buffer shrinking
rb_str_freeze does (via expand_path macro in file.c); the
result of rb_fstring is always frozen, and that rb_fstring
call is the last use of `expanded_path` in its scope.

load.c (rb_construct_expanded_load_path): remove rb_str_freeze
------------------------------------------------------------------------
r58505 | nobu | 2017-04-29 19:27:46 +0900 (Sat, 29 Apr 2017) | 4 lines

proc.c: recursion loop

* proc.c (rb_block_min_max_arity, rb_method_entry_min_max_arity):
  turn loop by recursion into goto.
------------------------------------------------------------------------
r58504 | svn | 2017-04-29 11:58:54 +0900 (Sat, 29 Apr 2017) | 1 line

* 2017-04-29
------------------------------------------------------------------------
r58503 | nobu | 2017-04-29 11:58:53 +0900 (Sat, 29 Apr 2017) | 6 lines

node.h: sign-extend

* node.h (nd_line): should sign-extend.  shifting `VALUE` extends
  with zero bits if `sizeof(VALUE)` equals to `sizeof(int)`.  the
  zero bits are truncated if `sizeof(VALUE)` is bigger enough.
  [ruby-core:80920] [Bug #13523]
------------------------------------------------------------------------
r58502 | hsbt | 2017-04-28 21:14:56 +0900 (Fri, 28 Apr 2017) | 5 lines

Bump version to gdbm-2.0.0.beta1

  * Merge from ruby/gdbm.
  * gdbm gem is already registered in rubygems.org. I skip shipped
    version of 0.x and 1.x. Therefore We need to use 2.x.
------------------------------------------------------------------------
r58501 | nobu | 2017-04-28 20:42:58 +0900 (Fri, 28 Apr 2017) | 1 line

sprintf.c: remove unused variable
------------------------------------------------------------------------
r58500 | nobu | 2017-04-28 18:50:43 +0900 (Fri, 28 Apr 2017) | 1 line

parse.y: set_line_body is not used in ripper
------------------------------------------------------------------------
r58499 | nobu | 2017-04-28 17:06:33 +0900 (Fri, 28 Apr 2017) | 4 lines

parse.y: fix line in rescue

* parse.y (set_line_body, primary): fix line number of bodystmt as
  the beginning of the block.  [ruby-core:79388] [Bug #13181]
------------------------------------------------------------------------
r58498 | nobu | 2017-04-28 14:08:44 +0900 (Fri, 28 Apr 2017) | 4 lines

sprintf.c: ruby_ultoa

* sprintf.c (ruby_ultoa): prefixed to get rid of conflict with
  a MSVC library function.
------------------------------------------------------------------------
r58497 | nobu | 2017-04-28 11:10:51 +0900 (Fri, 28 Apr 2017) | 7 lines

sprintf.c: format by utility functions

* sprintf.c (rb_str_format, fmt_setup): format by utility
  functions in vsnprintf.c instead of `snprintf`.

* sprintf.c (rb_str_format): format and append by `rb_str_catf`
  instead of formatting by `snprintf` and then copy.
------------------------------------------------------------------------
r58496 | svn | 2017-04-28 11:05:55 +0900 (Fri, 28 Apr 2017) | 1 line

* 2017-04-28
------------------------------------------------------------------------
r58495 | nobu | 2017-04-28 11:05:54 +0900 (Fri, 28 Apr 2017) | 4 lines

sprintf.c: fix one-off bug

* sprintf.c (rb_str_format): `CHECK` just before `FILL_`, but
  after another `PUSH`.  fix one-off bug.
------------------------------------------------------------------------
r58494 | nobu | 2017-04-27 21:30:55 +0900 (Thu, 27 Apr 2017) | 6 lines

fix ripper prereq

* common.mk (ext/ripper/ripper.c): fix VPATH when out-of-place
  build, and id.h was created in the build directory too.  it has
  to include the build directory, i.e., the current directory
  before `cd`.
------------------------------------------------------------------------
r58493 | eregon | 2017-04-27 21:07:43 +0900 (Thu, 27 Apr 2017) | 6 lines

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

* load.c: send as a single string.
* error.c: expose the string formatted by rb_warning as rb_warning_string().
* test/ruby/test_exception.rb: update tests.
  [ruby-core:80850] [Bug #13505]
------------------------------------------------------------------------
r58492 | shyouhei | 2017-04-27 13:21:04 +0900 (Thu, 27 Apr 2017) | 37 lines

refactor newhash (revision 58463 another try) [fix GH-1600]

	* st.c (rb_hash_bulk_insert): new API to bulk insert entries
	  into a hash. Given arguments are first inserted into the
	  table at once, then reindexed. This is faster than inserting
	  things using rb_hash_aset() one by one.

	  This arrangement (rb_ prefixed function placed in st.c) is
	  unavoidable because it both touches table internal and write
	  barrier at once.

	* internal.h: delcare the new function.

	* hash.c (rb_hash_s_create): use the new function.

	* vm.c (core_hash_merge): ditto.

	* insns.def (newhash): ditto.

	* test/ruby/test_hash.rb: more coverage on hash creation.

	* test/ruby/test_literal.rb: ditto.

-----------------------------------------------------------
benchmark results:
minimum results in each 7 measurements.
Execution time (sec)
name    before  after
loop_whileloop2  0.136  0.137
vm2_bighash*     1.249  0.623

Speedup ratio: compare with the result of `before' (greater is better)
name    after
loop_whileloop2 0.996
vm2_bighash*    2.004


------------------------------------------------------------------------
r58491 | normal | 2017-04-27 12:16:39 +0900 (Thu, 27 Apr 2017) | 7 lines

load.c: make fstrings from C strings sooner

The underlying string objects will become fstrings anyways,
so create the fstring directly from the C string to reduce
intermediate garbage.

* load.c (rb_provide, rb_provide): create fstring
------------------------------------------------------------------------
r58490 | nobu | 2017-04-27 05:13:07 +0900 (Thu, 27 Apr 2017) | 5 lines

error.c: send as a single string

* error.c (rb_warn_m): send the arguments as a single string
  concatenated with a newline, so it can be filtered easily.
  [ruby-core:80875] [Feature #12944]
------------------------------------------------------------------------
r58489 | svn | 2017-04-27 05:09:35 +0900 (Thu, 27 Apr 2017) | 1 line

* 2017-04-27
------------------------------------------------------------------------
r58488 | stomar | 2017-04-27 05:09:34 +0900 (Thu, 27 Apr 2017) | 5 lines

error.c: improve docs

* error.c: [DOC] fix rdoc formatting (make sure `Warning.warn' is
  displayed verbatim; rdoc would render it as a link named `#warn'),
  use capitalized "Ruby", fix a typo.
------------------------------------------------------------------------
r58487 | nobu | 2017-04-26 17:11:32 +0900 (Wed, 26 Apr 2017) | 5 lines

error.c: splat warn arguments

* error.c (rb_warn_m): print array arguments with splatting.
  it is often used with `caller`.
  [ruby-core:80849] [Feature #12944]
------------------------------------------------------------------------
r58486 | nobu | 2017-04-26 09:30:05 +0900 (Wed, 26 Apr 2017) | 1 line

range.c: remove no longer used variable
------------------------------------------------------------------------
r58485 | normal | 2017-04-26 05:20:08 +0900 (Wed, 26 Apr 2017) | 1 line

thread_sync.c (rb_mutex_lock): spelling fix [ci skip]
------------------------------------------------------------------------
r58484 | eregon | 2017-04-26 04:34:07 +0900 (Wed, 26 Apr 2017) | 3 lines

Use require to load rbconfig in default.mspec

* Otherwise it would be loaded twice.
------------------------------------------------------------------------
r58483 | naruse | 2017-04-26 04:13:26 +0900 (Wed, 26 Apr 2017) | 1 line

suppress_warning
------------------------------------------------------------------------
r58482 | ko1 | 2017-04-26 02:50:34 +0900 (Wed, 26 Apr 2017) | 7 lines

add timeout.

* test/ruby/test_trace.rb (test_trace_stackoverflow): sometimes this test
  was stopped forever and killed by test process forcibly. However, this
  test only checks if this code cause some critical failure such as SEGV.
  So that we can add timeout for this code.

------------------------------------------------------------------------
r58481 | svn | 2017-04-26 02:24:07 +0900 (Wed, 26 Apr 2017) | 1 line

* 2017-04-26
------------------------------------------------------------------------
r58480 | ko1 | 2017-04-26 02:24:06 +0900 (Wed, 26 Apr 2017) | 1 line

revert r58478 and r58479 because they do not support not in-place build
------------------------------------------------------------------------
r58479 | eregon | 2017-04-25 21:45:36 +0900 (Tue, 25 Apr 2017) | 3 lines

Use require_relative to load rbconfig in default.mspec

* Otherwise it would load it twice.
------------------------------------------------------------------------
r58478 | eregon | 2017-04-25 21:45:25 +0900 (Tue, 25 Apr 2017) | 3 lines

No need to pass the config file to mspec as mspec finds it itself

* It would also #load (because .mspec cannot be #require'd) it twice.
------------------------------------------------------------------------
r58477 | eregon | 2017-04-25 21:45:14 +0900 (Tue, 25 Apr 2017) | 1 line

Remove useless else which produced a warning
------------------------------------------------------------------------
r58476 | eregon | 2017-04-25 20:42:43 +0900 (Tue, 25 Apr 2017) | 6 lines

no longer rescue exceptions of #<=> when initializing a Range

* range.c (range_init): no longer hide the user exception
  with a ArgumentError, just let the user exception go through.
* test/ruby/test_range.rb (test_new): add tests.
  [Feature #7688]
------------------------------------------------------------------------
r58475 | eregon | 2017-04-25 20:42:31 +0900 (Tue, 25 Apr 2017) | 5 lines

no longer rescue exceptions of #coerce in Integer#step

* numeric.c (num_step_negative_p): no more error hiding.
* test/ruby/test_float.rb, test/ruby/test_numeric.rb:
  follow the change. [Feature #7688]
------------------------------------------------------------------------
r58474 | eregon | 2017-04-25 20:42:20 +0900 (Tue, 25 Apr 2017) | 5 lines

no longer rescue exceptions in numeric comparison operations

* numeric.c (do_coerce): no more error hiding.
* test/ruby/test_numeric.rb: follow the change.
  [Feature #7688]
------------------------------------------------------------------------
r58473 | hsbt | 2017-04-25 18:23:04 +0900 (Tue, 25 Apr 2017) | 6 lines

Import gemspec
Import gemspec and test file from ruby/webrick.

  * webrick.gemspec: Update files and dependency for standalone gem.
  * test/webrick/utils.rb: Added explicitly loading of EnvUtil for
    test suite without ruby core test suite.
------------------------------------------------------------------------
r58472 | eregon | 2017-04-25 18:10:46 +0900 (Tue, 25 Apr 2017) | 4 lines

Document the Warning module and warn method

* error.c (Warning): add documentation. [Feature #13504]
  Author: Jeremy Evans <code@jeremyevans.net>
------------------------------------------------------------------------
r58471 | nobu | 2017-04-25 17:17:24 +0900 (Tue, 25 Apr 2017) | 4 lines

load.c: backtrace of circular require

* load.c (load_lock): print backtrace of circular require via
  `Warning.warn` [ruby-core:80850] [Bug #13505]
------------------------------------------------------------------------
r58470 | hsbt | 2017-04-25 16:55:56 +0900 (Tue, 25 Apr 2017) | 5 lines

Import gemspec and test file changes from ruby/gdbm.

  * gdbm.gemspec: Update basic configuraiton for standalone gdbm gem.
  * test/gdbm/test_gdbm.rb: In standalone environment, It needs to
    explicit loading of EnvUtil module for test suite.
------------------------------------------------------------------------
r58469 | svn | 2017-04-25 15:51:35 +0900 (Tue, 25 Apr 2017) | 1 line

* 2017-04-25
------------------------------------------------------------------------
r58468 | shyouhei | 2017-04-25 15:51:34 +0900 (Tue, 25 Apr 2017) | 4 lines

fix macro expansion bug

This previous "key" macro argument accidentally replaced `(ptr)->key` part. 

------------------------------------------------------------------------
r58467 | nobu | 2017-04-24 20:52:14 +0900 (Mon, 24 Apr 2017) | 1 line

tool/git-refresh: fix branch operations
------------------------------------------------------------------------
r58466 | nobu | 2017-04-24 15:17:55 +0900 (Mon, 24 Apr 2017) | 5 lines

parse.y: args tail at error

* parse.y (new_args_tail_gen): abandon parsing arguments after
  error.  reported by ilsani Martino Sani (ilsani) at
  https://hackerone.com/reports/221201
------------------------------------------------------------------------
r58465 | nobu | 2017-04-24 15:17:54 +0900 (Mon, 24 Apr 2017) | 6 lines

parse.y: rb_parser_fatal

* parse.y (rb_parser_fatal): abort compilation on internal parser
  error.  rb_bug() is generic use but not useful for debugging the
  parser.  this function dumps internal states, and continues with
  enabling yydebug output to stderr for the parser stack dump.
------------------------------------------------------------------------
r58464 | nobu | 2017-04-24 13:20:02 +0900 (Mon, 24 Apr 2017) | 1 line

Get rid of unnecessary GCC extension
------------------------------------------------------------------------
r58463 | shyouhei | 2017-04-24 10:40:51 +0900 (Mon, 24 Apr 2017) | 5 lines

revert newhash refactoring

We need to fix GC bug before merging this.  Revert revisions
58452, 58435, 58434, 58428, 58427 in this order.

------------------------------------------------------------------------
r58462 | svn | 2017-04-24 01:19:23 +0900 (Mon, 24 Apr 2017) | 1 line

* 2017-04-24
------------------------------------------------------------------------
r58461 | naruse | 2017-04-24 01:19:23 +0900 (Mon, 24 Apr 2017) | 5 lines

Allow Net::HTTP to fetch user/pass from http_proxy

Note that this feature is enabled only on environment variables are
multi-user safe. In this time the list includes Linux, FreeBSD, or
Darwin. [Bug #12921]
------------------------------------------------------------------------
r58460 | naruse | 2017-04-24 01:19:22 +0900 (Mon, 24 Apr 2017) | 1 line

suppress warning: shadowing outer local variable
------------------------------------------------------------------------
r58459 | nobu | 2017-04-23 23:51:08 +0900 (Sun, 23 Apr 2017) | 1 line

Add diagnostic reports section header [ci skip]
------------------------------------------------------------------------
r58458 | nobu | 2017-04-23 23:47:31 +0900 (Sun, 23 Apr 2017) | 1 line

assert_syntax_error returns the exception [ci skip]
------------------------------------------------------------------------
r58457 | nobu | 2017-04-23 10:31:37 +0900 (Sun, 23 Apr 2017) | 1 line

Document parse.y instead of ext/ripper/ripper.c
------------------------------------------------------------------------
r58456 | nobu | 2017-04-23 10:31:36 +0900 (Sun, 23 Apr 2017) | 1 line

ext/dl has been removed already [ci skip]
------------------------------------------------------------------------
r58455 | nobu | 2017-04-23 10:23:30 +0900 (Sun, 23 Apr 2017) | 4 lines

use $(srcdir).

* win32/Makefile.sub (enc/jis/props.h): build it in not builddir,
  but in srcdir.
------------------------------------------------------------------------
r58454 | nobu | 2017-04-23 10:04:40 +0900 (Sun, 23 Apr 2017) | 4 lines

Refactor "%f" % Inf/NaN

* sprintf.c (rb_str_format): as for non-finite float, calculate
  the exact needed size with the space flag.
------------------------------------------------------------------------
r58453 | nobu | 2017-04-23 10:04:39 +0900 (Sun, 23 Apr 2017) | 5 lines

Fix space flag when Inf/NaN and width==3

* sprintf.c (rb_str_format): while `"% 2f"` and `"% 4f"` result in
  `" Inf"` and `" Inf"` respectively, `"% 3f"` results in
  `"Inf"` (no space).
------------------------------------------------------------------------
r58452 | ko1 | 2017-04-23 09:20:27 +0900 (Sun, 23 Apr 2017) | 5 lines

mark Hash keys correctly.

* hash.c (rb_hash_new_from_object): same as r58434.
  Newly created frozen objects are not referred from any roots/objects.

------------------------------------------------------------------------
r58451 | nobu | 2017-04-23 01:26:15 +0900 (Sun, 23 Apr 2017) | 1 line

Ignore enc/jis/props.h
------------------------------------------------------------------------
r58450 | svn | 2017-04-23 01:19:13 +0900 (Sun, 23 Apr 2017) | 1 line

* 2017-04-23
------------------------------------------------------------------------
r58449 | stomar | 2017-04-23 01:19:12 +0900 (Sun, 23 Apr 2017) | 1 line

test/test_prime.rb: update method name in comment
------------------------------------------------------------------------
r58448 | nobu | 2017-04-22 17:32:33 +0900 (Sat, 22 Apr 2017) | 6 lines

parse.y: fix compile_error format

* parse.y (ripper_compile_error, parser_compile_error): declare as
  PRINTF_ARGS attribute.

* parse.y (id_is_var_gen): fix format specifier for string value.
------------------------------------------------------------------------
r58447 | nobu | 2017-04-22 17:19:34 +0900 (Sat, 22 Apr 2017) | 5 lines

test_file_exhaustive.rb: check case-sensitive fs

* test/ruby/test_file_exhaustive.rb (test_expand_path): dump
  expanded file name, not only appended char, for case-sensitive
  filesystem.  [ruby-dev:50093] [Bug #13489]
------------------------------------------------------------------------
r58446 | nobu | 2017-04-22 17:19:33 +0900 (Sat, 22 Apr 2017) | 1 line

adjust indent
------------------------------------------------------------------------
r58443 | kazu | 2017-04-22 11:04:35 +0900 (Sat, 22 Apr 2017) | 1 line

Remove nonexistent files and rename some files
------------------------------------------------------------------------
r58442 | normal | 2017-04-22 10:08:15 +0900 (Sat, 22 Apr 2017) | 16 lines

define PACKED_STRUCT_UNALIGNED correctly

Defining PACKED_STRUCT_UNALIGNED to a noop in ruby/config.h (via
`configure') prevents the definition in include/ruby/defines.h
from working

This should have been fixed in r46914, so there's a size
regression for some objects since Ruby 2.2+.  I do not believe
we can backport to existing releases, either, since it can
affect ABI.

Add a test for Time objects on common x86-based platforms to
check for future regressions.

* configure.in: remove PACKED_STRUCT_UNALIGNED definition
* test/ruby/test_time.rb (test_memsize): new test for x86
------------------------------------------------------------------------
r58441 | nobu | 2017-04-22 09:27:14 +0900 (Sat, 22 Apr 2017) | 1 line

Add sha512
------------------------------------------------------------------------
r58440 | nobu | 2017-04-22 09:18:08 +0900 (Sat, 22 Apr 2017) | 1 line

Update sources and include files after update
------------------------------------------------------------------------
r58439 | ko1 | 2017-04-22 09:10:28 +0900 (Sat, 22 Apr 2017) | 4 lines

use $(srcdir).

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

------------------------------------------------------------------------
r58438 | nobu | 2017-04-22 08:16:43 +0900 (Sat, 22 Apr 2017) | 7 lines

clean autogenerated files

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

* enc/jis/props.h: autogenerated file.
  [ruby-core:80823] [Bug #13493]
------------------------------------------------------------------------
r58437 | normal | 2017-04-22 05:38:58 +0900 (Sat, 22 Apr 2017) | 8 lines

test/socket/test_basicsocket: handle :wait_readable on read_nonblock

On some systems with slower local sockets, :wait_readable may
happen and we should wait on it to drain the socket.
This is a possible fix for https://bugs.ruby-lang.org/issues/13491

* test/socket/test_basicsocket.rb (test_read_write_nonblock):
  handle :wait_readable on read_nonblock
------------------------------------------------------------------------
r58436 | svn | 2017-04-22 00:00:31 +0900 (Sat, 22 Apr 2017) | 1 line

* 2017-04-22
------------------------------------------------------------------------
r58435 | ko1 | 2017-04-22 00:00:30 +0900 (Sat, 22 Apr 2017) | 4 lines

insert WB correctly.

* hash.c (hash_insert_raw): should insert WB.

------------------------------------------------------------------------
r58434 | ko1 | 2017-04-21 20:02:10 +0900 (Fri, 21 Apr 2017) | 8 lines

mark created frozen strings.

* hash.c (rb_hash_new_from_values_with_klass): before this fix,
  only a st table are filled with passed values. However, newly
  created frozen strings are not marked correctly only reference
  from st table. This patch marks such created frozen strings
  by Hash object which refers to the st table.

------------------------------------------------------------------------
r58433 | kazu | 2017-04-21 20:00:10 +0900 (Fri, 21 Apr 2017) | 2 lines

Remove empty directories

------------------------------------------------------------------------
r58432 | hsbt | 2017-04-21 15:16:11 +0900 (Fri, 21 Apr 2017) | 3 lines

Removed mathn.rb from stdlib. It's deprecated from Ruby 2.2.

  [Feature #10169][[ruby-core:64553]]
------------------------------------------------------------------------
r58431 | nobu | 2017-04-21 15:12:27 +0900 (Fri, 21 Apr 2017) | 8 lines

test_framework.rb: for case-sensitive filesystem

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

* test/mkmf/test_framework.rb (test_multi_frameworks): ditto.
------------------------------------------------------------------------
r58430 | rhe | 2017-04-21 15:03:12 +0900 (Fri, 21 Apr 2017) | 4 lines

Remove missing/strtol.c

It is never used. We don't need it anyway as it's part of C89 which is
our current minimum requirement.
------------------------------------------------------------------------
r58429 | shyouhei | 2017-04-21 14:35:34 +0900 (Fri, 21 Apr 2017) | 2 lines

NEWS entry for [Feature #13302]

------------------------------------------------------------------------
r58428 | shyouhei | 2017-04-21 13:42:09 +0900 (Fri, 21 Apr 2017) | 2 lines

typo fix (sorry!)

------------------------------------------------------------------------
r58427 | shyouhei | 2017-04-21 13:21:14 +0900 (Fri, 21 Apr 2017) | 40 lines

refactor hash literal

Same as rb_ary_tmp_new_from_values(), it reduces vm_exec_core binary
size from 26,176 bytes to 26,080 bytes.  But this time, also with a
bit of optimizations:

  - Because we are allocating a new hash and no back references are
    introduced at all, we can safely skip write barriers.

  - Also, the iteration never recurs.  We can avoid complicated
    function callbacks by using st_insert instead of st_update.

----

	* hash.c (rb_hash_new_from_values): refactor
          extract the bulk insert into a function.

	* hash.c (rb_hash_new_from_object): also refactor.

	* hash.c (rb_hash_s_create): use the new functions.

	* insns.def (newhash): ditto.

	* vm.c (core_hash_from_ary): ditto.

	* iternal.h: export the new function.

-----------------------------------------------------------
benchmark results:
minimum results in each 7 measurements.
Execution time (sec)
name    before  after
loop_whileloop2  0.135  0.134
vm2_bighash*     1.236  0.687

Speedup ratio: compare with the result of `before' (greater is better)
name    after
loop_whileloop2 1.008
vm2_bighash*    1.798

------------------------------------------------------------------------
r58426 | nobu | 2017-04-21 12:01:12 +0900 (Fri, 21 Apr 2017) | 7 lines

ext/extmk.rb: colorize notes [Feature #13302]

* common.mk (build-ext): pass variables to colorize.

* ext/extmk.rb: colorize notes with tool/colorize.rb.

* tool/colorize.rb: extract from tool/generic_erb.rb.
------------------------------------------------------------------------
r58425 | nobu | 2017-04-21 11:43:25 +0900 (Fri, 21 Apr 2017) | 7 lines

exts.mk: refine notes [Feature #13302]

* ext/extmk.rb: split notes into header and footer, which are
  common, from bodies which are unique for each extensions.

* template/exts.mk.tmpl: now each notes are not one line, should
  not unique.
------------------------------------------------------------------------
r58424 | nobu | 2017-04-21 09:53:26 +0900 (Fri, 21 Apr 2017) | 4 lines

vm_dump.c: non-scalar thread_id

* vm_dump.c (rb_vmdebug_stack_dump_all_threads): fix for
  non-scalar thread_id platforms.  c.f. [Bug #9884]
------------------------------------------------------------------------
r58423 | nobu | 2017-04-21 09:11:56 +0900 (Fri, 21 Apr 2017) | 24 lines

Suppress a warning in ruby/win32.h [Fix GH-1591]

Fix a warning in ruby/win32.h which can cause failures with mkmf

The return value is implicit type casted from 'long double' to 'double', currently.
This causes a gcc warning like this:

```
In file included from C:\Ruby24-x64\include\ruby-2.4.0/ruby/defines.h:243:0,
                 from C:\Ruby24-x64\include\ruby-2.4.0/ruby/ruby.h:36,
                 from C:\Ruby24-x64\include\ruby-2.4.0/ruby.h:33,
                 from conftest.c:1:
C:\Ruby24-x64\include\ruby-2.4.0/ruby/win32.h: In function 'rb_w32_pow':
C:\Ruby24-x64\include\ruby-2.4.0/ruby/win32.h:786:12: warning: conversion to 'double' from 'long double' may alter its value [-Wfloat-conversion]
     return powl(x, y);
            ^~~~~~~~~~
```

This is fixed by the attached explicit type cast.

Moreover when CFLAGS is set to '-Wconversion', it prevents the compiler from
building. This is the case at the nokogiri gem.

The original issue arose at RubyInstaller2: https://github.com/oneclick/rubyinstaller2/commit/576a0eb70aa9348b366c3ecfe83c67811b7bcb9b
------------------------------------------------------------------------
r58422 | ko1 | 2017-04-21 07:52:57 +0900 (Fri, 21 Apr 2017) | 5 lines

use correct synchronization.

* test/ruby/test_thread.rb (make_handle_interrupt_test_thread1): use Queue
  to use correct synchronization.

------------------------------------------------------------------------
r58421 | ko1 | 2017-04-21 00:58:35 +0900 (Fri, 21 Apr 2017) | 4 lines

* vm_dump.c (rb_vmdebug_stack_dump_all_threads): cast to `void*`.
  Pointed out at
  <https://github.com/ruby/ruby/commit/fbc1deca89595e60af21e58b7e164f376e4bd2fc#commitcomment-21839826>

------------------------------------------------------------------------
r58420 | svn | 2017-04-21 00:02:56 +0900 (Fri, 21 Apr 2017) | 1 line

* 2017-04-21
------------------------------------------------------------------------
r58419 | ko1 | 2017-04-21 00:02:55 +0900 (Fri, 21 Apr 2017) | 8 lines

release monitor correctly.

* lib/rubygems/core_ext/kernel_require.rb: sometimes
  `Kernel.send(:gem, spec.name)` can raise some errors
  (Gem::MissingSpecError I observed) and this method
  doesn't release RUBYGEMS_ACTIVATION_MONITOR correctly.
  This patch fix this problem.

------------------------------------------------------------------------
r58418 | nobu | 2017-04-20 20:07:02 +0900 (Thu, 20 Apr 2017) | 5 lines

ruby-lex.rb: fix continued line conditions

* lib/irb/ruby-lex.rb (RubyLex#lex): fix conditions for continued
  line; empty lines, a semicolon, first line in `begin` block,
  just after `else` are not continued.
------------------------------------------------------------------------
r58417 | nobu | 2017-04-20 20:07:00 +0900 (Thu, 20 Apr 2017) | 1 line

ruby-lex.rb: merge regexps
------------------------------------------------------------------------
r58416 | shyouhei | 2017-04-20 19:32:08 +0900 (Thu, 20 Apr 2017) | 14 lines

refactor torexp to use routine in array.c

Found a part where copy&paste can be eliminated.  Reduces vm_exec_core
from 26,228 bytes to 26,176 bytes in size on my machine. I believe it
does not affect any runtime performance.

----

	* array.c (rb_ary_tmp_new_from_values): extend existing
          rb_ary_new_from_values function so that it can take
          additional value for klass.
	* array.c (rb_ary_new_from_values): use the new function.
	* insns.def (toregexp): ditto.

------------------------------------------------------------------------
r58415 | hsbt | 2017-04-20 18:11:36 +0900 (Thu, 20 Apr 2017) | 3 lines

Removed math mode from irb.

  mathn is deprecated from Ruby 2.2.
------------------------------------------------------------------------
r58414 | nobu | 2017-04-20 17:31:20 +0900 (Thu, 20 Apr 2017) | 4 lines

common.mk: separate note

* common.mk (build-ext): separate note from building extensions,
  not to be intermingled.  [ruby-core:80759] [Feature #13302]
------------------------------------------------------------------------
r58413 | hsbt | 2017-04-20 17:21:24 +0900 (Thu, 20 Apr 2017) | 4 lines

Removed deprecated extensions of mathn.

  * ext/mathn/{complex,rational}: Removed from ruby core.
    [fix GH-1542][Feature #13334][ruby-core:80247]
------------------------------------------------------------------------
r58412 | nobu | 2017-04-20 17:13:16 +0900 (Thu, 20 Apr 2017) | 6 lines

extmk.rb: fail for mandatory libraries

* ext/extmk.rb: fail if a mandatory extension library failed to
  configure.  [ruby-core:80759] [Feature #13302]

* template/exts.mk.tmpl: move `exit` at the end.
------------------------------------------------------------------------
r58411 | stomar | 2017-04-20 16:46:22 +0900 (Thu, 20 Apr 2017) | 6 lines

improve man pages

* man/ruby.1, man/erb.1, man/goruby.1, man/irb.1:
  fix document title formatting and volume name,
  improve "REPORTING BUGS" section: fix mdoc formatting error
  (wrong macro for bullet list items), small rewordings.
------------------------------------------------------------------------
r58410 | stomar | 2017-04-20 16:44:54 +0900 (Thu, 20 Apr 2017) | 9 lines

ri.1: rewrite ri man page

* man/ri.1: update the (very outdated) ri man page:
  * update document date
  * fix document title formatting and volume name
  * update descriptions and options to current ri --help text
  * fix some mdoc formatting errors (missing escaping of `\',
    wrong macro for bullet list items)
  * various rewordings and other improvements
------------------------------------------------------------------------
r58409 | stomar | 2017-04-20 16:44:01 +0900 (Thu, 20 Apr 2017) | 6 lines

ri.1: fix errors in ri man page

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

  Reported by Josh Cheek.  [ruby-core:68065] [Bug #10838]
------------------------------------------------------------------------
r58408 | ko1 | 2017-04-20 13:50:53 +0900 (Thu, 20 Apr 2017) | 5 lines

add a debug function.

* vm_dump.c (rb_vmdebug_stack_dump_all_threads): dump stack dump
  for all living threads.

------------------------------------------------------------------------
r58407 | usa | 2017-04-20 10:36:11 +0900 (Thu, 20 Apr 2017) | 4 lines

Move test_extlibs.rb because it's not the test of ruby itself

* test/test_extlibs.rb: moved from test/ruby.

------------------------------------------------------------------------
r58406 | svn | 2017-04-20 00:14:04 +0900 (Thu, 20 Apr 2017) | 1 line

* 2017-04-20
------------------------------------------------------------------------
r58405 | nobu | 2017-04-20 00:14:03 +0900 (Thu, 20 Apr 2017) | 4 lines

fix infinite recursion

* vm_insnhelper.c (vm_once_dispatch): no guarantee that tail call
  is always optimized away.
------------------------------------------------------------------------
r58404 | rhe | 2017-04-19 23:05:26 +0900 (Wed, 19 Apr 2017) | 4 lines

extmk.rb: improve message printed when configuring extensions fails

Point to the mkmf.log if configuring an extension fails so that people
can find and fix the culprit easily.  [ruby-core:80131] [Feature #13302]
------------------------------------------------------------------------
r58403 | hsbt | 2017-04-19 20:50:03 +0900 (Wed, 19 Apr 2017) | 2 lines

Rervert r58304. Because Rubygems have specialized finder for default gems.
We need to list library entries for default gems.
------------------------------------------------------------------------
r58402 | shyouhei | 2017-04-19 16:27:03 +0900 (Wed, 19 Apr 2017) | 19 lines

refactor extract binop dispatcher

Those opt_something instructions are worth refactoring. They tend to
have similar ways of executions.  By extracting the common part,
generated vm_exec_core function shrinks from 26,816 bytes to 26,256
bytes (according to nm(1)).

This changeset introduces negligible performance impact.  3 repeated
runs of optcarrot benchmark on my machine resulted in:

   before this: 28.813363684823557, 27.523907198440366, 27.292766121965400
   after  this: 28.174038497265080, 28.999513875020405, 29.621399800428065

in fps (greater==faster).

----

	* vm_insnhelper.c (vm_opt_binop_dispatch): new function.

------------------------------------------------------------------------
r58401 | svn | 2017-04-19 10:08:17 +0900 (Wed, 19 Apr 2017) | 1 line

* 2017-04-19
------------------------------------------------------------------------
r58400 | normal | 2017-04-19 10:08:16 +0900 (Wed, 19 Apr 2017) | 19 lines

socket: avoid fcntl for read/write_nonblock on Linux

On platforms where MSG_DONTWAIT works reliably on all sockets
(so far, I know of Linux), we can avoid fcntl syscalls and
implement IO#write_nonblock and IO#read_nonblock in terms of the
socket-specific send and recv family of syscalls.

This avoids side effects on the socket, and also encourages
generic code to be written in cases where IO wrappers like
OpenSSL::SSL::SSLSocket are used.

Perhaps in the future, side-effect-free non-blocking I/O can
be standard on all files and OSes: https://cr.yp.to/unix/nonblock.html

* ext/socket/lib/socket.rb (read_nonblock, write_nonblock):
  Linux-specific wrapper without side effects
  [ruby-core:80780] [Feature #13362]
* test/socket/test_basicsocket.rb (test_read_write_nonblock):
  new test
------------------------------------------------------------------------
r58399 | nobu | 2017-04-18 22:14:08 +0900 (Tue, 18 Apr 2017) | 1 line

fixup! vm_insnhelper.c: adjust indent [ci skip]
------------------------------------------------------------------------
r58398 | nobu | 2017-04-18 22:14:06 +0900 (Tue, 18 Apr 2017) | 5 lines

compile.c: wrong optimization

* compile.c (compile_branch_condition): expression which has side
  effects should not be eliminated.
  [ruby-core:80740] [Bug #13444]
------------------------------------------------------------------------
r58397 | nobu | 2017-04-18 22:14:05 +0900 (Tue, 18 Apr 2017) | 1 line

vm_insnhelper.c: adjust indent [ci skip]
------------------------------------------------------------------------
r58396 | shyouhei | 2017-04-18 22:05:38 +0900 (Tue, 18 Apr 2017) | 4 lines

typo fix (sorry!) [ci skip]

Surprisingly this was not a syntax error on my machine.

------------------------------------------------------------------------
r58395 | nobu | 2017-04-18 22:02:56 +0900 (Tue, 18 Apr 2017) | 1 line

test_optimization.rb: heredoc code style
------------------------------------------------------------------------
r58394 | ko1 | 2017-04-18 21:30:59 +0900 (Tue, 18 Apr 2017) | 4 lines

fix compile error.

* insns.def (trace): use cast `flag` to pass compilation with clang on MacOSX.

------------------------------------------------------------------------
r58393 | hsbt | 2017-04-18 20:55:44 +0900 (Tue, 18 Apr 2017) | 3 lines

Fix heading of README.

  [Fix GH-1586] Patch by @jbampton
------------------------------------------------------------------------
r58392 | shyouhei | 2017-04-18 20:06:58 +0900 (Tue, 18 Apr 2017) | 2 lines

tabify (sorry!) [ci skip]

------------------------------------------------------------------------
r58391 | svn | 2017-04-18 19:58:50 +0900 (Tue, 18 Apr 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r58390 | shyouhei | 2017-04-18 19:58:49 +0900 (Tue, 18 Apr 2017) | 33 lines

split insns.def into functions

Contemporary C compilers are good at function inlining.  They fold
multiple functions into one.  However they are not yet smart enough to
unfold a function into several ones.  So generally speaking, it is
wiser for a C programmer to manually split C functions whenever
possible.  That should make rooms for compilers to optimize at will.

Before this changeset insns.def was converted into single HUGE
function called vm_exec_core().  By moving each instruction's core
into individual functions, generated C source code is reduced from
3,428 lines to 2,847 lines.  Looking at the generated assembly
however, it seems my compiler (gcc 6.2) is extraordinary smart so that
it inlines almost all functions I introduced in this changeset back
into that vm_exec_core.  On my machine compiled machine binary of the
function does not shrink very much in size (28,432 bytes to 26,816
bytes, according to nm(1)).

I believe this change is zero-cost.  Several benchmarks I exercised
showed no significant difference beyond error mergin.  For instance
3 repeated runs of optcarrot benchmark on my machine resulted in:

   before this: 28.330329285707490, 27.513378371065920, 29.40420215754537
   after  this: 27.107195867280414, 25.549324021385907, 30.31581919050884

in fps (greater==faster).

----

	* internal.h (rb_obj_not_equal): used from vm_insnhelper.c
	* insns.def: move vast majority of lines into vm_insnhelper.c
	* vm_insnhelper.c: moved here.

------------------------------------------------------------------------
r58389 | nobu | 2017-04-18 17:34:40 +0900 (Tue, 18 Apr 2017) | 4 lines

eval.c: fix exit inside TAG

* eval.c (setup_exception): do not exit by goto inside
  PUSH_TAG/POP_TAG.  it causes an infinite loop.
------------------------------------------------------------------------
r58388 | nobu | 2017-04-18 14:56:34 +0900 (Tue, 18 Apr 2017) | 4 lines

configure.in: honor GIT env

* configure.in (--with-git): honor environment variable GIT if
  set.
------------------------------------------------------------------------
r58387 | nobu | 2017-04-18 11:58:45 +0900 (Tue, 18 Apr 2017) | 4 lines

vcs.rb: env for command

* tool/vcs.rb (VCS::SVN::COMMAND, VCS::GIT::COMMAND): customize
  command paths by environment variables.
------------------------------------------------------------------------
r58386 | nobu | 2017-04-18 11:58:44 +0900 (Tue, 18 Apr 2017) | 4 lines

enc/depend: remove Unicode versions

* enc/depend (enc/unicode.o): remove hardcoded Unicode versions.
  this object file must be compiled by toplevel make.
------------------------------------------------------------------------
r58385 | svn | 2017-04-18 08:47:13 +0900 (Tue, 18 Apr 2017) | 1 line

* 2017-04-18
------------------------------------------------------------------------
r58384 | ko1 | 2017-04-18 08:47:12 +0900 (Tue, 18 Apr 2017) | 5 lines

should not return.

* test/ruby/test_settracefunc.rb (test_throwing_return_with_finish_frame):
  should not use `return`, but should use `next`.

------------------------------------------------------------------------
r58383 | nobu | 2017-04-17 22:38:34 +0900 (Mon, 17 Apr 2017) | 5 lines

string.c: improve insertion performace

* string.c (rb_str_splice_0): improve performace of single byte
  optimizable cases, insertion 7bit string to 7bit string.
  [ruby-dev:49984] [Bug #13228]
------------------------------------------------------------------------
r58382 | nobu | 2017-04-17 22:23:42 +0900 (Mon, 17 Apr 2017) | 4 lines

thread_win32.c: fix index

* thread_win32.c (w32_wait_events): fix wait object index in the
  case of interrupt_event is not usable.
------------------------------------------------------------------------
r58381 | nobu | 2017-04-17 11:41:00 +0900 (Mon, 17 Apr 2017) | 4 lines

eval.c: copy before cause setup

* eval.c (setup_exception): copy frozen exception before setting
  up a cause not only a backtrace.
------------------------------------------------------------------------
r58380 | nobu | 2017-04-17 11:31:35 +0900 (Mon, 17 Apr 2017) | 9 lines

eval.c: copy special exceptions before raise

* eval.c (setup_exception): consider if the exception is frozen,
  but not one of special exception objects.

* gc.c (rb_memerror): copy minimum objects.

* thread.c (rb_threadptr_execute_interrupts): prepare special
  exception queued by another thread to be raised.
------------------------------------------------------------------------
r58379 | nobu | 2017-04-17 11:08:41 +0900 (Mon, 17 Apr 2017) | 4 lines

vm_insnhelper.c: rb_threadptr_stack_overflow

* vm_insnhelper.c (rb_threadptr_stack_overflow): move from
  thread.c and integrate with vm_stackoverflow.
------------------------------------------------------------------------
r58378 | nobu | 2017-04-17 10:35:54 +0900 (Mon, 17 Apr 2017) | 5 lines

parse.y: fix for empty `__VA_ARGS__`

* parse.y (WARN_CALL, WARNING_CALL): need `##` between a comman
  and `__VA_ARGS__` in the case it is empty, not to end arguments
  with a comma.
------------------------------------------------------------------------
r58377 | nobu | 2017-04-17 10:23:50 +0900 (Mon, 17 Apr 2017) | 9 lines

vm_backtrace.c: backtrace functions per threads

* vm_backtrace.c (rb_threadptr_backtrace_object): rename and
  extern.

* vm_backtrace.c (rb_threadptr_backtrace_str_ary): rename as
  threadptr since the parameter is rb_thread_t*.

* vm_backtrace.c (rb_threadptr_backtrace_location_ary): ditto.
------------------------------------------------------------------------
r58376 | nobu | 2017-04-17 09:25:48 +0900 (Mon, 17 Apr 2017) | 4 lines

eval.c: share rb_longjmp

* eval.c (rb_longjmp, rb_raise_jump): parameterize thread, and
  share rb_longjmp.
------------------------------------------------------------------------
r58375 | nobu | 2017-04-17 09:10:47 +0900 (Mon, 17 Apr 2017) | 7 lines

gc.c: rb_threadptr_stack_check

* gc.c (rb_threadptr_stack_check): check probability of stack
  overflow for the given thread, not the current thread.

* vm_eval.c (stack_check): check the given thread, not the current
  thread.
------------------------------------------------------------------------
r58374 | nobu | 2017-04-17 09:10:45 +0900 (Mon, 17 Apr 2017) | 6 lines

gc.c: PREVENT_STACK_OVERFLOW

* gc.c (PREVENT_STACK_OVERFLOW): define TRUE to try preventing
  stack overflow before actually happens.

* gc.c (stack_check): parameterize thread pointer.
------------------------------------------------------------------------
r58373 | svn | 2017-04-17 00:54:58 +0900 (Mon, 17 Apr 2017) | 1 line

* 2017-04-17
------------------------------------------------------------------------
r58372 | stomar | 2017-04-17 00:54:57 +0900 (Mon, 17 Apr 2017) | 3 lines

test_integer.rb: simplify test

* test/ruby/test_integer.rb: simplify test for Integer.sqrt.
------------------------------------------------------------------------
r58371 | nobu | 2017-04-16 23:54:59 +0900 (Sun, 16 Apr 2017) | 4 lines

rbinstall.rb: ignore skipped exts

* tool/rbinstall.rb (default-gems): skip gemspec if corresponding
  Makefile does not exist.
------------------------------------------------------------------------
r58370 | nobu | 2017-04-16 23:27:21 +0900 (Sun, 16 Apr 2017) | 5 lines

thread_win32.c: no GVL for interrupt_event

* thread_win32.c (w32_wait_events): do not acquire GVL, to fix
  deadlock at read/close race condition.  instead, just ignore
  interrupt_event if it is closed.
------------------------------------------------------------------------
r58369 | nobu | 2017-04-16 13:16:11 +0900 (Sun, 16 Apr 2017) | 1 line

test/ruby/test_io.rb: use Thread.stop? to wait
------------------------------------------------------------------------
r58368 | usa | 2017-04-16 11:00:24 +0900 (Sun, 16 Apr 2017) | 3 lines

* test/ruby/test_io.rb (test_race_closed_stream): separate because it stops
  entire test process on Windows.

------------------------------------------------------------------------
r58367 | svn | 2017-04-16 00:29:09 +0900 (Sun, 16 Apr 2017) | 1 line

* 2017-04-16
------------------------------------------------------------------------
r58366 | nobu | 2017-04-16 00:29:09 +0900 (Sun, 16 Apr 2017) | 5 lines

bignum.c: fix inexact estimation

* bignum.c (estimate_initial_sqrt): estimated square root is
  inexact if it is not equal to its ceil, needs Newton's method.
  [ruby-core:80696] [Bug #13440]
------------------------------------------------------------------------
r58365 | svn | 2017-04-15 16:13:06 +0900 (Sat, 15 Apr 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58364 | normal | 2017-04-15 16:13:05 +0900 (Sat, 15 Apr 2017) | 11 lines

fix ext/-test-/struct/ dependencies

I started writing a template for auto-generation and
let "tool/update-deps --fix" fill in the rest.

Hopefully this fixes problems with some CI builds
after r58359.  Further changes to other ext/-test-/
files should probably add or update "depend" files, too.

* ext/-test-/struct/depend: new file
* enc/depend: auto-updated with unicode 9.0.0 headers (side-effect)
------------------------------------------------------------------------
r58363 | nobu | 2017-04-15 11:37:21 +0900 (Sat, 15 Apr 2017) | 4 lines

signal.c: last tag page condition

* signal.c (check_stack_overflow): drop the last tag when it is
  close to the fault page, not same as sp page.
------------------------------------------------------------------------
r58362 | nobu | 2017-04-15 11:09:27 +0900 (Sat, 15 Apr 2017) | 4 lines

ruby.h: check argc to rb_funcall

* include/ruby/ruby.h (rb_funcall): check if argc matches the
  number of variadic arguments, and replace with rb_funcallv.
------------------------------------------------------------------------
r58361 | nobu | 2017-04-15 11:07:01 +0900 (Sat, 15 Apr 2017) | 4 lines

signal.c: prefer pthread_sigmask

* signal.c (raise_stack_overflow): prefer pthread_sigmask to
  sigprocmask, for multithreading.
------------------------------------------------------------------------
r58360 | svn | 2017-04-15 09:46:01 +0900 (Sat, 15 Apr 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58359 | normal | 2017-04-15 09:46:00 +0900 (Sat, 15 Apr 2017) | 9 lines

fix RSTRUCT_LEN macro in public C API

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

* ext/-test-/struct/len.c: new
* test/-ext-/struct/test_len.rb: new
* include/ruby/ruby.h (RSTRUCT_LEN): use NUM2LONG
  [ruby-core:80692] [Bug #13439]
------------------------------------------------------------------------
r58358 | ngoto | 2017-04-15 04:12:51 +0900 (Sat, 15 Apr 2017) | 7 lines

Workaround for optimization bug of Oracle Solaris Studio 12.4 and 12.5

* pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for
  optimization bug of Oracle Solaris Studio 12.4 and 12.5
  (Oracle Developer Studio 12.5) on Solaris with -xO4 optimization
  option. [Bug #11684] [ruby-core:80690]

------------------------------------------------------------------------
r58357 | ko1 | 2017-04-15 03:19:37 +0900 (Sat, 15 Apr 2017) | 4 lines

sync certainly.

* test/ruby/test_io.rb (test_race_closed_stream): awit for 'sleep' state.

------------------------------------------------------------------------
r58356 | ko1 | 2017-04-15 03:14:25 +0900 (Sat, 15 Apr 2017) | 6 lines

more explicit synchronization.

* test/ruby/test_io.rb (test_race_closed_stream): wait for blocking by r.gets.
  On some systems (for example, high load average systems) can't start Thread
  correctly and can't wait r.gets in invoked Thread.

------------------------------------------------------------------------
r58355 | svn | 2017-04-15 01:07:46 +0900 (Sat, 15 Apr 2017) | 1 line

* 2017-04-15
------------------------------------------------------------------------
r58354 | nobu | 2017-04-15 01:07:45 +0900 (Sat, 15 Apr 2017) | 1 line

signal.c: add sigprocmask guard
------------------------------------------------------------------------
r58353 | nobu | 2017-04-14 21:59:59 +0900 (Fri, 14 Apr 2017) | 4 lines

signal.c: unblock signal

* signal.c (raise_stack_overflow): unblock the received signal, to
  receive the same signal again.  [ruby-core:79285] [Bug #13164]
------------------------------------------------------------------------
r58352 | nobu | 2017-04-14 21:51:46 +0900 (Fri, 14 Apr 2017) | 4 lines

configure.in: sigsetjmp sivesigs flag

* configure.in (RUBY_SETJMP_TYPE): optional flag to save signal
  mask.
------------------------------------------------------------------------
r58351 | nobu | 2017-04-14 19:03:43 +0900 (Fri, 14 Apr 2017) | 1 line

IPSocket#inspect
------------------------------------------------------------------------
r58350 | nobu | 2017-04-14 17:33:08 +0900 (Fri, 14 Apr 2017) | 4 lines

ruby.h: check argc to rb_yield_values

* include/ruby/ruby.h (rb_yield_values): check if argc matches the
  number of variadic arguments, and replace with rb_yield_values2.
------------------------------------------------------------------------
r58349 | ko1 | 2017-04-14 16:46:11 +0900 (Fri, 14 Apr 2017) | 9 lines

disable rewind hooks.

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

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

------------------------------------------------------------------------
r58348 | svn | 2017-04-14 14:19:12 +0900 (Fri, 14 Apr 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58347 | mrkn | 2017-04-14 14:19:12 +0900 (Fri, 14 Apr 2017) | 13 lines

Improve performance of type conversion using to_r

* object.c: Add to_r in conv_method_tbl.

* defs/id.def: add to_r.

* benchmark/bm_int_quo.rb: added.

* benchmark/bm_time_subsec.rb: added.

[Bug #13426]
[ruby-core:80665]
[Fix GH-1582]
------------------------------------------------------------------------
r58346 | ko1 | 2017-04-14 11:19:39 +0900 (Fri, 14 Apr 2017) | 5 lines

increase timeout seconds.

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

------------------------------------------------------------------------
r58345 | nobu | 2017-04-14 09:45:49 +0900 (Fri, 14 Apr 2017) | 5 lines

rbinstall.rb: no file list for default gems

* tool/rbinstall.rb (default-gems): no file list is used now.
  all files should be installed as standard libraries.
  [ruby-core:80667] [Bug #13428]
------------------------------------------------------------------------
r58344 | nobu | 2017-04-14 09:45:48 +0900 (Fri, 14 Apr 2017) | 5 lines

git-refresh: fix abort by cd failure

* tool/git-refresh: try `cd -P` in a subshell, because Solaris10
  sh dies if it fails, not only the command.
  [ruby-dev:50074] [Bug #13433]
------------------------------------------------------------------------
r58343 | ko1 | 2017-04-14 01:32:20 +0900 (Fri, 14 Apr 2017) | 1 line

fix last commit
------------------------------------------------------------------------
r58342 | svn | 2017-04-14 01:19:46 +0900 (Fri, 14 Apr 2017) | 1 line

* 2017-04-14
------------------------------------------------------------------------
r58341 | ko1 | 2017-04-14 01:19:46 +0900 (Fri, 14 Apr 2017) | 2 lines

Terminate created threads.

------------------------------------------------------------------------
r58340 | svn | 2017-04-13 18:25:39 +0900 (Thu, 13 Apr 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58339 | mrkn | 2017-04-13 18:25:38 +0900 (Thu, 13 Apr 2017) | 9 lines

array.c: improve performance of Array#sort with block

* array.c (sort_1): improve performance of Array#sort with block

* benchmark/bm_array_sort_block.rb: added for Array#sort with block

[Bug #13344]
[ruby-dev:50027]
[Fix GH-1544]
------------------------------------------------------------------------
r58338 | svn | 2017-04-13 17:09:07 +0900 (Thu, 13 Apr 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58337 | mrkn | 2017-04-13 17:09:06 +0900 (Thu, 13 Apr 2017) | 4 lines

Add a benchmark script for Array#sort of float array

[Bug #13340]
[ruby-dev:50023]
------------------------------------------------------------------------
r58336 | nobu | 2017-04-13 17:08:04 +0900 (Thu, 13 Apr 2017) | 3 lines

git-refresh: for symlink srcdir

* tool/git-refresh: use `cd -P` for symlink srcdir.
------------------------------------------------------------------------
r58335 | nobu | 2017-04-13 16:52:05 +0900 (Thu, 13 Apr 2017) | 4 lines

git-refresh: fix expr

* tool/git-refresh (dir): surround by slashes to extract base
  name.  [ruby-dev:50070] [Bug #13424]
------------------------------------------------------------------------
r58334 | nobu | 2017-04-13 16:38:23 +0900 (Thu, 13 Apr 2017) | 6 lines

thread.c: disable VM events when stack overflow

* thread.c (ruby_thread_stack_overflow): disable VM events when
  stack overflow occurred; it causes another stack overflow again
  in making backtrace object, and crashes.
  [ruby-core:80662] [Bug #13425]
------------------------------------------------------------------------
r58333 | mrkn | 2017-04-13 16:22:35 +0900 (Thu, 13 Apr 2017) | 14 lines

array.c: Improve performance of Array#sort with float elements

* array.c (sort_2): improve performance of Array#sort with float elements.

* internal.h (cmp_opt_Float, cmp_opt_data): added for checking whether or not
  Float#<=> can be optimizable.

* numeric.c (rb_float_cmp): added for internal use.

* internal.h (rb_float_cmp): ditto.

[Bug #13340]
[ruby-dev:50023]
[Fix GH-1539]
------------------------------------------------------------------------
r58332 | rhe | 2017-04-13 15:43:17 +0900 (Thu, 13 Apr 2017) | 6 lines

array.c: report correct memsize for shared root arrays

For a shared array root, struct RArray::as.heap.aux.capa stores the
number of Arrays holding reference to that T_ARRAY instead of the actual
heap-allocated capacity. Use ARY_CAPA() macro which handles this
appropriately.
------------------------------------------------------------------------
r58331 | stomar | 2017-04-13 04:49:48 +0900 (Thu, 13 Apr 2017) | 5 lines

unicode_normalize.rb: improve docs

* lib/unicode_normalize.rb: [DOC] improve docs for
  String#{unicode_normalize,unicode_normalized?}: rdoc formatting,
  adopt style of other String methods (drop heading and "Examples").
------------------------------------------------------------------------
r58330 | svn | 2017-04-13 03:07:33 +0900 (Thu, 13 Apr 2017) | 1 line

* 2017-04-13
------------------------------------------------------------------------
r58329 | stomar | 2017-04-13 03:07:32 +0900 (Thu, 13 Apr 2017) | 6 lines

nodoc UnicodeNormalize module

* lib/unicode_normalize/normalize.rb: [DOC] nodoc the
  internal UnicodeNormalize module.
* lib/unicode_normalize/tables.rb: ditto.
* template/unicode_norm_gen.tmpl: ditto.
------------------------------------------------------------------------
r58328 | nobu | 2017-04-12 23:47:50 +0900 (Wed, 12 Apr 2017) | 4 lines

thread.c: during GC for thread

* thread.c (ruby_thread_stack_overflow): check if the given thread
  is during GC.
------------------------------------------------------------------------
r58327 | nobu | 2017-04-12 17:39:19 +0900 (Wed, 12 Apr 2017) | 5 lines

rbinstall.rb: purge `git ls-files`

* tool/rbinstall.rb (load_gemspec): purge `git ls-files` generated
  by bundle.  it is not available always everywhere everytime.
  [ruby-dev:50068] [Bug #13423]
------------------------------------------------------------------------
r58326 | hsbt | 2017-04-12 17:12:53 +0900 (Wed, 12 Apr 2017) | 4 lines

Import latest gemspec from ruby/fileutils.

  * Bump version to 0.7.1. Beucause fileutils-0.7 is alread reserverd
    on rubygems.org.
------------------------------------------------------------------------
r58325 | nobu | 2017-04-12 14:22:36 +0900 (Wed, 12 Apr 2017) | 4 lines

git-refresh: for old sh

* tool/git-refresh: get rid of matching prefix pattern removal for
  old sh.  [ruby-dev:50069] [Bug #13424]
------------------------------------------------------------------------
r58324 | hsbt | 2017-04-12 09:21:20 +0900 (Wed, 12 Apr 2017) | 1 line

Use `assert_raise` instead of `assert_raises`.
------------------------------------------------------------------------
r58323 | hsbt | 2017-04-12 09:21:18 +0900 (Wed, 12 Apr 2017) | 4 lines

Merge json-2.0.4.

  * https://github.com/flori/json/releases/tag/v2.0.4
  * https://github.com/flori/json/blob/09fabeb03e73ed88dc8ce8f19d76ac59e51dae20/CHANGES.md#2017-03-23-204
------------------------------------------------------------------------
r58322 | svn | 2017-04-12 07:41:21 +0900 (Wed, 12 Apr 2017) | 1 line

* 2017-04-12
------------------------------------------------------------------------
r58321 | hsbt | 2017-04-12 07:41:21 +0900 (Wed, 12 Apr 2017) | 4 lines

Merge upstream of ruby/etc.

  * Do not use `git ls-files` for file listing.
  * Fix extconf.rb path.
------------------------------------------------------------------------
r58320 | normal | 2017-04-11 23:56:17 +0900 (Tue, 11 Apr 2017) | 6 lines

Socket.udp_server_sockets: use symbol proc

Symbol proc is shorter human and machine code;
and also avoids needing to name variables.

* ext/socket/lib/socket.rb (Socket.udp_server_sockets): use symbol proc
------------------------------------------------------------------------
r58319 | nobu | 2017-04-11 21:28:51 +0900 (Tue, 11 Apr 2017) | 1 line

Parenthesized CHECK_CFP_CONSISTENCY [ci skip]
------------------------------------------------------------------------
r58318 | nobu | 2017-04-11 21:20:21 +0900 (Tue, 11 Apr 2017) | 5 lines

Install only files explicitly referenced by bundled gems.

[Bug #13417]
[Fix GH-1580]
Author:    V?t Ondruch <vondruch@redhat.com>
------------------------------------------------------------------------
r58317 | nobu | 2017-04-11 21:20:18 +0900 (Tue, 11 Apr 2017) | 4 lines

Spec#files are not used anymore.

[Fix GH-1579]
Author:    V?t Ondruch <vondruch@redhat.com>
------------------------------------------------------------------------
r58316 | hsbt | 2017-04-11 21:19:05 +0900 (Tue, 11 Apr 2017) | 3 lines

Fix a typo.

  Patch by @voxik. [fix GH-1581]
------------------------------------------------------------------------
r58315 | hsbt | 2017-04-11 18:46:53 +0900 (Tue, 11 Apr 2017) | 4 lines

Import gemspec from ruby/etc.

  * Update configuraiton for gem release.
  * Bump version to 0.2.1. Because 0.2.0 is already reserved on rubygems.org
------------------------------------------------------------------------
r58314 | hsbt | 2017-04-11 17:49:01 +0900 (Tue, 11 Apr 2017) | 4 lines

Import gemspec from ruby/dbm

  * Update gemspec version of beta release.
  * Bump version to 0.5.1. Because 0.5 is already reserved another implementation.
------------------------------------------------------------------------
r58313 | nobu | 2017-04-11 13:17:45 +0900 (Tue, 11 Apr 2017) | 4 lines

vm_insnhelper.c: CHECK_CFP_CONSISTENCY

* vm_insnhelper.c (CHECK_CFP_CONSISTENCY): make [BUG] messages
  consistent.
------------------------------------------------------------------------
r58312 | nobu | 2017-04-11 11:40:14 +0900 (Tue, 11 Apr 2017) | 4 lines

time.c: rename div as divv

* time.c (divv): add suffix to get rid of the name in C standard
  library, and others together.
------------------------------------------------------------------------
r58311 | nobu | 2017-04-11 11:40:13 +0900 (Tue, 11 Apr 2017) | 1 line

configure.in: need GIT to check if using git
------------------------------------------------------------------------
r58310 | nobu | 2017-04-11 10:24:13 +0900 (Tue, 11 Apr 2017) | 1 line

enc/unicode/data: no files under version control now
------------------------------------------------------------------------
r58309 | normal | 2017-04-11 03:16:58 +0900 (Tue, 11 Apr 2017) | 12 lines

time.c: use predefined IDs

This reduces rb_intern calls during startup and shortens code.

* time.c: include id.h for predefined IDs
  (id_mul, id_eq, id_ne, id_cmp): remove static variables
  (eq): replace id_eq with idEq
  (cmp, wcmp): replace id_cmp with idCmp
  (weq): replace id_eq with idEq
  (time_timespec): replace id_mul with '*'
  (Init_Time): remove rb_intern calls for removed variables
* common.mk (time.$(OBJEXT)): add depend on id.h
------------------------------------------------------------------------
r58308 | normal | 2017-04-11 03:08:16 +0900 (Tue, 11 Apr 2017) | 30 lines

time.c: Improve Time#to_i performance

Time#to_i will be faster around 80% (on 64-bit platforms).

* Before
       user     system      total        real
   2.840000   0.000000   2.840000 (  2.847238)

* After
       user     system      total        real
   1.600000   0.000000   1.600000 (  1.598911)

* Test code
require 'benchmark'

Benchmark.bmbm do |x|
  x.report do
    t = Time.now
    20000000.times do
      t.to_i
    end
  end
end

* time.c (_div): new function avoid rb_funcall
  (div): replace with new _div function
  [ruby-core:80636] [Bug #13418]
  Thanks to Watson <watson1978@gmail.com> for the patch.

From: Watson <watson1978@gmail.com>
------------------------------------------------------------------------
r58307 | stomar | 2017-04-11 02:28:18 +0900 (Tue, 11 Apr 2017) | 1 line

doc/extension.rdoc: rb_str_append grammar fix
------------------------------------------------------------------------
r58306 | nobu | 2017-04-11 00:34:37 +0900 (Tue, 11 Apr 2017) | 4 lines

extension.rdoc: rb_str_append [ci skip]

* doc/extension.rdoc: add rb_str_append and fix equivalent for
  rb_str_catf and rb_str_vcatf from rb_str_cat2.
------------------------------------------------------------------------
r58305 | svn | 2017-04-11 00:26:50 +0900 (Tue, 11 Apr 2017) | 1 line

* 2017-04-11
------------------------------------------------------------------------
r58304 | nobu | 2017-04-11 00:26:49 +0900 (Tue, 11 Apr 2017) | 9 lines

Make .gemspec slimmer.

This is the same code that RubyGems are using:

https://github.com/rubygems/rubygems/commit/a1a5ab55cb1501cbfeee29131a56cfa2e763174f

[ci skip]
[Fix GH-1578]
Author:    V?t Ondruch <vondruch@redhat.com>
------------------------------------------------------------------------
r58303 | nobu | 2017-04-11 00:26:48 +0900 (Tue, 11 Apr 2017) | 7 lines

extension.rdoc: fix rb_enc_str_new_literal

* doc/extension.rdoc: Add missing enc arg to rb_enc_str_new_literal.

[ci skip]
[Fix GH-1577]
Author:    Dylan Thacker-Smith <Dylan.Smith@shopify.com>
------------------------------------------------------------------------
r58302 | nobu | 2017-04-10 22:35:39 +0900 (Mon, 10 Apr 2017) | 1 line

svn:ignore: ignore ruby-runner
------------------------------------------------------------------------
r58301 | usa | 2017-04-10 22:30:28 +0900 (Mon, 10 Apr 2017) | 2 lines

svn:ignore: fix handling exts.mk.

------------------------------------------------------------------------
r58300 | usa | 2017-04-10 22:18:03 +0900 (Mon, 10 Apr 2017) | 2 lines

svn:ignore

------------------------------------------------------------------------
r58299 | nobu | 2017-04-10 11:13:52 +0900 (Mon, 10 Apr 2017) | 4 lines

Makefile.sub: fix HAVE_GIT

* win32/Makefile.sub (HAVE_GIT): fix missing `do`, excape `$`, and
  fix a typo.
------------------------------------------------------------------------
r58298 | nobu | 2017-04-10 10:46:24 +0900 (Mon, 10 Apr 2017) | 3 lines

configure.in: detect baseruby by default

* configure.in: default HAVE_BASERUBY to yes, for auto detection.
------------------------------------------------------------------------
r58297 | nobu | 2017-04-10 10:22:50 +0900 (Mon, 10 Apr 2017) | 4 lines

vcs.rb: remove git stuff

* tool/vcs.rb (VCS::GIT#after_export): remove git stuff not to
  distribute.  [ruby-core:80629] [Feature #13415]
------------------------------------------------------------------------
r58296 | nobu | 2017-04-10 10:22:49 +0900 (Mon, 10 Apr 2017) | 4 lines

Allow --without-baseruby option

* configure.in, win32/configure.bat: allow --without-baseruby
  option to use already generated files without baseruby.
------------------------------------------------------------------------
r58295 | nobu | 2017-04-10 10:22:48 +0900 (Mon, 10 Apr 2017) | 4 lines

Add --with-git option

* configure.in, win32/configure.bat: add --with-git option to
  tell git command to use, or not to use git.
------------------------------------------------------------------------
r58294 | svn | 2017-04-10 01:19:39 +0900 (Mon, 10 Apr 2017) | 1 line

* 2017-04-10
------------------------------------------------------------------------
r58293 | usa | 2017-04-10 01:19:37 +0900 (Mon, 10 Apr 2017) | 6 lines

Get rid of inifinity retry loop in Socket.udp_server_sockets

* ext/socket/lib/socket.rb (Socket.udp_server_sockets): remove duplicated
  addresses before passing it to ip_sockets_port0 because it causes
  Errno::EADDRINUSE and retry forever.

------------------------------------------------------------------------
r58291 | stomar | 2017-04-09 22:30:31 +0900 (Sun, 09 Apr 2017) | 4 lines

math.c: improve docs for Math.sqrt

* math.c: [DOC] mention possibly surprising behavior of Math.sqrt
  due to floating point arithmetic; also refer to BigDecimal#sqrt.
------------------------------------------------------------------------
r58290 | stomar | 2017-04-09 22:28:11 +0900 (Sun, 09 Apr 2017) | 4 lines

numeric.c: improve docs for Float

* numeric.c: [DOC] mention possibly surprising behavior of
  Float#{floor,ceil,to_i,truncate} due to floating point arithmetic.
------------------------------------------------------------------------
r58288 | kazu | 2017-04-09 20:53:53 +0900 (Sun, 09 Apr 2017) | 5 lines

io.c: ARGF.file returns $stdin instead of STDIN [ci skip]

For example:
`ruby -e '$stdin=open(IO::NULL);p [STDIN,$stdin,ARGF.file]'`
prints `[#<IO:<STDIN>>, #<File:/dev/null>, #<File:/dev/null>]`
------------------------------------------------------------------------
r58287 | nobu | 2017-04-09 20:44:01 +0900 (Sun, 09 Apr 2017) | 4 lines

configure.in: rpath with OPTDIR

* configure.in: add rpath flags which is needed for OPTDIR as well
  as -L options, when it is given.  [ruby-dev:50065] [Bug #13411]
------------------------------------------------------------------------
r58286 | nobu | 2017-04-09 14:09:44 +0900 (Sun, 09 Apr 2017) | 5 lines

thread.c: refine stream closed message

* thread.c (Init_Thread): [EXPERIMENTAL] refine the "stream
  closed" special exception message, by explicating that it is
  caused by threading.  [ruby-core:80583] [Bug #13405]
------------------------------------------------------------------------
r58285 | nobu | 2017-04-09 13:01:07 +0900 (Sun, 09 Apr 2017) | 4 lines

special exception messages are static

* vm_core.h (rb_vm_register_special_exception): make the contents
  of special exception messages static.
------------------------------------------------------------------------
r58284 | nobu | 2017-04-09 11:34:49 +0900 (Sun, 09 Apr 2017) | 5 lines

vm_core.h: ruby_error_stream_closed

* vm_core.h (ruby_special_exceptions): renamed
  ruby_error_closed_stream as ruby_error_stream_closed, like the
  message.
------------------------------------------------------------------------
r58283 | nobu | 2017-04-09 11:06:45 +0900 (Sun, 09 Apr 2017) | 4 lines

no mark of u3 in NODE_BLOCK_PASS

* node.c (rb_gc_mark_node): u3 in NODE_BLOCK_PASS is not used and
  does not need to be marked.
------------------------------------------------------------------------
r58282 | nobu | 2017-04-09 10:23:02 +0900 (Sun, 09 Apr 2017) | 5 lines

default.mspec: defer job tokens

* spec/default.mspec (MSpecScript::JobServer#cores): defer getting
  job tokens until required.  when running only one spec file,
  `-j` option has no effect.
------------------------------------------------------------------------
r58281 | svn | 2017-04-09 10:23:02 +0900 (Sun, 09 Apr 2017) | 1 line

* 2017-04-09
------------------------------------------------------------------------
r58280 | nobu | 2017-04-09 10:23:01 +0900 (Sun, 09 Apr 2017) | 4 lines

test/unit.rb: no jobserver in workers

* test/lib/test/unit.rb (Test::Unit::Parallel#process_args):
  worker processes do not access job server.
------------------------------------------------------------------------
r58279 | nobu | 2017-04-08 16:29:55 +0900 (Sat, 08 Apr 2017) | 4 lines

Show logs after PR merger

* .travis.yml (before_script): show logs of merged pull requests
  to rubyspec.
------------------------------------------------------------------------
r58278 | nobu | 2017-04-08 16:29:54 +0900 (Sat, 08 Apr 2017) | 5 lines

Split commands

* .travis.yml (before_script): split commands to prepare variables
  for pull request URLs to rubyspec, to stop when each commands
  failed.
------------------------------------------------------------------------
r58277 | nobu | 2017-04-08 12:25:50 +0900 (Sat, 08 Apr 2017) | 4 lines

basicsocket.c: proper system call name

* ext/socket/basicsocket.c (rsock_bsock_send): show proper system
  call name in the exception message.
------------------------------------------------------------------------
r58276 | suke | 2017-04-08 11:37:03 +0900 (Sat, 08 Apr 2017) | 2 lines

ext/win32ole/win32ole_variant.c (ole_val2variant_err): use FIXNUM_P, RB_TYPE_P

------------------------------------------------------------------------
r58275 | svn | 2017-04-08 01:08:50 +0900 (Sat, 08 Apr 2017) | 1 line

* 2017-04-08
------------------------------------------------------------------------
r58274 | nobu | 2017-04-08 01:08:49 +0900 (Sat, 08 Apr 2017) | 4 lines

.travis.yml: split long command [ci skip]

* .travis.yml (before_script): split long command to merge pull
  requests to rubyspec from github.
------------------------------------------------------------------------
r58273 | nobu | 2017-04-07 23:00:22 +0900 (Fri, 07 Apr 2017) | 5 lines

.travis.yml: multiple rubyspec PRs [ci skip]

* .travis.yml (before_script): merge multiple pull requests
  rubyspec to from github.  pull request numbers are given by
  RUBYSPEC_PULL_REQUEST, as a comma or space separated list.
------------------------------------------------------------------------
r58272 | nobu | 2017-04-07 22:26:12 +0900 (Fri, 07 Apr 2017) | 1 line

use dedicated assertions
------------------------------------------------------------------------
r58271 | nobu | 2017-04-07 22:26:12 +0900 (Fri, 07 Apr 2017) | 1 line

Use \A and \z to match whole string
------------------------------------------------------------------------
r58270 | usa | 2017-04-07 21:56:35 +0900 (Fri, 07 Apr 2017) | 4 lines

Classify extlibs tool

* tool/extlibs.rb (ExtLibs): classify the tool to make it able to reuse it.

------------------------------------------------------------------------
r58269 | ko1 | 2017-04-07 16:50:30 +0900 (Fri, 07 Apr 2017) | 2 lines

insert assertions for THROW_DATA_* macros.

------------------------------------------------------------------------
r58268 | ko1 | 2017-04-07 15:41:32 +0900 (Fri, 07 Apr 2017) | 5 lines

introduce imemo_type_p(v, imemo_type)

* internal.h: introduce imemo_type_p() which checks the given value is
  T_IMEMO and imemo_type() == given imemo_type.

------------------------------------------------------------------------
r58267 | nobu | 2017-04-07 13:00:56 +0900 (Fri, 07 Apr 2017) | 4 lines

fix condition of assert_not_respond_to

* test/lib/test/unit/assertions.rb (assert_not_respond_to): fix
  condition to assert.
------------------------------------------------------------------------
r58266 | nobu | 2017-04-07 12:56:16 +0900 (Fri, 07 Apr 2017) | 4 lines

assert_not_respond_to private method

* test/lib/test/unit/assertions.rb (assert_not_respond_to): allow
  private flag as well as assert_respond_to.
------------------------------------------------------------------------
r58265 | svn | 2017-04-07 12:56:16 +0900 (Fri, 07 Apr 2017) | 1 line

* 2017-04-07
------------------------------------------------------------------------
r58264 | nobu | 2017-04-07 12:56:15 +0900 (Fri, 07 Apr 2017) | 4 lines

assert_respond_to non-private method

* test/lib/test/unit/assertions.rb (assert_respond_to): do not
  call super class assert_respond_to when false priv is given.
------------------------------------------------------------------------
r58263 | nobu | 2017-04-06 13:42:41 +0900 (Thu, 06 Apr 2017) | 4 lines

internal.h: parenthesize macro argument

* internal.h (THROW_DATA_P): parenthesize the argument which is
  casted.
------------------------------------------------------------------------
r58262 | ko1 | 2017-04-06 11:56:23 +0900 (Thu, 06 Apr 2017) | 15 lines

fix TracePoint#return_value with non-local exits

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

* internal.h: define THROW_DATA_CONSUMED flag.

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

* vm_insnhelper.h: add THROW_DATA_CONSUMED_P() and
  THROW_DATA_CONSUMED_SET().

------------------------------------------------------------------------
r58261 | nobu | 2017-04-06 11:33:40 +0900 (Thu, 06 Apr 2017) | 1 line

Freeze RbConfig::SIZEOF and RbConfig::LIMITS
------------------------------------------------------------------------
r58260 | nobu | 2017-04-06 11:10:40 +0900 (Thu, 06 Apr 2017) | 5 lines

Rename RbConfig::Limits as RbConfig::LIMITS

* template/limits.c.tmpl (Init_limits): rename RbConfig::Limits as
  RbConfig::LIMITS, constants other than class or module are all
  uppercase with underscores by convention.
------------------------------------------------------------------------
r58259 | hsbt | 2017-04-06 10:47:45 +0900 (Thu, 06 Apr 2017) | 1 line

Update library entry for stringio and fiddle.
------------------------------------------------------------------------
r58258 | svn | 2017-04-06 09:14:58 +0900 (Thu, 06 Apr 2017) | 1 line

* 2017-04-06
------------------------------------------------------------------------
r58257 | kazu | 2017-04-06 09:14:57 +0900 (Thu, 06 Apr 2017) | 3 lines

NEWS: mention Array#append and Array#prepend

[Feature #12746] [ci skip]
------------------------------------------------------------------------
r58256 | hsbt | 2017-04-05 22:16:32 +0900 (Wed, 05 Apr 2017) | 5 lines

Import psych-3.0.0.beta1 from ruby/psych.

  * Removed deprecated code.
  * Removed code related syck gem.
  * Fixed typos.
------------------------------------------------------------------------
r58255 | hsbt | 2017-04-05 20:04:25 +0900 (Wed, 05 Apr 2017) | 3 lines

Added initial gemspec for ruby/fiddle.

  [Feature #13403][ruby-core:80577]
------------------------------------------------------------------------
r58254 | shyouhei | 2017-04-05 17:52:31 +0900 (Wed, 05 Apr 2017) | 8 lines

fix --with-gmp (broken by r57490)

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

------------------------------------------------------------------------
r58253 | nobu | 2017-04-05 17:34:18 +0900 (Wed, 05 Apr 2017) | 5 lines

compile.c: remove side effects by debug macros

* compile.c (debugp_param): do not evaluate arguments of debug
  macros, unless the debug mode is enabled.  these macros should
  not have side effects.
------------------------------------------------------------------------
r58252 | nobu | 2017-04-05 16:07:51 +0900 (Wed, 05 Apr 2017) | 3 lines

configure.in: HAVE_MALLOC_CONF

* configure.in: define HAVE_MALLOC_CONF when using jemalloc.
------------------------------------------------------------------------
r58251 | nobu | 2017-04-05 10:36:21 +0900 (Wed, 05 Apr 2017) | 4 lines

default.mspec: job server

* spec/default.mspec: override MSpecScript#cores by the tokens
  from the parent make job server.
------------------------------------------------------------------------
r58250 | nobu | 2017-04-05 09:12:43 +0900 (Wed, 05 Apr 2017) | 3 lines

parse.y: ID for logop

* parse.y (logop): use ID instead of token values.
------------------------------------------------------------------------
r58249 | svn | 2017-04-05 08:42:01 +0900 (Wed, 05 Apr 2017) | 1 line

* 2017-04-05
------------------------------------------------------------------------
r58248 | nobu | 2017-04-05 08:42:00 +0900 (Wed, 05 Apr 2017) | 4 lines

parse.y: use idGE for tGEQ

* parse.y (arg): use ID directly for '>=' operator, without
  TOKEN2ID macro.
------------------------------------------------------------------------
r58247 | nobu | 2017-04-04 23:19:04 +0900 (Tue, 04 Apr 2017) | 4 lines

parse.y: share with ripper

* parse.y (rb_parser_trace_lex_state, rb_parser_show_bitstack):
  share with ripper.
------------------------------------------------------------------------
r58246 | nobu | 2017-04-04 23:13:46 +0900 (Tue, 04 Apr 2017) | 4 lines

parse.y: flush debug buffer

* parse.y (rb_parser_trace_lex_state, rb_parser_show_bitstack):
  flush debug buffer before traces of lex_state and bitstack.
------------------------------------------------------------------------
r58245 | akr | 2017-04-04 21:54:42 +0900 (Tue, 04 Apr 2017) | 2 lines

Refactored using Method#owner.

------------------------------------------------------------------------
r58244 | stomar | 2017-04-04 04:23:13 +0900 (Tue, 04 Apr 2017) | 5 lines

improve docs for #truncate, #floor, and #ceil methods

* numeric.c: [DOC] improve and harmonize documentation
  for {Float,Integer,Numeric}#{truncate,floor,ceil}.
* rational.c: [DOC] ditto for Rational#{truncate,floor,ceil}.
------------------------------------------------------------------------
r58243 | svn | 2017-04-04 04:19:21 +0900 (Tue, 04 Apr 2017) | 1 line

* 2017-04-04
------------------------------------------------------------------------
r58242 | stomar | 2017-04-04 04:19:20 +0900 (Tue, 04 Apr 2017) | 5 lines

improve docs for #round methods

* numeric.c: [DOC] improve and harmonize documentation
  for {Float,Integer,Numeric}#round.
* rational.c: [DOC] ditto for Rational#round.
------------------------------------------------------------------------
r58241 | kazu | 2017-04-03 21:30:04 +0900 (Mon, 03 Apr 2017) | 1 line

Fix arguments order of IO#pwrite
------------------------------------------------------------------------
r58240 | nobu | 2017-04-03 09:10:50 +0900 (Mon, 03 Apr 2017) | 14 lines

Add IO#pread and IO#pwrite methods

These methods are useful for safe/concurrent file I/O in
multi-thread/process environments and also fairly standard
nowadays especially in systems supporting pthreads.

Based on patches by Avseyev <sergey.avseyev@gmail.com> at
[ruby-core:79290].  [Feature #4532]

* configure.in: check for pwrite(2).  pread() is already used
  internally for IO.copy_stream.

* io.c: implement wrappers for pread(2) and pwrite(2) and expose
  them in IO.
------------------------------------------------------------------------
r58239 | svn | 2017-04-03 05:16:02 +0900 (Mon, 03 Apr 2017) | 1 line

* 2017-04-03
------------------------------------------------------------------------
r58238 | normal | 2017-04-03 05:16:02 +0900 (Mon, 03 Apr 2017) | 9 lines

compile.c: avoid duplicate mark entry for string literal Range

iseq_add_mark_object is called in iseq_set_sequence later on,
so we only need to call iseq_add_mark_object_compile_time
in iseq_peephole_optimize.  Without this change, there would've
been a duplicate entry in the long-lived iseq mark_ary.

* compile.c (iseq_peephole_optimize): avoid duplicate mark object entry
  [ruby-core:80536] [Feature #13355]
------------------------------------------------------------------------
r58237 | nobu | 2017-04-02 12:05:10 +0900 (Sun, 02 Apr 2017) | 1 line

update configure by prereq [ci skip]
------------------------------------------------------------------------
r58236 | normal | 2017-04-02 10:14:14 +0900 (Sun, 02 Apr 2017) | 8 lines

thread.c: comments on M:N threading [ci skip]

I may experiment with M:N threading in coming months.  Often I
find myself yearning for the old 1.8 days when spawning threads
was really cheap for network operations.  But I also like to use
native blocking recv_io and accept calls for round-robin load
distribution and accessing files on systems with dozens of slow
rotational disks.
------------------------------------------------------------------------
r58235 | nobu | 2017-04-02 07:48:01 +0900 (Sun, 02 Apr 2017) | 4 lines

rational.c: improves Rational#round rdoc [ci skip]

* rational.c (nurat_round_n): [DOC] improves Integer#round
  documentation as well as Float#round.
------------------------------------------------------------------------
r58234 | normal | 2017-04-02 07:18:25 +0900 (Sun, 02 Apr 2017) | 5 lines

test/ruby/test_optimization.rb: quiet warnings

This quiets an old "assigned but unused variable" warning left
over after r56653 as well as two new "ambiguous first argment"
warnings introduced in r58233.
------------------------------------------------------------------------
r58233 | normal | 2017-04-02 06:38:25 +0900 (Sun, 02 Apr 2017) | 16 lines

compile.c: optimize literal String range in case/when dispatch

This is similar in spirit to opt_case_dispatch as the literal
Range here is guaranteed to be immutable when used for
checkmatch.

Normal range literals with non-frozen strings are actually
mutable, as Range#begin and Range#end exposes the strings to
modification.  So those Range objects cannot be frozen without
breaking compatibility, but Ranges in case/when dispatch can be
frozen at compile time.

* compile.c (iseq_peephole_optimize): persistent Range creation
  when String literals are used as beginning and end of range
  when used for case/when dispatch.
  [ruby-core:80290] [Feature #13355]
------------------------------------------------------------------------
r58232 | stomar | 2017-04-02 05:43:35 +0900 (Sun, 02 Apr 2017) | 1 line

doc/contributors.rdoc: [DOC] update
------------------------------------------------------------------------
r58231 | svn | 2017-04-02 05:20:00 +0900 (Sun, 02 Apr 2017) | 1 line

* 2017-04-02
------------------------------------------------------------------------
r58230 | stomar | 2017-04-02 05:19:59 +0900 (Sun, 02 Apr 2017) | 11 lines

rational.c: improve docs

* rational.c: [DOC] improve docs for Rational and related methods
  * improve class documentation for Rational
  * fix call-seq's
  * simplify examples for Rational#{floor,ceil,truncate,round}
  * fix wrong examples for #floor, subtraction, and exponentiation
  * improve docs for #<=>, Kernel#Rational, {String,Float}#to_r,
    Integer.{gcd,lcm,gcdlcm}
  * fix typos, grammar, and rdoc formatting
  * other improvements
------------------------------------------------------------------------
r58229 | eregon | 2017-04-01 19:30:48 +0900 (Sat, 01 Apr 2017) | 6 lines

ostruct.rb: improve fix for OpenStruct.allocate + #respond_to?

* lib/ostruct.rb (OpenStruct#respond_to_missing?): this makes
  OpenStruct#respond_to? works on any OpenStruct instance,
  just like Kernel#respond_to? does, without workarounds.
  [ruby-core:80292] [Bug #13358]
------------------------------------------------------------------------
r58228 | svn | 2017-04-01 16:38:13 +0900 (Sat, 01 Apr 2017) | 1 line

* 2017-04-01
------------------------------------------------------------------------
r58227 | nobu | 2017-04-01 16:38:12 +0900 (Sat, 01 Apr 2017) | 6 lines

array.c: Array#append and Array#prepend

* array.c (Init_Array): Add alias "append" to Array#push, and
  "prepend" to Array#unshift.  [Feature #12746] [Fix GH-1574]

Author:    pascbjumper2 <stowers.joshua@live.com>
------------------------------------------------------------------------
r58226 | nobu | 2017-03-31 16:34:47 +0900 (Fri, 31 Mar 2017) | 3 lines

exts.mk.tmpl: note footer [ci skip]

* template/exts.mk.tmpl: place note footer message at the end.
------------------------------------------------------------------------
r58225 | nobu | 2017-03-31 16:34:46 +0900 (Fri, 31 Mar 2017) | 3 lines

debug.c: check codepage value [ci skip]

* debug.c (set_debug_option): check garbage and overflow.
------------------------------------------------------------------------
r58224 | nobu | 2017-03-31 09:35:02 +0900 (Fri, 31 Mar 2017) | 7 lines

RUBY_DEBUG codepage option [ci skip]

* debug.c (set_debug_option): add "codepage" option to force
  locale charmap on Windows.

* localeinit.c (locale_charmap): use the codepage by debug env if
  given.
------------------------------------------------------------------------
r58223 | nobu | 2017-03-31 09:35:01 +0900 (Fri, 31 Mar 2017) | 4 lines

setup.mak: ENABLE_DEBUG_ENV [ci skip]

* win32/setup.mak (-basic-vars-): pass ENABLE_DEBUG_ENV to
  Makefile.
------------------------------------------------------------------------
r58222 | svn | 2017-03-31 00:20:52 +0900 (Fri, 31 Mar 2017) | 1 line

* 2017-03-31
------------------------------------------------------------------------
r58221 | nobu | 2017-03-31 00:20:52 +0900 (Fri, 31 Mar 2017) | 5 lines

localeinit.c: locale_charmap return value

* localeinit.c (locale_charmap): fix the return value to call conv
  function instead of encoding index on platforms where locale
  information is not available.
------------------------------------------------------------------------
r58220 | nobu | 2017-03-30 16:25:13 +0900 (Thu, 30 Mar 2017) | 1 line

.travis.yml: make tests silent [ci skip]
------------------------------------------------------------------------
r58219 | nobu | 2017-03-30 16:16:20 +0900 (Thu, 30 Mar 2017) | 1 line

.travis.yml: checkout ruby/spec PR
------------------------------------------------------------------------
r58218 | nobu | 2017-03-30 16:04:14 +0900 (Thu, 30 Mar 2017) | 4 lines

git-refresh: rewrite options

* tool/git-refresh: parse options without git-rev-parse, which is
  old on travis.
------------------------------------------------------------------------
r58217 | nobu | 2017-03-30 15:44:27 +0900 (Thu, 30 Mar 2017) | 5 lines

tool/git-refresh

* tool/git-refresh: tool to clone or update git working directory.

* Makefile.in: use git-refresh.
------------------------------------------------------------------------
r58216 | svn | 2017-03-30 04:12:02 +0900 (Thu, 30 Mar 2017) | 1 line

* 2017-03-30
------------------------------------------------------------------------
r58215 | stomar | 2017-03-30 04:12:01 +0900 (Thu, 30 Mar 2017) | 4 lines

methods.rdoc: small improvements

* doc/syntax/methods.rdoc: [DOC] small improvements: fix some typos,
  grammar, punctuation, consistently use capitalized "Ruby".
------------------------------------------------------------------------
r58212 | mame | 2017-03-29 20:49:39 +0900 (Wed, 29 Mar 2017) | 3 lines

Fix two typos

My typo checker :-) found the bugs.
------------------------------------------------------------------------
r58211 | sorah | 2017-03-29 20:33:59 +0900 (Wed, 29 Mar 2017) | 5 lines

string.c: Supress logical-op-parentheses warning

* string.c(rb_str_upcase_bang): Supress logical-op-parentheses warning
  Patch by Fukuo Kadota <fukuo-kadota@cookpad.com>,
  Closes [GH-1570] [Bug #13387].
------------------------------------------------------------------------
r58210 | nobu | 2017-03-29 18:47:42 +0900 (Wed, 29 Mar 2017) | 4 lines

vsnprintf.c: prefix with precision

* vsnprintf.c (BSD_vfprintf): sign and hex-prefix should not be
  counted in precision.  [ruby-dev:47714] [Bug #8916]
------------------------------------------------------------------------
r58209 | nobu | 2017-03-29 18:47:40 +0900 (Wed, 29 Mar 2017) | 4 lines

test_minitest_unit.rb: assert_triggered

* test/minitest/test_minitest_unit.rb (assert_triggered): rename
  to be hidden in backtraces.
------------------------------------------------------------------------
r58208 | sorah | 2017-03-29 18:31:13 +0900 (Wed, 29 Mar 2017) | 5 lines

Add documents on Process::CLOCK_* constants

* process.c: Add documents on Process::CLOCK_* constants.
  Patch by Sunao Komuro <sunao-komuro@cookpad.com>.
  Closes [GH-1567] [Bug #13386]
------------------------------------------------------------------------
r58207 | sorah | 2017-03-29 18:24:10 +0900 (Wed, 29 Mar 2017) | 8 lines

Fix `make clean` errors

Patch by Kohei Suzuki <eagletmt@gmail.com>.

* common.mk(clean-rubyspec): Supress error messages when rubyspec files
  don't exist. [GH-1563] [Bug #13384]

* Makefile.in: Fix error when files don't exist. [GH-1563] [Bug #13384]
------------------------------------------------------------------------
r58206 | nobu | 2017-03-29 14:54:14 +0900 (Wed, 29 Mar 2017) | 4 lines

parse.y: dot_or_colon

* parse.y (dot_or_colon): use the default action without type
  casts.
------------------------------------------------------------------------
r58205 | sorah | 2017-03-29 13:32:00 +0900 (Wed, 29 Mar 2017) | 9 lines

Remove unused Init_frozen_strings declaration

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

Patch by Kohei Suzuki <eagletmt@gmail.com>

* internal.h: Remove declaration of unexist function
  [Fix GH-1558]
------------------------------------------------------------------------
r58204 | nobu | 2017-03-29 12:00:50 +0900 (Wed, 29 Mar 2017) | 1 line

test_symbol.rb: switch to assert_not_equal
------------------------------------------------------------------------
r58201 | svn | 2017-03-29 02:14:50 +0900 (Wed, 29 Mar 2017) | 1 line

* 2017-03-29
------------------------------------------------------------------------
r58200 | normal | 2017-03-29 02:14:49 +0900 (Wed, 29 Mar 2017) | 8 lines

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

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

* test/ruby/test_symbol.rb (test_hash_nondeterministic): new test
  [ruby-core:80430] [Bug #13376]
------------------------------------------------------------------------
r58198 | kazu | 2017-03-28 22:47:45 +0900 (Tue, 28 Mar 2017) | 1 line

fix a typo [ci skip]
------------------------------------------------------------------------
r58197 | kazu | 2017-03-28 22:47:43 +0900 (Tue, 28 Mar 2017) | 1 line

Update assertion message [ci skip]
------------------------------------------------------------------------
r58195 | nobu | 2017-03-28 18:21:58 +0900 (Tue, 28 Mar 2017) | 4 lines

ostruct.rb: refine visibility failure message

* lib/ostruct.rb (method_missing): raise an exception with proper
  visibility message.
------------------------------------------------------------------------
r58192 | nobu | 2017-03-28 11:30:14 +0900 (Tue, 28 Mar 2017) | 4 lines

numeric.c: improves Integer#round rdoc [ci skip]

* numeric.c (int_round): [DOC] improves Integer#round documentation
  as well as Float#round.
------------------------------------------------------------------------
r58191 | svn | 2017-03-28 11:15:52 +0900 (Tue, 28 Mar 2017) | 1 line

* 2017-03-28
------------------------------------------------------------------------
r58190 | nobu | 2017-03-28 11:15:51 +0900 (Tue, 28 Mar 2017) | 6 lines

numeric.c: improves Float#round rdoc [ci skip]

* numeric.c (flo_round): [DOC] improves Float#round documentation
  to better highlight the half keyword.  [Fix GH-1541]

Author:    Evan Brodie <brodie.evan@gmail.com>
------------------------------------------------------------------------
r58156 | nobu | 2017-03-27 23:57:08 +0900 (Mon, 27 Mar 2017) | 10 lines

dir.c: err at glob failure

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

dir.c: ruby_glob_funcs_t
------------------------------------------------------------------------
r58150 | nobu | 2017-03-27 22:15:48 +0900 (Mon, 27 Mar 2017) | 6 lines

error.c: warning functions

* error.c: define warning functions in all combinations of
  * no errno, system errno, argument
  * without/with encoding
  * enabled/disabled by default
------------------------------------------------------------------------
r58146 | nobu | 2017-03-27 19:44:32 +0900 (Mon, 27 Mar 2017) | 7 lines

error.c: refactor warning messages

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

* error.c (syserr_warning): write warning message with the system
  error message.
------------------------------------------------------------------------
r58145 | svn | 2017-03-27 15:12:38 +0900 (Mon, 27 Mar 2017) | 1 line

* 2017-03-27
------------------------------------------------------------------------
r58144 | normal | 2017-03-27 15:12:37 +0900 (Mon, 27 Mar 2017) | 14 lines

fix redefinition optimization for -"literal string" (UMinus)

Unfortunately this enlarges insns.def by yet another
instruction.  However, it is much prettier than opt_str_freeze
in use, and maybe we can avoid having so many instructions in
the future.

[ruby-core:80368]

* insns.def (DEFINE_INSN): new instruction: opt_str_uminus (maybe temporary)
* compile.c (iseq_compile_each0): split instructions
* test/ruby/test_optimization.rb (test_string_uminus): new test
* vm.c (vm_init_redefined_flag): set redefinintion flag for uminus
* vm_core.h (enum ruby_basic_operators): add BOP_UMINUS
------------------------------------------------------------------------
r58142 | normal | 2017-03-26 19:21:45 +0900 (Sun, 26 Mar 2017) | 3 lines

NEWS: feature number for String#-@ compile-time optimization

[ruby-core:79971] [Feature #13295]
------------------------------------------------------------------------
r58138 | nobu | 2017-03-26 16:13:43 +0900 (Sun, 26 Mar 2017) | 5 lines

parse.y: unterminated content token

* parse.y (parser_parse_string): defer the end token to next
  reading, to yield tSTRING_CONTENT with the unterminated content.
  [Bug #13363]
------------------------------------------------------------------------
r58136 | nobu | 2017-03-26 10:21:57 +0900 (Sun, 26 Mar 2017) | 3 lines

gmake.mk: multi mspec

* defs/gmake.mk (MSPECOPT): enable multi exec if parallel make.
------------------------------------------------------------------------
r58135 | nobu | 2017-03-26 09:50:59 +0900 (Sun, 26 Mar 2017) | 3 lines

common.mk: test-rubyspec

* common.mk (yes-test-rubyspec): make jobserver ready.
------------------------------------------------------------------------
r58134 | svn | 2017-03-26 05:35:52 +0900 (Sun, 26 Mar 2017) | 1 line

* 2017-03-26
------------------------------------------------------------------------
r58133 | svn | 2017-03-26 05:35:52 +0900 (Sun, 26 Mar 2017) | 1 line

* properties.
------------------------------------------------------------------------
r58132 | usa | 2017-03-26 05:35:51 +0900 (Sun, 26 Mar 2017) | 4 lines

Add a tool for backporters.

* tool/generate-backport-changelog.rb: Generate ChangeLog entries from svn log.

------------------------------------------------------------------------
r58084 | nobu | 2017-03-25 16:46:12 +0900 (Sat, 25 Mar 2017) | 4 lines

configure.in: syscall is deprecated on macOS

* configure.in: syscall is no longer supported on macOS since
  10.12.  [ruby-core:80300] [Bug #13361]
------------------------------------------------------------------------
r58083 | nobu | 2017-03-25 12:23:43 +0900 (Sat, 25 Mar 2017) | 5 lines

class.c: prohibit refinement module

* class.c (ensure_includable): cannot include refinement
  module, or the type and the class do not match.
  [ruby-core:79632] [Bug #13236]
------------------------------------------------------------------------
r58082 | nobu | 2017-03-25 11:57:30 +0900 (Sat, 25 Mar 2017) | 4 lines

class.c: ensure_includable

* class.c (ensure_includable): extract checks to include and
  prepend.
------------------------------------------------------------------------
r58081 | svn | 2017-03-25 10:07:36 +0900 (Sat, 25 Mar 2017) | 1 line

* 2017-03-25
------------------------------------------------------------------------
r58080 | nobu | 2017-03-25 10:07:35 +0900 (Sat, 25 Mar 2017) | 5 lines

keep line number after unterminated string literal

* parse.y (parser_parse_string): keep line number even after an
  unterminated string literal.  it does not matter in the parser,
  ripper needs this value after this error.
------------------------------------------------------------------------
r58078 | naruse | 2017-03-24 23:05:50 +0900 (Fri, 24 Mar 2017) | 1 line

export_changelog must specify the branch's url
------------------------------------------------------------------------
r58077 | nobu | 2017-03-24 21:16:54 +0900 (Fri, 24 Mar 2017) | 5 lines

ostruct.rb: fix OpenStruct.allocate

* lib/ostruct.rb (OpenStruct.allocate): initialize an instance
  variable directly, without calling `intialize` method which may
  be overridden in a subclass.  [ruby-core:80292] [Bug #13358]
------------------------------------------------------------------------
r58076 | normal | 2017-03-24 16:29:33 +0900 (Fri, 24 Mar 2017) | 5 lines

logger: remove redundant opt_str_freeze use

Strings in "when" statements are allocation-free, so there's
never any reason to uglify the code to use opt_str_freeze over
the normal putobject instructions, here.
------------------------------------------------------------------------
r58075 | nobu | 2017-03-24 13:37:28 +0900 (Fri, 24 Mar 2017) | 4 lines

Do not update Unicode headers

* common.mk (name2ctype.h, casefold.h): use as checked out unless
  ALWAYS_UPDATE_UNICODE=yes.
------------------------------------------------------------------------
r58074 | nobu | 2017-03-24 12:42:28 +0900 (Fri, 24 Mar 2017) | 4 lines

Don't download from Unicode.org

* tool/make-snapshot: use checked out headers for Unicode, to get
  rid of downloading data files from Unicode.org.
------------------------------------------------------------------------
r58073 | nobu | 2017-03-24 11:44:21 +0900 (Fri, 24 Mar 2017) | 1 line

common.mk: touch-unicode-files
------------------------------------------------------------------------
r58072 | nobu | 2017-03-24 10:10:46 +0900 (Fri, 24 Mar 2017) | 1 line

Make Unicode data directory
------------------------------------------------------------------------
r58071 | nobu | 2017-03-24 08:55:29 +0900 (Fri, 24 Mar 2017) | 4 lines

Don't download from Unicode.org

* .travis.yml, appveyor.yml: use checked out headers for Unicode,
  to get rid of downloading data files from Unicode.org.
------------------------------------------------------------------------
r58070 | nobu | 2017-03-24 00:55:00 +0900 (Fri, 24 Mar 2017) | 4 lines

enc-unicode.rb: fix version matching

* tool/enc-unicode.rb (data_foreach): version comments do not
  include sub directory names.
------------------------------------------------------------------------
r58069 | nobu | 2017-03-24 00:49:10 +0900 (Fri, 24 Mar 2017) | 6 lines

fix GraphemeBreakProperty.txt

* tool/downloader.rb: download to the file given in ARGV.

* tool/enc-unicode.rb (parse_GraphemeBreakProperty): fix data file
  path as $(UNICODE_PROPERTY_FILES) in common.mk.
------------------------------------------------------------------------
r58068 | svn | 2017-03-24 00:47:27 +0900 (Fri, 24 Mar 2017) | 1 line

* 2017-03-24
------------------------------------------------------------------------
r58067 | nobu | 2017-03-24 00:47:26 +0900 (Fri, 24 Mar 2017) | 4 lines

common.mk: updating name2ctype.h

* common.mk (name2ctype.h): update if ALWAYS_UPDATE_UNICODE = yes,
  as well as casefold.h.
------------------------------------------------------------------------
r58066 | nobu | 2017-03-23 16:59:57 +0900 (Thu, 23 Mar 2017) | 4 lines

enc-unicode.rb: ifdef blocks

* tool/enc-unicode.rb (Unifdef#ifdef): enclose conditional blocks
  in blocks.
------------------------------------------------------------------------
r58065 | nobu | 2017-03-23 16:59:56 +0900 (Thu, 23 Mar 2017) | 1 line

enc-unicode.rb: uniname2ctype_offset
------------------------------------------------------------------------
r58064 | nobu | 2017-03-23 16:53:35 +0900 (Thu, 23 Mar 2017) | 4 lines

update name2ctype.h

* enc/unicode/9.0.0/name2ctype.h: update due to merger of Onigmo
  6.0.0.
------------------------------------------------------------------------
r58063 | svn | 2017-03-23 05:23:42 +0900 (Thu, 23 Mar 2017) | 1 line

* 2017-03-23
------------------------------------------------------------------------
r58062 | stomar | 2017-03-23 05:23:42 +0900 (Thu, 23 Mar 2017) | 3 lines

io.c: [DOC] expand docs for IO#puts

[ruby-core:80081] [Bug #13306]
------------------------------------------------------------------------
r58059 | nobu | 2017-03-22 23:06:57 +0900 (Wed, 22 Mar 2017) | 4 lines

stringio.gemspec: requires ruby 2.2

* ext/stringio/stringio.gemspec: bump up required ruby version to
  2.2, which exports rb_get_kwargs() first.
------------------------------------------------------------------------
r58057 | nobu | 2017-03-22 22:55:03 +0900 (Wed, 22 Mar 2017) | 4 lines

stringio.c: RB_INTEGER_TYPE_P

* ext/stringio/stringio.c (RB_INTEGER_TYPE_P): fallback definition
  for 2.3 or earlier.
------------------------------------------------------------------------
r58055 | kazu | 2017-03-22 21:27:53 +0900 (Wed, 22 Mar 2017) | 1 line

Use https URL instead of http URL
------------------------------------------------------------------------
r58054 | shyouhei | 2017-03-22 15:00:18 +0900 (Wed, 22 Mar 2017) | 11 lines

ruby tool/update-deps --fix

Onigumo 6 (r57045) introduced new onigumo.h header file, which is
required from quite much everywhere.  This commit adds necessary
dependencies.

Note: ruby/oniguruma.h now includes onigumo.h,
      ruby/io.h includes oniguruma.h,
      ruby/encoding.h also includes oniguruma.h,
      and internal.h includes encoding.h.

------------------------------------------------------------------------
r58050 | svn | 2017-03-22 10:58:17 +0900 (Wed, 22 Mar 2017) | 1 line

* 2017-03-22
------------------------------------------------------------------------
r58049 | nobu | 2017-03-22 10:58:17 +0900 (Wed, 22 Mar 2017) | 1 line

gemify stringio
------------------------------------------------------------------------
r58044 | nobu | 2017-03-21 17:03:49 +0900 (Tue, 21 Mar 2017) | 1 line

Download Unicode data by appveyor [ci skip]
------------------------------------------------------------------------
r58043 | nobu | 2017-03-21 16:19:23 +0900 (Tue, 21 Mar 2017) | 1 line

tool/downloader.rb: dryrun option [ci skip]
------------------------------------------------------------------------
r58042 | nobu | 2017-03-21 14:28:38 +0900 (Tue, 21 Mar 2017) | 6 lines

string.c: use the usable size

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

stringio.c: check range

* ext/stringio/stringio.c (strio_ungetc): raise RangeError instead
  of TypeError at too big value, as well as IO#ungetc.
------------------------------------------------------------------------
r58040 | nobu | 2017-03-21 12:15:56 +0900 (Tue, 21 Mar 2017) | 5 lines

stringio.c: check character code

* ext/stringio/stringio.c (strio_ungetc): check if the character
  code is valid in the encoding.  reported by Ahmad Sherif
  (ahmadsherif) at https://hackerone.com/reports/209593.
------------------------------------------------------------------------
r58039 | kazu | 2017-03-21 09:11:46 +0900 (Tue, 21 Mar 2017) | 4 lines

link to README.win32 instead of mentioning it in plain text

[Fix GH-1538][ci skip]
Author:    Rouan Wilsenach <Rouan.Wilsenach@tesglobal.com>
------------------------------------------------------------------------
r58038 | svn | 2017-03-21 05:30:26 +0900 (Tue, 21 Mar 2017) | 1 line

* 2017-03-21
------------------------------------------------------------------------
r58037 | stomar | 2017-03-21 05:30:25 +0900 (Tue, 21 Mar 2017) | 4 lines

docs for creating arrays

* array.c: [DOC] add example for Array.new with block and index.
  Reported by Don Cruickshank.  [ruby-core:68442] [Bug #10944]
------------------------------------------------------------------------
r58035 | hsbt | 2017-03-20 16:07:49 +0900 (Mon, 20 Mar 2017) | 3 lines

Added initial gemspec for mathn.

  [Feature #13335]
------------------------------------------------------------------------
r58034 | nobu | 2017-03-20 10:36:08 +0900 (Mon, 20 Mar 2017) | 3 lines

Avoid integer overflow in sprintf()

merged https://github.com/mruby/mruby/commit/ff03a9a61c62340cff62f8e0fdc1a1e8775b6f17
------------------------------------------------------------------------
r58033 | nobu | 2017-03-20 10:33:08 +0900 (Mon, 20 Mar 2017) | 4 lines

sprintf.c: string limits

* sprintf.c (ruby__sfvwrite): use long instead of size_t due to
  string limits.
------------------------------------------------------------------------
r58024 | svn | 2017-03-20 00:01:06 +0900 (Mon, 20 Mar 2017) | 1 line

* 2017-03-20
------------------------------------------------------------------------
r58023 | stomar | 2017-03-20 00:01:05 +0900 (Mon, 20 Mar 2017) | 7 lines

improve docs for URI::Generic

* lib/uri/generic.rb: [DOC] expand docs for URI::Generic#normalize
  to clarify what normalization means here.
  Reported by Robert Gleeson.  [ruby-core:58430] [Bug #9127]

* lib/uri/generic.rb: [DOC] fix indent for correct code block detection.
------------------------------------------------------------------------
r58021 | nobu | 2017-03-19 21:46:31 +0900 (Sun, 19 Mar 2017) | 4 lines

sprintf.c: use FILL

* sprintf.c (rb_str_format): use FILL and FILL_ macros instead of
  while loop.
------------------------------------------------------------------------
r58020 | stomar | 2017-03-19 18:51:29 +0900 (Sun, 19 Mar 2017) | 7 lines

date_core.c: fix error in DateTime docs

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

* ext/date/date_core.c: [DOC] ditto for DateTime#iso8601 and
  DateTime#xmlschema; other small improvements.
------------------------------------------------------------------------
r58019 | nobu | 2017-03-19 10:11:12 +0900 (Sun, 19 Mar 2017) | 9 lines

vm_args.c: arity check of lambda

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

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

* vm_insnhelper.c (vm_callee_setup_block_arg): ditto.
------------------------------------------------------------------------
r58018 | nobu | 2017-03-19 00:58:13 +0900 (Sun, 19 Mar 2017) | 1 line

test_lambda.rb: remove duplcate tests
------------------------------------------------------------------------
r58017 | svn | 2017-03-19 00:30:15 +0900 (Sun, 19 Mar 2017) | 1 line

* 2017-03-19
------------------------------------------------------------------------
r58016 | nobu | 2017-03-19 00:30:14 +0900 (Sun, 19 Mar 2017) | 5 lines

test_lambda.rb: refine test

* test/ruby/test_lambda.rb (test_lambda_as_iterator): refine a
  test for the intention of the original report.
  [ruby-core:61340] [Bug #9605]
------------------------------------------------------------------------
r58015 | nobu | 2017-03-18 23:22:15 +0900 (Sat, 18 Mar 2017) | 4 lines

vm_args.c: pass block

* vm_args.c (refine_sym_proc_call): pass block to the method when
  using refinements.  [ruby-core:80219] [Bug #13325]
------------------------------------------------------------------------
r58014 | nobu | 2017-03-18 22:15:15 +0900 (Sat, 18 Mar 2017) | 3 lines

vm.c: fix up r58012

* vm.c (invoke_iseq_block_from_c): fix stack region length.
------------------------------------------------------------------------
r58012 | nobu | 2017-03-18 20:29:35 +0900 (Sat, 18 Mar 2017) | 4 lines

vm.c: guard arguments [EXPERIMENTAL]

* vm.c (invoke_iseq_block_from_c): guard arguments on stack, not
  to be clobbered during splatting.
------------------------------------------------------------------------
r58011 | nobu | 2017-03-18 19:37:53 +0900 (Sat, 18 Mar 2017) | 4 lines

.gdbinit: suppress gdb message [ci skip]

* .gdbinit (rp): check number of instance variables to get rid of
  "Invalid number 0 of repetitions."  message at an empty object.
------------------------------------------------------------------------
r58010 | nobu | 2017-03-18 19:19:52 +0900 (Sat, 18 Mar 2017) | 4 lines

.gdbinit: RArray in history [ci skip]

* .gdbinit (rp): put the contents of RArray in value history, for
  later use.
------------------------------------------------------------------------
r58009 | duerst | 2017-03-18 10:35:03 +0900 (Sat, 18 Mar 2017) | 1 line

fix accidental reversal of r57997 in r58000
------------------------------------------------------------------------
r58008 | stomar | 2017-03-18 05:48:51 +0900 (Sat, 18 Mar 2017) | 10 lines

io.c: improve docs

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

* io.c: [DOC] various improvements for docs of IO, ARGF, and Kernel:
  fix indent to ensure correct code block detection; sync "outbuf"
  paragraph for {IO,ARGF}#read, {IO,ARGF}#readpartial, and IO#sysread;
  fix formatting of call-seq's; improve Kernel#open example to use nil?;
  fix RDoc markup and typos.
------------------------------------------------------------------------
r58007 | svn | 2017-03-18 04:59:57 +0900 (Sat, 18 Mar 2017) | 1 line

* 2017-03-18
------------------------------------------------------------------------
r58006 | normal | 2017-03-18 04:59:56 +0900 (Sat, 18 Mar 2017) | 14 lines

remove branches in dmark and dfree GC callbacks

dmark and dfree callbacks are never called in gc.c for NULL
DATA_PTR values, not even for zombie objects.

* compile.c (ibf_loader_mark): remove branch for pointer validity
* compile.c (ibf_loader_free): ditto
* cont.c (cont_free): ditto
* cont.c (fiber_free): ditto
* dir.c (dir_free): ditto
* ext/stringio/stringio.c (strio_mark): ditto
* proc.c (binding_free): ditto
* thread_sync.c (mutex_free): ditto
* vm.c (thread_free): ditto
------------------------------------------------------------------------
r58005 | kazu | 2017-03-17 22:24:14 +0900 (Fri, 17 Mar 2017) | 1 line

fix a typo [ci skip]
------------------------------------------------------------------------
r58004 | nobu | 2017-03-17 19:08:02 +0900 (Fri, 17 Mar 2017) | 4 lines

vm.c: check stack

* vm.c (invoke_iseq_block_from_c): check stack overflow before
  pushing arguments.
------------------------------------------------------------------------
r58000 | duerst | 2017-03-17 11:24:53 +0900 (Fri, 17 Mar 2017) | 6 lines

clarifiy 'codepoint' in documentation of String#each_codepoint

Make sure it's clear that the returned values are not Unicode codepoints
for encodings other than UTF-8/UTF-16(BE|LE)/UTF-32(BE|LE).

[ci skip] [Bug #13321]
------------------------------------------------------------------------
r57999 | svn | 2017-03-17 10:29:24 +0900 (Fri, 17 Mar 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r57998 | hsbt | 2017-03-17 10:29:22 +0900 (Fri, 17 Mar 2017) | 7 lines

Merge rubygems-2.6.11

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

  See details of changelogs for 2.6.11 release:
  https://github.com/rubygems/rubygems/blob/adfcf40502716080bd9cdfdd2e43bd4296872784/History.txt#L3
------------------------------------------------------------------------
r57997 | normal | 2017-03-17 09:55:55 +0900 (Fri, 17 Mar 2017) | 8 lines

deduplicate static rb_str_format format strings

Anybody who hits these code paths can hit them again in the
future, so try deduplicating across multiple runs of these
methods to reduce garbage.

* string.c (str_upto_each): fstring on "%.*d"
* strftime.c (rb_strftime_with_timespec): fstring on "%0*d"
------------------------------------------------------------------------
r57996 | normal | 2017-03-17 09:55:50 +0900 (Fri, 17 Mar 2017) | 6 lines

deduplicate File::NULL string

"/dev/null" is a common sight for pre-1.9.3-compatible code
targeting *nix systems, so deduplicate it here, as well.

* file.c (Init_File): use fstring for File::NULL
------------------------------------------------------------------------
r57995 | normal | 2017-03-17 09:55:45 +0900 (Fri, 17 Mar 2017) | 7 lines

deduplicate "/", ":" and "\n" strings

"/" and ":" are always statically registered in symbol.c (Init_op_tbl),
and "\n" is a commonly seen in source code.

* file.c (Init_File): fstring on File::SEPARATOR and File::PATH_SEPARATOR
* io.c (Init_IO): fstring on rb_default_rs ("\n")
------------------------------------------------------------------------
r57994 | normal | 2017-03-17 08:17:14 +0900 (Fri, 17 Mar 2017) | 5 lines

NEWS: document shorter opt_str_freeze usage

Users do not read commit messages, but maybe they read NEWS.

r57828 ("compile.c: apply opt_str_freeze to String#-@ (uminus)")
------------------------------------------------------------------------
r57993 | svn | 2017-03-17 05:58:59 +0900 (Fri, 17 Mar 2017) | 1 line

* 2017-03-17
------------------------------------------------------------------------
r57992 | stomar | 2017-03-17 05:58:58 +0900 (Fri, 17 Mar 2017) | 1 line

bignum.c: [DOC] typos and grammar
------------------------------------------------------------------------
r57991 | nobu | 2017-03-16 15:51:24 +0900 (Thu, 16 Mar 2017) | 4 lines

rational.c: initialize n

* rational.c (read_num): `n` was used uninitialized when the
  string started with a period.
------------------------------------------------------------------------
r57990 | nobu | 2017-03-16 12:35:29 +0900 (Thu, 16 Mar 2017) | 4 lines

rational.c: float denom

* rational.c (parse_rat): allow float as a denominator as well as
  a numerator.  [ruby-core:79104] [Bug #13134]
------------------------------------------------------------------------
r57989 | nobu | 2017-03-16 12:32:16 +0900 (Thu, 16 Mar 2017) | 5 lines

rational.c: read_num

* rational.c (read_num): use rb_int_parse_cstr to parse integer
  parts, and make String#to_r consistent with #to_i and #to_f.
  [ruby-core:80098] [Bug #13105]
------------------------------------------------------------------------
r57988 | nobu | 2017-03-16 12:21:12 +0900 (Thu, 16 Mar 2017) | 4 lines

bignum.c: rb_int_parse_cstr

* bignum.c (rb_int_parse_cstr): extend rb_cstr_parse_inum with
  flags.
------------------------------------------------------------------------
r57987 | nobu | 2017-03-16 12:05:34 +0900 (Thu, 16 Mar 2017) | 4 lines

test_rational.rb: invalid exponent

* test/ruby/test_rational.rb (test_parse): more checks for invalid
  exponent.  [ruby-core:80098] [Bug #13105]
------------------------------------------------------------------------
r57986 | nobu | 2017-03-16 11:02:47 +0900 (Thu, 16 Mar 2017) | 4 lines

test_rational.rb: duplicate assertions

* test/ruby/test_rational.rb (test_parse): remove duplicate
  assertions.
------------------------------------------------------------------------
r57985 | nobu | 2017-03-16 10:53:52 +0900 (Thu, 16 Mar 2017) | 4 lines

rational.c: zero division

* rational.c (read_rat_nos): denominator cannot be 0, raise zero
  division in that case.
------------------------------------------------------------------------
r57984 | svn | 2017-03-16 09:43:08 +0900 (Thu, 16 Mar 2017) | 1 line

* 2017-03-16
------------------------------------------------------------------------
r57983 | nobu | 2017-03-16 09:43:07 +0900 (Thu, 16 Mar 2017) | 4 lines

test_rational.rb: shorten

* test/ruby/test_rational.rb (test_parse): reduce repeated
  arguments.
------------------------------------------------------------------------
r57982 | nobu | 2017-03-15 21:41:56 +0900 (Wed, 15 Mar 2017) | 1 line

vm_insnhelper.c: adjust indent [ci skip]
------------------------------------------------------------------------
r57981 | svn | 2017-03-15 17:25:59 +0900 (Wed, 15 Mar 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r57980 | ko1 | 2017-03-15 17:25:58 +0900 (Wed, 15 Mar 2017) | 19 lines

add several counters to analyze ivar inline caches.

* debug_counter.h: add (and renamed) several counters:
  ivar_get_ic_hit
  ivar_get_ic_miss
  ivar_get_ic_miss_serial
  ivar_get_ic_miss_unset
  ivar_get_ic_miss_noobject
  ivar_set_ic_hit
  ivar_set_ic_miss
  ivar_set_ic_miss_serial
  ivar_set_ic_miss_unset
  ivar_set_ic_miss_oorange
  ivar_set_ic_miss_noobject
  ivar_get_base
  ivar_set_base

  See related source code to know what counters mean.

------------------------------------------------------------------------
r57979 | nobu | 2017-03-15 17:15:32 +0900 (Wed, 15 Mar 2017) | 7 lines

object.c: make String#to_f consistent with literal

* object.c (rb_cstr_to_dbl): stop at successive underscores, as
  well as Float literals.  [ruby-core:80098] [Bug #13105]

  * `_` should be within digits
  * only one `_` allowed between digits
------------------------------------------------------------------------
r57978 | nobu | 2017-03-15 16:57:11 +0900 (Wed, 15 Mar 2017) | 6 lines

string.c: shortcut argument check

* string.c (str_casecmp, str_casecmp_p): split to skip argument
  check when it is a String certainly.

* string.c (sym_casecmp, sym_casecmp_p): shortcut argument checks.
------------------------------------------------------------------------
r57977 | kazu | 2017-03-15 09:59:32 +0900 (Wed, 15 Mar 2017) | 1 line

io.c: [DOC] add missing `$`
------------------------------------------------------------------------
r57976 | marcandre | 2017-03-15 05:09:30 +0900 (Wed, 15 Mar 2017) | 2 lines

* lib/matrix.rb: Add Vector.zero and Vector#zero?
  Patch by Chia-sheng Chen [#13208]
------------------------------------------------------------------------
r57975 | svn | 2017-03-15 00:14:22 +0900 (Wed, 15 Mar 2017) | 1 line

* 2017-03-15
------------------------------------------------------------------------
r57974 | mame | 2017-03-15 00:14:21 +0900 (Wed, 15 Mar 2017) | 4 lines

Stop a global server of Rinda test

This server seemed to cause "leaked file descriptor" warnings.
Moved it into the setup/teardown framework.
------------------------------------------------------------------------
r57973 | kazu | 2017-03-14 23:46:10 +0900 (Tue, 14 Mar 2017) | 1 line

vm_insnhelper.c: undef BUILTIN_CLASS_P too
------------------------------------------------------------------------
r57972 | glass | 2017-03-14 21:53:32 +0900 (Tue, 14 Mar 2017) | 5 lines

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

* lib/tempfile.rb (Tempfile#size): Fix its behavior when nothing
  is written. Tempfile#size should return 0 in this case.
  The patch is from nobu <nobu@ruby-lang.org>.
------------------------------------------------------------------------
r57971 | mame | 2017-03-14 20:39:58 +0900 (Tue, 14 Mar 2017) | 6 lines

Fix a consistency bug of ISEQ_COVERAGE [Bug #13305]

There is an invariant that ISEQ_COVERAGE(iseq) must be Qnil if and only
if option->coverage_enabled is false.  This invariant was broken by
NODE_PRELUDE which updates option->coverage_enabled but not
ISEQ_COVERAGE(iseq).
------------------------------------------------------------------------
r57970 | ko1 | 2017-03-14 15:52:44 +0900 (Tue, 14 Mar 2017) | 6 lines

Fiber also has same issue. [Bug #13313]

* thread.c (rb_vm_proc_local_ep): added.

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

------------------------------------------------------------------------
r57969 | nobu | 2017-03-14 14:54:35 +0900 (Tue, 14 Mar 2017) | 5 lines

thread.c: Thread.start with Symbol

* thread.c (thread_do_start): fix segfault at start with Symbol.
  proc created by Symbol#to_proc does not have environment unless
  using refinements.  [ruby-core:80147] [Bug #13313]
------------------------------------------------------------------------
r57968 | nobu | 2017-03-14 14:54:33 +0900 (Tue, 14 Mar 2017) | 4 lines

thread.c: thread_do_start

* thread.c (thread_do_start): extract from a macro in
  thread_start_func_2 for debugger.
------------------------------------------------------------------------
r57967 | nobu | 2017-03-14 13:16:02 +0900 (Tue, 14 Mar 2017) | 4 lines

envutil.rb: basename for diagnostic_reports

* test/lib/envutil.rb (EnvUtil.diagnostic_reports): diagnostic
  report file uses base name only.  [ci skip]
------------------------------------------------------------------------
r57966 | nobu | 2017-03-14 13:03:48 +0900 (Tue, 14 Mar 2017) | 5 lines

vm_core.h: assertions for Proc

* vm_core.h (vm_proc_block): assert before accessing.

* vm_core.h (vm_proc_iseq): remove duplicate assertion.
------------------------------------------------------------------------
r57965 | nobu | 2017-03-14 12:42:43 +0900 (Tue, 14 Mar 2017) | 4 lines

string.c: use rb_check_string_type

* string.c (rb_str_cmp_m): use rb_check_string_type for check and
  conversion, instead of calling the conversion method directly.
------------------------------------------------------------------------
r57964 | svn | 2017-03-14 05:20:40 +0900 (Tue, 14 Mar 2017) | 1 line

* 2017-03-14
------------------------------------------------------------------------
r57963 | stomar | 2017-03-14 05:20:40 +0900 (Tue, 14 Mar 2017) | 5 lines

docs for Symbol#casecmp and Symbol#casecmp?

* string.c: [DOC] improve docs of Symbol#casecmp and Symbol#casecmp?
  according to the similar String methods; fix RDoc markup and typos;
  fix call-seq's for Symbol#{upcase,downcase,capitalize,swapcase}.
------------------------------------------------------------------------
r57962 | nobu | 2017-03-13 23:59:08 +0900 (Mon, 13 Mar 2017) | 4 lines

sprintf.c: fix out-of-bound access

* sprintf.c (rb_str_format): get rid of out-of-bound access when
  single % at the end.
------------------------------------------------------------------------
r57961 | nobu | 2017-03-13 20:47:45 +0900 (Mon, 13 Mar 2017) | 1 line

string.c (rb_str_set_len): pathological check
------------------------------------------------------------------------
r57960 | nobu | 2017-03-13 18:29:19 +0900 (Mon, 13 Mar 2017) | 4 lines

file.c: join with /

* file.c (rb_file_join): join using "/" always, not a constant.
  and fix the document.  [ruby-core:79579] [Bug #13223]
------------------------------------------------------------------------
r57958 | nobu | 2017-03-13 18:12:05 +0900 (Mon, 13 Mar 2017) | 4 lines

string.c: $; is a GC-root

* string.c (Init_String): $; must be a GC-root, not to be
  collected.  [ruby-core:79582]
------------------------------------------------------------------------
r57956 | naruse | 2017-03-13 18:05:35 +0900 (Mon, 13 Mar 2017) | 4 lines

Raise error if spec is nil

With parallel test-all, the spec is sometimes nil.
To debug it raise more detailed error.
------------------------------------------------------------------------
r57955 | nobu | 2017-03-13 17:38:12 +0900 (Mon, 13 Mar 2017) | 5 lines

parse.y: relax `&' warning

* parse.y (parser_yylex): disable "`&' interpreted as argument
  prefix" warning when just followed by a symbol literal.
  [ruby-core:79926] [Misc #13283]
------------------------------------------------------------------------
r57951 | mrkn | 2017-03-13 15:03:18 +0900 (Mon, 13 Mar 2017) | 7 lines

bigdecimal: version 1.3.2

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

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

This fixes [ruby-core:79603] [Bug #13232]
------------------------------------------------------------------------
r57950 | nobu | 2017-03-13 14:30:44 +0900 (Mon, 13 Mar 2017) | 4 lines

thread.c: rb_thread_fd_close [ci skip]

* thread.c (rb_thread_fd_close): remove deprecated. a couple of
  external libraries used it.  [ruby-core:80078] [Bug #13304]
------------------------------------------------------------------------
r57949 | nobu | 2017-03-13 12:30:11 +0900 (Mon, 13 Mar 2017) | 1 line

thread.c: rb_thread_fd_close no longer returns
------------------------------------------------------------------------
r57948 | nobu | 2017-03-13 11:14:15 +0900 (Mon, 13 Mar 2017) | 4 lines

thread.c: rb_thread_fd_close [ci skip]

* thread.c (rb_thread_fd_close): re-define only for abi-check,
  abort if called.  [ruby-core:80078] [Bug #13304]
------------------------------------------------------------------------
r57947 | nobu | 2017-03-13 09:11:25 +0900 (Mon, 13 Mar 2017) | 3 lines

compile.c: compile flip-flop

* compile.c (iseq_compile_each0): compile flip-flop directly.
------------------------------------------------------------------------
r57946 | nobu | 2017-03-13 09:11:24 +0900 (Mon, 13 Mar 2017) | 4 lines

compile.c: omit newrange

* compile.c (iseq_compile_each): omit creating literal-only range
  to be popped immediately.
------------------------------------------------------------------------
r57944 | naruse | 2017-03-13 03:40:07 +0900 (Mon, 13 Mar 2017) | 1 line

io.c: [DOC] IO#puts uses IO#write
------------------------------------------------------------------------
r57943 | svn | 2017-03-13 03:31:39 +0900 (Mon, 13 Mar 2017) | 1 line

* 2017-03-13
------------------------------------------------------------------------
r57942 | naruse | 2017-03-13 03:31:38 +0900 (Mon, 13 Mar 2017) | 1 line

Didn't work if backport field is empty
------------------------------------------------------------------------
r57908 | nobu | 2017-03-12 22:51:12 +0900 (Sun, 12 Mar 2017) | 4 lines

compile.c: compile_const_prefix

* compile.c (compile_const_prefix): rename, and check the result
  of parts of the prefix.
------------------------------------------------------------------------
r57892 | nobu | 2017-03-12 14:52:42 +0900 (Sun, 12 Mar 2017) | 4 lines

compile.c: omit newhash

* compile.c (iseq_compile_each): omit creating literal-only hash
  to be popped immediately.
------------------------------------------------------------------------
r57891 | nobu | 2017-03-12 14:48:58 +0900 (Sun, 12 Mar 2017) | 1 line

compile.c: NODE_VALUES must not be popped
------------------------------------------------------------------------
r57890 | nobu | 2017-03-12 07:44:26 +0900 (Sun, 12 Mar 2017) | 4 lines

compile.c: iseq_compile_each0

* compile.c (iseq_compile_each0): split from null node case to
  constify line and type.
------------------------------------------------------------------------
r57889 | nobu | 2017-03-12 07:37:50 +0900 (Sun, 12 Mar 2017) | 3 lines

compile.c: compile_when

* compile.c (compile_when): extract from iseq_compile_each.
------------------------------------------------------------------------
r57888 | nobu | 2017-03-12 07:25:32 +0900 (Sun, 12 Mar 2017) | 3 lines

compile.c: compile_case

* compile.c (compile_case): extract from iseq_compile_each.
------------------------------------------------------------------------
r57887 | stomar | 2017-03-12 06:32:46 +0900 (Sun, 12 Mar 2017) | 17 lines

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

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

[ruby-core:79265] [Bug #13159]
------------------------------------------------------------------------
r57886 | stomar | 2017-03-12 05:01:55 +0900 (Sun, 12 Mar 2017) | 5 lines

docs for String#casecmp and String#casecmp?

* string.c: [DOC] specify when String#casecmp and String#casecmp?
  return nil; modify examples to better show difference to <=>;
  fix RDoc markup and typos.
------------------------------------------------------------------------
r57883 | naruse | 2017-03-12 04:03:11 +0900 (Sun, 12 Mar 2017) | 3 lines

Generate log from svn log

When there's multiple revisions, all svn logs should be used.
------------------------------------------------------------------------
r57852 | svn | 2017-03-12 01:08:55 +0900 (Sun, 12 Mar 2017) | 1 line

* 2017-03-12
------------------------------------------------------------------------
r57851 | naruse | 2017-03-12 01:08:54 +0900 (Sun, 12 Mar 2017) | 1 line

suppress warning: shadowing outer local variable - dir & opt
------------------------------------------------------------------------
r57842 | nobu | 2017-03-11 22:24:08 +0900 (Sat, 11 Mar 2017) | 1 line

defs/gmake.mk: update again after comit [ci skip]
------------------------------------------------------------------------
r57836 | nobu | 2017-03-11 21:26:00 +0900 (Sat, 11 Mar 2017) | 6 lines

compile.c: constify flags

* compile.c (compile_cpath): return `noscoped` bit flag, instead
  of boolean flag.

* compile.c (iseq_compile_each): constify flags.
------------------------------------------------------------------------
r57835 | nobu | 2017-03-11 20:15:05 +0900 (Sat, 11 Mar 2017) | 1 line

test/ruby/test_require.rb: use squiggly heredocs
------------------------------------------------------------------------
r57829 | svn | 2017-03-11 05:09:07 +0900 (Sat, 11 Mar 2017) | 1 line

* 2017-03-11
------------------------------------------------------------------------
r57828 | normal | 2017-03-11 05:09:06 +0900 (Sat, 11 Mar 2017) | 5 lines

compile.c: apply opt_str_freeze to String#-@ (uminus)

The same optimization used for "literal string".freeze
can easily apply to uminus without introducing any
compatibility problems.
------------------------------------------------------------------------
r57827 | nobu | 2017-03-10 22:46:22 +0900 (Fri, 10 Mar 2017) | 4 lines

common.mk: ignore clean-rubyspec error [ci skip]

* common.mk (clean-rubyspec): nothing to clean before running
  rubyspec.
------------------------------------------------------------------------
r57826 | nobu | 2017-03-10 16:18:03 +0900 (Fri, 10 Mar 2017) | 7 lines

debug_counter.c: debug_counter_names [ci skip]

* debug_counter.c (debug_counter_names): stringize debug counter
  names by preprocessor.

* debug_counter.h (RB_DEBUG_COUNTER): define counter names outside
  the include guard, to expand multiple times.
------------------------------------------------------------------------
r57825 | nobu | 2017-03-10 14:34:27 +0900 (Fri, 10 Mar 2017) | 7 lines

configure.in: RUBY_SO_NAME as --with-soname

* configure.in (RUBY_SO_NAME): [EXPERIMENTAL] use the given name
  literally if --with-soname is specified.
  [ruby-core:79972] [Misc #13296]

[ci skip]
------------------------------------------------------------------------
r57824 | svn | 2017-03-10 04:48:10 +0900 (Fri, 10 Mar 2017) | 1 line

* 2017-03-10
------------------------------------------------------------------------
r57823 | stomar | 2017-03-10 04:48:09 +0900 (Fri, 10 Mar 2017) | 1 line

object.c: [DOC] simplify Object#tap example
------------------------------------------------------------------------
r57822 | nobu | 2017-03-09 15:44:57 +0900 (Thu, 09 Mar 2017) | 3 lines

rbconfig/sizeof: remove VPATH

* ext/rbconfig/sizeof/depend: remove VPATH for `make dist`.
------------------------------------------------------------------------
r57821 | normal | 2017-03-09 12:49:47 +0900 (Thu, 09 Mar 2017) | 4 lines

ext/socket/raddrinfo.c (addrinfo_mark): avoid needless branch

gc.c (gc_mark_children, case T_DATA) does not use
the dmark function pointer if DATA_PTR is NULL
------------------------------------------------------------------------
r57820 | nobu | 2017-03-09 12:38:06 +0900 (Thu, 09 Mar 2017) | 3 lines

goruby.c: FD leak [ci skip]

* goruby.c (goruby_options): fix potential FD leak.
------------------------------------------------------------------------
r57819 | nobu | 2017-03-09 12:31:53 +0900 (Thu, 09 Mar 2017) | 4 lines

rbconfig/sizeof: nmake VPATH

* ext/rbconfig/sizeof/depend: prepend VPATH for out-of-place build
  using nmake.
------------------------------------------------------------------------
r57818 | shyouhei | 2017-03-09 11:31:23 +0900 (Thu, 09 Mar 2017) | 6 lines

revert RB_FIXABLE related changesets [Bug #13288][Bug #13293][Bug #13294]

This commit is auto-generated using following command:

svn diff -r57807:57788 include internal.h bignum.c numeric.c compile.c insns.def object.c sprintf.c | patch -p0

------------------------------------------------------------------------
r57817 | nobu | 2017-03-09 11:10:27 +0900 (Thu, 09 Mar 2017) | 4 lines

fix UTF-32 valid_encoding?

* test/ruby/test_io_m17n.rb (TestIO_M17N#test_puts_widechar): do
  not use invalid codepoint.  [ruby-core:79966] [Bug #13292]
------------------------------------------------------------------------
r57816 | nobu | 2017-03-09 11:04:10 +0900 (Thu, 09 Mar 2017) | 9 lines

fix UTF-32 valid_encoding?

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

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

* regenc.h (UNICODE_VALID_CODEPOINT_P): predicate for valid
  Unicode codepoints.
------------------------------------------------------------------------
r57815 | nobu | 2017-03-09 10:55:43 +0900 (Thu, 09 Mar 2017) | 7 lines

test_utf16.rb: refine valid_encoding tests

* test/ruby/enc/test_utf16.rb (test_utf16be_valid_encoding):
  assert all data and use assert_predicate.

* test/ruby/enc/test_utf16.rb (test_utf16le_valid_encoding):
  ditto.
------------------------------------------------------------------------
r57814 | nobu | 2017-03-09 10:06:09 +0900 (Thu, 09 Mar 2017) | 1 line

make commit [ci skip]
------------------------------------------------------------------------
r57813 | normal | 2017-03-09 06:24:24 +0900 (Thu, 09 Mar 2017) | 3 lines

string.c (str_uminus): update doc for deduplication

As of r57698, String#-@ can return pre-existing strings.
------------------------------------------------------------------------
r57812 | svn | 2017-03-09 05:41:39 +0900 (Thu, 09 Mar 2017) | 1 line

* 2017-03-09
------------------------------------------------------------------------
r57811 | stomar | 2017-03-09 05:41:38 +0900 (Thu, 09 Mar 2017) | 9 lines

docs for FileUtils.ln methods

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

* lib/fileutils.rb: [DOC] further improve descriptions of FileUtils.ln
  and related methods; improve examples: relative links probably won't
  work in other dir, avoid `include', use more generic homedir name.
------------------------------------------------------------------------
r57810 | nobu | 2017-03-08 22:52:32 +0900 (Wed, 08 Mar 2017) | 1 line

great love
------------------------------------------------------------------------
r57809 | nobu | 2017-03-08 17:19:56 +0900 (Wed, 08 Mar 2017) | 3 lines

fix paren

* string.c (str_byte_substr): fix misplaced parenthesis at r56155.
------------------------------------------------------------------------
r57808 | nobu | 2017-03-08 16:34:13 +0900 (Wed, 08 Mar 2017) | 1 line

proc.c: preserve class name encoding in Proc#to_s
------------------------------------------------------------------------
r57807 | shyouhei | 2017-03-08 13:50:22 +0900 (Wed, 08 Mar 2017) | 10 lines

re-introduce __builtin_add_overflow

r57789 (74cdd89) was gradually "improve"d by naruse through r57793 to
r57806, resulted in reverting the efect of r57789 while retaining its
complexity.  I think the current situation is slightly worse than
before (same output complicated source code).

Here I introduce __builtin_add_overflow again, which (I think) is what
naruse wanted to do in r57793.

------------------------------------------------------------------------
r57806 | naruse | 2017-03-08 04:48:00 +0900 (Wed, 08 Mar 2017) | 1 line

Always use old RB_FIXABLE to allow double as argument
------------------------------------------------------------------------
r57805 | naruse | 2017-03-08 02:51:35 +0900 (Wed, 08 Mar 2017) | 3 lines

Revert r57803 "Avoid to cast the argument"

__builtin_add_overflow doesn't support double.
------------------------------------------------------------------------
r57804 | svn | 2017-03-08 02:46:55 +0900 (Wed, 08 Mar 2017) | 1 line

* 2017-03-08
------------------------------------------------------------------------
r57803 | naruse | 2017-03-08 02:46:54 +0900 (Wed, 08 Mar 2017) | 3 lines

Avoid to cast the argument

For 32bit environment and __int128 use cases.
------------------------------------------------------------------------
r57802 | kazu | 2017-03-07 22:04:39 +0900 (Tue, 07 Mar 2017) | 4 lines

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

[Fix GH-1531][ci skip]
Author:    Alex Semyonov <alex@semyonov.us>
------------------------------------------------------------------------
r57801 | nobu | 2017-03-07 19:56:22 +0900 (Tue, 07 Mar 2017) | 5 lines

parse.y: remove trace

* parse.y (reg_named_capture_assign_iter): do not insert trace
  instructions before local variable assinments.  putobject is
  expected at first.  [ruby-core:79940] [Bug #13287]
------------------------------------------------------------------------
r57800 | nobu | 2017-03-07 18:13:41 +0900 (Tue, 07 Mar 2017) | 4 lines

string.c: negation of LONG_MIN

* string.c (rb_str_update): do not use negation of LONG_MIN, which
  is negative too.
------------------------------------------------------------------------
r57799 | nobu | 2017-03-07 18:07:57 +0900 (Tue, 07 Mar 2017) | 6 lines

string.c: fix integer overflow

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

------------------------------------------------------------------------
r57798 | naruse | 2017-03-07 15:33:49 +0900 (Tue, 07 Mar 2017) | 1 line

Use RB_POSFIXABLE and RB_NEGFIXABLE to avoid cast introduced at r57793
------------------------------------------------------------------------
r57797 | nobu | 2017-03-07 14:48:15 +0900 (Tue, 07 Mar 2017) | 5 lines

string.c: fix integer overflow

* string.c (rb_str_subpos): fix integer overflow which can happen
  only when SHARABLE_MIDDLE_SUBSTRING is enabled.  incorpolate
  https://github.com/mruby/mruby/commit/7db0786abdd243ba031e24683f
------------------------------------------------------------------------
r57796 | naruse | 2017-03-07 14:19:00 +0900 (Tue, 07 Mar 2017) | 1 line

suppress warning: shadowing outer local variable - e
------------------------------------------------------------------------
r57795 | naruse | 2017-03-07 14:11:02 +0900 (Tue, 07 Mar 2017) | 1 line

Supress warning: instance variable @repeat_count not initialized
------------------------------------------------------------------------
r57794 | hsbt | 2017-03-07 13:46:46 +0900 (Tue, 07 Mar 2017) | 1 line

Fix up r57788, Function is removed at readline-6.3.
------------------------------------------------------------------------
r57793 | naruse | 2017-03-07 12:35:47 +0900 (Tue, 07 Mar 2017) | 13 lines

Use ADD instead of MUL

* On recent CPUs, 2-operand MUL's latency is 3 cycle but ADD is 1 cycle.
* clang Optimizes `MUL rax,2` into `ADD rax,rax` but gcc7 doesn't.
* LONG2FIX is compiled into `lea r14,[r15+r15*1+0x1]`; this is 1cycle
  and run in parallel if the branch prediction is correct.
* Note that old (RB_POSFIXABLE(f) && RB_NEGFIXABLE(f)) is usually uses
  following instructions.
  * movabs rax,0x4000000000000000
  * add    rax,rdi
  * js
  It needs large immediate and Macro-Fusion is not applied.
  ADD and JO is much smaller though it is also Macro-Fusion unfriendly.
------------------------------------------------------------------------
r57792 | nobu | 2017-03-07 10:07:03 +0900 (Tue, 07 Mar 2017) | 7 lines

fix macro name

* tool/instruction.rb (VmBodyGenerator#make_header_prepare_stack):
  REG_CFP has been prefixed with VM_ at r56609.  [Bug #12527]

* tool/instruction.rb (VmBodyGenerator#make_footer_stack_val):
  ditto.
------------------------------------------------------------------------
r57791 | svn | 2017-03-07 04:42:37 +0900 (Tue, 07 Mar 2017) | 1 line

* 2017-03-07
------------------------------------------------------------------------
r57790 | stomar | 2017-03-07 04:42:36 +0900 (Tue, 07 Mar 2017) | 1 line

io.c: [DOC] open mode can be an integer; fix rdoc syntax
------------------------------------------------------------------------
r57789 | shyouhei | 2017-03-06 20:14:05 +0900 (Mon, 06 Mar 2017) | 9 lines

optimize FIXABLE macro

Looking at the source code, FIXABLE tends to be just before LOING2FIX
to check applicability of that operation.  Why not try computing first
then check for overflow, which should be optimial.

I also tried the same thing for unsigned types but resulted in slower
execution.  It seems RB_POSFIXABLE() is fast enough on modern CPUs.

------------------------------------------------------------------------
r57788 | hsbt | 2017-03-06 18:10:21 +0900 (Mon, 06 Mar 2017) | 1 line

Avoid to warning of clang with -Wincompatible-pointer-types.
------------------------------------------------------------------------
r57787 | nobu | 2017-03-06 17:10:20 +0900 (Mon, 06 Mar 2017) | 4 lines

readline.c: fix waiting fucntion

* ext/readline/readline.c (getc_body): use
  rb_w32_wait_events_blocking in block region.
------------------------------------------------------------------------
r57786 | shyouhei | 2017-03-06 16:25:18 +0900 (Mon, 06 Mar 2017) | 6 lines

LONG_LONG_MAX not always available

I was not aware of cases when LONG_LONG_MAX is undefined.  Sorry.

Signed-off-by: Urabe, Shyouhei <shyouhei@ruby-lang.org>

------------------------------------------------------------------------
r57785 | nobu | 2017-03-06 15:44:11 +0900 (Mon, 06 Mar 2017) | 7 lines

opt_eq_func refactor

* vm_insnhelper.c (opt_eq_func): method to dispatch is resolved by
  only the receiver's class, not including the argument class.
  even if basic operation is redefined, other class conditions
  never meet.  optimize Float and non-Float case, delegate to
  rb_float_equal directly.
------------------------------------------------------------------------
r57784 | shyouhei | 2017-03-06 15:04:52 +0900 (Mon, 06 Mar 2017) | 16 lines

use HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW

We already check for __builtin_mul_overflow in configure but never
actually referred it before.  Why not call it if available, because
that should render supposedly-optimial assembly outputs.

Optionally if __builtin_mul_overflow_p is available, which is the case
for recent GCC, use that to detect fixnum overflow.  This is much
faster than the previous.  On my machine generated assembly of
numeric.c:int_pow reduces from 480 to 448 bytes, according to nm(1).
Also on my machine, following script boosts from 7.819 to 6.929 sec.

time ./miniruby -e 'i=0; while i < 30_000_000 do i += 1; 7 ** 23; end'

Signed-off-by: Urabe, Shyouhei <shyouhei@ruby-lang.org>

------------------------------------------------------------------------
r57783 | nobu | 2017-03-06 08:36:44 +0900 (Mon, 06 Mar 2017) | 5 lines

compile.c: variable type

* compile.c (iseq_compile_each): fix variable type, use VALUE for
  Symbol.
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?revision=57772&view=revision
------------------------------------------------------------------------
r57782 | svn | 2017-03-06 04:43:11 +0900 (Mon, 06 Mar 2017) | 1 line

* 2017-03-06
------------------------------------------------------------------------
r57781 | stomar | 2017-03-06 04:43:10 +0900 (Mon, 06 Mar 2017) | 9 lines

docs for IO.{write,read}

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

docs for IO#print

* io.c: [DOC] split documentation for IO#print into smaller paragraphs,
  delete duplicate sentence, fix call-seq.
  Based on a patch by Dario Daic. [ruby-core:78291] [Bug #12975]
------------------------------------------------------------------------
r57779 | nobu | 2017-03-05 10:46:20 +0900 (Sun, 05 Mar 2017) | 4 lines

math.c: more accuracy

* math.c (math_log10): calculate log10(2) for more accuracy.
  [ruby-core:79907] [Bug #13279]
------------------------------------------------------------------------
r57778 | stomar | 2017-03-05 05:08:04 +0900 (Sun, 05 Mar 2017) | 1 line

string.c: [DOC] fix doc formatting for String#==, #===
------------------------------------------------------------------------
r57777 | stomar | 2017-03-05 05:02:48 +0900 (Sun, 05 Mar 2017) | 4 lines

rdoc for String class

* lib/unicode_normalize.rb: [DOC] prevent a comment from
  showing up in the class documentation for String.
------------------------------------------------------------------------
r57776 | svn | 2017-03-05 04:52:31 +0900 (Sun, 05 Mar 2017) | 1 line

* 2017-03-05
------------------------------------------------------------------------
r57775 | stomar | 2017-03-05 04:52:30 +0900 (Sun, 05 Mar 2017) | 5 lines

nodoc OptParse

* lib/optparse.rb: [DOC] nodoc OptParse, introduced with r46126,
  to avoid leaking of its documentation (OptionParser's docs) into
  the class documentation of Object.  [ruby-core:79909] [Bug #13281]
------------------------------------------------------------------------
r57774 | nobu | 2017-03-04 23:44:05 +0900 (Sat, 04 Mar 2017) | 4 lines

compile.c: operand size check

* compile.c (ibf_load_code): raise an exception on invalid operand
  size.  should not use assert() to validate incoming data.
------------------------------------------------------------------------
r57773 | nobu | 2017-03-04 23:37:22 +0900 (Sat, 04 Mar 2017) | 4 lines

compile.c: memory leak

* compile.c (iseq_set_sequence): fix potential memory leaks on an
  invalid instruction sequence.
------------------------------------------------------------------------
r57772 | nobu | 2017-03-04 23:21:57 +0900 (Sat, 04 Mar 2017) | 4 lines

compile.c: fix invalid label message

* compile.c (validate_label): fix invalid label message.
  registered labels are Symbols, not IDs.
------------------------------------------------------------------------
r57771 | stomar | 2017-03-04 22:13:50 +0900 (Sat, 04 Mar 2017) | 5 lines

documentation for sort methods

* array.c: [DOC] fix grammar in Array#sort, #sort!, #sort_by!,
  move references below the code example, add a missing reference.
* enum.c: [DOC] fix grammar in Enumerable#sort, #sort_by.
------------------------------------------------------------------------
r57770 | stomar | 2017-03-04 22:12:20 +0900 (Sat, 04 Mar 2017) | 5 lines

enum.c: documentation for Enumerable#sort_by

* enum.c: [DOC] improve structure of docs for Enumerable#sort_by,
  adopt explanation of the comparison block from Array#sort_by,
  drop mention of 1.8, fix typos.
------------------------------------------------------------------------
r57769 | nobu | 2017-03-04 14:13:18 +0900 (Sat, 04 Mar 2017) | 4 lines

readline.c: fix type

* ext/readline/readline.c (getc_body): fix variable type, and
  extract _get_osfhandle.
------------------------------------------------------------------------
r57768 | svn | 2017-03-04 04:39:36 +0900 (Sat, 04 Mar 2017) | 1 line

* 2017-03-04
------------------------------------------------------------------------
r57767 | stomar | 2017-03-04 04:39:35 +0900 (Sat, 04 Mar 2017) | 5 lines

io.c: documentation for puts

* io.c: [DOC] clarify that the 'record separator' between
  arguments passed to 'puts' is always a newline.
  Based on a patch by Mark Amery. [ruby-core:65801] [Misc #10403]
------------------------------------------------------------------------
r57766 | nobu | 2017-03-03 18:27:27 +0900 (Fri, 03 Mar 2017) | 4 lines

zlib for mingw

* ext/zlib/extconf.rb: fix building zlib for mingw, and for
  cross-compiling.
------------------------------------------------------------------------
r57765 | stomar | 2017-03-03 17:45:04 +0900 (Fri, 03 Mar 2017) | 11 lines

proc.c: documentation for Proc#{call,yield,[]}

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

  * change order of Document-method directives as workaround for an
    RDoc rendering problem where the documentation for Proc#call displays
    a "Document-method: []" code block.  [ruby-core:79887] [Bug #13273]
  * add missing call-seq and example for Proc#yield
  * remove pointless cross reference to Proc#yield
  * update description for handling of extra or missing arguments,
    improve examples and add cross reference to #lambda?
------------------------------------------------------------------------
r57764 | nobu | 2017-03-03 15:22:47 +0900 (Fri, 03 Mar 2017) | 4 lines

MINIRUBY for cross-compling

* template/configure-ext.mk.tmpl (EXTMK_ARGS): add MINIRUBY for
  cross-compling, which is used in extmk.rb.
------------------------------------------------------------------------
r57763 | nobu | 2017-03-03 15:18:36 +0900 (Fri, 03 Mar 2017) | 4 lines

fix for mingw64

* util.c: define MINGW_HAS_SECURE_API for qsort_s on recent
  mingw64.
------------------------------------------------------------------------
r57762 | nobu | 2017-03-03 13:51:34 +0900 (Fri, 03 Mar 2017) | 6 lines

broken mingw

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

* include/ruby/win32.h (frexp, modf): ignore bad declarations when
  compiling as C++.  [ruby-core:79859] [Bug #13267]
------------------------------------------------------------------------
r57761 | akr | 2017-03-03 08:36:13 +0900 (Fri, 03 Mar 2017) | 2 lines

[DOC] update doc.

------------------------------------------------------------------------
r57760 | svn | 2017-03-03 08:33:07 +0900 (Fri, 03 Mar 2017) | 1 line

* 2017-03-03
------------------------------------------------------------------------
r57759 | akr | 2017-03-03 08:33:06 +0900 (Fri, 03 Mar 2017) | 6 lines

refine a warning message.

The "n" option for regexp, /.../n, is historical.
It doesn't mean the regexp works as binary match since Ruby 1.9.


------------------------------------------------------------------------
r57758 | stomar | 2017-03-02 19:31:56 +0900 (Thu, 02 Mar 2017) | 5 lines

string.c: restore documentation for String#<<

* string.c: [DOC] restore documentation for String#<<
  which became undocumented with r56021; fix a typo.
  [ruby-core:79865] [Bug #13268]
------------------------------------------------------------------------
r57757 | nobu | 2017-03-02 13:54:19 +0900 (Thu, 02 Mar 2017) | 5 lines

test: use RbConfig::Limits

* test/lib/envutil.rb: rbconfig/sizeof may not be available when
  cross-compiling.  use RbConfig::Limits instead of calculating
  limits of Fixnum with hard-coded CHAR_BIT.
------------------------------------------------------------------------
r57756 | nobu | 2017-03-02 13:54:18 +0900 (Thu, 02 Mar 2017) | 5 lines

fix for cross-compiling

* common.mk (test-rubyspec): add dependency for cross-compiling.

* defs/gmake.mk: ditto.
------------------------------------------------------------------------
r57755 | stomar | 2017-03-02 04:59:03 +0900 (Thu, 02 Mar 2017) | 5 lines

struct.c: improve rdoc for Struct

* struct.c: [DOC] improve examples for ::new, improve #dig example,
  simplify #select example, use consistent style for return values,
  fix typos and example code style, remove duplicate cross reference.
------------------------------------------------------------------------
r57754 | svn | 2017-03-02 04:57:15 +0900 (Thu, 02 Mar 2017) | 1 line

* 2017-03-02
------------------------------------------------------------------------
r57753 | stomar | 2017-03-02 04:57:14 +0900 (Thu, 02 Mar 2017) | 1 line

hash.c: [DOC] fix book title in example
------------------------------------------------------------------------
r57752 | kazu | 2017-03-01 20:37:30 +0900 (Wed, 01 Mar 2017) | 1 line

lib/e2mmap.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57751 | stomar | 2017-03-01 19:17:42 +0900 (Wed, 01 Mar 2017) | 5 lines

fileutils.rb: improve rdoc for FileUtils

* lib/fileutils.rb: [DOC] fix invalid example code to make it
  syntax highlighted, fix rdoc for lists, nodoc internal methods,
  avoid a dangerous example.
------------------------------------------------------------------------
r57750 | rhe | 2017-03-01 19:15:55 +0900 (Wed, 01 Mar 2017) | 7 lines

openssl: avoid segfault during running tests on Ubuntu trusty

Import the commit 6693a549d673 ("test/test_pkey_ec: do not use dummy 0
order", 2017-02-03) from upstream. Hopefully this will fix the segfault
on RubyCI icc16-x64:

  http://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-trunk/log/20170301T050002Z.fail.html.gz
------------------------------------------------------------------------
r57749 | stomar | 2017-03-01 17:54:37 +0900 (Wed, 01 Mar 2017) | 6 lines

fileutils.rb: improve docs for FileUtils.compare_file

* lib/fileutils.rb (compare_file): [DOC] clarify documentation
  by avoiding confusing return value of "maybe false".

[ruby-core:75431] [Misc #12365] reported by Robert A. Heiler.
------------------------------------------------------------------------
r57748 | nobu | 2017-03-01 16:53:15 +0900 (Wed, 01 Mar 2017) | 4 lines

common.mk: separate clean-ext

* common.mk (clean-ext): separate clean-up of makefiles and
  timestamps, and clean-up of subdirectories under ext and gems.
------------------------------------------------------------------------
r57747 | nobu | 2017-03-01 14:44:37 +0900 (Wed, 01 Mar 2017) | 4 lines

zlib: clean zlib

* ext/zlib/extconf.rb: clean zlib libraries generated in the
  place.
------------------------------------------------------------------------
r57746 | svn | 2017-03-01 10:16:27 +0900 (Wed, 01 Mar 2017) | 1 line

* 2017-03-01
------------------------------------------------------------------------
r57745 | normal | 2017-03-01 10:16:26 +0900 (Wed, 01 Mar 2017) | 9 lines

deduplicate strings sooner at load and compile

We can use rb_fstring_cstr in some places to prevent an
intermediate object from being created before deduplication
via rb_fstring.

* compile.c (iseq_compile_each): use rb_fstring_cstr
  (rb_insns_name_array): ditto
* load.c (rb_load_internal0): ditto
------------------------------------------------------------------------
r57744 | stomar | 2017-02-28 19:41:03 +0900 (Tue, 28 Feb 2017) | 1 line

lib/mathn.rb: [DOC] nodoc internal Math.rsqrt
------------------------------------------------------------------------
r57743 | nobu | 2017-02-28 17:22:00 +0900 (Tue, 28 Feb 2017) | 3 lines

clean gems

* Makefile.in (clean-ext): clean gem directories too.
------------------------------------------------------------------------
r57742 | hsbt | 2017-02-28 16:45:54 +0900 (Tue, 28 Feb 2017) | 6 lines

Added initial gemspec for SDBM module.

  [Feature #13261]

  * doc/*.rdoc: Move SDBM entry to default gem section.
  * ext/sdbm/sdbm.gemspec: first gemspec.
------------------------------------------------------------------------
r57741 | nobu | 2017-02-28 13:33:15 +0900 (Tue, 28 Feb 2017) | 5 lines

disable critical-error-handler

* win32/win32.c (rb_w32_sysinit): disable critical-error-handler
  message box even on mswin, regardless of runtime DLL version.
  [ruby-dev:49988] [Bug #13254]
------------------------------------------------------------------------
r57740 | nobu | 2017-02-28 11:58:12 +0900 (Tue, 28 Feb 2017) | 9 lines

Makefile.sub: ULL_TO_DOUBLE

* win32/Makefile.sub (config.h): define ULL_TO_DOUBLE for
  conversion from unsigned __int64 to double, which is not
  implemented in till Visual Studio.NET 2003, aka VC7.1.

* bignum.c (estimate_initial_sqrt): use ULL_TO_DOUBLE if defined.

* numeric.c (BDIGIT_DBL_TO_DOUBLE): ditto.
------------------------------------------------------------------------
r57739 | nobu | 2017-02-28 10:10:38 +0900 (Tue, 28 Feb 2017) | 4 lines

numeric.c: suppress warning

* numeric.c (DEFINE_INT_SQRT): suppress a type-limits warning
  where int is always smaller than double.
------------------------------------------------------------------------
r57738 | nobu | 2017-02-28 09:00:33 +0900 (Tue, 28 Feb 2017) | 4 lines

Makefile.in: CHDIR to srcdir

* Makefile.in (update-mspec, update-rubyspec): use CHDIR, which may
  use -P, to resolve symbolic links.
------------------------------------------------------------------------
r57737 | stomar | 2017-02-28 03:26:22 +0900 (Tue, 28 Feb 2017) | 9 lines

date_core.c: expand docs for Date shifting

* ext/date/date_core.c: [DOC] expand docs for Date shifting

  * add examples for Date#>> and Date#<< that clarify some edge cases
  * add examples for Date#next_year and Date#prev_year
  * add cross references to Date#>> and Date#<<

  [ruby-core:79584] [Bug #13225]
------------------------------------------------------------------------
r57736 | svn | 2017-02-28 03:07:12 +0900 (Tue, 28 Feb 2017) | 1 line

* 2017-02-28
------------------------------------------------------------------------
r57735 | stomar | 2017-02-28 03:07:11 +0900 (Tue, 28 Feb 2017) | 7 lines

Fix doc for Hash#dig and Struct#dig

* hash.c (rb_hash_dig): [DOC] correct argument name
  in method description; fix formatting in examples.
* struct.c (rb_struct_dig): ditto.

[ruby-core:79221] [Bug #13148]
------------------------------------------------------------------------
r57734 | nobu | 2017-02-27 22:52:08 +0900 (Mon, 27 Feb 2017) | 4 lines

fix nd_ainfo->kw_rest_arg

[Fix GH-5129]
Author:    fate0 <fate0@users.noreply.github.com>
------------------------------------------------------------------------
r57733 | nobu | 2017-02-27 22:52:07 +0900 (Mon, 27 Feb 2017) | 7 lines

kwrest arg name

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

* parse.y (new_args_tail_gen): ditto.
------------------------------------------------------------------------
r57732 | shyouhei | 2017-02-27 22:41:38 +0900 (Mon, 27 Feb 2017) | 2 lines

add NEWS for Random.urandom [ci skip]

------------------------------------------------------------------------
r57731 | nobu | 2017-02-27 22:22:05 +0900 (Mon, 27 Feb 2017) | 1 line

common.mk (distclean): clean docs too
------------------------------------------------------------------------
r57730 | hsbt | 2017-02-27 18:20:39 +0900 (Mon, 27 Feb 2017) | 6 lines

Added initial gemspec for Etc module.

  [Feature #13256]

  * doc/*.rdoc: move Etc module to default gem section.
  * ext/etc/etc.gemspec: first gemspec.
------------------------------------------------------------------------
r57729 | nobu | 2017-02-27 17:23:18 +0900 (Mon, 27 Feb 2017) | 3 lines

Makefile.in: by exts.mk

* Makefile.in (clean-ext): recurse by exts.mk in parallel first.
------------------------------------------------------------------------
r57728 | nobu | 2017-02-27 16:54:24 +0900 (Mon, 27 Feb 2017) | 4 lines

common.mk: clean-rubyspec

* common.mk (clean-rubyspec): remove OBJDIR for rubyspec C-API
  tests.
------------------------------------------------------------------------
r57727 | nobu | 2017-02-27 16:37:55 +0900 (Mon, 27 Feb 2017) | 5 lines

mkmf.rb: get rid of error messages

* lib/mkmf.rb (create_makefile): add TARGET_SO to CLEANLIBS only
  when the extension library will be build, to get rid of trying
  to remove $(TARGET_SO_DIR).
------------------------------------------------------------------------
r57726 | nobu | 2017-02-27 15:39:28 +0900 (Mon, 27 Feb 2017) | 7 lines

clean more

* Makefile.in (clean-local): remove debug symbol directories on
  Mac OS.

* common.mk (clean-ext): remove parent directories of timestamp
  directory.
------------------------------------------------------------------------
r57725 | nobu | 2017-02-27 15:31:25 +0900 (Mon, 27 Feb 2017) | 4 lines

Makefile.in: clean exts.mk files

* Makefile.in (clean-ext): remove exts.mk files in subdirectories
  underneath ext.
------------------------------------------------------------------------
r57724 | nobu | 2017-02-27 14:58:31 +0900 (Mon, 27 Feb 2017) | 1 line

ext/socket/extconf.rb: fix a typo
------------------------------------------------------------------------
r57723 | nobu | 2017-02-27 14:55:32 +0900 (Mon, 27 Feb 2017) | 4 lines

mkmf.rb: clean generated files

* lib/mkmf.rb (try_link0): remove generated files other than the
  executable file.
------------------------------------------------------------------------
r57722 | nobu | 2017-02-27 14:14:30 +0900 (Mon, 27 Feb 2017) | 10 lines

Makefile.in: verify-static-library

* Makefile.in (verify-static-library): separate from LIBRUBY_A.
  no check every times by default.

* lib/mkmf.rb (try_link): remove debugging symbol directory after
  linking, instead of try_do.

* lib/mkmf.rb (try_link): bccwin32 support has been removed long
  ago.
------------------------------------------------------------------------
r57721 | svn | 2017-02-27 09:53:27 +0900 (Mon, 27 Feb 2017) | 1 line

* 2017-02-27
------------------------------------------------------------------------
r57720 | nobu | 2017-02-27 09:53:26 +0900 (Mon, 27 Feb 2017) | 1 line

NEWS: Integer.sqrt [Feature #13219]
------------------------------------------------------------------------
r57719 | stomar | 2017-02-26 21:51:41 +0900 (Sun, 26 Feb 2017) | 4 lines

Add rdoc for Integer.sqrt

* numeric.c (rb_int_s_isqrt): [DOC] add rdoc for Integer.sqrt.
  [ruby-core:79762] [Bug #13251]
------------------------------------------------------------------------
r57718 | nobu | 2017-02-26 18:33:17 +0900 (Sun, 26 Feb 2017) | 6 lines

node.c: fix NODE_OP_ASGN1

* node.c (dump_node): fix a typo, index and rvalue.  fix
  NODE_OP_ASGN1 operator to nd_mid.  [Fix GH-1528]

Author:    fate0 <fate0@users.noreply.github.com>
------------------------------------------------------------------------
r57717 | nobu | 2017-02-26 09:33:06 +0900 (Sun, 26 Feb 2017) | 5 lines

parse.y: indent at invalid identifier

* parse.y (parser_heredoc_identifier): set indent only when valid
  identifier, not to dedent non-existent contents later.
  [ruby-core:79772] [Bug #13253]
------------------------------------------------------------------------
r57716 | svn | 2017-02-26 07:28:23 +0900 (Sun, 26 Feb 2017) | 1 line

* 2017-02-26
------------------------------------------------------------------------
r57715 | suke | 2017-02-26 07:28:22 +0900 (Sun, 26 Feb 2017) | 3 lines

ext/win32ole/win32ole.c(ole_initialize): avoid to fail in Windows nano server. 
This is experimental. Thanks to mwrock, Ethan Brown.

------------------------------------------------------------------------
r57714 | nobu | 2017-02-25 16:27:07 +0900 (Sat, 25 Feb 2017) | 1 line

bignum.c: use predefined IDs
------------------------------------------------------------------------
r57713 | nobu | 2017-02-25 14:44:39 +0900 (Sat, 25 Feb 2017) | 4 lines

bignum.c: improve estimate

* bignum.c (estimate_initial_sqrt, rb_big_isqrt): improve initial
  estimate by sqrt().  [ruby-core:79754] [Feature #13250]
------------------------------------------------------------------------
r57712 | nobu | 2017-02-25 13:13:42 +0900 (Sat, 25 Feb 2017) | 1 line

bignum.c (bary_zero_p): constify
------------------------------------------------------------------------
r57711 | nobu | 2017-02-25 11:59:47 +0900 (Sat, 25 Feb 2017) | 3 lines

.gdbinit: rp_bignum

* .gdbinit (rp_bignum): print bignum from higher digits.
------------------------------------------------------------------------
r57710 | normal | 2017-02-25 11:31:03 +0900 (Sat, 25 Feb 2017) | 4 lines

NEWS: document String#-@ change

* test/ruby/test_string.rb (test_uplus_minus): test deduplication
  [ruby-core:79747] [Feature #13077]
------------------------------------------------------------------------
r57709 | svn | 2017-02-25 08:31:08 +0900 (Sat, 25 Feb 2017) | 1 line

* 2017-02-25
------------------------------------------------------------------------
r57708 | nobu | 2017-02-25 08:31:07 +0900 (Sat, 25 Feb 2017) | 1 line

extract initial sqrt estimation [Feature #13219]
------------------------------------------------------------------------
r57707 | rhe | 2017-02-24 20:33:06 +0900 (Fri, 24 Feb 2017) | 4 lines

securerandom: fix up r57384

SecureRandom.gen_random_openssl still refers to Random.raw_seed, which
is renamed to Random.urandom by r57384.  [Bug #9569]
------------------------------------------------------------------------
r57706 | nobu | 2017-02-24 18:39:17 +0900 (Fri, 24 Feb 2017) | 4 lines

Integer.sqrt argument check

* numeric.c (rb_int_s_isqrt): check if the argument is an integer.
  [Feature #13219]
------------------------------------------------------------------------
r57705 | nobu | 2017-02-24 17:36:16 +0900 (Fri, 24 Feb 2017) | 1 line

Integer.sqrt [Feature #13219]
------------------------------------------------------------------------
r57704 | hsbt | 2017-02-24 16:55:50 +0900 (Fri, 24 Feb 2017) | 3 lines

Update maintainers and standard library docs for GDBM.

  [Feature #13248][ruby-core:79742]
------------------------------------------------------------------------
r57703 | hsbt | 2017-02-24 16:39:37 +0900 (Fri, 24 Feb 2017) | 4 lines

Update rdoc-5.1.0

  * Details of changes are following url.
    https://github.com/rdoc/rdoc/blob/master/History.rdoc#510--2017-02-24
------------------------------------------------------------------------
r57702 | hsbt | 2017-02-24 15:50:43 +0900 (Fri, 24 Feb 2017) | 1 line

gem name should be the downcase.
------------------------------------------------------------------------
r57701 | hsbt | 2017-02-24 15:48:55 +0900 (Fri, 24 Feb 2017) | 1 line

Added initial gemspec for GDBM module.
------------------------------------------------------------------------
r57700 | hsbt | 2017-02-24 15:32:48 +0900 (Fri, 24 Feb 2017) | 3 lines

Update psych-2.2.3

 * It's only typo fix for CRuby.
------------------------------------------------------------------------
r57699 | svn | 2017-02-24 10:01:24 +0900 (Fri, 24 Feb 2017) | 1 line

* 2017-02-24
------------------------------------------------------------------------
r57698 | normal | 2017-02-24 10:01:23 +0900 (Fri, 24 Feb 2017) | 59 lines

string.c (str_uminus): deduplicate strings

This exposes the rb_fstring internal function to return a
deduped and frozen string when a non-frozen string is given.
This is useful for writing all sorts of record processing key
values maybe stored, but certain keys and values are often
duplicated at a high frequency, so memory savings can
noticeable.

Use cases are many:

* email/NNTP header processing

  There are some standard header keys everybody uses
  (From/To/Cc/Date/Subject/Received/Message-ID/References/In-Reply-To),
  as well as common ones specific to a certain lists:
  (ruby-core has X-Redmine-* headers)
  It is also useful to dedupe values, as most inboxes have
  multiple messages from the same sender, or MUA.

* package management systems -
  things like RubyGems stores identical strings for licenses,
  dependency names, author names/emails, etc

* HTTP headers/trailers -
  standard headers (Host/Accept/Accept-Encoding/User-Agent/...)
  are common, but there are also uncommon ones.
  Values may be deduped, as well, as it is likely a user
  agent will make multiple/parallel requests to the same
  server.

* version control systems -
  this can be useful for deduplicating names of frequent
  committers (like "nobu" :)

  In linux.git and git.git, there are also common
  trailers such as Signed-Off-By/Acked-by/Reviewed-by/Fixes/...
  as well as less common ones.

* audio metadata -

  There are commonly used tags (Artist/Album/Title/Tracknumber),
  but Vorbis comments allows arbitrary key values to be stored.
  Music collections contain songs by the same artist or mutiple
  songs from the same album, so deduplicating values will be
  helpful there, too.

* JSON, YAML, XML, HTML processing

  Certain fields, tags and attributes are commonly used
  across the same and multiple documents

There is no security concern in this being a DoS vector by
causing immortal strings.  The fstring table is not a GC-root
and not walked during the mark phase.  GC-able dynamic symbols
since Ruby 2.2 are handled in the same manner, and that
implementation also relies on the non-immortality of fstrings.

[Feature #13077] [ruby-core:79663]
------------------------------------------------------------------------
r57697 | nobu | 2017-02-23 16:14:29 +0900 (Thu, 23 Feb 2017) | 4 lines

appveyor.yaml: matrix

* appveyor.yaml: use build matrix for platforms and compilers.
  resolve hard coded paths from these variables.
------------------------------------------------------------------------
r57696 | nobu | 2017-02-23 15:55:42 +0900 (Thu, 23 Feb 2017) | 4 lines

bignum.c: NAIVE_MUL_DIGITS

* bignum.c (NAIVE_MUL_DIGITS): share threshold for bary_sq_fast
  between bary_mul and bigsq.
------------------------------------------------------------------------
r57695 | nobu | 2017-02-23 13:10:41 +0900 (Thu, 23 Feb 2017) | 4 lines

fix circular dependencies

* defs/gmake.mk (TEST_DEPENDS): remove targets expanded as
  TEST_TARGETS, to get rid of circular dependencies.
------------------------------------------------------------------------
r57694 | nobu | 2017-02-23 11:40:17 +0900 (Thu, 23 Feb 2017) | 3 lines

Revert r57690 except for read_nonblock

https://github.com/ruby/ruby/pull/1527#issuecomment-281867551
------------------------------------------------------------------------
r57693 | nobu | 2017-02-23 11:11:16 +0900 (Thu, 23 Feb 2017) | 1 line

[DOC] mark up literals
------------------------------------------------------------------------
r57692 | nobu | 2017-02-23 11:00:28 +0900 (Thu, 23 Feb 2017) | 1 line

[DOC] keyword argument _exception_
------------------------------------------------------------------------
r57691 | nobu | 2017-02-23 10:54:13 +0900 (Thu, 23 Feb 2017) | 11 lines

socket.rb: [DOC] fix nonblock methods

* ext/socket/lib/socket.rb (BasicSocket#recv_nonblock): fix
  exception class and symbol.

* ext/socket/lib/socket.rb (BasicSocket#recvmsg_nonblock): ditto.

* ext/socket/lib/socket.rb (Socket#recvfrom_nonblock): fix the
  method name.

* ext/socket/lib/socket.rb (UDPSocket#recvfrom_nonblock): both.
------------------------------------------------------------------------
r57690 | nobu | 2017-02-23 10:15:27 +0900 (Thu, 23 Feb 2017) | 7 lines

[DOC] {read,write}_nonblock with exception: false

Update docs to reflect EOF behavior change of read_nonblock and
write_nonblock when using `exception: false`.

[Fix GH-1527]
Author:    Russell Davis <russell-stripe@users.noreply.github.com>
------------------------------------------------------------------------
r57689 | nobu | 2017-02-23 08:49:40 +0900 (Thu, 23 Feb 2017) | 4 lines

rational.c: infinity in power

* rational.c (nurat_expt): return 0 due to overflow.
  [ruby-core:79686] [Bug #13242]:
------------------------------------------------------------------------
r57688 | nobu | 2017-02-23 08:28:26 +0900 (Thu, 23 Feb 2017) | 4 lines

rational.c: infinity in power

* rational.c (nurat_expt): return Infinity due to overflow.
  [ruby-core:79686] [Bug #13242]:
------------------------------------------------------------------------
r57687 | svn | 2017-02-23 00:46:43 +0900 (Thu, 23 Feb 2017) | 1 line

* 2017-02-23
------------------------------------------------------------------------
r57686 | kazu | 2017-02-23 00:46:43 +0900 (Thu, 23 Feb 2017) | 8 lines

rational.c: fix rdoc

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

[ci skip] [ruby-core:79607] [Bug #13233]
Author:    Marcus Stollsteimer <sto.mar@web.de>
------------------------------------------------------------------------
r57685 | nobu | 2017-02-22 17:50:25 +0900 (Wed, 22 Feb 2017) | 5 lines

eval_error.c: backstrace in reverse order

* eval_error.c (rb_threadptr_error_print): print backtrace and
  error message in reverse order if STDERR is unchanged and a tty.
  [Feature #8661]
------------------------------------------------------------------------
r57684 | akr | 2017-02-22 16:31:25 +0900 (Wed, 22 Feb 2017) | 5 lines

refine warning message for binary regexp /.../n.

Reported by Herwin W.  [ruby-core:78592] [Bug #13024]


------------------------------------------------------------------------
r57683 | nobu | 2017-02-22 16:16:13 +0900 (Wed, 22 Feb 2017) | 4 lines

Thread#fetch

* thread.c (rb_thread_fetch): add new method Thread#fetch.
  [Feature #13009]
------------------------------------------------------------------------
r57682 | nobu | 2017-02-22 11:02:11 +0900 (Wed, 22 Feb 2017) | 8 lines

numeric.c: Numeric#clone and #dup

* numeric.c (num_clone, num_dup): no longer raises TypeError,
  returns the receiver instead as well as Integer and Float.
  [ruby-core:79636] [Bug #13237]

* object.c (rb_immutable_obj_clone): immutable object clone with
  freeze optional keyword argument.
------------------------------------------------------------------------
r57681 | svn | 2017-02-22 10:55:11 +0900 (Wed, 22 Feb 2017) | 1 line

* 2017-02-22
------------------------------------------------------------------------
r57680 | nobu | 2017-02-22 10:55:10 +0900 (Wed, 22 Feb 2017) | 7 lines

object.c: refactor rb_obj_clone and rb_obj_clone2

* object.c (rb_obj_clone2): extract option for clone, and split by
  whether the object is immutable or mutable.

* object.c (rb_obj_clone): no arguments, return immutable object
  immediately.
------------------------------------------------------------------------
r57679 | nobu | 2017-02-21 23:51:22 +0900 (Tue, 21 Feb 2017) | 3 lines

object.c: message encoding

* object.c (rb_obj_clone2): preserve encoding in error messages.
------------------------------------------------------------------------
r57678 | nobu | 2017-02-21 23:42:02 +0900 (Tue, 21 Feb 2017) | 4 lines

backward.h: RClassDeprecated

* include/ruby/backward.h (RClassDeprecated): move from
  ruby/ruby.h.
------------------------------------------------------------------------
r57677 | svn | 2017-02-21 17:18:16 +0900 (Tue, 21 Feb 2017) | 1 line

* properties.
------------------------------------------------------------------------
r57676 | ko1 | 2017-02-21 17:18:15 +0900 (Tue, 21 Feb 2017) | 38 lines

add performance counting mechanism for MRI debug/tuning purpose.

* How to enable this feature?
  * define USE_DEBUG_COUNTER as 1.
  * you can disable to output the result with
    RUBY_DEBUG_COUNTER_DISABLE environment variable
    even if USE_DEBUG_COUNTER == 1.

* How to add new counter?
  * add COUNTER(<name>) line on debug_counter.h.
  * include "debug_counter.h"
  * insert RB_DEBUG_COUNTER_INC(<name>) line on your favorite place.

* counter output example:
  [RUBY_DEBUG_COUNTER]    mc_inline_hit   999
  [RUBY_DEBUG_COUNTER]    mc_inline_miss  3
  [RUBY_DEBUG_COUNTER]    mc_global_hit   23
  [RUBY_DEBUG_COUNTER]    mc_global_miss  273
  [RUBY_DEBUG_COUNTER]    mc_global_state_miss    3
  [RUBY_DEBUG_COUNTER]    mc_class_serial_miss    0
  [RUBY_DEBUG_COUNTER]    mc_cme_complement       0
  [RUBY_DEBUG_COUNTER]    mc_cme_complement_hit   0
  [RUBY_DEBUG_COUNTER]    mc_search_super 1384
  [RUBY_DEBUG_COUNTER]    ivar_get_hit    0
  [RUBY_DEBUG_COUNTER]    ivar_get_miss   0
  [RUBY_DEBUG_COUNTER]    ivar_set_hit    0
  [RUBY_DEBUG_COUNTER]    ivar_set_miss   0
  [RUBY_DEBUG_COUNTER]    ivar_get        431
  [RUBY_DEBUG_COUNTER]    ivar_set        465

  * mc_... is related to method caching.
  * ivar_... is related to instance variable accesses.

* compare with dtrace/system tap features, there are completely
  no performacne penalties when it is disabled.

* This feature is supported only on __GNUC__ compilers.

------------------------------------------------------------------------
r57675 | nobu | 2017-02-21 15:16:50 +0900 (Tue, 21 Feb 2017) | 4 lines

backward.h: move deprecated declaration

* include/ruby/backward.h (rb_autoload): move declaration of
  deprecated function.
------------------------------------------------------------------------
r57674 | nobu | 2017-02-21 15:16:49 +0900 (Tue, 21 Feb 2017) | 1 line

variable.c: remove deprecated internal feature
------------------------------------------------------------------------
r57673 | nobu | 2017-02-21 15:07:22 +0900 (Tue, 21 Feb 2017) | 1 line

error.c: remove deprecated internal features
------------------------------------------------------------------------
r57672 | nobu | 2017-02-21 15:07:21 +0900 (Tue, 21 Feb 2017) | 4 lines

complex.c: remove deprecated functions

* complex.c (rb_complex_set_real, rb_complex_set_imag): remove
  functions deprecated at 2.2.
------------------------------------------------------------------------
r57671 | nobu | 2017-02-21 14:17:41 +0900 (Tue, 21 Feb 2017) | 4 lines

backward.h: 2.2 deprecated features

* include/ruby/backward.h (DECLARE_DEPRECATED_FEATURE): move
  features deprecated at 2.2.
------------------------------------------------------------------------
r57670 | nobu | 2017-02-21 14:16:49 +0900 (Tue, 21 Feb 2017) | 4 lines

internal.h: removed function declaration

* internal.h (rb_compile_error_str): remove declaration of removed
  internal function at r54189.
------------------------------------------------------------------------
r57669 | nobu | 2017-02-21 10:28:30 +0900 (Tue, 21 Feb 2017) | 4 lines

variable.c: noreturn in GCC

* variable.c (rb_generic_ivar_table): declare as noreturn only in
  GCC, which does not err on different attributes.
------------------------------------------------------------------------
r57668 | svn | 2017-02-21 04:12:53 +0900 (Tue, 21 Feb 2017) | 1 line

* 2017-02-21
------------------------------------------------------------------------
r57667 | ko1 | 2017-02-21 04:12:52 +0900 (Tue, 21 Feb 2017) | 4 lines

remove harmful declaration.

* variable.c (gen_ivtbl_get): declaration conflict on VC++.

------------------------------------------------------------------------
r57666 | yui-knk | 2017-02-20 23:40:56 +0900 (Mon, 20 Feb 2017) | 4 lines

compile.c: Fix a typo

* compile.c (compile_branch_condition): NODE_LIT is
  always true.
------------------------------------------------------------------------
r57665 | kazu | 2017-02-20 21:20:22 +0900 (Mon, 20 Feb 2017) | 12 lines

extension.rdoc: add document title

* doc/extension.rdoc, doc/extension.ja.rdoc: [DOC]
  add title and adapt subheading levels.

* doc/extension.rdoc: [DOC] fix subheading level of section
  about "Ruby Constants That Can Be Accessed From C".

* doc/extension.ja.rdoc: [DOC] add missing subheading.

[ruby-core:79590] [Bug #13229]
Author:    Marcus Stollsteimer <sto.mar@web.de>
------------------------------------------------------------------------
r57664 | naruse | 2017-02-20 19:59:10 +0900 (Mon, 20 Feb 2017) | 3 lines

Supress warning: function might be candidate for attribute 'noreturn'

GCC7 shows it.
------------------------------------------------------------------------
r57663 | naruse | 2017-02-20 19:59:10 +0900 (Mon, 20 Feb 2017) | 1 line

Cast as VALUE to suppress type warnings
------------------------------------------------------------------------
r57662 | naruse | 2017-02-20 19:59:09 +0900 (Mon, 20 Feb 2017) | 1 line

They are enum yytokentype, need cast
------------------------------------------------------------------------
r57661 | nobu | 2017-02-20 19:10:08 +0900 (Mon, 20 Feb 2017) | 4 lines

assertions.rb: ignore exit in child

* test/lib/test/unit/assertions.rb (assert_separately): ignore
  SystemExit.  unsuccessful exit still fails an assertion later.
------------------------------------------------------------------------
r57660 | nobu | 2017-02-20 18:46:12 +0900 (Mon, 20 Feb 2017) | 5 lines

regparse.c: initialize return values

* regparse.c (parse_char_class): initialize return values before
  depth limit check.  returned values will be freed in callers
  regardless the error.  [ruby-core:79624] [Bug #13234]
------------------------------------------------------------------------
r57659 | nobu | 2017-02-20 14:35:57 +0900 (Mon, 20 Feb 2017) | 1 line

parse.y: new_qcall
------------------------------------------------------------------------
r57658 | nobu | 2017-02-20 14:35:56 +0900 (Mon, 20 Feb 2017) | 3 lines

parse.y: ID2VAL

* parse.y (ID2VAL): split from TOKEN2VAL.
------------------------------------------------------------------------
r57657 | svn | 2017-02-20 11:16:23 +0900 (Mon, 20 Feb 2017) | 1 line

* 2017-02-20
------------------------------------------------------------------------
r57656 | nobu | 2017-02-20 11:16:22 +0900 (Mon, 20 Feb 2017) | 4 lines

envutil.rb: diagnostic_reports for ruby-runner

* test/lib/envutil.rb (EnvUtil.diagnostic_reports): ruby-runner
  execs "RUBY_INSTALL_NAME" file, so search by that name.
------------------------------------------------------------------------
r57655 | nobu | 2017-02-19 10:27:52 +0900 (Sun, 19 Feb 2017) | 5 lines

vm_insnhelper.c: super to module in refinement

* vm_insnhelper.c (vm_call_zsuper): method defined in module in
  refinement is not callable as-is.  dispatch again.
  [ruby-core:79588] [Bug #13227]
------------------------------------------------------------------------
r57654 | svn | 2017-02-19 07:38:36 +0900 (Sun, 19 Feb 2017) | 1 line

* 2017-02-19
------------------------------------------------------------------------
r57653 | nobu | 2017-02-19 07:38:35 +0900 (Sun, 19 Feb 2017) | 5 lines

COPYING: expand tabs

* COPYING: expand tabs like as the rest lines.  [Fix GH-1526]

Author: Philippe Ombredanne <pombredanne@gmail.com>
------------------------------------------------------------------------
r57652 | kazu | 2017-02-18 14:52:16 +0900 (Sat, 18 Feb 2017) | 1 line

{lib,test}/cgi: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57651 | nobu | 2017-02-18 13:23:20 +0900 (Sat, 18 Feb 2017) | 4 lines

array.c: check if numeric

* array.c (finish_exact_sum): add 0 and the initial value to check
  if the latter is numeric.  [ruby-core:79572] [Bug #13222]
------------------------------------------------------------------------
r57650 | svn | 2017-02-18 12:42:36 +0900 (Sat, 18 Feb 2017) | 1 line

* 2017-02-18
------------------------------------------------------------------------
r57649 | nobu | 2017-02-18 12:42:35 +0900 (Sat, 18 Feb 2017) | 4 lines

array.c: finish_exact_sum

* array.c (finish_exact_sum): extract duplicate code from
  rb_ary_sum.
------------------------------------------------------------------------
r57648 | nobu | 2017-02-17 22:31:43 +0900 (Fri, 17 Feb 2017) | 5 lines

test_fileutils.rb: no broken symlinks on Cygwin

* test/fileutils/test_fileutils.rb (no_broken_symlink): exclude
  test using broken symlinks on Cygwin, which are not allowed
  because of the directory flag of Windows native symlink.
------------------------------------------------------------------------
r57647 | nobu | 2017-02-17 22:31:42 +0900 (Fri, 17 Feb 2017) | 5 lines

test_fileutils.rb: fix relative symlink path

* test/fileutils/test_fileutils.rb (test_rm_symlink): fix relative
  symlink path, the target should be relative to the directory in
  which the symlink gets created.
------------------------------------------------------------------------
r57646 | nobu | 2017-02-17 19:22:10 +0900 (Fri, 17 Feb 2017) | 4 lines

test_fileutils.rb: workaround for Cygwin

* test/fileutils/test_fileutils.rb (root_in_posix): seems Cygwin
  has some different conditions for privilege.
------------------------------------------------------------------------
r57645 | nobu | 2017-02-17 19:22:09 +0900 (Fri, 17 Feb 2017) | 5 lines

test_fileutils.rb: cache distinct UIDs

* test/fileutils/test_fileutils.rb: cache distinct UIDs as
  constants at initialization.  assume no UIDs will be
  added/removed during tests.
------------------------------------------------------------------------
r57644 | svn | 2017-02-17 14:45:45 +0900 (Fri, 17 Feb 2017) | 1 line

* 2017-02-17
------------------------------------------------------------------------
r57643 | nobu | 2017-02-17 14:45:44 +0900 (Fri, 17 Feb 2017) | 6 lines

DEPRECATED_INTERNAL_FEATURE

* error.c (ruby_deprecated_internal_feature): renamed, to
  explicitly represent deprecation.

* internal.h (DEPRECATED_INTERNAL_FEATURE): ditto.
------------------------------------------------------------------------
r57642 | nobu | 2017-02-16 23:48:12 +0900 (Thu, 16 Feb 2017) | 3 lines

variable.c: fatal rb_generic_ivar_table

* variable.c (rb_generic_ivar_table): raise fatal error.
------------------------------------------------------------------------
r57641 | ko1 | 2017-02-16 18:15:26 +0900 (Thu, 16 Feb 2017) | 2 lines

use rb_iseq_check() for USE_LAZY_LOAD, too.

------------------------------------------------------------------------
r57640 | nobu | 2017-02-16 17:42:22 +0900 (Thu, 16 Feb 2017) | 6 lines

fileutils.rb: do not make root

* lib/fileutils.rb (FileUtils#mkdir_p): no need to make root
  directory which should be exist and cannot be made with mkdir
  recent Cygwin can make a directory contains a colon.
  [Bug #13214]
------------------------------------------------------------------------
r57639 | ko1 | 2017-02-16 17:24:37 +0900 (Thu, 16 Feb 2017) | 2 lines

use rb_iseq_check() for USE_LAZY_LOAD.

------------------------------------------------------------------------
r57638 | svn | 2017-02-16 11:47:22 +0900 (Thu, 16 Feb 2017) | 1 line

* 2017-02-16
------------------------------------------------------------------------
r57637 | nobu | 2017-02-16 11:47:21 +0900 (Thu, 16 Feb 2017) | 6 lines

win32.c: memcpy instead of strlcpy

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

* win32/win32.c (w32_cmdvector): ditto, with NUL-terminating.
------------------------------------------------------------------------
r57636 | nobu | 2017-02-15 20:17:53 +0900 (Wed, 15 Feb 2017) | 1 line

Update gems/bundled_gems
------------------------------------------------------------------------
r57635 | nobu | 2017-02-15 19:51:58 +0900 (Wed, 15 Feb 2017) | 4 lines

gmake.mk: mflags without -jN

* defs/gmake.mk (mflags): override the definition in common.mk
  without -jN option.
------------------------------------------------------------------------
r57634 | nobu | 2017-02-15 17:38:01 +0900 (Wed, 15 Feb 2017) | 7 lines

marshal.c: revert r57631 partially

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

* marshal.c (rb_marshal_load_with_proc): ditto for load_arg.
------------------------------------------------------------------------
r57633 | nobu | 2017-02-15 14:53:01 +0900 (Wed, 15 Feb 2017) | 3 lines

thread.c: fix for VC

* thread.c (rb_fd_no_init): make void same as rb_fd_init_copy.
------------------------------------------------------------------------
r57632 | svn | 2017-02-15 09:42:52 +0900 (Wed, 15 Feb 2017) | 1 line

* 2017-02-15
------------------------------------------------------------------------
r57631 | normal | 2017-02-15 09:42:51 +0900 (Wed, 15 Feb 2017) | 11 lines

marshal.c: use hidden objects to allow recycling

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

* marshal.c (rb_marshal_dump_limited): hide dump_arg and recycle when done
  (rb_marshal_load_with_proc): hide load_arg and recycle when done
  [ruby-core:79518]
------------------------------------------------------------------------
r57630 | kou | 2017-02-14 22:29:13 +0900 (Tue, 14 Feb 2017) | 2 lines

Fix a typo

------------------------------------------------------------------------
r57629 | nobu | 2017-02-14 21:34:11 +0900 (Tue, 14 Feb 2017) | 4 lines

resolv9x.rb: fix typo

* ext/win32/lib/win32/resolv9x.rb (WsControl): fix missing close
  parenthesis at r22724.
------------------------------------------------------------------------
r57628 | nobu | 2017-02-14 21:29:56 +0900 (Tue, 14 Feb 2017) | 4 lines

string.c: assertion

* string.c (str_shared_replace): use RUBY_ASSERT for
  pre-condition.
------------------------------------------------------------------------
r57627 | hsbt | 2017-02-14 20:12:52 +0900 (Tue, 14 Feb 2017) | 3 lines

Added initial gemspec for Scanf module.

  [Feature #13213]
------------------------------------------------------------------------
r57625 | nobu | 2017-02-14 16:52:30 +0900 (Tue, 14 Feb 2017) | 6 lines

initialize variables

* string.c (rb_str_enumerate_lines): initialize conditionally
  used variable.

* thread.c (rb_fd_no_init): ditto.
------------------------------------------------------------------------
r57624 | nobu | 2017-02-14 00:28:25 +0900 (Tue, 14 Feb 2017) | 4 lines

gmake.mk: test-ruby

* defs/gmake.mk (ORDERED_TEST_TARGETS): add test-ruby target, test
  for ruby core without bundled libraries.
------------------------------------------------------------------------
r57623 | svn | 2017-02-14 00:19:13 +0900 (Tue, 14 Feb 2017) | 1 line

* 2017-02-14
------------------------------------------------------------------------
r57622 | nobu | 2017-02-14 00:19:12 +0900 (Tue, 14 Feb 2017) | 4 lines

thread.c: use ASSUME only on gcc 5 or later

* thread.c (rb_fd_no_init): on gcc 4, ASSUME macro affects
  something too much.
------------------------------------------------------------------------
r57621 | nobu | 2017-02-13 22:08:44 +0900 (Mon, 13 Feb 2017) | 4 lines

ruby.h: remove comment

* include/ruby/ruby.h (RB_GC_GUARD): remove comment unsupported by
  Solaris AS.
------------------------------------------------------------------------
r57620 | kazu | 2017-02-13 21:16:26 +0900 (Mon, 13 Feb 2017) | 1 line

lib/find.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57619 | nobu | 2017-02-13 17:14:19 +0900 (Mon, 13 Feb 2017) | 4 lines

ruby.h: RB_GC_GUARD stronger than gcc7

* include/ruby/ruby.h (RB_GC_GUARD): prevent guarded pointer from
  optimization by using as an input to inline asm.
------------------------------------------------------------------------
r57618 | nobu | 2017-02-13 14:44:15 +0900 (Mon, 13 Feb 2017) | 6 lines

suppress warnings

* string.c (rb_str_enumerate_lines): hint to suppress a
  maybe-uninitialized warning by gcc.

* thread.c (rb_fd_no_init): ditto.
------------------------------------------------------------------------
r57617 | nobu | 2017-02-13 14:23:36 +0900 (Mon, 13 Feb 2017) | 4 lines

compile.c: suppress a warning

* compile.c (iseq_build_kw): suppress an alloc-size-larger-than
  warning by gcc 7.
------------------------------------------------------------------------
r57616 | nobu | 2017-02-13 14:11:14 +0900 (Mon, 13 Feb 2017) | 3 lines

gmake.mk: tests step

* defs/gmake.mk (TEST_TARGETS): run tests step by step.
------------------------------------------------------------------------
r57615 | normal | 2017-02-13 11:04:26 +0900 (Mon, 13 Feb 2017) | 6 lines

array.c (ary_recycle_hash): use rb_gc_force_recycle

Hidden objects (RBASIC_CLASS(hash) == 0) can never become
visible to other threads or signal handlers via
ObjectSpace.each_object or similar means.  Thus it is safe to
forcibly recycle the object slot for future use, here.
------------------------------------------------------------------------
r57614 | normal | 2017-02-13 10:05:23 +0900 (Mon, 13 Feb 2017) | 6 lines

cont.c: avoid needless branch for dmark callbacks

gc.c (gc_mark_children, case T_DATA) does not use
the dmark function pointer if DATA_PTR is NULL

* cont.c (cont_mark, fiber_mark): remove branch, ptr is never NULL
------------------------------------------------------------------------
r57613 | svn | 2017-02-13 08:37:29 +0900 (Mon, 13 Feb 2017) | 1 line

* 2017-02-13
------------------------------------------------------------------------
r57612 | nobu | 2017-02-13 08:37:28 +0900 (Mon, 13 Feb 2017) | 4 lines

gmake.mk: -n for tests

* defs/gmake.mk (gnumake_recursive): do not invoke tests if -n
  option is given.
------------------------------------------------------------------------
r57611 | nobu | 2017-02-12 17:43:43 +0900 (Sun, 12 Feb 2017) | 1 line

parse.y: ripper_intern is no longer used
------------------------------------------------------------------------
r57610 | nobu | 2017-02-12 17:33:33 +0900 (Sun, 12 Feb 2017) | 6 lines

parse.y: logop

* defs/id.def (predefined): add keywords `and` and `or`.

* parse.y (log_op): unify parser and ripper, and use tokens
  instead of node types and symbols.
------------------------------------------------------------------------
r57609 | kazu | 2017-02-12 13:31:25 +0900 (Sun, 12 Feb 2017) | 1 line

ext/objspace: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57608 | nobu | 2017-02-12 13:23:16 +0900 (Sun, 12 Feb 2017) | 4 lines

parse.y: call_bin_op

* parse.y (call_bin_op): unify parser and ripper, and use IDs
  instead of tokens.
------------------------------------------------------------------------
r57607 | nobu | 2017-02-12 13:20:35 +0900 (Sun, 12 Feb 2017) | 6 lines

parse.y: call_uni_op

* defs/id.def (predefined): add keyword `not`.

* parse.y (call_uni_op): unify parser and ripper, and use IDs
  instead of tokens.
------------------------------------------------------------------------
r57606 | nobu | 2017-02-12 12:15:34 +0900 (Sun, 12 Feb 2017) | 6 lines

ripper: fix %-op on_operator_ambiguous

* parse.y (ambiguous_operator): separate token and string
  representation of operators, to fix %-operator argument.  in a
  warning message, needs to be escaped by '%' but the symbol
  should not be.
------------------------------------------------------------------------
r57605 | nobu | 2017-02-12 11:48:28 +0900 (Sun, 12 Feb 2017) | 4 lines

symbol/init.c: ID value

* ext/-test-/symbol/init.c (sym_pinneddown_p): return ID value or
  nil for debugging.
------------------------------------------------------------------------
r57604 | svn | 2017-02-12 00:08:34 +0900 (Sun, 12 Feb 2017) | 1 line

* 2017-02-12
------------------------------------------------------------------------
r57603 | naruse | 2017-02-12 00:08:33 +0900 (Sun, 12 Feb 2017) | 4 lines

Merge Onigmo 6.1.1

* Support absent operator https://github.com/k-takata/Onigmo/issues/82
* https://github.com/k-takata/Onigmo/blob/Onigmo-6.1.1/HISTORY
------------------------------------------------------------------------
r57602 | nobu | 2017-02-11 20:37:14 +0900 (Sat, 11 Feb 2017) | 1 line

appveyor.yml: extract zlib_version
------------------------------------------------------------------------
r57601 | nobu | 2017-02-11 19:33:05 +0900 (Sat, 11 Feb 2017) | 5 lines

fiddle/depend: build-libffi

* ext/fiddle/depend (build-libffi): get rid of making $(LIBFFI_A)
  a sole target, which may be empty when installed libffi is
  found.
------------------------------------------------------------------------
r57600 | kazu | 2017-02-11 12:12:59 +0900 (Sat, 11 Feb 2017) | 4 lines

appveyor.yml: Update zlib

* Update zlib to 1.2.11
* Use https instead of http
------------------------------------------------------------------------
r57599 | svn | 2017-02-11 11:14:07 +0900 (Sat, 11 Feb 2017) | 1 line

* 2017-02-11
------------------------------------------------------------------------
r57598 | nobu | 2017-02-11 11:14:06 +0900 (Sat, 11 Feb 2017) | 6 lines

parse.y: TOKEN2ID

* parse.y (TOKEN2ID): add macro which maps static tokens to IDs.

* template/id.h.tmpl (TOKEN2*ID, DEFINE_*ID_FROM_TOKEN): separate
  into macros, token to ID mapping and enum definitions.
------------------------------------------------------------------------
r57597 | mrkn | 2017-02-10 22:23:58 +0900 (Fri, 10 Feb 2017) | 5 lines

bigdecimal: version 1.3.1

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

  https://github.com/ruby/bigdecimal/compare/v1.3.0...v1.3.1
------------------------------------------------------------------------
r57596 | hsbt | 2017-02-10 18:41:15 +0900 (Fri, 10 Feb 2017) | 7 lines

Added initial gemspec for Fcntl module.

  [Feature #13206]

  * ext/fcntl/fcntl.gemspec: initial commit.
  * doc/maintainers.rdoc, doc/standard_library.rdoc: Move Fcntl module
    to Default gems section.
------------------------------------------------------------------------
r57595 | ko1 | 2017-02-10 17:15:39 +0900 (Fri, 10 Feb 2017) | 2 lines

check thread deadness correctly.

------------------------------------------------------------------------
r57594 | nobu | 2017-02-10 15:12:22 +0900 (Fri, 10 Feb 2017) | 9 lines

MFLAGS for nmake

* common.mk (mflags): pass make flags to sub-makes, for nmake
  which cannot pass them by the environment variable.

* defs/gmake.mk (mflags): filter out -j option for sub-makes.

* template/exts.mk.tmpl (MFLAGS): extract MFLAGS from sub extmk
  files for nmake.
------------------------------------------------------------------------
r57593 | nobu | 2017-02-10 13:24:08 +0900 (Fri, 10 Feb 2017) | 5 lines

fiddle: fix $(SUBMAKE_PRE)

* ext/fiddle/extconf.rb: fix $(SUBMAKE_PRE) to chdir to
  $(LIBFFI_DIR) instead of $(@D), since $(LIBFFI_A) is not
  underneath libffi but under .libs.
------------------------------------------------------------------------
r57592 | nobu | 2017-02-10 12:59:55 +0900 (Fri, 10 Feb 2017) | 4 lines

openssl: fix broken openssl check

* ext/openssl/deprecation.rb: check for broken OpenSSL only on mac
  OS.  [ruby-core:79475] [Bug #13200]
------------------------------------------------------------------------
r57591 | nobu | 2017-02-10 12:58:02 +0900 (Fri, 10 Feb 2017) | 4 lines

openssl: fix broken openssl check

* ext/openssl/extconf.rb: check for broken OpenSSL only on mac OS.
  [ruby-core:79475] [Bug #13200]
------------------------------------------------------------------------
r57590 | nobu | 2017-02-10 12:58:01 +0900 (Fri, 10 Feb 2017) | 4 lines

extmk.rb: split notes

* ext/extmk.rb: split notes and echo per lines, for multiple lines
  messages.  [ruby-core:79475] [Bug #13200]
------------------------------------------------------------------------
r57589 | nobu | 2017-02-10 10:13:22 +0900 (Fri, 10 Feb 2017) | 5 lines

parallel.rb: fix intervention

* test/lib/test/unit/parallel.rb (_report): send a response and a
  newline atomically, to get rid of intervention with "p" which
  runs in a separate thread.
------------------------------------------------------------------------
r57588 | kazu | 2017-02-10 09:58:47 +0900 (Fri, 10 Feb 2017) | 1 line

Use `unpack1` instead of `unpack` and `first`
------------------------------------------------------------------------
r57587 | kazu | 2017-02-10 09:58:45 +0900 (Fri, 10 Feb 2017) | 1 line

lib/base64.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57586 | svn | 2017-02-10 01:12:01 +0900 (Fri, 10 Feb 2017) | 1 line

* 2017-02-10
------------------------------------------------------------------------
r57585 | kazu | 2017-02-10 01:12:00 +0900 (Fri, 10 Feb 2017) | 1 line

lib/abbrev.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57584 | akr | 2017-02-09 23:28:27 +0900 (Thu, 09 Feb 2017) | 7 lines

[DOC] Update an obsolete example for slice_before.

The argument for Enumerable#slice_before is is removed at Ruby 2.3.

Reported by Shyouhei Urabe.  [Bug #13202]


------------------------------------------------------------------------
r57583 | nobu | 2017-02-09 21:08:56 +0900 (Thu, 09 Feb 2017) | 4 lines

fiddle: jobserver for libffi

* ext/fiddle/depend (libffi): use $(MAKE) explicitly for recursive
  make, so that jobserver works.
------------------------------------------------------------------------
r57582 | hsbt | 2017-02-09 20:46:32 +0900 (Thu, 09 Feb 2017) | 5 lines

Update maintainers list.

 * Added Default gems section and move some libraries to it section.
 * Added Bundled gems section and added upstream repositories of bundled gems.
 * Added upstream repositories to some default gems.
------------------------------------------------------------------------
r57581 | hsbt | 2017-02-09 20:26:21 +0900 (Thu, 09 Feb 2017) | 5 lines

Update latest infomation of standard libraries.

 * Added Bundled gems section.
 * Added IO::console to Default gems.
 * Move XMLRPC to Bundled gems section.
------------------------------------------------------------------------
r57580 | hsbt | 2017-02-09 19:49:08 +0900 (Thu, 09 Feb 2017) | 1 line

Separated default gems section.
------------------------------------------------------------------------
r57579 | svn | 2017-02-09 16:53:53 +0900 (Thu, 09 Feb 2017) | 1 line

* 2017-02-09
------------------------------------------------------------------------
r57578 | nobu | 2017-02-09 16:53:52 +0900 (Thu, 09 Feb 2017) | 5 lines

parse.y: fix idCOLON2

* defs/id.def: remove idDSTAR and idCOLON3.

* parse.y (tCOLON2): make same as id.h.
------------------------------------------------------------------------
r57577 | hsbt | 2017-02-08 19:05:13 +0900 (Wed, 08 Feb 2017) | 3 lines

Added initial gemspec for DBM module.

  [Feature #13201]
------------------------------------------------------------------------
r57576 | nobu | 2017-02-08 16:06:37 +0900 (Wed, 08 Feb 2017) | 4 lines

parse.y: named caputre into match_op_gen

* parse.y (match_op_gen): move making named capture assignment
  nodes.  remove repeated conditions.
------------------------------------------------------------------------
r57575 | ko1 | 2017-02-08 12:59:53 +0900 (Wed, 08 Feb 2017) | 2 lines

remove warning about enum and int comparison.

------------------------------------------------------------------------
r57574 | svn | 2017-02-08 10:18:56 +0900 (Wed, 08 Feb 2017) | 1 line

* 2017-02-08
------------------------------------------------------------------------
r57573 | nobu | 2017-02-08 10:18:56 +0900 (Wed, 08 Feb 2017) | 4 lines

node.c: compress logop sequence

* node.c (dump_node): compress sequence of same logical binary
  operators, NODE_AND/NODE_OR.
------------------------------------------------------------------------
r57564 | kazu | 2017-02-07 21:49:57 +0900 (Tue, 07 Feb 2017) | 1 line

{ext,test}/zlib: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57563 | nobu | 2017-02-07 17:16:50 +0900 (Tue, 07 Feb 2017) | 5 lines

test/unit.rb: old GNU make

* test/lib/test/unit.rb (Test::Unit::Parallel#non_options):
  support old GNU make, which uses --jobserver-fds option instead
  of --jobserver-auth.
------------------------------------------------------------------------
r57562 | nobu | 2017-02-07 17:09:23 +0900 (Tue, 07 Feb 2017) | 4 lines

test_parallel.rb: match the count

* test/testunit/test_parallel.rb (test_should_run_all_without_any_leaks):
  match the final test count instead of progressing indicators.
------------------------------------------------------------------------
r57561 | hsbt | 2017-02-07 16:14:22 +0900 (Tue, 07 Feb 2017) | 1 line

Fix a required ruby version on gemspec of gemified libraries.
------------------------------------------------------------------------
r57560 | hsbt | 2017-02-07 16:14:21 +0900 (Tue, 07 Feb 2017) | 1 line

Added initial gemspec for StringScanner class.
------------------------------------------------------------------------
r57559 | nobu | 2017-02-07 14:19:29 +0900 (Tue, 07 Feb 2017) | 4 lines

test/unit.rb: most-asserted

* test/lib/test/unit.rb (Statistics#record): record most asserted
  tests.
------------------------------------------------------------------------
r57558 | ko1 | 2017-02-07 13:24:44 +0900 (Tue, 07 Feb 2017) | 2 lines

TRUE is not defined here...

------------------------------------------------------------------------
r57557 | ko1 | 2017-02-07 13:14:25 +0900 (Tue, 07 Feb 2017) | 6 lines

remove compare with enum value.

* vm_core.h (vm_block_handler_verify): some compilers warn about comparison
  with enum value and 0. Real assertion is in vm_block_handler_type() so
  we only need to call vm_block_handler_type() and the value should be TRUE.

------------------------------------------------------------------------
r57556 | nobu | 2017-02-07 12:58:07 +0900 (Tue, 07 Feb 2017) | 4 lines

test/unit.rb: defined

* test/lib/test/unit.rb (Test::Unit::Statistics#record): check if
  @longest is set first.
------------------------------------------------------------------------
r57555 | nobu | 2017-02-07 12:55:47 +0900 (Tue, 07 Feb 2017) | 7 lines

test/unit: record in parallel

* test/lib/test/unit.rb (Test::Unit::Parallel#deal): deal with
  record.

* test/lib/test/unit/parallel.rb (Test::Unit::Worker#record):
  report test records to the master.
------------------------------------------------------------------------
r57554 | nobu | 2017-02-07 11:49:04 +0900 (Tue, 07 Feb 2017) | 4 lines

test/unit.rb: statistics

* test/lib/test/unit.rb (Test::Unit::Statistics): show statistics.
  only --longest option is implemented right now.
------------------------------------------------------------------------
r57553 | svn | 2017-02-07 11:49:03 +0900 (Tue, 07 Feb 2017) | 1 line

* 2017-02-07
------------------------------------------------------------------------
r57552 | nobu | 2017-02-07 11:49:02 +0900 (Tue, 07 Feb 2017) | 3 lines

rbinstall.rb: umask hack

* tool/rbinstall.rb (Gem::Installer#install): moved umask hack.
------------------------------------------------------------------------
r57551 | kazu | 2017-02-06 22:23:39 +0900 (Mon, 06 Feb 2017) | 1 line

{ext,test}/strscan: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57550 | hsbt | 2017-02-06 18:51:17 +0900 (Mon, 06 Feb 2017) | 3 lines

Added initial gemspec for FileUtils module.

  [Feature #13197]
------------------------------------------------------------------------
r57549 | nobu | 2017-02-06 16:34:13 +0900 (Mon, 06 Feb 2017) | 13 lines

date_core.c: [DOC] revise docs [ci skip]

* fix malformed rdoc for Date#today, Date._strptime,
  and DateTime._strptime
* add code examples for Date#<< and Date#>> to demonstrate
  that different dates can result in the same return value
* use Date::ITALY in call-seq instead of only ITALY
* fix some copy/paste mistakes where Date should be DateTime
* fix various errors and grammar
* fix cross references and formatting

[ruby-core:79433] [Bug #13193]
Author:    Marcus Stollsteimer <sto.mar@web.de>
------------------------------------------------------------------------
r57548 | nobu | 2017-02-06 11:35:48 +0900 (Mon, 06 Feb 2017) | 5 lines

rdoc: suppress warnings in eval

* lib/rdoc/markup/to_html.rb (RDoc::Markup::ToHtml): the argument
  text may contain warnings, which are useless to check if
  parseable.  merge rdoc/rdoc#440.
------------------------------------------------------------------------
r57547 | nobu | 2017-02-06 11:35:47 +0900 (Mon, 06 Feb 2017) | 1 line

common.mk: suppress debugging messages
------------------------------------------------------------------------
r57546 | nobu | 2017-02-06 08:52:49 +0900 (Mon, 06 Feb 2017) | 4 lines

rbinstall.rb: Gem::Installer lacks dir_mode option

* tool/rbinstall.rb (bundle-gems): Gem::Installer does not support
  directory permission option, set umask to owner writable.
------------------------------------------------------------------------
r57545 | nobu | 2017-02-06 08:52:48 +0900 (Mon, 06 Feb 2017) | 1 line

rbinstall.rb: rename tags
------------------------------------------------------------------------
r57544 | nobu | 2017-02-06 01:23:12 +0900 (Mon, 06 Feb 2017) | 1 line

tool/rbinstall.rb: add new tags
------------------------------------------------------------------------
r57543 | nobu | 2017-02-06 01:23:11 +0900 (Mon, 06 Feb 2017) | 6 lines

rbinstall.rb: default umask

* tool/rbinstall.rb: revert r49841 and default umask to just
  prohibit all from writing.  symlink(2) has no argument to set
  permissions but is affected by umask.
  [ruby-dev:49975] [Bug #13194]
------------------------------------------------------------------------
r57542 | svn | 2017-02-06 01:07:31 +0900 (Mon, 06 Feb 2017) | 1 line

* 2017-02-06
------------------------------------------------------------------------
r57541 | naruse | 2017-02-06 01:07:30 +0900 (Mon, 06 Feb 2017) | 1 line

@job_tokens is defined iff @jobserver is true
------------------------------------------------------------------------
r57540 | yui-knk | 2017-02-05 23:16:52 +0900 (Sun, 05 Feb 2017) | 3 lines

node.c: Fix a typo

* node.c (dump_node): Fix a typo of || operator example
------------------------------------------------------------------------
r57539 | nobu | 2017-02-05 20:15:49 +0900 (Sun, 05 Feb 2017) | 5 lines

rational.c: fix rdoc [ci skip]

* rational.c (rb_rational_plus): [DOC] fix an example.
  A patch by Trygve Flathen <at.ruby-lang AT flathen.net> in
  [ruby-core:71755].  [Bug #11752]
------------------------------------------------------------------------
r57538 | kazu | 2017-02-05 16:54:32 +0900 (Sun, 05 Feb 2017) | 1 line

{ext,test}/ripper: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57537 | nobu | 2017-02-05 10:26:27 +0900 (Sun, 05 Feb 2017) | 4 lines

pty/shl.rb: update [ci skip]

* sample/pty/shl.rb: leap exited child process.
  [ruby-dev:49974] [Bug #13191]
------------------------------------------------------------------------
r57536 | normal | 2017-02-05 09:22:03 +0900 (Sun, 05 Feb 2017) | 9 lines

doc: Add example for Symbol#to_s

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

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

From: Marcus Stollsteimer <sto.mar@web.de>
------------------------------------------------------------------------
r57535 | svn | 2017-02-05 03:14:43 +0900 (Sun, 05 Feb 2017) | 1 line

* 2017-02-05
------------------------------------------------------------------------
r57534 | naruse | 2017-02-05 03:14:42 +0900 (Sun, 05 Feb 2017) | 1 line

fix description for current implementation
------------------------------------------------------------------------
r57533 | nobu | 2017-02-04 19:48:15 +0900 (Sat, 04 Feb 2017) | 4 lines

pty/shl.rb: update [ci skip]

* sample/pty/shl.rb: do not manage array length separately.
  [ruby-dev:49974] [Bug #13191]
------------------------------------------------------------------------
r57532 | nobu | 2017-02-04 19:48:14 +0900 (Sat, 04 Feb 2017) | 4 lines

pty/shl.rb: update [ci skip]

* sample/pty/shl.rb: use io/console instead of stty.
  [ruby-dev:49974] [Bug #13191]
------------------------------------------------------------------------
r57531 | nobu | 2017-02-04 19:48:13 +0900 (Sat, 04 Feb 2017) | 5 lines

pty/shl.rb: update [ci skip]

* sample/pty/shl.rb: stop writer loop when the child exited.
  PTY::ChildExited no longer raises asynchronously since r20298.
  [ruby-dev:49974] [Bug #13191]
------------------------------------------------------------------------
r57530 | kazu | 2017-02-04 15:49:07 +0900 (Sat, 04 Feb 2017) | 5 lines

sample/pty/shl.rb: update sample

* Specify frozen_string_literal: true.
* Fix TypeError of raise.
* Use a character literal instead of Integer.
------------------------------------------------------------------------
r57529 | kazu | 2017-02-04 15:49:06 +0900 (Sat, 04 Feb 2017) | 1 line

sample/pty/script.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57528 | kazu | 2017-02-04 15:49:04 +0900 (Sat, 04 Feb 2017) | 5 lines

sample/pty/expect_sample.rb: Update sample

* Fix regexp capture scope bug.
* Specify frozen_string_literal: true.
* Use passive mode.
------------------------------------------------------------------------
r57527 | kazu | 2017-02-04 15:49:00 +0900 (Sat, 04 Feb 2017) | 1 line

ext/pty: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57526 | nobu | 2017-02-04 14:23:48 +0900 (Sat, 04 Feb 2017) | 5 lines

test/unit.rb: jobserver for workers

* test/lib/test/unit.rb (Test::Unit::Parallel#process_args):
  initialize @run_options to pass jobserver auth pipes to worker
  processes.
------------------------------------------------------------------------
r57525 | nobu | 2017-02-04 12:28:17 +0900 (Sat, 04 Feb 2017) | 4 lines

test/unit.rb: job tokens

* test/lib/test/unit.rb (_run_parallel): deal with job tokens for
  each workers.
------------------------------------------------------------------------
r57524 | nobu | 2017-02-04 11:17:35 +0900 (Sat, 04 Feb 2017) | 4 lines

test/unit.rb: initialize instance variable

* test/lib/test/unit.rb (Test::Unit::Parallel#non_options):
  initialize @jobserver instance variable to suppress warnings.
------------------------------------------------------------------------
r57523 | nobu | 2017-02-04 10:04:14 +0900 (Sat, 04 Feb 2017) | 4 lines

test_gem.rb: exclude default gems

* test/rubygems/test_gem.rb: check difference to exclude default
  gems from the expected results.  [Feature #13186]
------------------------------------------------------------------------
r57522 | normal | 2017-02-04 08:58:18 +0900 (Sat, 04 Feb 2017) | 14 lines

doc: restore class documentation for Struct

* struct.c: restore class documentation for Struct
  that disappeared with r46663.

Due to r46663, the class documentation for Struct disappeared.
(The revision inserted the definition of `InitVM_Struct` between
the rdoc and the definition of `Init_Struct`.)

The docs are rendered for 2.1: <https://docs.ruby-lang.org/en/2.1.0/Struct.html>,
but not for later versions, see: <https://docs.ruby-lang.org/en/2.2.0/Struct.html>
(Same for `ri` pages).

[ruby-core:79416] [Bug #13189]
------------------------------------------------------------------------
r57521 | normal | 2017-02-04 08:55:06 +0900 (Sat, 04 Feb 2017) | 8 lines

symbol.c (rb_id2str): eliminate branch to set class

Since the fstring table encompasses all strings in the
symbol table, we may reuse the fstring table walk to set
the class and eliminate the branch in rb_id2str.

* string.c (Init_String): use rb_cString immediately after definition
* symbol.c (rb_id2str): eliminate branch to set class
------------------------------------------------------------------------
r57520 | nobu | 2017-02-04 08:50:41 +0900 (Sat, 04 Feb 2017) | 5 lines

ruby.h: unused parameter

* include/ruby/ruby.h (rb_scan_args_set): remove unused parameter
  for more pedantic extension libraries.
  [ruby-core:79399] [Feature #13184]
------------------------------------------------------------------------
r57519 | normal | 2017-02-04 08:40:59 +0900 (Sat, 04 Feb 2017) | 1 line

.gitignore: add ext/rbconfig/sizeof/limits.c
------------------------------------------------------------------------
r57518 | normal | 2017-02-04 08:40:05 +0900 (Sat, 04 Feb 2017) | 3 lines

ext/rbconfig/sizeof: add limits.c to svn:ignore


------------------------------------------------------------------------
r57517 | normal | 2017-02-04 08:34:48 +0900 (Sat, 04 Feb 2017) | 8 lines

doc: Fix error for escape sequences in string literals

Backslash goes first in escape sequences, so it must be
"any other character following a backslash is interpreted as ...",
while the doc says "...followed by...".

Author: Marcus Stollsteimer <sto.mar@web.de>
[ruby-core:79418] [Bug #13190]
------------------------------------------------------------------------
r57516 | svn | 2017-02-04 03:25:29 +0900 (Sat, 04 Feb 2017) | 1 line

* 2017-02-04
------------------------------------------------------------------------
r57515 | marcandre | 2017-02-04 03:25:28 +0900 (Sat, 04 Feb 2017) | 3 lines

lib/ostruct.rb: Fix returned value of each_pair.

From a patch by Marcus Stollsteimer. [Fixes #13169]
------------------------------------------------------------------------
r57514 | nobu | 2017-02-03 21:52:09 +0900 (Fri, 03 Feb 2017) | 4 lines

test/unit.rb: share job slots

* test/lib/test/unit.rb (Test::Unit::Parallel#_run_parallel):
  share job slots with GNU 'make'.
------------------------------------------------------------------------
r57513 | nobu | 2017-02-03 21:52:08 +0900 (Fri, 03 Feb 2017) | 4 lines

test/unit.rb: job testing flag

* test/lib/test/unit.rb (Parallel#non_options): split testing flag
  and job count by OptionParser.
------------------------------------------------------------------------
r57512 | hsbt | 2017-02-03 21:39:04 +0900 (Fri, 03 Feb 2017) | 3 lines

Added initial gemspec for zlib module.

  [Feature #13186]
------------------------------------------------------------------------
r57511 | nobu | 2017-02-03 15:48:02 +0900 (Fri, 03 Feb 2017) | 4 lines

ensured.c: fix conflict

* ext/-test-/exception/ensured.c (exc_raise): get rid of conflict
  with raise(2) in the standard.  [ruby-core:79371] [Bug #13176]
------------------------------------------------------------------------
r57510 | nobu | 2017-02-03 15:23:34 +0900 (Fri, 03 Feb 2017) | 4 lines

eval.c: hide internal objects

* eval.c (rb_ensure): veil internal exception objects not to leak
  in ensure functions.  [ruby-core:79371] [Bug #13176]
------------------------------------------------------------------------
r57509 | nobu | 2017-02-03 15:11:32 +0900 (Fri, 03 Feb 2017) | 4 lines

internal.h: fix r57507

* internal.h (rb_overflowed_fix_to_int): invert sign bit.  should
  not set LSB of fixnum value, which is always set, to MSB.
------------------------------------------------------------------------
r57508 | normal | 2017-02-03 03:59:40 +0900 (Fri, 03 Feb 2017) | 10 lines

io.c: remove rb_ensure usage for rb_str_tmp_frozen_* calls

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

* io.c (io_fwrite): call rb_str_tmp_frozen{acquire,release} directly
  (rb_io_syswrite): ditto
  (fwrite_do, fwrite_end, swrite_do, swrite_end): remove
------------------------------------------------------------------------
r57507 | naruse | 2017-02-03 02:07:28 +0900 (Fri, 03 Feb 2017) | 1 line

fix typo and argument of r57506
------------------------------------------------------------------------
r57506 | naruse | 2017-02-03 00:54:51 +0900 (Fri, 03 Feb 2017) | 13 lines

Use carry flag to reduce instructions

NOTE:
(1) Fixnum's LSB is always 1.
    It means you can always run `x - 1` without overflow.
(2) Of course `z = x + (y-1)` may overflow.
    Now z's LSB is always 1, and the MSB of true result is also 1.
    You can get true result in long as `(1<<63)|(z>>1)`,
    and it equals to `(z<<63)|(z>>1)` == `ror(z)`.

GCC and Clang have __builtin_add_ovewflow:
* https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins.html
* https://clang.llvm.org/docs/LanguageExtensions.html#checked-arithmetic-builtins
------------------------------------------------------------------------
r57505 | svn | 2017-02-03 00:12:30 +0900 (Fri, 03 Feb 2017) | 1 line

* 2017-02-03
------------------------------------------------------------------------
r57504 | kazu | 2017-02-03 00:12:29 +0900 (Fri, 03 Feb 2017) | 1 line

ext/fcntl: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57503 | kazu | 2017-02-02 21:38:41 +0900 (Thu, 02 Feb 2017) | 1 line

Add class name to assert messages
------------------------------------------------------------------------
r57502 | hsbt | 2017-02-02 17:38:54 +0900 (Thu, 02 Feb 2017) | 3 lines

Added initial gemspec for Date module.

  [Feature #13183]
------------------------------------------------------------------------
r57501 | nobu | 2017-02-02 17:02:36 +0900 (Thu, 02 Feb 2017) | 4 lines

escape.c: check argument

* ext/cgi/escape/escape.c (optimized_unescape): check
  accept_charset encoding argument.
------------------------------------------------------------------------
r57500 | hsbt | 2017-02-02 16:49:19 +0900 (Thu, 02 Feb 2017) | 3 lines

Added initial gemspec for CMath module.

  [Feature #13182]
------------------------------------------------------------------------
r57499 | nobu | 2017-02-02 16:03:59 +0900 (Thu, 02 Feb 2017) | 6 lines

test_cgi_util.rb: encoding tests

* test/cgi/test_cgi_util.rb (test_cgi_unescape): \u is useless on
  old versions.

* test/cgi/test_cgi_util.rb (test_cgi_include_unescape): ditto.
------------------------------------------------------------------------
r57498 | nobu | 2017-02-02 14:56:06 +0900 (Thu, 02 Feb 2017) | 5 lines

compile.c: restore catch entry sp

* compile.c (iseq_build_from_ary_exception): restore stack depth
  of catch entries.  accurate stack depths cannot be calculated
  from dumped array.
------------------------------------------------------------------------
r57497 | nobu | 2017-02-02 14:45:22 +0900 (Thu, 02 Feb 2017) | 4 lines

compile.c: restore misc params

* compile.c (rb_iseq_build_from_ary): restore misc params.
  accurate stack depths cannot be calculated from dumped array.
------------------------------------------------------------------------
r57496 | nobu | 2017-02-02 14:45:21 +0900 (Thu, 02 Feb 2017) | 4 lines

compile.c: keyword table for required kwarg

* compile.c (iseq_build_kw): keyword table is necessary also when
  required keyword argumetns only.
------------------------------------------------------------------------
r57495 | nobu | 2017-02-02 14:43:58 +0900 (Thu, 02 Feb 2017) | 6 lines

test_iseq_load.rb: refine test_require_integration

* test/-ext-/iseq_load/test_iseq_load.rb (test_require_integration):
  assert with diff.

[ci skip]
------------------------------------------------------------------------
r57494 | nobu | 2017-02-02 07:18:28 +0900 (Thu, 02 Feb 2017) | 4 lines

test_time.rb: use UTC

* test/ruby/test_time.rb (test_strftime_no_hidden_garbage): fix
  failure due to timezone offset.
------------------------------------------------------------------------
r57493 | svn | 2017-02-02 07:14:23 +0900 (Thu, 02 Feb 2017) | 1 line

* 2017-02-02
------------------------------------------------------------------------
r57492 | nobu | 2017-02-02 07:14:22 +0900 (Thu, 02 Feb 2017) | 5 lines

test_queue.rb: fix portability

* test/thread/test_queue.rb (test_queue_with_trap): fix
  portability.  use SIGINT instead of SIGUSR2 which is supported
  on not all platforms.
------------------------------------------------------------------------
r57491 | hsbt | 2017-02-01 18:12:53 +0900 (Wed, 01 Feb 2017) | 6 lines

Prepare to make CSV module to default gem.

  * lib/csv.gemspec: initial gemspec for csv gem.
  * tool/rbinstall.rb: support gemspec located under lib direcotry like `lib/foo.gemspec`

  [Feature #13177]
------------------------------------------------------------------------
r57490 | nobu | 2017-02-01 16:40:58 +0900 (Wed, 01 Feb 2017) | 5 lines

configure.in: use AC_SEARCH_LIBS

* configure.in (--with-gmp, --with-jemalloc): use AC_SEARCH_LIBS
  to check if no library is required, instead of AC_CHECK_LIB.
  [ruby-core:79368] [Bug #13175]
------------------------------------------------------------------------
r57489 | nobu | 2017-02-01 13:54:04 +0900 (Wed, 01 Feb 2017) | 7 lines

common.mk: remove explicit MFLAGS

It is unnecessary to pass MFLAGS to sub-makes, because it is
evaluated implicitly if set by make.  GNU make 4.2 sets both of
-jN and --jobserver-auth (or --jobserver-fds in older versions)
options which conflict.  And it is useless for command line macros
since Microsoft NMAKE does not set them.
------------------------------------------------------------------------
r57488 | nobu | 2017-02-01 13:54:03 +0900 (Wed, 01 Feb 2017) | 1 line

win32/setup.mak: reorder
------------------------------------------------------------------------
r57487 | svn | 2017-02-01 02:46:52 +0900 (Wed, 01 Feb 2017) | 1 line

* 2017-02-01
------------------------------------------------------------------------
r57486 | tenderlove | 2017-02-01 02:46:51 +0900 (Wed, 01 Feb 2017) | 6 lines

Add IMEMO type to heap dump output.

IMEMO objects have many types.  Without this change, we cannot see what
types of IMEMO objects are being used when dumping the heap.  Adding the
type to the IMEMO object will allow us to gather statistics about IMEMO
objects being used.
------------------------------------------------------------------------
r57485 | nobu | 2017-01-31 21:55:00 +0900 (Tue, 31 Jan 2017) | 4 lines

ruby.c: defining DATA

* ruby.c (load_file_internal): define DATA here instead of ensure
  func.
------------------------------------------------------------------------
r57484 | nobu | 2017-01-31 21:54:59 +0900 (Tue, 31 Jan 2017) | 5 lines

ruby.c: forbid options

* ruby.c (forbid_setid): constified.

* ruby.c (process_options): forbid if setid earlier.
------------------------------------------------------------------------
r57483 | naruse | 2017-01-31 19:37:50 +0900 (Tue, 31 Jan 2017) | 4 lines

Describe about RUBY_CODESIGN

With RUBY_CODESIGN people can avoid pushing many OK button of firewall
dialogs on macOS through test-all.
------------------------------------------------------------------------
r57482 | rhe | 2017-01-31 19:08:22 +0900 (Tue, 31 Jan 2017) | 24 lines

openssl: import v2.0.3

Import Ruby/OpenSSL 2.0.3. Only bugfixes. The full commit log since
2.0.2 (imported at r57146) can be found at:

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

----------------------------------------------------------------
Corey Bonnell (1):
      Fix for ASN1::Constructive 'each' implementation

Kazuki Yamaguchi (10):
      Fix build with static OpenSSL libraries on Windows
       ([ruby-core:78878] [Bug #13080])
      Merge pull request #96 from CBonnell/master
      Merge branch 'topic/windows-static-linking-without-pkg-config' into maint
      appveyor.yml: update OpenSSL version to 1.0.2j
      buffering: fix typo in doc
      test/envutil: fix assert_raise_with_message
      x509: fix OpenSSL::X509::Name#eql?
       ([ruby-core:79310] [Bug #13170])
      ruby-openssl-docker: update versions of Ruby and OpenSSL
      .travis.yml: test with Ruby 2.4
      Ruby/OpenSSL 2.0.3
------------------------------------------------------------------------
r57481 | hsbt | 2017-01-31 17:48:14 +0900 (Tue, 31 Jan 2017) | 3 lines

Initial commit for gem release of webrick.

  [Feature #13173]
------------------------------------------------------------------------
r57480 | nobu | 2017-01-31 17:03:08 +0900 (Tue, 31 Jan 2017) | 3 lines

mkmf.rb: message format string

* lib/mkmf.rb (checking_for): message needs format string.
------------------------------------------------------------------------
r57479 | ko1 | 2017-01-31 16:00:38 +0900 (Tue, 31 Jan 2017) | 7 lines

allow Queue operation in trap.

* thread_sync.c: allow spurious wakeup to check Queue status just after trap.
  [Bug #12405]

* test/thread/test_queue.rb: add a test for it.

------------------------------------------------------------------------
r57478 | ko1 | 2017-01-31 15:39:01 +0900 (Tue, 31 Jan 2017) | 6 lines

define rb_thread_sleep_deadly_allow_spurious_wakeup().

* thread.c, thread_sync.c: define new function
  rb_thread_sleep_deadly_allow_spurious_wakeup() and use it instead of
  using sleep_forever() directly.

------------------------------------------------------------------------
r57477 | ko1 | 2017-01-31 15:31:06 +0900 (Tue, 31 Jan 2017) | 2 lines

use TRUE/FALSE.

------------------------------------------------------------------------
r57476 | normal | 2017-01-31 11:18:58 +0900 (Tue, 31 Jan 2017) | 7 lines

time.c (time_strftime): avoid garbage in common case

strftime format strings which are dynamically-generated will benefit
from avoiding garbage, here.

* time.c (time_strftime): use rb_str_tmp_frozen_{acquire,release}
* test/ruby/test_time.rb (test_strftime_no_hidden_garbage): new test
------------------------------------------------------------------------
r57475 | nobu | 2017-01-31 11:01:31 +0900 (Tue, 31 Jan 2017) | 4 lines

limits.c.tmpl: fallback ULLONG_MAX

* template/limits.c.tmpl (ULLONG_MAX): add a fallback definition.
  On old CentOS lacks ULLONG_MAX.
------------------------------------------------------------------------
r57474 | nobu | 2017-01-31 10:18:10 +0900 (Tue, 31 Jan 2017) | 4 lines

test_io.rb: separate a test

* test/ruby/test_io.rb (test_closed_stream_in_rescue): run in a
  separated process.
------------------------------------------------------------------------
r57473 | normal | 2017-01-31 09:41:56 +0900 (Tue, 31 Jan 2017) | 8 lines

sprintf.c: avoid garbage in common (no exception) case

Format strings which are dynamically-generated will benefit
from this.  This won't cover exceptions, but exceptions for
sprintf should be too uncommon to care about (unlike IO)

* sprintf.c (rb_str_format): use rb_str_tmp_frozen_{acquire,release}
* test/ruby/test_sprintf.rb (test_no_hidden_garbage): new test
------------------------------------------------------------------------
r57472 | normal | 2017-01-31 07:03:57 +0900 (Tue, 31 Jan 2017) | 8 lines

io.c (rb_io_syswrite): avoid leaving garbage after write

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

* io.c (swrite_arg, swrite_do, swrite_end): new
  (rb_io_syswrite): use new functions to cleanup garbage
  [ruby-core:78898] [Bug #13085]
------------------------------------------------------------------------
r57471 | normal | 2017-01-31 06:54:32 +0900 (Tue, 31 Jan 2017) | 8 lines

string.c (rb_str_tmp_frozen_release): release embedded strings

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

* string.c (rb_str_tmp_frozen_release): handled embedded strings
* test/ruby/test_io.rb (test_write_no_garbage): new test
  [ruby-core:78898] [Bug #13085]
------------------------------------------------------------------------
r57470 | svn | 2017-01-31 05:40:19 +0900 (Tue, 31 Jan 2017) | 1 line

* 2017-01-31
------------------------------------------------------------------------
r57469 | normal | 2017-01-31 05:40:18 +0900 (Tue, 31 Jan 2017) | 37 lines

io.c: recycle garbage on write

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

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

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

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

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

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

Memory consuming ratio (size) with the result of `trunk' (greater is better)
name    built
io_copy_stream_write            14.654
io_copy_stream_write_socket     16.505
------------------------------------------------------------------------
r57468 | nobu | 2017-01-30 21:00:34 +0900 (Mon, 30 Jan 2017) | 6 lines

common.mk: limits.c

* common.mk (ext/rbconfig/sizeof/sizes.c): specify the target
  explicitly.

* common.mk (ext/rbconfig/sizeof/limits.c): add the recipe.
------------------------------------------------------------------------
r57467 | nobu | 2017-01-30 20:45:00 +0900 (Mon, 30 Jan 2017) | 1 line

VC18 or later support stdbool.h
------------------------------------------------------------------------
r57466 | svn | 2017-01-30 19:12:19 +0900 (Mon, 30 Jan 2017) | 1 line

* properties.
------------------------------------------------------------------------
r57465 | shyouhei | 2017-01-30 19:12:18 +0900 (Mon, 30 Jan 2017) | 15 lines

make FIXNUM_MAX visible from Ruby

Because our tests now have several places where FIXNUM_MAX is needed,
we decided to provide it along with several other constants.

	* template/limits.c.tmpl: new file, defining RbConfig::Limits

	* ext/rbconfig/sizeof/depend (limits.c): rule to generate limits.c

	* test/-ext-/num2int/test_num2int.rb: use RbConfig::Limits

	* bootstraptest/test_insns.rb: ditto.

	* .gitignore: ignore new generated file.

------------------------------------------------------------------------
r57464 | ko1 | 2017-01-30 16:39:27 +0900 (Mon, 30 Jan 2017) | 2 lines

add a ticket number.

------------------------------------------------------------------------
r57463 | nobu | 2017-01-30 14:09:13 +0900 (Mon, 30 Jan 2017) | 1 line

reduce iterations for slower machines
------------------------------------------------------------------------
r57462 | nobu | 2017-01-30 13:54:52 +0900 (Mon, 30 Jan 2017) | 4 lines

fix up r57461

* internal.h: Microsoft Visual C++ has never supported C99 yet,
  even in 2017.
------------------------------------------------------------------------
r57461 | nobu | 2017-01-30 13:47:44 +0900 (Mon, 30 Jan 2017) | 4 lines

refine assertions

* test/irb/test_ruby-lex.rb (test_prompt): invert confinue flag by
  FIXME comments.  adjust line numbers.
------------------------------------------------------------------------
r57460 | shyouhei | 2017-01-30 13:42:04 +0900 (Mon, 30 Jan 2017) | 30 lines

#include <stdbool.h>

17+ years passed since standardized in ISO, 8 years since we added
AC_HEADER_STDBOOL to configure.in.  I'm quite confident that it's
already safe to use <stdbool.h>.

I understand that when we introduced AC_HEADER_STDBOOL, <stdbool.h>
was remain not included because C standard and SVR4 curses conflicted
miserably back then (#1).  Though I believe such situation has been
fixed already(#2), I'm afraid of your operating system might ship a
proprietary curses that still conflicts with the standard. So to avoid
potential problem, we limit the inclusion to our internal use only.

#1 : 1997 version of SUSv2 said bool is "defined though typedef" in
     <curses.h>, while C99 said bool is a macro, plus in C++ bool is a
     keyword.  AFASIK the curses library has never been a part of
     POSIX.

#2 : In reality ncurses and NetBSD curses both just follow C99 to
     include <stdbool.h> from <curses.h>.  I think C99 is now widely
     adopted.

----

	* internal.h: #include <stdbool.h> if present.  That is
	  believed to be the case for 99.9% systems that lives today.
	  Non-C99, non-C++ situations are intentionally left
	  undefined, advised by Motohiro Kosaki.  If you have such
	  compiler, please fill the definition appropriately.

------------------------------------------------------------------------
r57459 | nobu | 2017-01-30 12:57:46 +0900 (Mon, 30 Jan 2017) | 1 line

more checks for prompt
------------------------------------------------------------------------
r57458 | svn | 2017-01-30 12:21:16 +0900 (Mon, 30 Jan 2017) | 1 line

* 2017-01-30
------------------------------------------------------------------------
r57457 | nobu | 2017-01-30 12:21:15 +0900 (Mon, 30 Jan 2017) | 1 line

test for prompt
------------------------------------------------------------------------
r57456 | nobu | 2017-01-29 21:53:24 +0900 (Sun, 29 Jan 2017) | 1 line

test for immature statement
------------------------------------------------------------------------
r57455 | nobu | 2017-01-29 21:53:23 +0900 (Sun, 29 Jan 2017) | 1 line

test for top level statement
------------------------------------------------------------------------
r57454 | nobu | 2017-01-29 21:20:26 +0900 (Sun, 29 Jan 2017) | 1 line

test for comment
------------------------------------------------------------------------
r57453 | nobu | 2017-01-29 18:51:55 +0900 (Sun, 29 Jan 2017) | 1 line

tests for irb lexer
------------------------------------------------------------------------
r57452 | svn | 2017-01-29 10:35:24 +0900 (Sun, 29 Jan 2017) | 1 line

* 2017-01-29
------------------------------------------------------------------------
r57451 | kazu | 2017-01-29 10:35:23 +0900 (Sun, 29 Jan 2017) | 1 line

{ext,test}/etc: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57450 | nobu | 2017-01-28 20:27:32 +0900 (Sat, 28 Jan 2017) | 4 lines

test/unit.rb: minimum workers

* test/lib/test/unit.rb (_run_parallel): launch only necessary
  workers.
------------------------------------------------------------------------
r57449 | nobu | 2017-01-28 14:31:25 +0900 (Sat, 28 Jan 2017) | 4 lines

extmk.rb: remove clean and install mode

* ext/extmk.rb (parse_args): remove clean and install mode, now
  configure mode only.
------------------------------------------------------------------------
r57448 | nobu | 2017-01-28 14:23:39 +0900 (Sat, 28 Jan 2017) | 4 lines

extmk.rb: remove direct build mode

* ext/extmk.rb (parse_args): --command-output is now mandatory.
  remove direct build mode.
------------------------------------------------------------------------
r57447 | nobu | 2017-01-28 14:02:41 +0900 (Sat, 28 Jan 2017) | 5 lines

extension gems in static-linked-exts

* template/configure-ext.mk.tmpl: --no-extstatic option to gems.

* template/exts.mk.tmpl: include extension gems.
------------------------------------------------------------------------
r57446 | nobu | 2017-01-28 14:02:39 +0900 (Sat, 28 Jan 2017) | 4 lines

mkmf.rb: fix script installation

* lib/mkmf.rb (MakeMakefile): fix condition to install script
  files.
------------------------------------------------------------------------
r57445 | kazu | 2017-01-28 13:36:08 +0900 (Sat, 28 Jan 2017) | 1 line

{ext,test}/dbm: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57444 | nobu | 2017-01-28 10:43:29 +0900 (Sat, 28 Jan 2017) | 3 lines

exts.mk.tmpl: ruby names

* template/exts.mk.tmpl: extract configured ruby names.
------------------------------------------------------------------------
r57443 | svn | 2017-01-28 00:32:50 +0900 (Sat, 28 Jan 2017) | 1 line

* 2017-01-28
------------------------------------------------------------------------
r57442 | naruse | 2017-01-28 00:32:50 +0900 (Sat, 28 Jan 2017) | 1 line

fix typo
------------------------------------------------------------------------
r57441 | nobu | 2017-01-27 17:05:06 +0900 (Fri, 27 Jan 2017) | 5 lines

extmk.rb: fix for static-linked-ext

* ext/extmk.rb (extmake): fix up r57424 for static-linked-ext.
  separate maybestatic argument from basedir which is given always
  now.
------------------------------------------------------------------------
r57440 | nobu | 2017-01-27 16:51:58 +0900 (Fri, 27 Jan 2017) | 1 line

template/exts.mk.tmpl: fix missing dependencies
------------------------------------------------------------------------
r57439 | nobu | 2017-01-27 16:23:21 +0900 (Fri, 27 Jan 2017) | 1 line

template/exts.mk.tmpl: consider EXEEXT
------------------------------------------------------------------------
r57438 | nobu | 2017-01-27 16:16:36 +0900 (Fri, 27 Jan 2017) | 4 lines

exts.mk.tmpl: for not GNU makes

* template/exts.mk.tmpl: use `cd` then `make` instead of `make -C`
  when not GNU make.
------------------------------------------------------------------------
r57437 | nobu | 2017-01-27 14:01:18 +0900 (Fri, 27 Jan 2017) | 5 lines

leakchecker.rb: get rid of uninitialized Tempfile

* test/lib/leakchecker.rb (LeakChecker#find_tempfiles): get rid of
  errors on uninitialized Tempfile, which can be left when
  Dir.tmpdir failed or by Tempfile.allocate.
------------------------------------------------------------------------
r57436 | nobu | 2017-01-27 12:24:45 +0900 (Fri, 27 Jan 2017) | 3 lines

enum.c: write barrier

* enum.c (rb_nmin_run): set the class with write barrier.
------------------------------------------------------------------------
r57435 | nobu | 2017-01-27 12:24:44 +0900 (Fri, 27 Jan 2017) | 1 line

enum.c (rb_nmin_run): adjust indent [ci skip]
------------------------------------------------------------------------
r57434 | nobu | 2017-01-27 12:24:43 +0900 (Fri, 27 Jan 2017) | 9 lines

Enumerable#{min,min_by,max,max_by} [ci skip]

* enum.c: [DOC] Enumerable#{min,min_by,max,max_by} return a sorted
  array when +n+ argument is used.

* enum.c: Small typo : minimum -> maximum

[Bug #13161]
Author:    Eric Duminil <eric.duminil@gmail.com>
------------------------------------------------------------------------
r57433 | nobu | 2017-01-27 11:55:02 +0900 (Fri, 27 Jan 2017) | 4 lines

configure-ext.mk.tmpl: fix ext build

* template/configure-ext.mk.tmpl: fixed inverted names of target
  and directory, and chomp the last slash.
------------------------------------------------------------------------
r57432 | kazu | 2017-01-27 09:29:21 +0900 (Fri, 27 Jan 2017) | 1 line

{ext,test}/date: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57431 | kazu | 2017-01-27 00:14:02 +0900 (Fri, 27 Jan 2017) | 1 line

[DOC] Use Integer instead of Fixnum [ci skip]
------------------------------------------------------------------------
r57430 | svn | 2017-01-27 00:14:01 +0900 (Fri, 27 Jan 2017) | 1 line

* 2017-01-27
------------------------------------------------------------------------
r57429 | kazu | 2017-01-27 00:14:00 +0900 (Fri, 27 Jan 2017) | 1 line

lib/weakref.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57428 | kou | 2017-01-26 21:47:51 +0900 (Thu, 26 Jan 2017) | 6 lines

Add document for lib/rss/atom.rb

[fix GH-1520]

Patch by Tsehau Chao. Thanks!!!

------------------------------------------------------------------------
r57427 | ko1 | 2017-01-26 18:57:41 +0900 (Thu, 26 Jan 2017) | 5 lines

skip T_IMEMO for VMDEBUG

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

------------------------------------------------------------------------
r57426 | ko1 | 2017-01-26 18:40:25 +0900 (Thu, 26 Jan 2017) | 2 lines

* vm_dump.c: enable to compile with VMDEBUG == 3.

------------------------------------------------------------------------
r57425 | svn | 2017-01-26 17:19:35 +0900 (Thu, 26 Jan 2017) | 1 line

* 2017-01-26
------------------------------------------------------------------------
r57424 | nobu | 2017-01-26 17:19:34 +0900 (Thu, 26 Jan 2017) | 1 line

Parallel gem configuration
------------------------------------------------------------------------
r57423 | hsbt | 2017-01-26 16:09:58 +0900 (Thu, 26 Jan 2017) | 4 lines

Fix function name for DBM on extension document.

  Patch by Yuji Yaginuma, @y-yagi <yuuji.yaginuma@gmail.com>
  [ci skip][fix GH-1519]
------------------------------------------------------------------------
r57422 | nobu | 2017-01-25 23:34:07 +0900 (Wed, 25 Jan 2017) | 4 lines

io.c: close before wait

* io.c (io_close_fptr): notify then close, and wait for other
  threads before free fptr.  [ruby-core:79262] [Bug #13158]
------------------------------------------------------------------------
r57421 | kazu | 2017-01-25 23:28:42 +0900 (Wed, 25 Jan 2017) | 3 lines

[DOC] Add empty example to enum.all? and any?

[ci skip]
------------------------------------------------------------------------
r57420 | nobu | 2017-01-25 15:08:16 +0900 (Wed, 25 Jan 2017) | 3 lines

regcomp.c: debug function [ci skip]

* regcomp.c (print_indent_tree): make a function for debug static.
------------------------------------------------------------------------
r57419 | nobu | 2017-01-25 15:05:51 +0900 (Wed, 25 Jan 2017) | 4 lines

.gdbinit: fix on empty strings [ci skip]

* .gdbinit (output_string): get rid of "Invalid number 0 of
  repetitions" error on empty strings.
------------------------------------------------------------------------
r57418 | nobu | 2017-01-25 15:05:50 +0900 (Wed, 25 Jan 2017) | 3 lines

.gdbinit: op symbols [ci skip]

* .gdbinit (rp_id): add unhandled operator symbols.
------------------------------------------------------------------------
r57417 | svn | 2017-01-25 12:03:53 +0900 (Wed, 25 Jan 2017) | 1 line

* 2017-01-25
------------------------------------------------------------------------
r57416 | ko1 | 2017-01-25 12:03:52 +0900 (Wed, 25 Jan 2017) | 6 lines

swithc id_table data structure.

* id_table.c: swtich to "simple open addressing with quadratic probing"
  by Yura Sokolov.  For more detail measurements, see [Feature #12180]
* id_table.c: remove other algorithms to simplify the source code.

------------------------------------------------------------------------
r57415 | nobu | 2017-01-24 23:52:07 +0900 (Tue, 24 Jan 2017) | 4 lines

eval.c: copy special exception

* eval.c (setup_exception): make unfrozen copy of special
  exception before setting up a cause.
------------------------------------------------------------------------
r57414 | nobu | 2017-01-24 16:52:41 +0900 (Tue, 24 Jan 2017) | 1 line

parse.y (parser_yylex): remove wrong warning
------------------------------------------------------------------------
r57413 | svn | 2017-01-24 11:38:58 +0900 (Tue, 24 Jan 2017) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r57412 | hsbt | 2017-01-24 11:38:57 +0900 (Tue, 24 Jan 2017) | 4 lines

Update Rubygems 2.6.10

 * https://github.com/rubygems/rubygems/commit/2ee5bf9fd3bd7649d3e244bc40107ff32070ef47
 * https://github.com/rubygems/rubygems/commit/be510dd4097e65c6a256a6e173d6b724a3a96472
------------------------------------------------------------------------
r57411 | naruse | 2017-01-24 02:02:08 +0900 (Tue, 24 Jan 2017) | 3 lines

Fix typo of URI#escape [Bug #13147]

patched by Steve Hill <sghill.dev@gmail.com>
------------------------------------------------------------------------
r57410 | naruse | 2017-01-24 01:58:27 +0900 (Tue, 24 Jan 2017) | 5 lines

Prevent GC by volatile [Bug #13150]

test/ruby/test_marshal.rb test_context_switch (load) and test_gc (dump)
are failed on FreeBSD 10.3 and gcc7 (FreeBSD Ports Collection) 7.0.0
20170115 (experimental); RB_GC_GUARD looks not worked well.
------------------------------------------------------------------------
r57409 | svn | 2017-01-24 00:47:33 +0900 (Tue, 24 Jan 2017) | 1 line

* 2017-01-24
------------------------------------------------------------------------
r57408 | kazu | 2017-01-24 00:47:32 +0900 (Tue, 24 Jan 2017) | 1 line

test/test_tmpdir.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57407 | nobu | 2017-01-23 15:16:04 +0900 (Mon, 23 Jan 2017) | 5 lines

object.c: no TypeError at Symbol

* object.c (special_object_p): uninterned Symbol also should not
  raise a TypeError but return itself instead, as well as interned
  Symbols.  [ruby-core:79216] [Bug #13145]
------------------------------------------------------------------------
r57406 | nobu | 2017-01-23 14:59:28 +0900 (Mon, 23 Jan 2017) | 4 lines

csv.rb: fix field_size_limit check

* lib/csv.rb (CSV#shift): the last column is an Array in extended
  column since r55985.  [ruby-dev:49964] [Bug #13149]
------------------------------------------------------------------------
r57405 | nobu | 2017-01-23 13:49:19 +0900 (Mon, 23 Jan 2017) | 6 lines

error.c: fixed doc [ci skip]

* error.c (exc_message): fixed doc regarding the presence of
  to_str.  [Fix GH-1517]

Author:    Marc Gauthier <marcg.gauthier@gmail.com>
------------------------------------------------------------------------
r57404 | nobu | 2017-01-23 13:22:23 +0900 (Mon, 23 Jan 2017) | 4 lines

configure-ext.mk.tmpl: embed macros

* template/configure-ext.mk.tmpl: embed MINIRUBY and SCRIPT_ARGS
  to get rid of quoting problems of nmake.
------------------------------------------------------------------------
r57403 | nobu | 2017-01-23 12:51:25 +0900 (Mon, 23 Jan 2017) | 11 lines

Fix for nmake

* common.mk (EXT_MK): use double-quotes and remove SCRIPT_ARGS
  which contains both types of quotes.

* template/configure-ext.mk.tmpl (all): use single-quotes for MAKE
  which is set by nmake and contains spaces in the path. do not
  use SCRIPT_ARGS.

* template/exts.mk.tmpl (all, static): separate dependency lines,
  not to become a default target unintentionally.
------------------------------------------------------------------------
r57402 | nobu | 2017-01-23 12:43:43 +0900 (Mon, 23 Jan 2017) | 4 lines

configure-ext.mk.tmpl: FORCE

* template/configure-ext.mk.tmpl (FORCE): add missing target for
  BSD make.
------------------------------------------------------------------------
r57401 | nobu | 2017-01-23 11:50:23 +0900 (Mon, 23 Jan 2017) | 7 lines

Parallel ext configuration

* ext/configure-ext.mk: configure each directories underneath ext
  in parallel.

* template/exts.mk.tmpl: then collect the results.

------------------------------------------------------------------------
r57400 | svn | 2017-01-23 11:47:17 +0900 (Mon, 23 Jan 2017) | 1 line

* properties.
------------------------------------------------------------------------
r57399 | shyouhei | 2017-01-23 11:47:16 +0900 (Mon, 23 Jan 2017) | 14 lines

improve C0 coverage of insns.def from 65.9% to 96.1%

While I was developing my private topic branch I found that the VM
itself is not tested very much in `make test` tests.  Of course
`make test-all` covers vast majority of the VM but running that task
is not an immediately possible thing when we are touching the VM.  In
order to boost development in a rapid cycle I decided to add some
tests to the bootstraptest.  Here it is.

	* test_insns.rb: new test that covers insns.def.

	* runner.rb (#assert_equal): pass extra options to the target
	  so that we can test frozen_string_literal: true situation.

------------------------------------------------------------------------
r57398 | nobu | 2017-01-23 11:19:00 +0900 (Mon, 23 Jan 2017) | 4 lines

extinit.c.tmpl: drop after dot

* template/extinit.c.tmpl: drop rest from the first dot in the
  base name of a feature is ignored since r30464.
------------------------------------------------------------------------
r57397 | svn | 2017-01-23 11:18:59 +0900 (Mon, 23 Jan 2017) | 1 line

* 2017-01-23
------------------------------------------------------------------------
r57396 | nobu | 2017-01-23 11:18:59 +0900 (Mon, 23 Jan 2017) | 5 lines

extmk.rb: EXTINITS to sub make

* ext/extmk.rb: pass EXTINITS to sub make.  if the template for
  extinit.c is modified after extinit.c got compiled, extinit.c
  will be re-generated together with ruby.
------------------------------------------------------------------------
r57395 | nobu | 2017-01-22 21:50:36 +0900 (Sun, 22 Jan 2017) | 3 lines

template/extinit.c.tmpl

* template/extinit.c.tmpl: separate from ext/extmk.rb.
------------------------------------------------------------------------
r57394 | nobu | 2017-01-22 17:04:37 +0900 (Sun, 22 Jan 2017) | 5 lines

Makefile.sub: refine distclean-ext

* win32/Makefile.sub (distclean-ext, realclean-ext): remove
  extinit.c and suppress error message when failed to remove ext
  directory.
------------------------------------------------------------------------
r57393 | shyouhei | 2017-01-22 13:14:21 +0900 (Sun, 22 Jan 2017) | 2 lines

NEWS for SecureRandom's random source [ci skip]

------------------------------------------------------------------------
r57392 | shyouhei | 2017-01-22 13:02:42 +0900 (Sun, 22 Jan 2017) | 2 lines

NEWS for SipHash13 [ci skip]

------------------------------------------------------------------------
r57391 | svn | 2017-01-22 12:06:18 +0900 (Sun, 22 Jan 2017) | 1 line

* 2017-01-22
------------------------------------------------------------------------
r57390 | kazu | 2017-01-22 12:06:17 +0900 (Sun, 22 Jan 2017) | 4 lines

Hash#fetch: fix grammar in documentation.

[Fix GH-1515][ci skip]
Author:    Alyssa Ross <hi+services.github@alyssa.is>
------------------------------------------------------------------------
r57389 | kazu | 2017-01-21 21:21:05 +0900 (Sat, 21 Jan 2017) | 1 line

lib/tempfile.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57388 | svn | 2017-01-21 15:17:08 +0900 (Sat, 21 Jan 2017) | 1 line

* 2017-01-21
------------------------------------------------------------------------
r57387 | nobu | 2017-01-21 15:17:07 +0900 (Sat, 21 Jan 2017) | 1 line

Makefile.in: clean ruby-runner [ci skip]
------------------------------------------------------------------------
r57386 | kazu | 2017-01-20 22:33:06 +0900 (Fri, 20 Jan 2017) | 5 lines

Remove deprecated rbconfig/datadir

This is deleted at
https://github.com/rubygems/rubygems/commit/0e3c2c1f04182990c4c7a0aa53435ad8427342fd
in upstream.
------------------------------------------------------------------------
r57385 | nobu | 2017-01-20 19:59:47 +0900 (Fri, 20 Jan 2017) | 4 lines

extmk.rb: ignore generated sources

* ext/extmk.rb (extract_makefile): ignore generated source files
  not to reconfigure when in-place build.
------------------------------------------------------------------------
r57384 | shyouhei | 2017-01-20 17:00:00 +0900 (Fri, 20 Jan 2017) | 24 lines

SecureRandom should try /dev/urandom first [Bug #9569]

	* random.c (InitVM_Random): rename Random.raw_seed to
	  Random.urandom.  A quick search seems there are no practical use
	  of this method than securerandom.rb so I think it's OK to rename
	  but if there are users of it, this hunk is subject to revert.

	* test/ruby/test_rand.rb (TestRand#test_urandom): test for it.

	* lib/securerandom.rb (SecureRandom.gen_random): Prefer OS-
	  provided CSPRNG if available. Otherwise falls back to OpenSSL.
	  Current preference is:

	  1. CSPRNG routine that the OS has; one of
	     - getrandom(2),
	     - arc4random(3), or
	     - CryptGenRandom()
	  2. /dev/urandom device
	  3. OpenSSL's RAND_bytes(3)

	  If none of above random number generators are available, you
	  cannot use this module.  An exception is raised that case.


------------------------------------------------------------------------
r57383 | nobu | 2017-01-20 16:45:10 +0900 (Fri, 20 Jan 2017) | 4 lines

Keep -jN option

* {cygwin,template}/GNUmakefile.in (MFLAGS, MAKEFLAGS): keep -jN
  option.
------------------------------------------------------------------------
r57382 | shyouhei | 2017-01-20 15:01:23 +0900 (Fri, 20 Jan 2017) | 16 lines

switch SipHash from SipHash24 to SipHash13 variant

SipHash13 is secure enough to be used in hash-tables,
and SipHash's author confirms that.
Rust already considered switch to SipHash13:
  https://github.com/rust-lang/rust/issues/29754#issue-116174313
Jean-Philippe Aumasson confirmation:
  https://github.com/rust-lang/rust/issues/29754#issuecomment-156073946
Merged pull request:
  https://github.com/rust-lang/rust/pull/33940

From: Sokolov Yura aka funny_falcon <funny.falcon@gmail.com>
Date: Thu, 8 Dec 2016 20:31:29 +0300
Signed-off-by: Urabe, Shyouhei <shyouhei@ruby-lang.org>
Fixes: [Feature #13017]

------------------------------------------------------------------------
r57381 | nobu | 2017-01-20 13:27:55 +0900 (Fri, 20 Jan 2017) | 5 lines

compile.c: optimization of defined? in condition

* compile.c (compile_branch_condition): trivial optimization of
  defined? expression in a branch condition, where a string is not
  needed, but just a boolean.
------------------------------------------------------------------------
r57380 | nobu | 2017-01-20 11:39:27 +0900 (Fri, 20 Jan 2017) | 5 lines

array.c: improve Array#sample

* array.c (rb_ary_sample): improve performance when many samples
  from a large array.  based on the patch by tomoya ishida
  <tomoyapenguin AT gmail.com> in [ruby-dev:49956].  [Bug #13136]
------------------------------------------------------------------------
r57379 | nobu | 2017-01-20 11:27:28 +0900 (Fri, 20 Jan 2017) | 1 line

benchmarks for Bug#13136
------------------------------------------------------------------------
r57378 | svn | 2017-01-20 10:02:38 +0900 (Fri, 20 Jan 2017) | 1 line

* 2017-01-20
------------------------------------------------------------------------
r57377 | nobu | 2017-01-20 10:02:37 +0900 (Fri, 20 Jan 2017) | 4 lines

error.c: print default RS

* error.c (rb_warn_m): print the default RS instead of an empty
  string with a newline.  [Feature #12944]
------------------------------------------------------------------------
r57376 | nobu | 2017-01-19 18:54:58 +0900 (Thu, 19 Jan 2017) | 4 lines

parse.y: rescue/else/ensure in do-end

* parse.y (do_body): allow rescue/else/ensure inside do/end
  blocks.  [Feature #12906]
------------------------------------------------------------------------
r57375 | naruse | 2017-01-19 18:34:30 +0900 (Thu, 19 Jan 2017) | 1 line

More description about the protected attribute of a method
------------------------------------------------------------------------
r57374 | shugo | 2017-01-19 17:13:03 +0900 (Thu, 19 Jan 2017) | 3 lines

string.c: rindex(//) should set $~.

This seems a bug introduced by r520 (1.4.0).  [ruby-core:79110] [Bug #13135]
------------------------------------------------------------------------
r57373 | nobu | 2017-01-19 16:18:23 +0900 (Thu, 19 Jan 2017) | 4 lines

parse.y: chomp by -l

* parse.y (rb_parser_while_loop): should chomp but not chop by -l
  option.  [ruby-core:78099] [Bug #12926]
------------------------------------------------------------------------
r57372 | hsbt | 2017-01-19 16:07:17 +0900 (Thu, 19 Jan 2017) | 3 lines

Fix documentation of options for all of methods in FileUtils.

Patch by galia traub( @galiat ). [Fix GH-1510][ci skip]
------------------------------------------------------------------------
r57371 | nobu | 2017-01-19 15:39:44 +0900 (Thu, 19 Jan 2017) | 4 lines

ENV#fetch: fix documentation of raised exception

[Fix GH-1514]
Author:    Misty De Meo <mistydemeo@github.com>
------------------------------------------------------------------------
r57370 | nobu | 2017-01-19 15:25:06 +0900 (Thu, 19 Jan 2017) | 15 lines

Change Kernel#warn to call Warning.warn

This allows Warning.warn to filter/process warning messages
generated by Kernel#warn.  Currently, Warning.warn can only handle
messages generated by the rb_warn/rb_warning C functions.

The Kernel#warn API is different than the Warning.warn API, this
tries to get similar behavior, but there are probably corner cases
where the behavior is different.

This makes str_end_with_asciichar in io.c no longer static so it
can be called from error.c.

[Feature #12944]
Author:    Jeremy Evans <code@jeremyevans.net>
------------------------------------------------------------------------
r57369 | nobu | 2017-01-19 14:24:34 +0900 (Thu, 19 Jan 2017) | 1 line

id_table.c: fix typo
------------------------------------------------------------------------
r57368 | nobu | 2017-01-19 12:42:07 +0900 (Thu, 19 Jan 2017) | 4 lines

compile.c: check err_info

* compile.c (iseq_setup): bail out if any errors found.
  [ruby-core:76531] [Bug #12613]
------------------------------------------------------------------------
r57367 | nobu | 2017-01-19 10:38:59 +0900 (Thu, 19 Jan 2017) | 3 lines

parse.y: warn space

* parse.y (parser_yylex): warn parentheses after space.
------------------------------------------------------------------------
r57366 | svn | 2017-01-19 03:23:49 +0900 (Thu, 19 Jan 2017) | 1 line

* 2017-01-19
------------------------------------------------------------------------
r57365 | svn | 2017-01-19 03:23:49 +0900 (Thu, 19 Jan 2017) | 1 line

* properties.
------------------------------------------------------------------------
r57364 | normal | 2017-01-19 03:23:49 +0900 (Thu, 19 Jan 2017) | 4 lines

another benchmark for IO.copy_stream socket writing

For testing Linux socket-only workaround for
https://bugs.ruby-lang.org/issues/13085
------------------------------------------------------------------------
r57363 | kazu | 2017-01-18 21:35:10 +0900 (Wed, 18 Jan 2017) | 1 line

lib/profiler.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57362 | nobu | 2017-01-18 14:23:53 +0900 (Wed, 18 Jan 2017) | 4 lines

vm_method.c: resolve refined method to undef

* vm_method.c (rb_undef): resolve the method entry which refines a
  prepended method entry.  [ruby-core:78944] [Bug #13096]
------------------------------------------------------------------------
r57361 | svn | 2017-01-18 12:38:53 +0900 (Wed, 18 Jan 2017) | 1 line

* 2017-01-18
------------------------------------------------------------------------
r57360 | nobu | 2017-01-18 12:38:52 +0900 (Wed, 18 Jan 2017) | 4 lines

class.c: non-keyword hash class

* class.c (rb_extract_keywords): keep the class of non-keyword
  elements hash as the original.  [ruby-core:77813] [Bug #12884]
------------------------------------------------------------------------
r57359 | nobu | 2017-01-17 21:54:35 +0900 (Tue, 17 Jan 2017) | 4 lines

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

* lib/uri/generic.rb (URI::Generic#find_proxy): match IP address
  no_proxy against resolved self IP address.  [Fix GH-1513]
------------------------------------------------------------------------
r57358 | kazu | 2017-01-17 21:47:38 +0900 (Tue, 17 Jan 2017) | 1 line

lib/pstore.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57355 | normal | 2017-01-17 12:31:57 +0900 (Tue, 17 Jan 2017) | 4 lines

rinda/ring.rb (make_socket): do not keep socket on failures

This prevents leaked FD warnings on test/rinda/test_rinda.rb
when testing on a machine without multicast support.
------------------------------------------------------------------------
r57354 | normal | 2017-01-17 06:42:05 +0900 (Tue, 17 Jan 2017) | 4 lines

basicsocket (rsock_bsock_send): do not truncate return value

send(2) and sendto(2) syscalls return `ssize_t', use the
proper type and macro for converting to a Numeric VALUE.
------------------------------------------------------------------------
r57353 | svn | 2017-01-17 06:08:13 +0900 (Tue, 17 Jan 2017) | 1 line

* 2017-01-17
------------------------------------------------------------------------
r57352 | normal | 2017-01-17 06:08:12 +0900 (Tue, 17 Jan 2017) | 9 lines

doc: improve documentation for Binding [ci skip]

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

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

[ruby-core:79082] [Bug #13132]
------------------------------------------------------------------------
r57339 | kazu | 2017-01-16 21:37:42 +0900 (Mon, 16 Jan 2017) | 1 line

Fix a typo [ci skip]
------------------------------------------------------------------------
r57338 | nobu | 2017-01-16 11:56:28 +0900 (Mon, 16 Jan 2017) | 4 lines

test_rational.rb: messages

* test/ruby/test_rational.rb (test_parse): add messages to
  assertions.
------------------------------------------------------------------------
r57337 | svn | 2017-01-16 11:43:56 +0900 (Mon, 16 Jan 2017) | 1 line

* 2017-01-16
------------------------------------------------------------------------
r57336 | nobu | 2017-01-16 11:43:55 +0900 (Mon, 16 Jan 2017) | 4 lines

file.c: refine message

* file.c (rb_get_path_check_convert): refine the error message
  when the path name contains null byte.
------------------------------------------------------------------------
r57335 | a_matsuda | 2017-01-15 22:45:12 +0900 (Sun, 15 Jan 2017) | 7 lines

s/SaveStringValue/SafeStringValue/

Fix a typo in extension.rdoc.

Signed-off-by: Akira Matsuda <ronnie@dio.jp>

closes #1512
------------------------------------------------------------------------
r57334 | nobu | 2017-01-15 15:08:09 +0900 (Sun, 15 Jan 2017) | 4 lines

.gdbinit: refine rp [ci skip]

* .gdbinit (rp, output_string, rp): show the contents after NUL
  char.
------------------------------------------------------------------------
r57333 | nobu | 2017-01-15 14:50:41 +0900 (Sun, 15 Jan 2017) | 5 lines

rbinstall.rb: mimic rubygems wrapper script

* tool/rbinstall.rb (app_script_text): move shell script part
  after comments generated by RubyGems. '#'-lines are comments in
  both of ruby and shell script.
------------------------------------------------------------------------
r57332 | kazu | 2017-01-15 11:56:04 +0900 (Sun, 15 Jan 2017) | 1 line

lib/profile.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57331 | nobu | 2017-01-15 09:45:10 +0900 (Sun, 15 Jan 2017) | 6 lines

rbinstall.rb: do nothing if bin script is same

* tool/rbinstall.rb (check_executable_overwrite): do nothing if
  the existing file equals to the wrapper script to be generated.

* tool/rbinstall.rb (generate_bin_script): ditto.
------------------------------------------------------------------------
r57330 | svn | 2017-01-15 08:09:56 +0900 (Sun, 15 Jan 2017) | 1 line

* 2017-01-15
------------------------------------------------------------------------
r57329 | normal | 2017-01-15 08:09:55 +0900 (Sun, 15 Jan 2017) | 28 lines

mention behavior of Array#join for nested arrays [ci skip]

The current documentation for Array#join does not mention the
special treatment of nested arrays.

It says:
> Returns a string created by converting each element of the
> array to a string, separated by the given separator.

Expected behavior according to the docs would be:

    [ "a", [1, 2, [:x, :y]], "b" ].join("-")  #=> "a-[1, 2, [:x, :y]]-b"
    # because of:
    [1, 2, [:x, :y]].to_s  #=> "[1, 2, [:x, :y]]"

Actual behavior:

    [ "a", [1, 2, [:x, :y]], "b" ].join("-")  #=> "a-1-2-x-y-b"

because join is applied recursively for nested arrays.

The patch clarifies this behavior.

(Also: small markup and grammar fix.)

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

[ruby-talk:437238] [ruby-core:79079] [Bug #13130]
------------------------------------------------------------------------
r57328 | nobu | 2017-01-14 18:38:56 +0900 (Sat, 14 Jan 2017) | 5 lines

revert r57323

StringIO.new makes the buffer IO.default_external, while
StringIO.new("".dup) makes source encoding which is defaulted to
UTF-8.
------------------------------------------------------------------------
r57327 | nobu | 2017-01-14 15:13:23 +0900 (Sat, 14 Jan 2017) | 3 lines

fix up r57322

* tool/rbinstall.rb: ruby_install_name is used too.
------------------------------------------------------------------------
r57326 | nobu | 2017-01-14 11:26:49 +0900 (Sat, 14 Jan 2017) | 4 lines

resolv.rb: byte buffer

* lib/resolv.rb (Resolv::DNS::Message::MessageDecoder): treat the
  data as a byte buffer.
------------------------------------------------------------------------
r57325 | nobu | 2017-01-14 11:26:48 +0900 (Sat, 14 Jan 2017) | 8 lines

Made #decode_rdata client to catch errors

* lib/resolv.rb (Resolv::DNS::Message::MessageDecoder#get_rr):
  re-raise an exception from decode_rdata as DecodeError, so it
  can report them to the top in more informative way.  It was not
  reflecting on errors of data and thus breaking.  Client code
  expects `DecodeError` and knows how to handle broken messages.
  [Fix GH-1511]
------------------------------------------------------------------------
r57324 | svn | 2017-01-14 11:06:23 +0900 (Sat, 14 Jan 2017) | 1 line

* 2017-01-14
------------------------------------------------------------------------
r57323 | nobu | 2017-01-14 11:06:22 +0900 (Sat, 14 Jan 2017) | 1 line

StringIO.new makes a RW buffer
------------------------------------------------------------------------
r57322 | nobu | 2017-01-13 23:15:00 +0900 (Fri, 13 Jan 2017) | 1 line

fix prolog in gem wrapper scripts
------------------------------------------------------------------------
r57321 | kazu | 2017-01-13 21:08:29 +0900 (Fri, 13 Jan 2017) | 1 line

lib/observer.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57320 | nobu | 2017-01-13 14:58:44 +0900 (Fri, 13 Jan 2017) | 4 lines

rbinstall.rb: LIBRUBY_RELATIVE

* tool/rbinstall.rb: see LIBRUBY_RELATIVE in CONFIG instead of
  reading config.h.
------------------------------------------------------------------------
r57319 | nobu | 2017-01-13 14:49:43 +0900 (Fri, 13 Jan 2017) | 4 lines

insns.def: float comparison

* insns.def (opt_lt, opt_le, opt_gt, opt_ge): optimize flonum and
  on-heap float comparison.
------------------------------------------------------------------------
r57318 | nobu | 2017-01-13 12:24:22 +0900 (Fri, 13 Jan 2017) | 4 lines

error.c: moved

* error.c (preface_dump, postscript_dump): CrashReporter directory
  was used before Mac OS X 10.6.
------------------------------------------------------------------------
r57317 | nobu | 2017-01-13 11:57:45 +0900 (Fri, 13 Jan 2017) | 5 lines

error.c: moved

* error.c (preface_dump, postscript_dump): moved from
  rb_vm_bugreport to place the last important message at the very
  last after [NOTE].
------------------------------------------------------------------------
r57316 | svn | 2017-01-13 10:46:45 +0900 (Fri, 13 Jan 2017) | 1 line

* 2017-01-13
------------------------------------------------------------------------
r57315 | nobu | 2017-01-13 10:46:45 +0900 (Fri, 13 Jan 2017) | 4 lines

vm_dump.c: postscript_dump

* vm_dump.c (postscript_dump): mention crash report log twice
  because important.
------------------------------------------------------------------------
r57314 | kazu | 2017-01-12 21:17:33 +0900 (Thu, 12 Jan 2017) | 1 line

lib/net/smtp.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57313 | nobu | 2017-01-12 16:41:35 +0900 (Thu, 12 Jan 2017) | 11 lines

immediate message mode of compile error

* compile.c (append_compile_error): set Qtrue for erred state with
  showing the message immediately.

* iseq.c (prepare_iseq_build): make immediate message mode if main
  or top level context, not to show the failed path twice in the
  first line.

* iseq.c (cleanup_iseq_build): raise default message exception if
  immediate message mode.
------------------------------------------------------------------------
r57312 | nobu | 2017-01-12 14:43:00 +0900 (Thu, 12 Jan 2017) | 4 lines

compile.c: invalid yield in main

* compile.c (iseq_compile_each): yield cannot be in the main
  context as well as a top context.
------------------------------------------------------------------------
r57311 | shugo | 2017-01-12 11:19:17 +0900 (Thu, 12 Jan 2017) | 5 lines

lib/net/protocol.rb: preserve backtrace information

BufferedIO#rbuf_fill should preserve backtrace information when raising
EOFError.  Otherwise, users get confused when EOFError is leaked out from
Net::SMTP etc.  [ruby-core:78550] [Bug #13018]
------------------------------------------------------------------------
r57310 | normal | 2017-01-12 08:53:05 +0900 (Thu, 12 Jan 2017) | 5 lines

test/rinda/test_rinda: skip multicast tests for unsupported systems

This allows "test-all" to pass on systems without multicast
support.  I leave CONFIG_IP_MULTICAST unset in my Linux kernel
.config, nowadays.
------------------------------------------------------------------------
r57309 | normal | 2017-01-12 08:46:05 +0900 (Thu, 12 Jan 2017) | 10 lines

test/fiddle/helper: remove special case for x86_64-linux

RUBY_PLATFORM is "x86_64-linux" on a 32-bit (x86) Ruby built and
running on a 64-bit Linux kernel.  I also have a /lib64
directory nowadays because I just installed multi-arch support
in userspace.  So, fall back to loading based in the size of a
packed "unsigned long" type instead of special-casing.

Tested with both x86 and x86_64 userspace on 64-bit Linux kernel,
as well as x86 with a 32-bit Linux kernel.
------------------------------------------------------------------------
r57308 | svn | 2017-01-12 07:38:51 +0900 (Thu, 12 Jan 2017) | 1 line

* 2017-01-12
------------------------------------------------------------------------
r57307 | normal | 2017-01-12 07:38:50 +0900 (Thu, 12 Jan 2017) | 10 lines

random.c (fill_random_bytes_syscall): use "__NR_" prefix on Linux

glibc still does not define the SYS_getrandom alias for
__NR_getrandom in the Linux kernel.  However, installing
up-to-date Linux kernel headers (linux-libc-dev >= 3.17 package
on Debian) will get the __NR_getrandom syscall number defined
properly without relying on glibc.

This allows users with a modern kernel+headers to use the getrandom
syscall without waiting on glibc support.
------------------------------------------------------------------------
r57306 | kazu | 2017-01-11 23:48:51 +0900 (Wed, 11 Jan 2017) | 1 line

lib/net/protocol.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57305 | nobu | 2017-01-11 13:12:56 +0900 (Wed, 11 Jan 2017) | 5 lines

variable.c: fix the condition to cache

* variable.c (rb_const_set): fix the condition to cache the class
  path and cache permanent or temporary path corresponding to the
  outer klass.  [ruby-core:79039] [Bug #13120]
------------------------------------------------------------------------
r57304 | nobu | 2017-01-11 11:31:02 +0900 (Wed, 11 Jan 2017) | 4 lines

string.c: replacement and block

* string.c (rb_enc_str_scrub): only one of replacement and block
  is allowed.  [ruby-core:79038] [Bug #13119]
------------------------------------------------------------------------
r57303 | nobu | 2017-01-11 11:18:45 +0900 (Wed, 11 Jan 2017) | 4 lines

string.c: yield invalid part

* string.c (rb_enc_str_scrub): yield the invalid part only with
  ASCII-incompatible.  [ruby-core:79039] [Bug #13120]
------------------------------------------------------------------------
r57302 | nobu | 2017-01-11 10:03:37 +0900 (Wed, 11 Jan 2017) | 4 lines

string.c: block for scrub with ASCII-incompatible

* string.c (rb_enc_str_scrub): honor the given block with
  ASCII-incompatible encoding.  [ruby-core:79039] [Bug #13120]
------------------------------------------------------------------------
r57301 | svn | 2017-01-11 00:28:12 +0900 (Wed, 11 Jan 2017) | 1 line

* 2017-01-11
------------------------------------------------------------------------
r57300 | nobu | 2017-01-11 00:28:11 +0900 (Wed, 11 Jan 2017) | 4 lines

compile.c: check compile

* compile.c (iseq_compile_each): check if sub nodes succeeded.
  [ruby-core:76531] [Bug #12613]
------------------------------------------------------------------------
r57299 | nobu | 2017-01-10 22:41:18 +0900 (Tue, 10 Jan 2017) | 4 lines

rational.c: short circuit optimization

* rational.c (nurat_reduce): short circuit when arguments are ONE,
  nothing is needed.
------------------------------------------------------------------------
r57298 | nobu | 2017-01-10 22:37:34 +0900 (Tue, 10 Jan 2017) | 3 lines

rational.c: f_idiv

* rational.c (f_idiv): call rb_int_idiv directly if possible.
------------------------------------------------------------------------
r57297 | kazu | 2017-01-10 21:32:56 +0900 (Tue, 10 Jan 2017) | 1 line

lib/net/pop.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57296 | nobu | 2017-01-10 21:18:21 +0900 (Tue, 10 Jan 2017) | 4 lines

numeric.c: short circuit optimization

* numeric.c (fix_mul): short circuit when multiplication of Bignum
  and 0 or 1 not to make a Bignum unnecessarily.
------------------------------------------------------------------------
r57295 | svn | 2017-01-10 19:57:26 +0900 (Tue, 10 Jan 2017) | 1 line

* 2017-01-10
------------------------------------------------------------------------
r57294 | nobu | 2017-01-10 19:57:26 +0900 (Tue, 10 Jan 2017) | 4 lines

thread.c: fix todo

* thread.c (rb_threadptr_pending_interrupt_check_mask): traverse
  the super class chain instead of making ancestors array.
------------------------------------------------------------------------
r57293 | nobu | 2017-01-09 11:55:39 +0900 (Mon, 09 Jan 2017) | 5 lines

vm_insnhelper.c: block argument at tailcall

* vm_insnhelper.c (vm_call_iseq_setup_tailcall): check interrupts
  after set up the new frame, not the passed block to be clobbered
  by invoked finalizers and so on.  [ruby-core:78981] [Bug #13107]
------------------------------------------------------------------------
r57292 | svn | 2017-01-09 11:45:29 +0900 (Mon, 09 Jan 2017) | 1 line

* 2017-01-09
------------------------------------------------------------------------
r57291 | nobu | 2017-01-09 11:45:28 +0900 (Mon, 09 Jan 2017) | 4 lines

slex.rb: japanese comment [ci skip]

* lib/irb/slex.rb (postproc): translated a japanese comment in
  ISO-2022-JP.  [ruby-core:79017] [Misc #13117]
------------------------------------------------------------------------
r57290 | kazu | 2017-01-08 13:17:08 +0900 (Sun, 08 Jan 2017) | 1 line

lib/getoptlong.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57289 | nobu | 2017-01-08 13:04:29 +0900 (Sun, 08 Jan 2017) | 4 lines

test_io_console.rb: fix of old CentOS5

* test/io/console/test_io_console.rb (test_winsize): on old CentOS5
  window size seems unable to be set across a pty.
------------------------------------------------------------------------
r57288 | nobu | 2017-01-08 12:51:35 +0900 (Sun, 08 Jan 2017) | 4 lines

driver.rb: measure_target option [ci skip]

* benchmark/driver.rb (BenchmarkDriver.load): restore
  measure_target option from the loaded results.
------------------------------------------------------------------------
r57287 | nobu | 2017-01-08 12:50:32 +0900 (Sun, 08 Jan 2017) | 4 lines

driver.rb: out output file when loading [ci skip]

* benchmark/driver.rb: default output file is not used when
  loading rawdata.
------------------------------------------------------------------------
r57286 | nobu | 2017-01-08 12:46:17 +0900 (Sun, 08 Jan 2017) | 4 lines

driver.rb: extract loop times [ci skip]

* benchmark/driver.rb (BenchmarkDriver.load): extract loop times
  from the loaded results to adjust the results.
------------------------------------------------------------------------
r57285 | nobu | 2017-01-08 12:45:34 +0900 (Sun, 08 Jan 2017) | 4 lines

driver.rb: adjust name width [ci skip]

* benchmark/driver.rb (show_results): count adjusted result marks
  as the name width.
------------------------------------------------------------------------
r57284 | nobu | 2017-01-08 10:59:54 +0900 (Sun, 08 Jan 2017) | 5 lines

variable.c: resolve permanent name only

* variable.c (rb_const_set): resolve and cache class name
  immediately only if the outer class/module has the name,
  otherwise just set the ID.  [ruby-core:79007] [Bug #13113]
------------------------------------------------------------------------
r57283 | nobu | 2017-01-08 10:46:10 +0900 (Sun, 08 Jan 2017) | 1 line

benchmarks for [Bug #13113] [ci skip]
------------------------------------------------------------------------
r57282 | nobu | 2017-01-08 08:02:29 +0900 (Sun, 08 Jan 2017) | 4 lines

console.c: unpaired size

* ext/io/console/console.c (console_set_winsize): reject unpaired
  pixel size.
------------------------------------------------------------------------
r57281 | svn | 2017-01-08 07:52:03 +0900 (Sun, 08 Jan 2017) | 1 line

* 2017-01-08
------------------------------------------------------------------------
r57280 | nobu | 2017-01-08 07:52:03 +0900 (Sun, 08 Jan 2017) | 4 lines

console.c: OOB access

* ext/io/console/console.c (console_set_winsize): fix
  out-of-bounds access.  [ruby-core:79004] [Bug #13112]
------------------------------------------------------------------------
r57279 | nobu | 2017-01-07 20:54:10 +0900 (Sat, 07 Jan 2017) | 1 line

adjust indent [ci skip]
------------------------------------------------------------------------
r57278 | eregon | 2017-01-07 20:31:53 +0900 (Sat, 07 Jan 2017) | 8 lines

fix optimization for hash aset/aref with fstring

Patch by Eric Wong [ruby-core:78797].
I don't like the idea of making insns.def any bigger to support
a corner case, and "test_hash_aref_fstring_identity" shows
how contrived this is.

[ruby-core:78783] [Bug #12855]
------------------------------------------------------------------------
r57277 | nobu | 2017-01-07 17:31:03 +0900 (Sat, 07 Jan 2017) | 4 lines

bignum.c: unnecessary check

* bignum.c (rb_cstr_parse_inum): remove unnecessary check.
  successive sign is rejected by conv_digit.
------------------------------------------------------------------------
r57276 | svn | 2017-01-07 11:14:08 +0900 (Sat, 07 Jan 2017) | 1 line

* 2017-01-07
------------------------------------------------------------------------
r57275 | kazu | 2017-01-07 11:14:07 +0900 (Sat, 07 Jan 2017) | 1 line

lib/fileutils.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57274 | nobu | 2017-01-06 12:11:45 +0900 (Fri, 06 Jan 2017) | 4 lines

prelude.rb: Binding#irb [ci skip]

* prelude.rb (Binding#irb): [EXPERIMENTAL] automatically require
  irb and run.  [ruby-core:78960] [Bug #13099]
------------------------------------------------------------------------
r57273 | nobu | 2017-01-06 12:02:38 +0900 (Fri, 06 Jan 2017) | 4 lines

test_io.rb: squiggly heredoc

* test/ruby/test_io.rb (test_threaded_flush): use squiggly here
  document to strip leading spaces.
------------------------------------------------------------------------
r57272 | svn | 2017-01-06 11:05:36 +0900 (Fri, 06 Jan 2017) | 1 line

* 2017-01-06
------------------------------------------------------------------------
r57271 | kazu | 2017-01-06 11:05:35 +0900 (Fri, 06 Jan 2017) | 1 line

lib/delegate.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57270 | nobu | 2017-01-05 16:27:19 +0900 (Thu, 05 Jan 2017) | 3 lines

numeric.c: short circuit

* numeric.c (int_pow): short circuit when y is 0, always return 1.
------------------------------------------------------------------------
r57269 | nobu | 2017-01-05 16:27:18 +0900 (Thu, 05 Jan 2017) | 4 lines

bignum.c: fix rb_cstr_parse_inum endp

* bignum.c (rb_cstr_parse_inum): stores the address of the first
  invalid character when str is too big or contains an underscore.
------------------------------------------------------------------------
r57268 | svn | 2017-01-05 10:00:02 +0900 (Thu, 05 Jan 2017) | 1 line

* 2017-01-05
------------------------------------------------------------------------
r57267 | kazu | 2017-01-05 10:00:01 +0900 (Thu, 05 Jan 2017) | 1 line

lib/debug.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57266 | nobu | 2017-01-04 20:06:16 +0900 (Wed, 04 Jan 2017) | 4 lines

win32/registry.rb: registry type names

* ext/win32/lib/win32/registry.rb (Win32::Registry#read): show
  registry type names instead of numeric values.
------------------------------------------------------------------------
r57265 | nobu | 2017-01-04 17:21:14 +0900 (Wed, 04 Jan 2017) | 7 lines

win32/resolv.rb: ad hoc workaround

* ext/win32/lib/win32/resolv.rb (Win32::Resolv::SZ): an ad hoc
  workaround for broken registry.  SearchList and other registry
  values must be REG_SZ, or Windows ignores anything in those
  values otherwise.  [ruby-dev:49924] [Bug #13081]
  https://github.com/rubygems/rubygems/issues/1700
------------------------------------------------------------------------
r57264 | kazu | 2017-01-04 14:47:52 +0900 (Wed, 04 Jan 2017) | 1 line

lib/cmath.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57262 | nobu | 2017-01-04 09:30:45 +0900 (Wed, 04 Jan 2017) | 1 line

adjust indent [ci skip]
------------------------------------------------------------------------
r57261 | svn | 2017-01-04 07:42:11 +0900 (Wed, 04 Jan 2017) | 1 line

* 2017-01-04
------------------------------------------------------------------------
r57260 | tenderlove | 2017-01-04 07:42:10 +0900 (Wed, 04 Jan 2017) | 16 lines

Add `full` option to `ObjectSpace.dump_all`

The `full` option includes all slots (even `T_NONE`) in the JSON output.
This is to help with debugging heap fragmentation.

Here is an example usage:

```ruby
File.open('heap.json', 'w') do |f|
  ObjectSpace.dump_all(output: f, full: true)
end
```

The `heap.json` file contains all slots, including empty slots.

[Feature #13001] [ruby-core:78468]
------------------------------------------------------------------------
r57259 | nobu | 2017-01-03 19:49:12 +0900 (Tue, 03 Jan 2017) | 4 lines

compile.c: fallback nil

* compile.c (iseq_compile_each): push fallback nil only when
  defined guard is added.
------------------------------------------------------------------------
r57258 | nobu | 2017-01-03 18:48:43 +0900 (Tue, 03 Jan 2017) | 4 lines

compile.c: omit unnecessary defined guard

* compile.c (defined_expr): omit unnecessary defined guard when
  method call has no receiver and no arguments.
------------------------------------------------------------------------
r57257 | nobu | 2017-01-03 18:47:16 +0900 (Tue, 03 Jan 2017) | 4 lines

forwardable.rb: fix branches

* lib/forwardable.rb (instance_delegate, single_delegate): fix
  inverted branches.
------------------------------------------------------------------------
r57256 | nobu | 2017-01-03 18:35:26 +0900 (Tue, 03 Jan 2017) | 5 lines

forwardable.rb: use defined?

* lib/forwardable.rb (_delegator_method): use defined? operator
  instead of binding and calling unbound Kernel#respond_to?.  a
  remedy for an performance bottleneck.
------------------------------------------------------------------------
r57255 | nobu | 2017-01-03 17:40:51 +0900 (Tue, 03 Jan 2017) | 5 lines

forwardable.rb: use defined?

* lib/forwardable.rb (_delegator_method): use defined? operator
  instead of binding and calling unbound Kernel#respond_to?.  a
  remedy for an performance bottleneck.
------------------------------------------------------------------------
r57254 | svn | 2017-01-03 11:00:02 +0900 (Tue, 03 Jan 2017) | 1 line

* 2017-01-03
------------------------------------------------------------------------
r57253 | kazu | 2017-01-03 11:00:01 +0900 (Tue, 03 Jan 2017) | 1 line

lib/benchmark.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57252 | kazu | 2017-01-02 21:20:09 +0900 (Mon, 02 Jan 2017) | 1 line

lib/English.rb: Specify frozen_string_literal: true.
------------------------------------------------------------------------
r57251 | duerst | 2017-01-02 10:40:12 +0900 (Mon, 02 Jan 2017) | 1 line

adjust spacing [ci skip]
------------------------------------------------------------------------
r57250 | nobu | 2017-01-02 09:22:46 +0900 (Mon, 02 Jan 2017) | 5 lines

object.c: rb_class_alloc

* object.c (rb_obj_alloc): add pathological check of klass for
  extension libraries which do not check given arguments properly.
  [ruby-core:78934] [Bug #13093]
------------------------------------------------------------------------
r57249 | nobu | 2017-01-02 09:03:28 +0900 (Mon, 02 Jan 2017) | 5 lines

object.c: rb_class_s_new

* object.c (rb_class_new_instance): add pathological check of
  klass for extension libraries which do not check given arguments
  properly.  [ruby-core:78934] [Bug #13093]
------------------------------------------------------------------------
r57248 | nobu | 2017-01-02 07:20:38 +0900 (Mon, 02 Jan 2017) | 4 lines

 dir.c: getattrlist on OSX 10.5

* dir.c (is_case_sensitive): use getattrlist() if fgetattrlist()
  is unavailable, on OSX 10.5.  [ruby-core:68829] [Bug #11054]
------------------------------------------------------------------------
r57247 | svn | 2017-01-02 01:42:44 +0900 (Mon, 02 Jan 2017) | 1 line

* 2017-01-02
------------------------------------------------------------------------
r57246 | naruse | 2017-01-02 01:42:43 +0900 (Mon, 02 Jan 2017) | 1 line

fix typo [Bug #13091]
------------------------------------------------------------------------
r57245 | nobu | 2017-01-01 18:17:10 +0900 (Sun, 01 Jan 2017) | 1 line

test for [Feature #11547]
------------------------------------------------------------------------
r57244 | nobu | 2017-01-01 18:07:56 +0900 (Sun, 01 Jan 2017) | 4 lines

variable.c: top-level constant look-up

* variable.c (rb_const_search): [EXPERIMENTAL] remove top-level
  constant look-up.  [Feature #11547]
------------------------------------------------------------------------
r57243 | nobu | 2017-01-01 17:22:02 +0900 (Sun, 01 Jan 2017) | 1 line

passed block should keep the lambda-ness
------------------------------------------------------------------------
r57242 | svn | 2017-01-01 07:44:32 +0900 (Sun, 01 Jan 2017) | 1 line

* 2017-01-01
------------------------------------------------------------------------
r57241 | hsbt | 2017-01-01 07:44:31 +0900 (Sun, 01 Jan 2017) | 1 line

Update submaintainer of default gems.
------------------------------------------------------------------------
r57240 | nobu | 2016-12-31 17:07:58 +0900 (Sat, 31 Dec 2016) | 6 lines

vm.c: fix return in lambda

* vm.c (invoke_block_from_c_splattable): pass lambda-ness.

* vm_eval.c (yield_under): invoke lambda proc properly.
  [ruby-core:78917] [Bug #13090]
------------------------------------------------------------------------
r57239 | svn | 2016-12-31 09:41:15 +0900 (Sat, 31 Dec 2016) | 1 line

* 2016-12-31
------------------------------------------------------------------------
r57238 | svn | 2016-12-31 09:41:15 +0900 (Sat, 31 Dec 2016) | 1 line

* properties.
------------------------------------------------------------------------
r57237 | normal | 2016-12-31 09:41:14 +0900 (Sat, 31 Dec 2016) | 4 lines

add benchmark for IO.copy_stream IO#write case

I will attempt to reduce garbage in proposed fix
for https://bugs.ruby-lang.org/issues/13085
------------------------------------------------------------------------
r57236 | nobu | 2016-12-30 17:01:34 +0900 (Fri, 30 Dec 2016) | 5 lines

rational.c: memory leak in gcd

* rational.c (rb_gcd_gmp): fix memory leak.  patched by KISHIMOTO,
  Makoto <ksmakoto AT dd.iij4u.or.jp> in [ruby-dev:49934].
  [Bug #13089]
------------------------------------------------------------------------
r57235 | svn | 2016-12-30 01:16:33 +0900 (Fri, 30 Dec 2016) | 1 line

* 2016-12-30
------------------------------------------------------------------------
r57234 | rhe | 2016-12-30 01:16:32 +0900 (Fri, 30 Dec 2016) | 9 lines

test/ruby/test_pack.rb: fix test case added by r57187

The test case for String#unpack added by r57187 is not properly testing
because the String will be filled after the block invocation.
[ruby-core:78841] [Bug #13075]

Thanks to nagachika for pointing this out:

  http://d.hatena.ne.jp/nagachika/20161226/ruby_trunk_changes_57184_57194#r57187
------------------------------------------------------------------------
r57233 | nobu | 2016-12-29 19:32:48 +0900 (Thu, 29 Dec 2016) | 4 lines

rational.c: refactor to_r

* rational.c (read_num, read_rat_nos): refactor to curtail
  creating Rational objects.
------------------------------------------------------------------------
r57232 | nobu | 2016-12-29 18:26:45 +0900 (Thu, 29 Dec 2016) | 4 lines

rational.c: fix for mathn

* rational.c (read_num, read_rat_nos): dispatch by the type of numerator, for
  mathn.  [ruby-core:78893] [Bug #13084]
------------------------------------------------------------------------
r57231 | svn | 2016-12-29 18:06:00 +0900 (Thu, 29 Dec 2016) | 1 line

* 2016-12-29
------------------------------------------------------------------------
r57230 | nobu | 2016-12-29 18:05:59 +0900 (Thu, 29 Dec 2016) | 4 lines

rational.c: canonicalization

* rational.c (canonicalization): define always regardless CANON,
  and remove unnecessary ifdefs.
------------------------------------------------------------------------
r57228 | svn | 2016-12-28 13:40:59 +0900 (Wed, 28 Dec 2016) | 1 line

* 2016-12-28
------------------------------------------------------------------------
r57227 | nobu | 2016-12-28 13:40:58 +0900 (Wed, 28 Dec 2016) | 4 lines

numeric.c: reduce fdiv

* numeric.c (rb_int_fdiv_double): reduce first for more precise
  result.  [ruby-core:78886] [Bug #13078]
------------------------------------------------------------------------
r57224 | nobu | 2016-12-27 20:43:34 +0900 (Tue, 27 Dec 2016) | 5 lines

io.c: fix race between read and close

* io.c (io_fillbuf): fix race between read and close and bail out
  in the case the IO gets closed before the reading thread achieve
  the lock.  [ruby-core:78845] [Bug #13076]
------------------------------------------------------------------------
r57206 | usa | 2016-12-27 18:07:02 +0900 (Tue, 27 Dec 2016) | 5 lines

revert a part of r57199

* io.c (io_fillbuf): revert a part of r57199 because it broke IO#getch.
  see also [Bug #13076]

------------------------------------------------------------------------
r57205 | normal | 2016-12-27 17:52:32 +0900 (Tue, 27 Dec 2016) | 4 lines

cont.c: change fiber stack size doc [ci skip]

It's many years since we had tiny 4KB fiber stacks :<
point to the manpage instead for current, larger sizes.
------------------------------------------------------------------------
r57204 | nobu | 2016-12-27 16:39:29 +0900 (Tue, 27 Dec 2016) | 1 line

io.c: use io_close to close ARGF
------------------------------------------------------------------------
r57203 | nobu | 2016-12-27 16:18:27 +0900 (Tue, 27 Dec 2016) | 4 lines

io.c: ARGF fd leak

* io.c (argf_next_argv): fix leak of fd after breaking in #each
  method.
------------------------------------------------------------------------
r57202 | nobu | 2016-12-27 16:10:11 +0900 (Tue, 27 Dec 2016) | 5 lines

thread.c: fix race between read and close

* thread.c (rb_thread_fd_close): wait until all threads using the
  fd finish the operation, not to free the buffer in use.
  [ruby-core:78845] [Bug #13076]
------------------------------------------------------------------------
r57201 | svn | 2016-12-27 10:40:40 +0900 (Tue, 27 Dec 2016) | 1 line

* 2016-12-27
------------------------------------------------------------------------
r57200 | hsbt | 2016-12-27 10:40:39 +0900 (Tue, 27 Dec 2016) | 1 line

Ignored extracted gem files.
------------------------------------------------------------------------
r57199 | nobu | 2016-12-26 23:14:18 +0900 (Mon, 26 Dec 2016) | 5 lines

io.c: fix race between read and close

* io.c (io_fillbuf): fix race between read and close, in the case
  the IO gets closed before the reading thread achieve the lock.
  [ruby-core:78845] [Bug #13076]
------------------------------------------------------------------------
r57198 | nobu | 2016-12-26 22:31:03 +0900 (Mon, 26 Dec 2016) | 4 lines

parse.y: preserve cmdarg stack

* parse.y (do_body): preserve cmdarg stack around do/end block.
  [ruby-core:78837] [Bug #13073]
------------------------------------------------------------------------
r57197 | svn | 2016-12-26 21:00:03 +0900 (Mon, 26 Dec 2016) | 1 line

* properties.
------------------------------------------------------------------------
r57196 | kazu | 2016-12-26 21:00:02 +0900 (Mon, 26 Dec 2016) | 1 line

Add NEWS for Ruby 2.5.0
------------------------------------------------------------------------
r57195 | kazu | 2016-12-26 21:00:01 +0900 (Mon, 26 Dec 2016) | 1 line

Move from NEWS to doc/NEWS-2.4.0
------------------------------------------------------------------------
r57194 | nobu | 2016-12-26 19:00:36 +0900 (Mon, 26 Dec 2016) | 4 lines

vm_eval.c: Symbol#to_proc and instance_exec

* vm_eval.c (yield_under): should evaluate the proc on the first
  argument.  [ruby-core:78839] [Bug #13074]
------------------------------------------------------------------------
r57193 | nobu | 2016-12-26 19:00:34 +0900 (Mon, 26 Dec 2016) | 1 line

test/ruby/test_symbol.rb: use begin;end; hack
------------------------------------------------------------------------
r57192 | nobu | 2016-12-26 18:32:07 +0900 (Mon, 26 Dec 2016) | 1 line

[Bug #12705]
------------------------------------------------------------------------
r57191 | nobu | 2016-12-26 18:28:48 +0900 (Mon, 26 Dec 2016) | 3 lines

get rid of sprintf

* missing/strerror.c (strerror): use snprintf instead of sprintf.
------------------------------------------------------------------------
r57190 | nobu | 2016-12-26 18:28:47 +0900 (Mon, 26 Dec 2016) | 4 lines

get rid of strcat

* regerror.c (onig_vsnprintf_with_pattern): use memcpy with the
  known length instead of strcat.
------------------------------------------------------------------------
r57189 | nobu | 2016-12-26 18:28:46 +0900 (Mon, 26 Dec 2016) | 10 lines

get rid of strcpy

* addr2line.c (follow_debuglink): insert global_debug_dir by using
  memmove instead of copying to temporary buffer.

* dln.c (dln_load): use memcpy with the known length instead of
  strcpy.

* gc.c (rb_gc_unprotect_logging): use strdup instead of malloc and
  strcpy.
------------------------------------------------------------------------
r57188 | nobu | 2016-12-26 17:01:37 +0900 (Mon, 26 Dec 2016) | 5 lines

Makefile.sub: refine configuration check

* win32/Makefile.sub (config.status): check configured target by
  reading from config.status, and remove version dependent values
  from config.h.
------------------------------------------------------------------------
r57187 | rhe | 2016-12-26 15:32:00 +0900 (Mon, 26 Dec 2016) | 7 lines

pack.c: avoid returning uninitialized String

Fix unpacking with 'b', 'B', 'h' and 'H' format. Do not return an
uninitialized String to Ruby before filling the content bytes.
Fixes r11175 ("pack.c (pack_unpack): execute block if given with
unpacked value instead of creating an array", 2006-10-15).
[ruby-core:78841] [Bug #13075]
------------------------------------------------------------------------
r57186 | nobu | 2016-12-26 14:07:54 +0900 (Mon, 26 Dec 2016) | 4 lines

Makefile.sub: fix dependency of RUBYDEF

* win32/Makefile.sub (RUBYDEF): fix dependency, win32/mkexports.rb
  requires rbconfig.rb.
------------------------------------------------------------------------
r57185 | nobu | 2016-12-26 08:56:55 +0900 (Mon, 26 Dec 2016) | 4 lines

string.c: CRLF in paragraph mode

* string.c (rb_str_enumerate_lines): allow CRLF to separate
  paragraphs.
------------------------------------------------------------------------
r57184 | nobu | 2016-12-26 08:50:09 +0900 (Mon, 26 Dec 2016) | 5 lines

string.c: consistent paragraph mode with IO

* string.c (rb_str_enumerate_lines): in paragraph mode, do not
  include newlines which separate paragraphs, so that it will be
  consistent with IO#each_line.
------------------------------------------------------------------------
r57183 | matz | 2016-12-26 01:53:00 +0900 (Mon, 26 Dec 2016) | 2 lines

include/ruby/version.h: Update API version.

------------------------------------------------------------------------
r57182 | svn | 2016-12-26 01:35:52 +0900 (Mon, 26 Dec 2016) | 1 line

* 2016-12-26
------------------------------------------------------------------------
r57181 | matz | 2016-12-26 01:35:51 +0900 (Mon, 26 Dec 2016) | 2 lines

version.h (RUBY_VERSION): 2.5.0 development has started.

------------------------------------------------------------------------
r57180 | nobu | 2016-12-25 23:32:29 +0900 (Sun, 25 Dec 2016) | 4 lines

memory_status.c: support old Mac OS

* ext/-test-/memory_status/memory_status.c (read_status): use
  TASK_BASIC_INFO instead of MACH_TASK_BASIC_INFO on old Mac OS.
------------------------------------------------------------------------
r57179 | nobu | 2016-12-25 17:47:22 +0900 (Sun, 25 Dec 2016) | 3 lines

bignum.c: precise fdiv

* bignum.c (big_fdiv): more precise calculation.  [ruby-dev:49915]
------------------------------------------------------------------------
r57178 | nobu | 2016-12-25 17:42:28 +0900 (Sun, 25 Dec 2016) | 1 line

bignum.c (DBL_BIGDIG): make enum
------------------------------------------------------------------------
r57177 | svn | 2016-12-25 14:58:25 +0900 (Sun, 25 Dec 2016) | 1 line

* 2016-12-25
------------------------------------------------------------------------
r57176 | nobu | 2016-12-25 14:58:24 +0900 (Sun, 25 Dec 2016) | 4 lines

.gdbinit: refine rp

* .gdbinit (rp): refine output of T_STRUCT and T_BIGNUM to show
  all elements.
------------------------------------------------------------------------
r57175 | nobu | 2016-12-24 22:22:53 +0900 (Sat, 24 Dec 2016) | 4 lines

regint.h: version for secure functions

* regint.h (xvsnprintf): secure version functions are not
  supported on old VC.
------------------------------------------------------------------------
r57174 | nobu | 2016-12-24 22:21:30 +0900 (Sat, 24 Dec 2016) | 4 lines

hash.c: split long long literals

* hash.c (prime1, prime2): split long long literals for platforms
  where LL suffix is not supported, e.g., VC6.
------------------------------------------------------------------------
r57173 | nobu | 2016-12-24 22:19:50 +0900 (Sat, 24 Dec 2016) | 4 lines

compile.c: constify

* compile.c (method_for_self): constify an argument of build
  function for VC6.
------------------------------------------------------------------------
r57172 | nobu | 2016-12-24 21:21:52 +0900 (Sat, 24 Dec 2016) | 4 lines

time.c: fix type of usec2subsecx

* time.c (usec2subsecx): fix return type, which is a numeric
  object but not a long int.  [ruby-dev:49912] [Bug #13066]
------------------------------------------------------------------------
r57171 | nobu | 2016-12-24 21:19:23 +0900 (Sat, 24 Dec 2016) | 1 line

time.c: remove debug code
------------------------------------------------------------------------
r57170 | nobu | 2016-12-24 20:56:12 +0900 (Sat, 24 Dec 2016) | 1 line

time.c: fix typo in value_insane_p
------------------------------------------------------------------------
r57169 | nobu | 2016-12-24 18:22:21 +0900 (Sat, 24 Dec 2016) | 4 lines

test/unit.rb: restore parallel option

* test/lib/test/unit.rb (_run_parallel): restore parallel option
  after retrying for --repeat-count option.
------------------------------------------------------------------------
r57168 | nobu | 2016-12-24 09:51:01 +0900 (Sat, 24 Dec 2016) | 7 lines

test/unit.rb: --subprocess-timeout-scale option

* test/lib/envutil.rb (EnvUtil#invoke_ruby): add subprocess
  timeout scaling factor.

* test/lib/test/unit.rb (Test::Unit::SubprocessOption): add
  --subprocess-timeout-scale option.
------------------------------------------------------------------------
r57167 | nobu | 2016-12-24 09:50:59 +0900 (Sat, 24 Dec 2016) | 4 lines

test/unit.rb: --repeat-count option

* test/lib/test/unit.rb (Test::Unit::RepeatOption): --repeat-count
  option to repeat COUNT times while success.
------------------------------------------------------------------------
r57166 | svn | 2016-12-24 01:09:10 +0900 (Sat, 24 Dec 2016) | 1 line

* 2016-12-24
------------------------------------------------------------------------
r57165 | naruse | 2016-12-24 01:09:09 +0900 (Sat, 24 Dec 2016) | 1 line

Add ruby_2_4 branch to test on travis [skip ci]
------------------------------------------------------------------------
r57160 | naruse | 2016-12-23 23:54:04 +0900 (Fri, 23 Dec 2016) | 3 lines

Increase timeout

http://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20161223T113301Z.fail.html.gz
------------------------------------------------------------------------
r57159 | nobu | 2016-12-23 12:22:36 +0900 (Fri, 23 Dec 2016) | 5 lines

assertions.rb: prepare_syntax_check

* test/lib/test/unit/assertions.rb (prepare_syntax_check): extract
  common preparation of arguments from assert_valid_syntax and
  assert_syntax_error.
------------------------------------------------------------------------
r57158 | nobu | 2016-12-23 12:22:35 +0900 (Fri, 23 Dec 2016) | 8 lines

assertions.rb: syntax check by iseq

* test/lib/test/unit/assertions.rb (assert_valid_syntax): use
  RubyVM::InstructionSequence.compile to get rid of executing the
  code, instead of catch&throw.  sample/trick2015/kinaba/entry.rb
  no longer raises an Invalid return.

* test/lib/test/unit/assertions.rb (assert_syntax_error): ditto.
------------------------------------------------------------------------
r57157 | nobu | 2016-12-23 09:05:40 +0900 (Fri, 23 Dec 2016) | 4 lines

time.c: inquire suspicious values

* time.c (time_arg): dump sec and subsec arguments if subsecx is
  insane.
------------------------------------------------------------------------
r57156 | nobu | 2016-12-23 08:20:00 +0900 (Fri, 23 Dec 2016) | 5 lines

test_modify_expand.rb: skip if no overflow

* test/-ext-/string/test_modify_expand.rb (test_integer_overflow):
  no longer happens on platforms where size_t is larger than long,
  e.g. 64bit windows, since r57122.
------------------------------------------------------------------------
r57155 | nobu | 2016-12-23 07:34:18 +0900 (Fri, 23 Dec 2016) | 1 line

time.c: inquire suspicious values
------------------------------------------------------------------------
r57154 | nobu | 2016-12-23 07:16:19 +0900 (Fri, 23 Dec 2016) | 4 lines

string.c: suppress a warning

* string.c (rb_str_casecmp_p): [DOC] use Unicode escape form to
  get rid of warning C4819 by Microsoft Visual C++.
------------------------------------------------------------------------
r57153 | svn | 2016-12-23 05:58:55 +0900 (Fri, 23 Dec 2016) | 1 line

* 2016-12-23
------------------------------------------------------------------------
r57152 | nobu | 2016-12-23 05:58:55 +0900 (Fri, 23 Dec 2016) | 1 line

get rid of implicit signedness conversions
------------------------------------------------------------------------
r57151 | yui-knk | 2016-12-22 19:29:40 +0900 (Thu, 22 Dec 2016) | 4 lines

test_float.rb: add test cases for Float#round

* test_float.rb: add test cases for Float#round with
  half nil. Follow up r57130.
------------------------------------------------------------------------
r57150 | naruse | 2016-12-22 18:44:30 +0900 (Thu, 22 Dec 2016) | 3 lines

suppress warning: implicit conversion changes signedness

It causes [Bug #13060]
------------------------------------------------------------------------
r57149 | rhe | 2016-12-22 13:40:28 +0900 (Thu, 22 Dec 2016) | 4 lines

io.c: [DOC] update outdated documentation of ARGF.close

As of Ruby 2.3, IO#close no longer raises IOError if the file is already
closed.
------------------------------------------------------------------------
r57148 | hsbt | 2016-12-22 12:53:53 +0900 (Thu, 22 Dec 2016) | 1 line

Update xmlrpc-0.2.1 for Ruby 2.4.0 release.
------------------------------------------------------------------------
r57147 | nobu | 2016-12-22 11:00:02 +0900 (Thu, 22 Dec 2016) | 4 lines

test_rinda.rb: ipv6_mc

* test/rinda/test_rinda.rb (RingIPv6#ipv6_mc): extract IPv6
  multicast setup and cleanup, and ignore ENETDOWN.
------------------------------------------------------------------------
r57146 | rhe | 2016-12-22 10:43:41 +0900 (Thu, 22 Dec 2016) | 14 lines

openssl: import v2.0.2

Import Ruby/OpenSSL 2.0.2. This release contains only bugfixes. The full
commit log since 2.0.1 (imported at r57041) can be found at:

  https://github.com/ruby/openssl/compare/v2.0.1...v2.0.2

----------------------------------------------------------------
Kazuki Yamaguchi (5):
      ssl: check for SSL_CTX_clear_options()
      Rename functions in openssl_missing.c
      ssl: use SSL_SESSION_get_protocol_version()
      pkey: allow instantiating OpenSSL::PKey::PKey with unsupported key type
      Ruby/OpenSSL 2.0.2
------------------------------------------------------------------------
r57145 | mrkn | 2016-12-22 00:35:29 +0900 (Thu, 22 Dec 2016) | 5 lines

bigdecimal: version 1.3.0

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

  https://github.com/ruby/bigdecimal/compare/v1.3.0.pre.2...v1.3.0
------------------------------------------------------------------------
r57144 | svn | 2016-12-22 00:21:20 +0900 (Thu, 22 Dec 2016) | 1 line

* 2016-12-22
------------------------------------------------------------------------
r57143 | ngoto | 2016-12-22 00:21:19 +0900 (Thu, 22 Dec 2016) | 5 lines

regcomp.c: Fix compile error with old version of fcc on Solaris

* regcomp.c (get_min_match_length): Fix compile error with old version
  of fcc (Fujitsu C Compiler) on Solaris 10. [Bug #13059][ruby-dev:49909]

------------------------------------------------------------------------
r57142 | nobu | 2016-12-21 22:46:46 +0900 (Wed, 21 Dec 2016) | 1 line

time.c: debug print
------------------------------------------------------------------------
r57141 | yui-knk | 2016-12-21 22:26:16 +0900 (Wed, 21 Dec 2016) | 4 lines

numeric.c: remove not used lines

* numeric.c (rb_num_get_rounding_option): remove not used
  lines. After r57130 these lines are never reached.
------------------------------------------------------------------------
r57140 | nobu | 2016-12-21 21:06:40 +0900 (Wed, 21 Dec 2016) | 4 lines

time.c: refine num_exact error message

* time.c (num_exact): show the original argument when conversion
  failed, instead of intermediate nil.
------------------------------------------------------------------------
r57139 | nobu | 2016-12-21 21:05:41 +0900 (Wed, 21 Dec 2016) | 4 lines

time.c: use RB_TYPE_P

* time.c (time_timespec): use RB_TYPE_P instead of switching by
  TYPE.
------------------------------------------------------------------------
r57138 | nobu | 2016-12-21 20:20:02 +0900 (Wed, 21 Dec 2016) | 4 lines

st.c: suppress a warning

* st.c (st_hash): suppress unused label warning on 32bit
  platforms.  fix up r57134.
------------------------------------------------------------------------
r57137 | nobu | 2016-12-21 20:12:39 +0900 (Wed, 21 Dec 2016) | 4 lines

eval.c: fix circular cause

* eval.c (exc_setup_cause): always set cause of cause to get rid
  of circular references.  [ruby-core:78688] [Bug #13043]
------------------------------------------------------------------------
r57136 | usa | 2016-12-21 17:13:42 +0900 (Wed, 21 Dec 2016) | 2 lines

* win32/win32.c (winnt_stat): use `numberof` macro instead of constant.

------------------------------------------------------------------------
r57135 | usa | 2016-12-21 16:50:14 +0900 (Wed, 21 Dec 2016) | 8 lines

Fixed potentially buffer overrun.

* win32/win32.c (winnt_stat): the return value of `get_final_path` is the
  expected buffer length, not the actuall filled length.

* win32/win32.c (winnt_stat): `finalname` may be accessed in the outer block of
  its definition via `path`.

------------------------------------------------------------------------
r57134 | nobu | 2016-12-21 15:22:16 +0900 (Wed, 21 Dec 2016) | 29 lines

st.c: fix st_hash* functions [Bug #13019]

Previous implementation had an issues:
- macros murmur1 assumes murmur_step takes rotation value
  as a second argument
- but murmur_step second argument is "next block"
- this makes st_hash_uint and st_hash_end to not mix high bits of
  hash value into lower bits
- this leads to pure hash behavior on doubles and mixing hashes using
  st_hash_uint.
  It didn't matter when bins amount were prime numbers, but it hurts
  when bins are powers of two.

Mistake were created cause of attempt to co-exist Murmur1 and Murmur2
in a same code.

Change it to single hash-function implementation.
- block function is in a spirit of Murmur functions,
  but handles inter-block dependency a bit better (imho).
- final block is read in bit more optimal way on CPU with unaligned word access,
- final block is mixed in simple way,
- finalizer is taken from MurmurHash3 (it makes most of magic :) )
  (64bit finalizer is taken from
  http://zimbry.blogspot.ru/2011/09/better-bit-mixing-improving-on.html)

Also remove ST_USE_FNV1: it lacks implementation of many functions,
and looks to be abandoned

Author: Sokolov Yura aka funny_falcon <funny.falcon@gmail.com>
------------------------------------------------------------------------
r57133 | akr | 2016-12-21 14:26:35 +0900 (Wed, 21 Dec 2016) | 2 lines

[DOC] itemize values for half option of Float#round.

------------------------------------------------------------------------
r57132 | nobu | 2016-12-21 10:58:32 +0900 (Wed, 21 Dec 2016) | 4 lines

compile.c: toplevel return

* compile.c (iseq_compile_each): stop execution of the current source
  by toplevel return.  [ruby-core:36785] [Feature #4840]
------------------------------------------------------------------------
r57131 | nobu | 2016-12-21 10:29:58 +0900 (Wed, 21 Dec 2016) | 3 lines

numeric.c: rdoc of half option [ci skip]

* numeric.c (flo_round): [DOC] mention half option.  [Bug #12548]
------------------------------------------------------------------------
r57130 | nobu | 2016-12-21 10:29:57 +0900 (Wed, 21 Dec 2016) | 4 lines

numeric.c: allow nil as rounding mode option

* numeric.c (rb_num_get_rounding_option): allow nil same as the
  default behavior, per [ruby-core:77961].  [Bug #12548]
------------------------------------------------------------------------
r57129 | nobu | 2016-12-21 02:15:37 +0900 (Wed, 21 Dec 2016) | 4 lines

rdoc for r57126 [ci skip]

* ext/zlib/zlib.c: [DOC] update as keyword arguments.
  [Feature #13020]
------------------------------------------------------------------------
r57128 | svn | 2016-12-21 01:02:22 +0900 (Wed, 21 Dec 2016) | 1 line

* 2016-12-21
------------------------------------------------------------------------
r57127 | naruse | 2016-12-21 01:02:22 +0900 (Wed, 21 Dec 2016) | 1 line

suppress warning: attempt to close unfinished zstream; reset forced.
------------------------------------------------------------------------
r57126 | naruse | 2016-12-21 01:02:21 +0900 (Wed, 21 Dec 2016) | 1 line

Zlib.gzip uses kwargs instead of argc [Feature #13020]
------------------------------------------------------------------------
r57125 | nobu | 2016-12-20 17:25:03 +0900 (Tue, 20 Dec 2016) | 4 lines

io.c: update argf lineno

* io.c (argf_rewind): rewind line number in non-global ARGF
  instance.
------------------------------------------------------------------------
r57124 | nobu | 2016-12-20 17:25:02 +0900 (Tue, 20 Dec 2016) | 4 lines

io.c: update argf lineno

* io.c (argf_block_call_line): update line number in non-global
  ARGF instance.  [ruby-core:78728] [Bug #13051]
------------------------------------------------------------------------
r57123 | rhe | 2016-12-20 16:32:23 +0900 (Tue, 20 Dec 2016) | 5 lines

re.c: consider the case of RMatch::regexp is nil

Follow r49675, r57098 and r57110. Don't assume RMatch::regexp always
contains a valid Regexp instance; it will be Qnil if the MatchData is
created by rb_backref_set_string().  [ruby-core:78741] [Bug #13054]
------------------------------------------------------------------------
r57122 | rhe | 2016-12-20 15:53:45 +0900 (Tue, 20 Dec 2016) | 5 lines

string.c: add missing size_t cast

Add size_t cast to avoid signed integer overflow. r56157 ("string.c:
avoid signed integer overflow", 2016-09-13) missed this. Suppresses
UBSan.
------------------------------------------------------------------------
r57121 | rhe | 2016-12-20 15:53:44 +0900 (Tue, 20 Dec 2016) | 6 lines

array.c: do not resize to less than 0

Shrinking the Array from the block invoked by Array#select! or
Array#reject! causes the Array to be a negative number size. Ensure that
the resulting Array won't be smaller than 0.
[ruby-core:78739] [Bug #13053]
------------------------------------------------------------------------
r57120 | yuki | 2016-12-20 15:53:17 +0900 (Tue, 20 Dec 2016) | 2 lines

* gems/bundled_gems: Upgrade the did_you_mean gem to 1.1.0

------------------------------------------------------------------------
r57119 | rhe | 2016-12-20 14:26:08 +0900 (Tue, 20 Dec 2016) | 8 lines

array.c: check array length every time after yielding

Since the Array may be modified during rb_yield(), the length before
invoking the block can't be trusted. Fix possible out-of-bounds read in
Array#combination and Array#repeated_combination.

It may better to make a defensive copy of the Array, but for now let's
follow what Array#permutation does.  [ruby-core:78738] [Bug #13052]
------------------------------------------------------------------------
r57118 | rhe | 2016-12-20 14:26:07 +0900 (Tue, 20 Dec 2016) | 10 lines

proc.c: assume rb_iseq_location_t::first_lineno is always a Fixnum

Do not check for the value of rb_iseq_constant_body::line_info_table as
it is no longer related. The checks seem to be the remains from the day
before the dedicated 'first_lineno' field was introduced. Remove them.

Note, rb_iseq_constant_body::line_info_table can be NULL only when the
iseq does not contain any instructions that originate from Ruby code,
for example, an iseq created with 'proc {}' under a non-default compile
options where trace instructions are disabled.
------------------------------------------------------------------------
r57117 | svn | 2016-12-20 14:09:18 +0900 (Tue, 20 Dec 2016) | 1 line

* 2016-12-20
------------------------------------------------------------------------
r57116 | nobu | 2016-12-20 14:09:18 +0900 (Tue, 20 Dec 2016) | 4 lines

test/unit.rb: separator [ci skip]

* test/lib/test/unit.rb (ExcludesOption#setup_options): add
  separator for --excludes-dir in help message.
------------------------------------------------------------------------
r57115 | nobu | 2016-12-19 17:36:21 +0900 (Mon, 19 Dec 2016) | 4 lines

time.c: refine error message

* time.c (validate_vtm): separate validation failure messages for
  each members.
------------------------------------------------------------------------
r57114 | nobu | 2016-12-19 13:07:40 +0900 (Mon, 19 Dec 2016) | 4 lines

re.c: RB_TYPE_P

* re.c (match_backref_number, namev_to_backref_number): use
  RB_TYPE_P instead of switching by TYPE.
------------------------------------------------------------------------
r57113 | svn | 2016-12-19 12:11:58 +0900 (Mon, 19 Dec 2016) | 1 line

* 2016-12-19
------------------------------------------------------------------------
r57112 | nobu | 2016-12-19 12:11:57 +0900 (Mon, 19 Dec 2016) | 4 lines

re.c: NAME_TO_NUMBER

* re.c (namev_to_backref_number, rb_reg_regsub): extract name to
  backref number check as NAME_TO_NUMBER.
------------------------------------------------------------------------
r57111 | ktsj | 2016-12-18 21:29:34 +0900 (Sun, 18 Dec 2016) | 1 line

doc/standard_library.rdoc: Tk is removed from stdlib
------------------------------------------------------------------------
r57110 | nobu | 2016-12-18 20:43:51 +0900 (Sun, 18 Dec 2016) | 4 lines

re.c: use name_to_backref_number

* re.c (match_backref_number): use name_to_backref_number for
  casts.
------------------------------------------------------------------------
r57109 | naruse | 2016-12-18 20:28:01 +0900 (Sun, 18 Dec 2016) | 3 lines

Increase timeout

http://rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20161215T021909Z.fail.html.gz
------------------------------------------------------------------------
r57108 | nobu | 2016-12-18 03:04:30 +0900 (Sun, 18 Dec 2016) | 4 lines

sprintf.c: fix width underflow

* sprintf.c (rb_str_format): fix memory corruption by width
  underflow.  https://github.com/mruby/mruby/issues/3347
------------------------------------------------------------------------
r57107 | svn | 2016-12-18 01:10:57 +0900 (Sun, 18 Dec 2016) | 1 line

* 2016-12-18
------------------------------------------------------------------------
r57106 | naruse | 2016-12-18 01:10:56 +0900 (Sun, 18 Dec 2016) | 3 lines

Increase timeout

http://rubyci.org/logs/13.78.52.201/vc12-x64/ruby-trunk/log/20161217T103523Z.log.html.gz
------------------------------------------------------------------------
r57105 | rhe | 2016-12-17 17:25:34 +0900 (Sat, 17 Dec 2016) | 3 lines

compile.c: do not emit numeric literal range in void context

A fix-up for r56316. Fix stack consistency error on '1..3; nil'.
------------------------------------------------------------------------
r57104 | nobu | 2016-12-17 16:48:58 +0900 (Sat, 17 Dec 2016) | 1 line

Reapply r57093,r57094,r57097 "dtrace build fixes on FreeBSD"
------------------------------------------------------------------------
r57103 | nobu | 2016-12-17 16:48:57 +0900 (Sat, 17 Dec 2016) | 3 lines

Reapply r57092 "configure.in: repeated checks"

Needs DTRACE_OBJ when "$rb_cv_prog_dtrace_g" = rebuild, too.
------------------------------------------------------------------------
r57102 | nobu | 2016-12-17 14:27:05 +0900 (Sat, 17 Dec 2016) | 1 line

Revert r57092 "configure.in: repeated checks"
------------------------------------------------------------------------
r57101 | naruse | 2016-12-17 14:14:14 +0900 (Sat, 17 Dec 2016) | 1 line

Revert r57093,r57094,r57097 "dtrace build fixes on FreeBSD"
------------------------------------------------------------------------
r57100 | nobu | 2016-12-17 09:58:47 +0900 (Sat, 17 Dec 2016) | 4 lines

test_mailto.rb: overwritten methods

* test/uri/test_mailto.rb (URI::TestMailTo#test_to_mailtext):
  merge overwritten methods.  [Bug #10774]
------------------------------------------------------------------------
r57099 | nobu | 2016-12-17 09:58:46 +0900 (Sat, 17 Dec 2016) | 1 line

test_mailto.rb: adjust scope
------------------------------------------------------------------------
r57098 | nobu | 2016-12-17 09:52:47 +0900 (Sat, 17 Dec 2016) | 4 lines

re.c: non-regexp name reference

* re.c (rb_reg_regsub): other than regexp has no name references.
  [ruby-core:78686] [Bug #13042]
------------------------------------------------------------------------
r57097 | nobu | 2016-12-17 09:01:42 +0900 (Sat, 17 Dec 2016) | 4 lines

configure.in: fix r57093

* configure.in (RUBY_DTRACE_AVAILABLE): try -xnolibs first.
  [ruby-core:78676] [Bug #13041]
------------------------------------------------------------------------
r57096 | svn | 2016-12-17 07:57:02 +0900 (Sat, 17 Dec 2016) | 1 line

* 2016-12-17
------------------------------------------------------------------------
r57095 | nobu | 2016-12-17 07:57:01 +0900 (Sat, 17 Dec 2016) | 4 lines

fix r57089

* parse.y (parser_heredoc_identifier): fix multiline here document
  identifier condition.
------------------------------------------------------------------------
r57094 | nobu | 2016-12-16 21:28:19 +0900 (Fri, 16 Dec 2016) | 3 lines

garbage space [ci skip]

* configure.in (RUBY_DTRACE_AVAILABLE): remove a garbage space.
------------------------------------------------------------------------
r57093 | nobu | 2016-12-16 21:16:33 +0900 (Fri, 16 Dec 2016) | 5 lines

dtrace build fixes on FreeBSD

* configure.in (RUBY_DTRACE_AVAILABLE, RUBY_DTRACE_POSTPROCESS):
  incorporate dtrace build fix on FreeBSD, dtrace needs -xnolibs
  in a jail.  [ruby-core:78676] [Bug #13041]
------------------------------------------------------------------------
r57092 | nobu | 2016-12-16 20:59:57 +0900 (Fri, 16 Dec 2016) | 4 lines

configure.in: repeated checks

* configure.in (enable_dtrace): reduce repeated
  RUBY_DTRACE_AVAILABLE checks.
------------------------------------------------------------------------
r57091 | nobu | 2016-12-16 14:05:42 +0900 (Fri, 16 Dec 2016) | 4 lines

no crypt.h on FreeBSD 12

* string.c (crypt.h): crypt_r() was added in FreeBSD 12.0 but is
  declared in unistd.h.  [ruby-core:78664] [Bug #13038]
------------------------------------------------------------------------
r57090 | nobu | 2016-12-16 12:30:26 +0900 (Fri, 16 Dec 2016) | 4 lines

configure.in: no crypt.h on FreeBSD 12

* configure.in (crypt.h): crypt_r() was added in FreeBSD 12.0 but
  is declared in unistd.h.  [ruby-core:78664] [Bug #13038]
------------------------------------------------------------------------
r57089 | nobu | 2016-12-16 10:27:47 +0900 (Fri, 16 Dec 2016) | 4 lines

multiline heredoc identifier

* parse.y (parser_heredoc_identifier): reject multiline here
  document identifier, which never matches single line.
------------------------------------------------------------------------
r57088 | nobu | 2016-12-16 10:12:09 +0900 (Fri, 16 Dec 2016) | 6 lines

fix chomping newline only line

* string.c (chomp_newline): fix chomping newline only line.
  rb_enc_prev_char return NULL if no previous character and must
  not call rb_enc_ascget on it.  a patch by Ary Borenszweig
  <asterite AT gmail.com> at [ruby-core:78666].  [Bug #13037]
------------------------------------------------------------------------
r57087 | svn | 2016-12-16 01:08:34 +0900 (Fri, 16 Dec 2016) | 1 line

* 2016-12-16
------------------------------------------------------------------------
r57086 | mrkn | 2016-12-16 01:08:33 +0900 (Fri, 16 Dec 2016) | 1 line

NEWS: Fix the default rounding mode
------------------------------------------------------------------------
r57085 | nobu | 2016-12-15 21:58:59 +0900 (Thu, 15 Dec 2016) | 4 lines

parse.y: newline in heredoc identifier

* parse.y (parser_heredoc_identifier): warn newline in here
  document identifier.
------------------------------------------------------------------------
r57084 | hsbt | 2016-12-15 20:00:41 +0900 (Thu, 15 Dec 2016) | 1 line

Added entry of psych 2.2.2
------------------------------------------------------------------------
r57083 | hsbt | 2016-12-15 20:00:40 +0900 (Thu, 15 Dec 2016) | 3 lines

Update psych-2.2.2

 * It fixed only JRuby dependency issue.
------------------------------------------------------------------------
r57082 | nobu | 2016-12-15 15:22:09 +0900 (Thu, 15 Dec 2016) | 1 line

parse.y: one warning, one line [ci skip]
------------------------------------------------------------------------
r57081 | usa | 2016-12-15 02:53:20 +0900 (Thu, 15 Dec 2016) | 5 lines

Removed the obstacle to running test-all with VC14.

* test/fiddle/test_import.rb (LIBC.fprintf): VC14's `fprintf` is very distinct
  name, then, just ignore this test.

------------------------------------------------------------------------
r57080 | svn | 2016-12-15 02:49:27 +0900 (Thu, 15 Dec 2016) | 1 line

* 2016-12-15
------------------------------------------------------------------------
r57079 | usa | 2016-12-15 02:49:26 +0900 (Thu, 15 Dec 2016) | 6 lines

Fixed link error with VC14.

* win32/mkexports.rb (Exports::Mswin#each_exports): should ignore `vsprintf_s_l`
  and the like just like `vsprintf_l`.
  [ruby-dev:49899] [Bug #13033]

------------------------------------------------------------------------
r57078 | rhe | 2016-12-14 21:32:42 +0900 (Wed, 14 Dec 2016) | 9 lines

encoding.c: handle needmore error from rb_enc_precise_mbclen()

rb_enc_ascget() erroneously reports success even if the given byte
sequence is incomplete, for non-ASCII compatible encoding strings.

rb_enc_precise_mbclen() may return a negative value on error, and thus
rb_enc_ascget() must not store the return value in 'unsigned int';
otherwise the subsequent MBCLEN_CHARFOUND_P() check won't catch the
error.  [ruby-core:78646] [Bug #13034]
------------------------------------------------------------------------
r57077 | nobu | 2016-12-14 17:25:56 +0900 (Wed, 14 Dec 2016) | 5 lines

vcs.rb: no ext/date in vcs.rb

* tool/vcs.rb (VCS::GIT#export_changelog): do not require date
  extension library so that miniruby can run.
  [ruby-core:78641] [Bug #13032]
------------------------------------------------------------------------
r57076 | nobu | 2016-12-14 17:06:55 +0900 (Wed, 14 Dec 2016) | 4 lines

constify

* vm_dump.c (rb_vmdebug_debug_print_pre): constify pc argument for
  VMDEBUG.
------------------------------------------------------------------------
r57075 | nobu | 2016-12-14 16:30:41 +0900 (Wed, 14 Dec 2016) | 4 lines

parse.y: curtail scanning

* parse.y (parser_yyerror): curtail scanning range, not to exceed
  the max margin.
------------------------------------------------------------------------
r57074 | svn | 2016-12-14 13:35:29 +0900 (Wed, 14 Dec 2016) | 1 line

* 2016-12-14
------------------------------------------------------------------------
r57073 | nobu | 2016-12-14 13:35:28 +0900 (Wed, 14 Dec 2016) | 4 lines

parse.y: fix yyerror message

* parse.y (parser_yyerror): show the error line even if the error
  is at the end.
------------------------------------------------------------------------
r57072 | usa | 2016-12-13 14:17:48 +0900 (Tue, 13 Dec 2016) | 7 lines

declare `rb_w32_sysinit` in header.

* include/ruby/win32.h (rb_w32_sysinit): declare.
  [ruby-core:78444] [Bug #12994]

* ruby.c (ruby_sysinit): follow above change.

------------------------------------------------------------------------
r57071 | nobu | 2016-12-13 12:55:14 +0900 (Tue, 13 Dec 2016) | 1 line

require "irb/output-method" for StdioOutputMethod
------------------------------------------------------------------------
r57070 | nobu | 2016-12-13 12:55:13 +0900 (Tue, 13 Dec 2016) | 1 line

make-snapshot: fix circular dependency
------------------------------------------------------------------------
r57069 | hsbt | 2016-12-13 11:01:34 +0900 (Tue, 13 Dec 2016) | 1 line

Update description of XMLRPC section.
------------------------------------------------------------------------
r57068 | usa | 2016-12-13 01:18:45 +0900 (Tue, 13 Dec 2016) | 5 lines

get rid of a test failure with VC10.

* numeric.c (round_half_up, round_half_down): use `round` always because it's
  defined in this file even if doesn't exist.

------------------------------------------------------------------------
r57067 | svn | 2016-12-13 00:24:29 +0900 (Tue, 13 Dec 2016) | 1 line

* 2016-12-13
------------------------------------------------------------------------
r57066 | naruse | 2016-12-13 00:24:28 +0900 (Tue, 13 Dec 2016) | 4 lines

Use URI.decode_www_form_component [Bug #10774]

`parser` refered RFC2396_Parser, but it is separated.
test is contributed by Dominik Menke
------------------------------------------------------------------------
r57065 | naruse | 2016-12-12 23:55:15 +0900 (Mon, 12 Dec 2016) | 4 lines

st: Add 'static const'

patched by Ken Takata [ruby-core:78558]
https://github.com/k-takata/Onigmo/commit/44e3c0a16da1116be641ea807c1202434b743ace
------------------------------------------------------------------------
r57062 | naruse | 2016-12-12 22:37:27 +0900 (Mon, 12 Dec 2016) | 1 line

fix command
------------------------------------------------------------------------
r57060 | naruse | 2016-12-12 22:20:00 +0900 (Mon, 12 Dec 2016) | 3 lines

Use 7z if exist

7z can compress with higher ratio than gzip/zip.
------------------------------------------------------------------------
r57059 | kazu | 2016-12-12 22:12:08 +0900 (Mon, 12 Dec 2016) | 1 line

NEWS: Add String#match? and Symbol#match? [ci skip]
------------------------------------------------------------------------
r57058 | kazu | 2016-12-12 22:12:06 +0900 (Mon, 12 Dec 2016) | 1 line

NEWS: Use spaces instead of tab [ci skip]
------------------------------------------------------------------------
r57057 | kazu | 2016-12-12 22:12:05 +0900 (Mon, 12 Dec 2016) | 1 line

NEWS: Sort entries [ci skip]
------------------------------------------------------------------------
r57056 | nobu | 2016-12-12 16:12:07 +0900 (Mon, 12 Dec 2016) | 4 lines

string.c: fix method name in rdoc [ci skip]

* string.c (rb_str_equal): [DOC] fix fallback method name. the
  peer's == method will be used, not ===.
------------------------------------------------------------------------
r57055 | nobu | 2016-12-12 12:19:52 +0900 (Mon, 12 Dec 2016) | 1 line

test for Symbol#match?  [Feature #12898]
------------------------------------------------------------------------
r57054 | nobu | 2016-12-12 12:07:47 +0900 (Mon, 12 Dec 2016) | 4 lines

test_m17n.rb: escape

* test/ruby/test_m17n.rb (test_regexp_ascii_none): escape regexp
  meta characters.
------------------------------------------------------------------------
r57053 | nobu | 2016-12-12 11:56:12 +0900 (Mon, 12 Dec 2016) | 5 lines

String#match? and Symbol#match?

* string.c (rb_str_match_m_p): inverse of Regexp#match?.  based on
  the patch by Herwin Weststrate <herwin@snt.utwente.nl>.
  [Fix GH-1483] [Feature #12898]
------------------------------------------------------------------------
r57052 | svn | 2016-12-12 11:38:54 +0900 (Mon, 12 Dec 2016) | 1 line

* 2016-12-12
------------------------------------------------------------------------
r57051 | nobu | 2016-12-12 11:38:53 +0900 (Mon, 12 Dec 2016) | 4 lines

re.c: char boundary

* re.c (rb_reg_match_m_p): consider char boundary.  rb_str_subpos
  does not adjust to the boundary if len == 0.
------------------------------------------------------------------------
r57050 | nobu | 2016-12-11 18:20:27 +0900 (Sun, 11 Dec 2016) | 4 lines

parse.y: zero codepoints

* parse.y (parser_tokadd_utf8): relax restriction to allow zero or
  more codepoints.
------------------------------------------------------------------------
r57049 | naruse | 2016-12-11 15:13:02 +0900 (Sun, 11 Dec 2016) | 1 line

fix Zlib.gzip/gunzip document
------------------------------------------------------------------------
r57048 | naruse | 2016-12-11 03:34:07 +0900 (Sun, 11 Dec 2016) | 7 lines

Updated documentation examples for Hash#value?

The same code is used for has_value? and value?, but according to
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/43765
has_value is deprecated. Use the non-deprecated syntax in the examples.
by Herwin Weststrate <herwin@snt.utwente.nl>
fix https://github.com/ruby/ruby/pull/1491
------------------------------------------------------------------------
r57047 | naruse | 2016-12-11 03:23:33 +0900 (Sun, 11 Dec 2016) | 7 lines

Add missing :nodoc: comment

We were missing a `:nodoc:` magic comment that was making automated tools show
that this method was missing documentation, when it really didn't need to be
documented.
by Devon Estes <devon.c.estes@gmail.com>
https://github.com/ruby/ruby/pull/1482 fix GH-1482
------------------------------------------------------------------------
r57046 | svn | 2016-12-11 02:47:06 +0900 (Sun, 11 Dec 2016) | 1 line

* 2016-12-11
------------------------------------------------------------------------
r57045 | naruse | 2016-12-11 02:47:04 +0900 (Sun, 11 Dec 2016) | 8 lines

Merge Onigmo 6.0.0

* https://github.com/k-takata/Onigmo/blob/Onigmo-6.0.0/HISTORY
* fix for ruby 2.4: https://github.com/k-takata/Onigmo/pull/78
* suppress warning: https://github.com/k-takata/Onigmo/pull/79
* include/ruby/oniguruma.h: include onigmo.h.
* template/encdb.h.tmpl: ignore duplicated definition of EUC-CN in
  enc/euc_kr.c. It is defined in enc/gb2313.c with CRuby macro.
------------------------------------------------------------------------
r57044 | mrkn | 2016-12-10 17:56:05 +0900 (Sat, 10 Dec 2016) | 5 lines

bigdecimal: version 1.3.0.pre.2

Import bigdecimal version 1.3.0.pre.2.  The full commit log is here:

  https://github.com/ruby/bigdecimal/compare/v1.3.0.pre...v1.3.0.pre.2
------------------------------------------------------------------------
r57043 | nobu | 2016-12-10 17:54:40 +0900 (Sat, 10 Dec 2016) | 4 lines

stringio.c: chomp CR

* ext/stringio/stringio.c (strio_getline): chomp CR not only LF,
  as well as String#chomp.
------------------------------------------------------------------------
r57042 | nobu | 2016-12-10 17:26:40 +0900 (Sat, 10 Dec 2016) | 5 lines

zlib.c: replace with substring

* ext/zlib/zlib.c (zstream_discard_input): replace with unread
  portion substring, not modifying the input buffer directly.
  [ruby-core:78567] [Bug #13021]
------------------------------------------------------------------------
r57041 | rhe | 2016-12-10 17:12:02 +0900 (Sat, 10 Dec 2016) | 9 lines

openssl: import v2.0.1

Import Ruby/OpenSSL 2.0.1. The full commit history since 2.0.0 (imported
at r56946) can be found at:

  https://github.com/ruby/openssl/compare/v2.0.0...v2.0.1

This release contains only bug fixes. Note, the first two commits since
v2.0.0 are already imported at r56953 to make Travis and RubyCI green.
------------------------------------------------------------------------
r57040 | mrkn | 2016-12-10 16:49:15 +0900 (Sat, 10 Dec 2016) | 6 lines

bigdecimal: import version 1.3.0.pre

Import bigdecimal version 1.3.0.pre.  The full commit log of this
changes can be found at:

    https://github.com/ruby/bigdecimal/compare/5c43a9e...v1.3.0.pre
------------------------------------------------------------------------
r57039 | nobu | 2016-12-10 15:25:26 +0900 (Sat, 10 Dec 2016) | 1 line

Fix grammer [ci skip]
------------------------------------------------------------------------
r57038 | mrkn | 2016-12-10 11:36:16 +0900 (Sat, 10 Dec 2016) | 10 lines

internal.h: change the default rounding mode to half-up

* internal.h (ROUND_DEFAULT): changed to RUBY_NUM_ROUND_HALF_UP.
  [Bug #12958] [ruby-core:78204]

* test/ruby/test_integer.rb: fix assertions for the above change.

* test/ruby/test_rational.rb: ditto.

* test/test_mathn.rb: ditto.
------------------------------------------------------------------------
r57037 | kazu | 2016-12-10 11:16:55 +0900 (Sat, 10 Dec 2016) | 5 lines

Fix document of gunzip and gzip [ci skip]

- fix a typo (`GzipReadr` -> `GzipReader`)
- `Zlib::GzipReader.new` does not take block
- fix encoding
------------------------------------------------------------------------
r57036 | svn | 2016-12-10 07:45:39 +0900 (Sat, 10 Dec 2016) | 1 line

* 2016-12-10
------------------------------------------------------------------------
r57035 | naruse | 2016-12-10 07:45:39 +0900 (Sat, 10 Dec 2016) | 3 lines

Zlib.gzip and Zlib.gunzip [Feature #13020]

Encode and Decode gzip data without creating files.
------------------------------------------------------------------------
r57034 | naruse | 2016-12-10 07:45:38 +0900 (Sat, 10 Dec 2016) | 4 lines

Suppress warning: this use of "defined" may not be portable

Use of defined() in macro expansion is considered non portable.
https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01577.html
------------------------------------------------------------------------
r57033 | nobu | 2016-12-09 12:25:20 +0900 (Fri, 09 Dec 2016) | 4 lines

ruby.h: add prefix

* include/ruby/ruby.h (RB_TEST, RB_NIL_P): prefix RB to get rid of
  name conflicts with other headers.
------------------------------------------------------------------------
r57032 | nobu | 2016-12-09 11:59:55 +0900 (Fri, 09 Dec 2016) | 1 line

Adjust indent [ci skip]
------------------------------------------------------------------------
r57031 | svn | 2016-12-09 11:57:58 +0900 (Fri, 09 Dec 2016) | 1 line

* 2016-12-09
------------------------------------------------------------------------
r57030 | nobu | 2016-12-09 11:57:57 +0900 (Fri, 09 Dec 2016) | 6 lines

remove core#hash_merge_ary

* compile.c (compile_array_): remove m_core_hash_merge_ary which
  seems unreachable, and wrong number of arguments.

* vm.c (m_core_hash_merge_ary): removed because it is never used.
------------------------------------------------------------------------
r57029 | nobu | 2016-12-08 22:51:34 +0900 (Thu, 08 Dec 2016) | 4 lines

compile.c: static_literal_value

* compile.c (static_literal_value): separate getter from predicate
  function.
------------------------------------------------------------------------
r57028 | kazu | 2016-12-08 21:58:26 +0900 (Thu, 08 Dec 2016) | 10 lines

extension.rdoc: add ANYARGS to method definitions

* doc/extension.rdoc (rb_define_method, rb_define_singleton_method,
  rb_define_private_method, rb_define_protected_method,
  rb_define_module_function, rb_define_global_function): set ANYARGS
  as arguments to their underlying functions.

[ci skip]
Patch by: Dmitry Gritsay <unseductable@gmail.com>
[Fix GH-1473]
------------------------------------------------------------------------
r57027 | nobu | 2016-12-08 17:31:01 +0900 (Thu, 08 Dec 2016) | 5 lines

ruby-lex.rb: fix for label

* lib/irb/ruby-lex.rb (identify_identifier): treat identifier just
  followed by a colon as a lable.  this is not a precise solution
  but enough for the time being.  [ruby-core:78526] [Bug #13012]
------------------------------------------------------------------------
r57026 | nobu | 2016-12-08 17:25:21 +0900 (Thu, 08 Dec 2016) | 4 lines

test/unit.rb: fix -n option

* test/lib/test/unit.rb (non_options): turn name patterns into
  Regexps.
------------------------------------------------------------------------
r57025 | nobu | 2016-12-08 16:54:58 +0900 (Thu, 08 Dec 2016) | 5 lines

compile.c: optimize literal nodes

* compile.c (static_literal_node_p): optimize literal nodes for
  true, false, and nil, which are static literals in specific
  nodes but not in NODE_LIT.
------------------------------------------------------------------------
r57024 | nobu | 2016-12-08 15:19:06 +0900 (Thu, 08 Dec 2016) | 4 lines

vm.c: check type of hash to merge

* vm.c (core_hash_merge): check the type of the target hash to
  merge.  [ruby-core:78536] [Bug #13015]
------------------------------------------------------------------------
r57023 | nobu | 2016-12-08 14:16:33 +0900 (Thu, 08 Dec 2016) | 4 lines

vm_insnhelper.c: zsuper in refinements

* vm_insnhelper.c (vm_call_zsuper): prevent infinite recursion
  zsuper in refinements.  [ruby-core:77161] [Bug #12729]
------------------------------------------------------------------------
r57022 | nobu | 2016-12-08 09:45:13 +0900 (Thu, 08 Dec 2016) | 4 lines

parse.y: ripper generic input

* parse.y (ripper_initialize): allow generic input as source, if
  it has #gets method.
------------------------------------------------------------------------
r57021 | shugo | 2016-12-08 08:47:59 +0900 (Thu, 08 Dec 2016) | 12 lines

Add volatile to a suppress warning.

Without the fix, the following warning is shown:

    compiling cont.c
    cont.c: In function ?rb_callcc?:
    cont.c:949:39: warning: passing argument 1 of ?cont_capture? discards ?volatile? qualifier from pointer target type [-Wdiscarded-qualifiers]
	 volatile VALUE val = cont_capture(&called);
					   ^
    cont.c:473:1: note: expected ?int * volatile? but argument is of type ?volatile int *?
     cont_capture(int *volatile stat)
     ^
------------------------------------------------------------------------
r57020 | shugo | 2016-12-08 08:27:51 +0900 (Thu, 08 Dec 2016) | 5 lines

Add clang volatile fixes from FreeBSD and NetBSD.

Use volatile instead of optnone to avoid optimization which causes
segmentation faults.
Patch by Dimitry Andric.  [ruby-core:78531] [Bug #13014]
------------------------------------------------------------------------
r57019 | svn | 2016-12-08 00:30:02 +0900 (Thu, 08 Dec 2016) | 1 line

* 2016-12-08
------------------------------------------------------------------------
r57018 | kazu | 2016-12-08 00:30:01 +0900 (Thu, 08 Dec 2016) | 9 lines

fix typo in `IO#write_nonblock` example [ci skip]

This example explains when writing a value greater than 65536,
so the value specify must be greater than 65536.

This seems to be wrong in cee7f69

Patch by: Yuji Yaginuma <yuuji.yaginuma@gmail.com>
[Fix GH-1496]
------------------------------------------------------------------------
r57017 | nobu | 2016-12-07 23:39:24 +0900 (Wed, 07 Dec 2016) | 4 lines

ruby.c: dump option

* ruby.c (process_options): dump specified informations all, not
  only first one.
------------------------------------------------------------------------
r57016 | nobu | 2016-12-07 23:26:44 +0900 (Wed, 07 Dec 2016) | 4 lines

assertions.rb: defered message in FailDesc

* test/lib/test/unit/assertions.rb (FailDesc): allow to defer
  message generation, as well as other assertion methods.
------------------------------------------------------------------------
r57015 | svn | 2016-12-07 21:59:49 +0900 (Wed, 07 Dec 2016) | 1 line

* properties.
------------------------------------------------------------------------
r57014 | shugo | 2016-12-07 21:59:48 +0900 (Wed, 07 Dec 2016) | 5 lines

Delay Utils.getservername until needed.

There is no need to call Utils.getservername when the :ServerName option is
specified, so delay Utils.getservername until needed to avoid unnecessary
DNS lookups.  [ruby-core:78492] [Bug #13007]
------------------------------------------------------------------------
r57013 | nobu | 2016-12-07 17:44:34 +0900 (Wed, 07 Dec 2016) | 6 lines

compile.c: remove dead code

* compile.c (DECL_ANCHOR, INIT_ANCHOR): make anchor name an array
  and unassignable.

* compile.c (iseq_compile_each): ret is never 0.
------------------------------------------------------------------------
r57012 | nobu | 2016-12-07 13:25:50 +0900 (Wed, 07 Dec 2016) | 4 lines

hash.c: hash should be long

* hash.c (any_hash): should return `long', because ruby assumes
  the hash value of the object id of an object is `long'.
------------------------------------------------------------------------
r57011 | nobu | 2016-12-07 12:19:33 +0900 (Wed, 07 Dec 2016) | 4 lines

win32.c: suppress warning

* win32/win32.c (rb_w32_home_dir): suppress sequence-point
  warning, REALLOC_N re-assigns the variable.
------------------------------------------------------------------------
r57010 | shugo | 2016-12-07 11:41:00 +0900 (Wed, 07 Dec 2016) | 3 lines

Extend timeout for Solaris unstable10s.

http://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20161206T181910Z.fail.html.gz
------------------------------------------------------------------------
r57009 | nobu | 2016-12-07 11:19:29 +0900 (Wed, 07 Dec 2016) | 4 lines

file.c: cygwin behavior

* file.c: recent cygwin hides NTFS specific features.
  [ruby-core:78497] [Bug #13008]
------------------------------------------------------------------------
r57008 | svn | 2016-12-07 11:03:41 +0900 (Wed, 07 Dec 2016) | 1 line

* 2016-12-07
------------------------------------------------------------------------
r57007 | usa | 2016-12-07 11:03:40 +0900 (Wed, 07 Dec 2016) | 4 lines

const pointer is not able to be free.

* win32/file.c (rb_default_home_dir): should not be marked as const.

------------------------------------------------------------------------
r57006 | kazu | 2016-12-07 00:33:49 +0900 (Wed, 07 Dec 2016) | 4 lines

untabify [ci skip]

based on the patch by W <wolf@wolfsden.cz>
[Fix GH-1497]
------------------------------------------------------------------------
r57005 | kazu | 2016-12-07 00:33:47 +0900 (Wed, 07 Dec 2016) | 1 line

Fix indent [ci skip]
------------------------------------------------------------------------
r57004 | svn | 2016-12-06 22:57:57 +0900 (Tue, 06 Dec 2016) | 1 line

* properties.
------------------------------------------------------------------------
r57003 | kou | 2016-12-06 22:57:56 +0900 (Tue, 06 Dec 2016) | 2 lines

rexml: REXML::Element#[] accepts String or Symbol as attribute name

------------------------------------------------------------------------
r57002 | nobu | 2016-12-06 22:57:23 +0900 (Tue, 06 Dec 2016) | 6 lines

Make `trace_running` an integer flag again

* vm_core.h (rb_vm_struct): trace_running should be a counter but
  not a bit flag.  [ruby-core:78514] [Bug #13011]

Author: David Rodr?guez <deivid.rodriguez@gmail.com>
------------------------------------------------------------------------
r57001 | mrkn | 2016-12-06 22:40:31 +0900 (Tue, 06 Dec 2016) | 9 lines

array.c, enum.c: change sum algorithm

* array.c (rb_ary_sum): change the algorithm to Kahan-Babuska balancing
  summation to be more precise.
  [Feature #12871] [ruby-core:77771]

* enum.c (sum_iter, enum_sum): ditto.

* test_array.rb, test_enum.rb: add an assertion for the above change.
------------------------------------------------------------------------
r57000 | mrkn | 2016-12-06 21:54:19 +0900 (Tue, 06 Dec 2016) | 6 lines

numeric.c: fix exception message for nil rounding

* numeric.c (rb_num_get_rounding_option): fix exception message
  for the case of nil rounding mode.

* test_float.rb: add an assertion for the above change.
------------------------------------------------------------------------
r56999 | kazu | 2016-12-06 21:49:46 +0900 (Tue, 06 Dec 2016) | 4 lines

Fix typos

Patch by: Koichi ITO <koic.ito@gmail.com>
[Fix GH-1498]
------------------------------------------------------------------------
r56998 | hsbt | 2016-12-06 20:57:19 +0900 (Tue, 06 Dec 2016) | 4 lines

Update latest bundled gems.

  * Rake 12.0.0
  * minitest 5.10.1
------------------------------------------------------------------------
r56997 | nobu | 2016-12-06 16:46:14 +0900 (Tue, 06 Dec 2016) | 4 lines

EPERM by symlink

* test/ruby/test_file.rb (test_realpath_encoding): EPERM can raise
  on cygwin.
------------------------------------------------------------------------
r56996 | nobu | 2016-12-06 16:21:55 +0900 (Tue, 06 Dec 2016) | 4 lines

file.c: isADS

* file.c (isADS): add macro to tell if Alternate Data Stream
  separator, to distinguish from drive letter.
------------------------------------------------------------------------
r56995 | nobu | 2016-12-06 15:16:57 +0900 (Tue, 06 Dec 2016) | 4 lines

EPERM by symlink

* test/ruby/test_file_exhaustive.rb (symlinkfile): EPERM can raise
  on cygwin.
------------------------------------------------------------------------
r56994 | rhe | 2016-12-06 15:14:17 +0900 (Tue, 06 Dec 2016) | 5 lines

re.c: check that MatchData is initialized

Follow r16757 ("* re.c: fix SEGV by Regexp.allocate.names,
Match.allocate.names, etc.", 2008-06-02). Don't do null dereference if
MatchData#hash or #== is called against an uninitialized instance.
------------------------------------------------------------------------
r56993 | rhe | 2016-12-06 15:14:16 +0900 (Tue, 06 Dec 2016) | 4 lines

test/ruby/test_hash.rb: suppress syntax warning

Avoid "ambiguous first argument; put parentheses or a space even after
`-' operator" warning in assert_in_out_err. Fixes r56992.
------------------------------------------------------------------------
r56992 | nobu | 2016-12-06 13:43:48 +0900 (Tue, 06 Dec 2016) | 23 lines

switching hash removal

* st.h (struct st_hash_type): Remove strong_hash.
  (struct st_table): Remove inside_rebuild_p and curr_hash.
* st.c (do_hash): Use type->hash instead of curr_hash.
  (make_tab_empty): Remove setting up curr_hash.
  (st_init_table_with_size): Remove setting up inside_rebuild_p.
  (rebuild_table): Remove clearing inside_rebuild_p.
  (reset_entry_hashes, HIT_THRESHOULD_FOR_STRONG_HASH): Remove code
  recognizing a denial attack and switching to strong hash.
* hash.c (rb_dbl_long_hash, rb_objid_hash, rb_ident_hash): Use
  rb_hash_start to randomize the hash.
  (str_seed): Remove.
  (any_hash): Remove strong_p and use always rb_str_hash for
  strings.
  (any_hash_weak, rb_any_hash_weak): Remove.
  (st_hash_type objhash): Remove rb_any_hash_weak.

based on the patch by Vladimir N Makarov <vmakarov@redhat.com> at
[ruby-core:78490].  [Bug #13002]

* test/ruby/test_hash.rb (test_wrapper): objects other than special
  constants should be able to be wrapped.
------------------------------------------------------------------------
r56991 | nobu | 2016-12-06 12:36:52 +0900 (Tue, 06 Dec 2016) | 5 lines

remove unnecessary variable

* st.c (do_hash): remove unnecessary variable and cast.

* hash.c, numeric.c, st.c: adjust style and indent.
------------------------------------------------------------------------
r56990 | nobu | 2016-12-06 12:25:21 +0900 (Tue, 06 Dec 2016) | 4 lines

random.c: pack hash seeds

* random.c (seed_keys_t, init_seed): pack seed for rb_hash_start and
  rb_memhash, and fill them at once.
------------------------------------------------------------------------
r56989 | svn | 2016-12-06 08:37:25 +0900 (Tue, 06 Dec 2016) | 1 line

* 2016-12-06
------------------------------------------------------------------------
r56988 | shugo | 2016-12-06 08:37:25 +0900 (Tue, 06 Dec 2016) | 1 line

Add a comment.
------------------------------------------------------------------------
r56987 | kazu | 2016-12-05 21:35:03 +0900 (Mon, 05 Dec 2016) | 1 line

Remove closed checks and use `&.`
------------------------------------------------------------------------
r56986 | kazu | 2016-12-05 21:35:02 +0900 (Mon, 05 Dec 2016) | 1 line

NEWS: mention chomp option of String and StringIO
------------------------------------------------------------------------
r56985 | shugo | 2016-12-05 20:10:05 +0900 (Mon, 05 Dec 2016) | 5 lines

Don't insert an entry to loading_tbl if another thread succeed to load.

If rb_thread_shield_wait() returns Qfalse, the file has been successfully
loaded by another thread, so there is no need to insert a new entry into
loading_tbl.  [ruby-core:78464] [Bug #12999]
------------------------------------------------------------------------
r56984 | nobu | 2016-12-05 09:03:45 +0900 (Mon, 05 Dec 2016) | 4 lines

random.c: private rand

* random.c (rb_random_ulong_limited): do not call private method
  rand.  [ruby-dev:49892] [Misc #13003]
------------------------------------------------------------------------
r56983 | svn | 2016-12-05 08:14:47 +0900 (Mon, 05 Dec 2016) | 1 line

* 2016-12-05
------------------------------------------------------------------------
r56982 | naruse | 2016-12-05 08:14:46 +0900 (Mon, 05 Dec 2016) | 4 lines

Increase timeout of TestRequire#test_require_with_loaded_features_pop

unstable10s fails it because of timeout
http://rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20161201T161908Z.fail.html.gz
------------------------------------------------------------------------
r56981 | nobu | 2016-12-04 17:50:29 +0900 (Sun, 04 Dec 2016) | 5 lines

class.c: missing unknown_keyword_error

* class.c (rb_get_kwargs): when values are stored, corresponding
  keys have been remove from the keyword hash, and the hash should
  be empty in that case.  [ruby-dev:49893] [Bug #13004]
------------------------------------------------------------------------
r56980 | nobu | 2016-12-04 17:50:28 +0900 (Sun, 04 Dec 2016) | 5 lines

extension.rdoc: fix rb_get_kwargs [ci skip]

* doc/extension.rdoc: [DOC] optional keyword arguments are
  defaulted to Qundef.  ignored keys are kept in the hash but a
  new Hash is not created.  [ruby-dev:49893] [Bug #13004]
------------------------------------------------------------------------
r56979 | ktsj | 2016-12-04 14:40:18 +0900 (Sun, 04 Dec 2016) | 4 lines

Revert changes on rb_frame_method_id_and_class()

r56593 introduced backwards incompatible changes in the API.
[ruby-core:78471] [Feature #12747]
------------------------------------------------------------------------
r56978 | shugo | 2016-12-04 14:05:54 +0900 (Sun, 04 Dec 2016) | 1 line

Specify the socktype explicitly.
------------------------------------------------------------------------
r56977 | shugo | 2016-12-04 13:53:33 +0900 (Sun, 04 Dec 2016) | 1 line

Use 127.0.0.1 if getaddrinfo fails.
------------------------------------------------------------------------
r56976 | duerst | 2016-12-04 10:58:54 +0900 (Sun, 04 Dec 2016) | 10 lines

remove special processing for U+03B9/U+03BC/U+A64B

* enc/unicode.c: Remove special processing for U+03B9/U+03BC/U+A64B
  (GREEK SMALL LETTERs IOTA/MU, CYRILLIC SMALL LETTER MONOGRAPH UK)
  from onigenc_unicode_case_map and simplify code.

* enc/unicode/case-folding.rb: Remove check for U+03B9/U+03BC/U+A64B.

This and the previous few related commits make sure that we won't hit
the equivalent of bug #12990 anymore for future updates of Unicode versions.
------------------------------------------------------------------------
r56975 | duerst | 2016-12-04 10:17:34 +0900 (Sun, 04 Dec 2016) | 6 lines

Reorder codepoints in some entries of CaseUnfold_11_Table

* enc/unicode/case-folding.rb: Reorder codepoints so that the upper-case
  mapping comes first.
* enc/unicode/9.0.0/casefold.h: Codepoints reordered, upper-case mapping
  flag added.
------------------------------------------------------------------------
r56974 | svn | 2016-12-04 00:41:15 +0900 (Sun, 04 Dec 2016) | 1 line

* 2016-12-04
------------------------------------------------------------------------
r56973 | shugo | 2016-12-04 00:41:14 +0900 (Sun, 04 Dec 2016) | 3 lines

Use IPv6 if it's preferred.

I hope this fix makes tests faster on Windows.
------------------------------------------------------------------------
r56972 | nobu | 2016-12-03 23:18:03 +0900 (Sat, 03 Dec 2016) | 3 lines

string.c: chomp option

* string.c (rb_str_enumerate_lines): implement chomp option.
------------------------------------------------------------------------
r56971 | kazu | 2016-12-03 20:18:44 +0900 (Sat, 03 Dec 2016) | 8 lines

Cleanup ruby method definitions in hash.c

Always add a space between a comma and the next element. These spaces
were there sometimes, but not always. This keeps to code consistent.

Patch by: Herwin Weststrate <herwin@snt.utwente.nl>

[ruby-core:78297] [Misc #12977] [GH-1492]
------------------------------------------------------------------------
r56970 | nobu | 2016-12-03 20:01:25 +0900 (Sat, 03 Dec 2016) | 3 lines

stringio: chomp option

* ext/stringio/stringio.c (strio_getline): implement chomp option.
------------------------------------------------------------------------
r56969 | nobu | 2016-12-03 20:01:24 +0900 (Sat, 03 Dec 2016) | 4 lines

test_stringio.rb: paragraph mode

* test/stringio/test_stringio.rb (test_gets, test_each):
  assertions for paragraph mode.
------------------------------------------------------------------------
r56968 | duerst | 2016-12-03 16:18:41 +0900 (Sat, 03 Dec 2016) | 5 lines

add tests againts regressions for upcoming codepoint reordering in unfolding table

* test/ruby/enc/test_case_mapping.rb: Add method test_reorder_unfold to test against
  problems when reordering codepoints in some entries in
  CaseUnfold_11_Type CaseUnfold_11_Table.
------------------------------------------------------------------------
r56967 | svn | 2016-12-03 14:09:10 +0900 (Sat, 03 Dec 2016) | 1 line

* 2016-12-03
------------------------------------------------------------------------
r56966 | duerst | 2016-12-03 14:09:09 +0900 (Sat, 03 Dec 2016) | 5 lines

change test class name because it is not only about folding

* test/ruby/enc/test_case_comprehensive.rb: Change test class name from
  TestComprehensiveCaseFold to TestComprehensiveCaseMapping because the
  tests are about mapping in general, not only folding
------------------------------------------------------------------------
r56965 | nobu | 2016-12-02 15:12:56 +0900 (Fri, 02 Dec 2016) | 1 line

test/ruby/test_string.rb: ensure restoring $/
------------------------------------------------------------------------
r56964 | nobu | 2016-12-02 12:33:54 +0900 (Fri, 02 Dec 2016) | 4 lines

parse.y: simplify parsing utf-8 string

* parse.y (parser_tokadd_codepoint): move error checks and add
  char.
------------------------------------------------------------------------
r56963 | nobu | 2016-12-02 11:47:11 +0900 (Fri, 02 Dec 2016) | 4 lines

parse.y: relax spaces

* parse.y (parser_tokadd_utf8): relax restriction spaces inside
  "\u{...}".
------------------------------------------------------------------------
r56962 | rhe | 2016-12-02 11:24:45 +0900 (Fri, 02 Dec 2016) | 5 lines

re.c: count associated Regexp object in MatchData#hash

Don't discard the hash value computed for the regexp object. It seems it
was simply missed out in r24754, when MatchData#hash was initially
implemented.
------------------------------------------------------------------------
r56961 | svn | 2016-12-02 02:43:42 +0900 (Fri, 02 Dec 2016) | 1 line

* 2016-12-02
------------------------------------------------------------------------
r56960 | naruse | 2016-12-02 02:43:41 +0900 (Fri, 02 Dec 2016) | 1 line

Remove unused variable
------------------------------------------------------------------------
r56959 | naruse | 2016-12-01 23:18:32 +0900 (Thu, 01 Dec 2016) | 3 lines

String#unpack1 [Feature #12752]

Returns the first value of String#unpack.
------------------------------------------------------------------------
r56958 | usa | 2016-12-01 22:20:47 +0900 (Thu, 01 Dec 2016) | 4 lines

Remove `offset:` from `Array#pack`

* pack.c (pack_pack): can use `@` instead of `offset:`.

------------------------------------------------------------------------
r56957 | usa | 2016-12-01 22:08:20 +0900 (Thu, 01 Dec 2016) | 5 lines

Supports `buffer` and `offset` in `Array#pack`

* pack.c (pack_pack): Supports `buffer` and `offset` in `Array#pack`.
  [Feature #12754] [ruby-dev:49798]

------------------------------------------------------------------------
r56956 | nobu | 2016-12-01 17:26:39 +0900 (Thu, 01 Dec 2016) | 4 lines

parse.y: reject invalid codepoint

* parse.y (parser_tokadd_codepoint): reject invalid codepoint,
  surrogate blocks and surrogate pair, as well as mruby.
------------------------------------------------------------------------
r56955 | hsbt | 2016-12-01 14:24:00 +0900 (Thu, 01 Dec 2016) | 4 lines

Update bundled_gems

  * minitest-5.10.0
  * test-unit-3.2.3
------------------------------------------------------------------------
r56954 | shugo | 2016-12-01 13:51:42 +0900 (Thu, 01 Dec 2016) | 10 lines

Wait until excpetion handling is ready.

Because RubyCI on Solaris 10 failed as follows:

    1) Failure:
  TestProcess#test_execopts_redirect_open_fifo_interrupt_raise [/export/home/rubyci/unstable10s/tmp/build/20161130T201909Z/ruby/test/ruby/test_process.rb:646]:
  <"ok\n"> expected but was
  <"">.

The argument of sleep (0.5) can be smaller, but I'm not sure.
------------------------------------------------------------------------
r56953 | rhe | 2016-12-01 13:42:10 +0900 (Thu, 01 Dec 2016) | 27 lines

openssl: import fixes from upstream

Import the following two commits from upstream:

  commit 72126d6c8b88abd69c3565fc3bbbd5ed1e401611
  Author: Kazuki Yamaguchi <k@rhe.jp>
  Date:   Thu Dec 1 22:27:03 2016 +0900

      pkey: check existence of EVP_PKEY_get0()

      EVP_PKEY_get0() did not exist in early OpenSSL 0.9.8 series. So define
      ourselves if needed.

  commit 94a1c4e0c5705ad1e9a4ca08cacaa6cba8b1e6f5
  Author: Kazuki Yamaguchi <k@rhe.jp>
  Date:   Thu Dec 1 22:13:22 2016 +0900

      test/test_cipher: fix test with OpenSSL 1.0.1 before 1.0.1d

      Set the authentication tag before the AAD when decrypting.

      Before OpenSSL commit 96f7fafa2431 ("Don't require tag before ciphertext
      in AESGCM mode", 2012-10-16, at OpenSSL_1_0_1-stable branch, included in
      OpenSSL 1.0.1d), the authentication tag must be set before any calls of
      EVP_CipherUpdate().

They should fix build on CentOS 5 and Ubuntu 12.04 respectively.
------------------------------------------------------------------------
r56952 | nobu | 2016-12-01 09:34:42 +0900 (Thu, 01 Dec 2016) | 1 line

Use offsetof macro and shrink table size
------------------------------------------------------------------------
r56951 | nobu | 2016-12-01 09:34:41 +0900 (Thu, 01 Dec 2016) | 1 line

constify CaseMappingSpecials
------------------------------------------------------------------------
r56950 | svn | 2016-12-01 02:29:20 +0900 (Thu, 01 Dec 2016) | 1 line

* 2016-12-01
------------------------------------------------------------------------
r56949 | naruse | 2016-12-01 02:29:19 +0900 (Thu, 01 Dec 2016) | 22 lines

Regexp supports Unicoe 9.0.0's \X

* meta character \X matches Unicode 9.0.0 characters with some workarounds
  for UTR #51 Unicode Emoji, Version 4.0 emoji zwj sequences.
  [Feature #12831] [ruby-core:77586]

The term "character" can have many meanings bytes, codepoints, combined
characters, and so on. "grapheme cluster" is highest one of such words,
which means user-perceived characters.
Unicode Standard Annex #29 UNICODE TEXT SEGMENTATION specifies how to
handle grapheme clusters (extended grapheme cluster).
But some specs aren't updated to current situation because Unicode Emoji
is rapidly extended without well definition.
It breaks the precondition of UTR#29 "Grapheme cluster boundaries can be
easily tested by looking at immediately adjacent characters". (the
sentence will be removed in the next version)
Though some of its detail are described in Unicode Technical Report #51
UNICODE EMOJI but it is not merged into UTR#29 yet.

http://unicode.org/reports/tr29/
http://unicode.org/reports/tr51/
http://unicode.org/Public/emoji/4.0/
------------------------------------------------------------------------
r56948 | nobu | 2016-11-30 23:54:09 +0900 (Wed, 30 Nov 2016) | 4 lines

ossl.c: cast

* ext/openssl/ossl.c (ossl_pem_passwd_cb): cast to int.  it's safe
  because len does not exceed int max_len.
------------------------------------------------------------------------
r56947 | nobu | 2016-11-30 23:43:43 +0900 (Wed, 30 Nov 2016) | 4 lines

parse.y: refine error message

* parse.y (parser_tokadd_utf8): refine error message at bad char
  in unicode escape, "invalid" instead of "unterminated".
------------------------------------------------------------------------
r56946 | rhe | 2016-11-30 23:41:46 +0900 (Wed, 30 Nov 2016) | 6 lines

openssl: import v2.0.0

Import Ruby/OpenSSL 2.0.0. The full commit history since 2.0.0 beta.2
(imported at r56098) can be found at:

  https://github.com/ruby/openssl/compare/v2.0.0.beta.2...v2.0.0
------------------------------------------------------------------------
r56945 | hsbt | 2016-11-30 23:24:12 +0900 (Wed, 30 Nov 2016) | 3 lines

Fixed error with `make install`

  rbinstall.rb couldn't load "psych/versions".
------------------------------------------------------------------------
r56944 | hsbt | 2016-11-30 22:55:02 +0900 (Wed, 30 Nov 2016) | 6 lines

Update psych-2.2.1

  It fixed segmentation fault related with GC.
  https://github.com/ruby/psych/pull/296

  and removed deprecated code of Ruby 1.8.
------------------------------------------------------------------------
r56943 | nobu | 2016-11-30 22:09:51 +0900 (Wed, 30 Nov 2016) | 4 lines

parse.y: parser_tokadd_codepoint

* parse.y (parser_tokadd_codepoint): extract from
  parser_tokadd_utf8.
------------------------------------------------------------------------
r56942 | nobu | 2016-11-30 22:09:50 +0900 (Wed, 30 Nov 2016) | 3 lines

parse.y: brace constants

* parse.y (parser_tokadd_utf8): make open/close braces constant.
------------------------------------------------------------------------
r56941 | duerst | 2016-11-30 17:25:46 +0900 (Wed, 30 Nov 2016) | 14 lines

fix uppercasing for U+A64B, CYRILLIC SMALL LETTER MONOGRAPH UK

* enc/unicode.c: Add U+A64B to the special cases 03B9 and 03BC
  at the end of onigenc_unicode_case_map (Bug #12990).

* enc/unicode/case-folding.rb: Add U+A64B to the special cases
  03B9 and 03BC. Add a comment pointing to enc/unicode.c.
  Change warnings to exceptions for unpredicted cases,
  because this would have been more easily noticed
  (the warning was not noticed when upgrading to Unicode 9.0.0).

* test/ruby/enc/test_case_comprehensive.rb: Remove temporary
  exclusion of U+A64B from testing.

------------------------------------------------------------------------
r56940 | nobu | 2016-11-30 10:40:11 +0900 (Wed, 30 Nov 2016) | 4 lines

parse.y: no warning for lambda

* parse.y (parser_yylex): do not warn parentheses of lambda
  argument list, because there is no name.
------------------------------------------------------------------------
r56939 | shugo | 2016-11-30 10:22:05 +0900 (Wed, 30 Nov 2016) | 1 line

Supress warnings.
------------------------------------------------------------------------
r56938 | tenderlove | 2016-11-30 02:06:35 +0900 (Wed, 30 Nov 2016) | 28 lines

Stop reading past the end of `ivptr` array

If you have code like this:

```ruby
class A
  def initialize
    @a = nil
    @b = nil
    @c = nil
    @d = nil
    @e = nil
  end
end

x = A.new
y = x.clone
100.times { |z| x.instance_variable_set(:"@foo#{z}", nil) }
puts y.inspect
```

`x` and `y` will share `iv_index_tbl` hashes.  However, the size of the
hash will grow larger than the number if entries in `ivptr` in `y`.
Before this commit, `rb_ivar_count` would use the size of the hash to
determine how far to read in to the array, but this means that it could
read past the end of the array and cause the program to segv

[ruby-core:78403]
------------------------------------------------------------------------
r56937 | nobu | 2016-11-30 01:06:54 +0900 (Wed, 30 Nov 2016) | 1 line

get rid of ambiguous parentheses warnings
------------------------------------------------------------------------
r56936 | rhe | 2016-11-30 00:48:47 +0900 (Wed, 30 Nov 2016) | 4 lines

webrick: don't use OpenSSL::TestUtils from webrick tests

Follow net/http and open-uri. Don't rely on the constants/methods from
OpenSSL::TestUtils.
------------------------------------------------------------------------
r56935 | rhe | 2016-11-30 00:48:46 +0900 (Wed, 30 Nov 2016) | 3 lines

open-uri: don't use OpenSSL::TestUtils from open-uri tests

Follow net/http. Define own test DH parameters and use.
------------------------------------------------------------------------
r56934 | rhe | 2016-11-30 00:48:45 +0900 (Wed, 30 Nov 2016) | 5 lines

net/http: don't use OpenSSL::TestUtils from test code

Make test code independent of test/openssl/utils.rb. The development of
openssl library has moved to a separate repository and
OpenSSL::TestUtils may be modified at any time.
------------------------------------------------------------------------
r56933 | nobu | 2016-11-30 00:34:31 +0900 (Wed, 30 Nov 2016) | 4 lines

object.c: no TypeError at special const

* object.c (special_object_p): no longer raise a TypeError for
  Integer and Float, and return itself instead.  [Feature#12979]
------------------------------------------------------------------------
r56932 | kazu | 2016-11-30 00:31:16 +0900 (Wed, 30 Nov 2016) | 3 lines

NEWS: Add String/Symbol#casecmp? [Feature #12786]

[ci skip]
------------------------------------------------------------------------
r56931 | usa | 2016-11-30 00:23:12 +0900 (Wed, 30 Nov 2016) | 4 lines

get rid of test failures on CI introduced at r56927

* lib/matrix.rb: now ruby warns ambiguous parentheses after a space in method definitions.

------------------------------------------------------------------------
r56930 | svn | 2016-11-30 00:14:06 +0900 (Wed, 30 Nov 2016) | 1 line

* 2016-11-30
------------------------------------------------------------------------
r56929 | nobu | 2016-11-30 00:14:05 +0900 (Wed, 30 Nov 2016) | 5 lines

object.c: no TypeError at special const clone

* object.c (rb_obj_clone2): no longer raise a TypeError for
  special constants, and return itself instead.  however, if
  freeze option is false, raise an ArgumentError.  [Feature#12979]
------------------------------------------------------------------------
r56928 | nobu | 2016-11-29 21:54:43 +0900 (Tue, 29 Nov 2016) | 8 lines

thread.c: fix doc of abort_on_exception [ci skip]

* thread.c (rb_thread_s_abort_exc, rb_thread_s_abort_exc_set):
  [DOC] the raised exception will be re-raised in the main thread,
  and then follows the ordinary exception sequence, exit status is
  not 0.  [ruby-core:78415] [Bug #12991]

* thread.c (rb_thread_abort_exc_set): ditto.
------------------------------------------------------------------------
r56927 | nobu | 2016-11-29 19:47:43 +0900 (Tue, 29 Nov 2016) | 4 lines

parse.y: ambiguous parentheses

* parse.y (parser_yylex): warn ambiguous parentheses after a space
  in method definitions.
------------------------------------------------------------------------
r56926 | duerst | 2016-11-29 19:45:54 +0900 (Tue, 29 Nov 2016) | 6 lines

Fix/improve documentation of String/Symbol#casecmp[?]

Fix documentation of String#casecmp? (examples didn't have the '?').
Add an example with non-ASCII characters. Clarify that casecmp,
unlike casecmp?, only does case-insensitivity on A-Z/a-z.
[ci skip]
------------------------------------------------------------------------
r56925 | shugo | 2016-11-29 17:44:21 +0900 (Tue, 29 Nov 2016) | 1 line

Suppress warnings.
------------------------------------------------------------------------
r56924 | duerst | 2016-11-29 17:39:57 +0900 (Tue, 29 Nov 2016) | 5 lines

Fix erroneous test of target against target

* test/ruby/enc/test_case_comprehensive.rb: fix test condition,
  add a temporary check for U+A64B, the only character where the tests
  currently fail. (Bug #12990)
------------------------------------------------------------------------
r56923 | shugo | 2016-11-29 17:31:39 +0900 (Tue, 29 Nov 2016) | 4 lines

Ignore SystemCallError in case it is raised by SSLSocket#accept.

Errno::ECONNRESET was raised by test_tls_post_connection_check and
test_tls_unknown_ca on mswin64 CI.
------------------------------------------------------------------------
r56922 | nobu | 2016-11-29 12:06:03 +0900 (Tue, 29 Nov 2016) | 4 lines

test_keyword.rb: more assertions

* test/ruby/test_keyword.rb (test_block_required_keyword): more
  assertions for positional and require keyword parameters.
------------------------------------------------------------------------
r56921 | nobu | 2016-11-29 12:06:02 +0900 (Tue, 29 Nov 2016) | 4 lines

test_keyword.rb: assert_raise_with_message value

* test/ruby/test_keyword.rb (test_block_required_keyword):
  assert_raise_with_message returns the raised exception object.
------------------------------------------------------------------------
r56920 | nobu | 2016-11-29 12:06:01 +0900 (Tue, 29 Nov 2016) | 4 lines

string.c: use xmalloc

* string.c (rb_str_casemap): use xmalloc simply instead of
  ALLOC_N.
------------------------------------------------------------------------
r56919 | shugo | 2016-11-29 11:47:11 +0900 (Tue, 29 Nov 2016) | 7 lines

net/ftp: add a new option ssl_handshake_timeout to Net::FTP.new.

The TLS handshake timeout can be specified independently, because the TLS
handshake doesn't start just after the underlying connection is established,
but after the AUTH command is completed.  It's also useful for testing
purposes.  However, if ssl_handshake_timeout is not specified, open_timeout
is used instead for convenience.
------------------------------------------------------------------------
r56918 | shugo | 2016-11-29 11:33:34 +0900 (Tue, 29 Nov 2016) | 3 lines

net/ftp: close the socket directly when an error occurs during TLS handshake.

Otherwise, @sock.read in Net::FTP#close hungs until read_timeout exceeded.
------------------------------------------------------------------------
r56917 | svn | 2016-11-29 11:21:51 +0900 (Tue, 29 Nov 2016) | 1 line

* 2016-11-29
------------------------------------------------------------------------
r56916 | shugo | 2016-11-29 11:21:50 +0900 (Tue, 29 Nov 2016) | 3 lines

net/ftp: close the connection if the TLS handshake timeout is exceeded.

Otherwise, file descriptor leaks may occur in Net::FTP.new.
------------------------------------------------------------------------
r56915 | nobu | 2016-11-28 22:16:00 +0900 (Mon, 28 Nov 2016) | 4 lines

string.c: fix zero-length array

* string.c (mapping_buffer): get rid of zero-length array member,
  which is not a part of C90.
------------------------------------------------------------------------
r56914 | usa | 2016-11-28 19:17:03 +0900 (Mon, 28 Nov 2016) | 4 lines

hide exceptions in server thread

* test/net/ftp/test_ftp.rb (test_tls_connect_timeout): sleeping to give a chance of complete of accept is a timing issue at all.  therefore, simply ignore the exception.

------------------------------------------------------------------------
r56913 | nobu | 2016-11-28 18:37:19 +0900 (Mon, 28 Nov 2016) | 4 lines

string.c: enable rdoc

* string.c (rb_str_casecmp_p): [DOC] move forward declaration of
  rb_str_downcase to enable rdoc.
------------------------------------------------------------------------
r56912 | duerst | 2016-11-28 17:37:32 +0900 (Mon, 28 Nov 2016) | 8 lines

implement String/Symbol#casecmp? including Unicode case folding

* string.c: Implement String#casecmp? and Symbol#casecmp? by using
  String#downcase :fold for Unicode case folding. This does not include
  options such as :turkic, because these currently cannot be combined
  with the :fold option. This implements feature #12786.

* test/ruby/test_string.rb/test_symbol.rb: Tests for above.
------------------------------------------------------------------------
r56911 | nobu | 2016-11-28 12:48:34 +0900 (Mon, 28 Nov 2016) | 4 lines

insns.def: adjust index type

* insns.def (checkmatch): adjust type of the index variable, to
  get rid of (potential) overflow.
------------------------------------------------------------------------
r56910 | usa | 2016-11-28 12:14:07 +0900 (Mon, 28 Nov 2016) | 4 lines

Give a chance to complete server.accept

* test/net/ftp/test_ftp.rb (test_tls_connect_timeout): get rid of a test error on Windows.

------------------------------------------------------------------------
r56909 | svn | 2016-11-28 11:02:41 +0900 (Mon, 28 Nov 2016) | 1 line

* 2016-11-28
------------------------------------------------------------------------
r56908 | nobu | 2016-11-28 11:02:40 +0900 (Mon, 28 Nov 2016) | 4 lines

compile.c: splatarray peephole opt

* compile.c (iseq_peephole_optimize): remove splatarray following
  always-array insn.
------------------------------------------------------------------------
r56907 | nobu | 2016-11-27 20:22:42 +0900 (Sun, 27 Nov 2016) | 5 lines

signal.c: improve stack overflow check

* signal.c (check_stack_overflow): [EXPERIMENTAL] consider the
  segfault a stack overflow when the fault address is between SP
  and BP.
------------------------------------------------------------------------
r56906 | nobu | 2016-11-27 20:07:27 +0900 (Sun, 27 Nov 2016) | 4 lines

object.c: no TypeError at special const dup

* object.c (rb_obj_dup): no longer raise a TypeError for special
  constants, and return itself instead.  [Feature#12979]
------------------------------------------------------------------------
r56905 | knu | 2016-11-27 19:08:00 +0900 (Sun, 27 Nov 2016) | 5 lines

Reverse compatibility_version and current_version for Darwin

The `compatibility_version` should have an API version and the
`current_version` should have a program version of Ruby, but they have
been reversed and the binary compatibility has never worked.
------------------------------------------------------------------------
r56904 | svn | 2016-11-27 18:40:52 +0900 (Sun, 27 Nov 2016) | 1 line

* 2016-11-27
------------------------------------------------------------------------
r56903 | ktsj | 2016-11-27 18:40:51 +0900 (Sun, 27 Nov 2016) | 1 line

gems/bundled_gems: Update to power_assert 0.4.1
------------------------------------------------------------------------
r56902 | nobu | 2016-11-26 20:37:01 +0900 (Sat, 26 Nov 2016) | 4 lines

file.c: home directory from system

* file.c (rb_default_home_dir): resolve home directory from the
  system database when HOME is not set.  [Feature #12695]
------------------------------------------------------------------------
r56901 | nobu | 2016-11-26 20:37:01 +0900 (Sat, 26 Nov 2016) | 4 lines

win32.c: special folders as home dir

* win32/win32.c (rb_w32_home_dir): move from win32/file.c to try
  special folders.
------------------------------------------------------------------------
r56900 | nobu | 2016-11-26 19:57:02 +0900 (Sat, 26 Nov 2016) | 1 line

NEWS: mention [Feature #12953] [ci skip]
------------------------------------------------------------------------
r56899 | svn | 2016-11-26 18:29:12 +0900 (Sat, 26 Nov 2016) | 1 line

* 2016-11-26
------------------------------------------------------------------------
r56898 | shugo | 2016-11-26 18:29:11 +0900 (Sat, 26 Nov 2016) | 3 lines

net/ftp: support timeout for TLS handshake.

Net::FTP inherits ssl_socket_connect from Net::Protocol to implement timeout.
------------------------------------------------------------------------
r56897 | nobu | 2016-11-25 15:28:00 +0900 (Fri, 25 Nov 2016) | 4 lines

round-down

* numeric.c (round_half_down, int_round_half_down): support
  round-down mode.
------------------------------------------------------------------------
r56896 | svn | 2016-11-25 05:51:46 +0900 (Fri, 25 Nov 2016) | 1 line

* 2016-11-25
------------------------------------------------------------------------
r56895 | usa | 2016-11-25 05:51:45 +0900 (Fri, 25 Nov 2016) | 4 lines

use `rb_struct_ptr` for `RSTRUCT_PTR` macro

* include/ruby/ruby.h (RSTRUCT_PTR): at r55788, `rb_struct_const_ptr` had been hidden and `rb_struct_ptr` had been implemented for backward compatiblity.  but the definition of `RSTRUCT_PTR` was not modified to use it, probably by mistake.

------------------------------------------------------------------------
r56894 | nobu | 2016-11-24 20:07:12 +0900 (Thu, 24 Nov 2016) | 5 lines

marshal.c: fix infinite recursion

* marshal.c (check_userdump_arg): marshal_dump should not return
  an instance of the same class, otherwise it causes infinite
  recursion.  [ruby-core:78289] [Bug #12974]
------------------------------------------------------------------------
r56893 | nobu | 2016-11-24 19:59:35 +0900 (Thu, 24 Nov 2016) | 4 lines

marshal.c: negative limit

* marshal.c (w_object): should not decrement negative limit which
  means unlimited.
------------------------------------------------------------------------
r56892 | nobu | 2016-11-24 12:01:59 +0900 (Thu, 24 Nov 2016) | 6 lines

test_fileutils.rb: fix deadlock

* test/fileutils/test_fileutils.rb (assert_output_lines): ensure
  that write pipe is closed, not the reader thread to deadlock
  when an exception raised in the given block.
  [ruby-core:78053] [Bug #12910]
------------------------------------------------------------------------
r56891 | shugo | 2016-11-24 10:03:07 +0900 (Thu, 24 Nov 2016) | 1 line

Add credit and PR/issue numbers.
------------------------------------------------------------------------
r56890 | normal | 2016-11-24 08:57:30 +0900 (Thu, 24 Nov 2016) | 7 lines

resolv: use safe navigation operator to avoid extra hash lookups

@addr2name is a private Hash and never changes its default_proc,
so only pay the hash lookup cost once; we know missing entries
in the hash will be nil.

* lib/resolv.rb (each_name): use safe navigation operator
------------------------------------------------------------------------
r56889 | normal | 2016-11-24 08:14:15 +0900 (Thu, 24 Nov 2016) | 6 lines

webrick/server: use symbol proc

Symbol proc is less code and avoids confusion from variable
naming.

* lib/webrick/server.rb (shutdown): use symbol proc
------------------------------------------------------------------------
r56886 | svn | 2016-11-24 00:10:20 +0900 (Thu, 24 Nov 2016) | 1 line

* 2016-11-24
------------------------------------------------------------------------
r56885 | shugo | 2016-11-24 00:10:19 +0900 (Thu, 24 Nov 2016) | 1 line

Add CR/LF check to Net::FTP#status.
------------------------------------------------------------------------
r56884 | nobu | 2016-11-23 20:30:02 +0900 (Wed, 23 Nov 2016) | 9 lines

test_fileutils.rb: Use primary group too

* test/fileutils/test_fileutils.rb (TestFileUtils#setup): Use
  primary group as well as supplementary groups.  based on the
  patch by V?t Ondruch at [ruby-core:78053].  [Bug #12910]

It might happen in certain environments (systemd-nspawn) that
process has no supplementary groups, but primary groups should be
enough to pass most of the tests.
------------------------------------------------------------------------
r56883 | normal | 2016-11-23 17:10:44 +0900 (Wed, 23 Nov 2016) | 3 lines

lib/net/ftp: fix typo

* lib/net/ftp.rb (shutdown): fix typo
------------------------------------------------------------------------
r56882 | shugo | 2016-11-23 14:26:18 +0900 (Wed, 23 Nov 2016) | 4 lines

rescue Errno::EPROTOTYPE in FTPTest#test_list_read_timeout_exceeded.

Errno::EPROTOTYPE is sometimes raised on Mac OS X 10.10.
[ruby-core:78066] [Bug #12914]
------------------------------------------------------------------------
r56881 | shugo | 2016-11-23 13:40:40 +0900 (Wed, 23 Nov 2016) | 4 lines

Don't encode to UTF-8 if it's unnecessary.

If the file system encoding is ISO-8851-1 or if the encoding of the target
string is invalid, don't encode to UTF-8.  [ruby-core:78271] [Bug#12972]
------------------------------------------------------------------------
r56880 | shugo | 2016-11-23 09:34:13 +0900 (Wed, 23 Nov 2016) | 6 lines

Disconnect immediately even if Net::FTP#close is called without quit.

In that case, BufferedSSLSocket#read in FTP#close exceeded timeout because
BufferedSSLSocket#shutdown did nothing.  So BufferedIO#rbuf_fill is
overridden in BufferedSSLSocket to raise an EOFError if the connection is
shut down.
------------------------------------------------------------------------
r56879 | shugo | 2016-11-23 09:03:27 +0900 (Wed, 23 Nov 2016) | 4 lines

Add a new optinal argument pathname to FTP#stat.

Based on the patch by soleboxy.
[Fix GH-1478] [ruby-core:78240] [Feature #12965]
------------------------------------------------------------------------
r56878 | kazu | 2016-11-23 08:44:51 +0900 (Wed, 23 Nov 2016) | 1 line

Use `&.` instead of `if` and `? :`
------------------------------------------------------------------------
r56877 | nobu | 2016-11-23 08:32:44 +0900 (Wed, 23 Nov 2016) | 4 lines

parse.y: warn ? followed by a word

* parse.y (parse_qmark): warn `?` with unbalanced space, which is
  interpreted as a conditional operator.
------------------------------------------------------------------------
r56876 | svn | 2016-11-23 08:11:41 +0900 (Wed, 23 Nov 2016) | 1 line

* 2016-11-23
------------------------------------------------------------------------
r56875 | nobu | 2016-11-23 08:11:41 +0900 (Wed, 23 Nov 2016) | 1 line

Use `&.` and `||=` instead of if guards
------------------------------------------------------------------------
r56874 | kazu | 2016-11-22 22:59:16 +0900 (Tue, 22 Nov 2016) | 4 lines

IOError does not happen

* IOError does not happen even if another thread closes io
* Use symbol proc
------------------------------------------------------------------------
r56873 | kazu | 2016-11-22 22:11:43 +0900 (Tue, 22 Nov 2016) | 1 line

Use `&.` instead of modifier if
------------------------------------------------------------------------
r56872 | mrkn | 2016-11-22 14:21:12 +0900 (Tue, 22 Nov 2016) | 11 lines

complex.c: optimize f_gt_p some cases

* complex.c (f_gt_p): optimize f_gt_p for specific types of arguments.

* internal.h (rb_int_gt, rb_float_gt, rb_rational_cmp): exported.

* numeric.c (rb_float_gt): rename from flo_gt and be exported.

* numeric.c (rb_int_gt): rename from int_gt and be exported.

* rational.c (rb_rational_cmp): rename from nurat_cmp and be exported.
------------------------------------------------------------------------
r56871 | shugo | 2016-11-22 14:17:45 +0900 (Tue, 22 Nov 2016) | 4 lines

Add BufferedSSLSocket#send.

SSLSocket#send is not defined, so use #write instead.  flags and dest are
ignored.
------------------------------------------------------------------------
r56870 | mrkn | 2016-11-22 13:54:57 +0900 (Tue, 22 Nov 2016) | 5 lines

complex.c: optimize Kernel#Complex

* complex.c (nucomp_f_complex): use nucomp_s_convert directly.

* complex.c (id_convert): removed.
------------------------------------------------------------------------
r56869 | normal | 2016-11-22 09:16:23 +0900 (Tue, 22 Nov 2016) | 6 lines

webrick/server: simplify Daemon.start

Process.daemon exists since Ruby 1.9.1 and does most of what we need.

* lib/webrick/server.rb (Daemon.start): simplify
  [Misc #12937]
------------------------------------------------------------------------
r56868 | normal | 2016-11-22 08:50:31 +0900 (Tue, 22 Nov 2016) | 5 lines

resolv: use symbol proc when possible

This reduces both human code and bytecode.

lib/resolv.rb (sender_for, Config.parse_resolv_conf): use symbol proc
------------------------------------------------------------------------
r56867 | normal | 2016-11-22 08:50:25 +0900 (Tue, 22 Nov 2016) | 8 lines

socket: use symbol proc for IO#close loops

Made possible by r56795, this reduces human and byte code size.

* ext/socket/lib/socket.rb (self.ip_sockets_port0,
  self.tcp_server_sockets_port0,
  self.tcp_server_sockets,
  self.udp_server_sockets): use symbol proc
------------------------------------------------------------------------
r56866 | normal | 2016-11-22 08:13:16 +0900 (Tue, 22 Nov 2016) | 6 lines

lib/open3: favor symbol proc when possible

It reduces both human and machine code; as well as reducing
the confusion from variable naming.

* lib/open3.rb (popen_run, pipeline, pipeline_run): avoid capture
------------------------------------------------------------------------
r56865 | normal | 2016-11-22 08:05:41 +0900 (Tue, 22 Nov 2016) | 17 lines

lib/*: remove closed checks

Follow r56795.  Since Ruby 2.2, calling #close on a closed
socket no longer raises exceptions.

* lib/cgi/session.rb (update): remove closed? check
* lib/net/http.rb (finish, transport_request): ditto
* lib/net/imap.rb (disconnect): ditto
* lib/net/pop.rb (do_start, do_finish): ditto
* lib/net/smtp.rb (do_start, do_finish): ditto
* lib/open3.rb (popen_run, pipeline_run): ditto
* lib/pstore.rb (transaction): ditto
* lib/shell/process-controller.rb (sfork):
* lib/tempfile (_close, call, Tempfile.create): ditto
* lib/webrick/httpauth/htdigest.rb (flush): ditto
* lib/webrick/httpauth/htpasswd.rb (flush): ditto
* lib/webrick/server.rb (start_thread, cleanup_shutdown_pipe): ditto
------------------------------------------------------------------------
r56864 | svn | 2016-11-22 07:45:27 +0900 (Tue, 22 Nov 2016) | 1 line

* 2016-11-22
------------------------------------------------------------------------
r56863 | nobu | 2016-11-22 07:45:26 +0900 (Tue, 22 Nov 2016) | 3 lines

Revert r56856

* parse.y: tCHAR can be concatenated.
------------------------------------------------------------------------
r56862 | nobu | 2016-11-21 21:34:54 +0900 (Mon, 21 Nov 2016) | 4 lines

ftp.rb: fix typo [ci skip]

* lib/net/ftp.rb (Net::FTP#initialize): [DOC] fix type in option
  name, :username is used but :use is not.
------------------------------------------------------------------------
r56861 | shugo | 2016-11-21 19:38:31 +0900 (Mon, 21 Nov 2016) | 1 line

Add new options open_timeout and read_timeout to Net::FTP.new.
------------------------------------------------------------------------
r56860 | shugo | 2016-11-21 17:55:25 +0900 (Mon, 21 Nov 2016) | 1 line

Use dynamic dispatch instead of is_a?.
------------------------------------------------------------------------
r56857 | rhe | 2016-11-21 14:02:58 +0900 (Mon, 21 Nov 2016) | 13 lines

net/http: avoid writing/reading from unstarted SSL socket

When net/http connects to an HTTPS server through a CONNECT proxy, it
writes the CONNECT request to an unconnected OpenSSL::SSL::SSLSocket.

OpenSSL::SSL::SSLSocket traditionally fallbacks to a method call on the
underlying IO object if a read/write method is called before the TLS
connection is established. So it automagically works correctly, emitting
the "SSL session is not started yet" warning.

This is not obvious at first glance. The warning is also noisy. Let's
just write to the plain socket instead of relying on the SSLSocket's
behavior.
------------------------------------------------------------------------
r56856 | nobu | 2016-11-21 12:13:59 +0900 (Mon, 21 Nov 2016) | 4 lines

parse.y: tCHAR cannot be concatenated

* parse.y (strings): tCHAR is not a subject of string literal
  concatenation and string interpolation.
------------------------------------------------------------------------
r56855 | svn | 2016-11-21 11:17:29 +0900 (Mon, 21 Nov 2016) | 1 line

* 2016-11-21
------------------------------------------------------------------------
r56854 | nobu | 2016-11-21 11:17:29 +0900 (Mon, 21 Nov 2016) | 4 lines

numeric.c: refine error message

* numeric.c (rb_num_get_rounding_option): refine error message at
  invalid rounding mode.
------------------------------------------------------------------------
r56853 | nobu | 2016-11-20 19:52:28 +0900 (Sun, 20 Nov 2016) | 3 lines

proc.c: enable Proc#to_s rdoc

* proc.c (proc_to_s): move just after the rdoc comment.
------------------------------------------------------------------------
r56852 | nobu | 2016-11-20 19:41:09 +0900 (Sun, 20 Nov 2016) | 4 lines

proc.c: suppress warning

* proc.c (NO_CLOBBERED): suppress clobbered warning which appears
  only on mingw.
------------------------------------------------------------------------
r56851 | shugo | 2016-11-20 18:11:44 +0900 (Sun, 20 Nov 2016) | 1 line

Remove an unused variable to suppress a warning.
------------------------------------------------------------------------
r56850 | nobu | 2016-11-20 15:53:39 +0900 (Sun, 20 Nov 2016) | 4 lines

win32ole.c: suppress warnings

* ext/win32ole/win32ole.c (g_ole_initialized): compare with 0
  instead of cast to get rid of pointer-to-int-cast warnings.
------------------------------------------------------------------------
r56849 | usa | 2016-11-20 15:19:05 +0900 (Sun, 20 Nov 2016) | 5 lines

get rid of test failures introduced at r56848

* ext/rubyvm/lib/forwardable/impl.rb: remove an unused variable definition to
  get rid of a warning.

------------------------------------------------------------------------
r56848 | nobu | 2016-11-20 11:12:48 +0900 (Sun, 20 Nov 2016) | 5 lines

forwardable/impl.rb

* lib/forwardable/impl.rb (_valid_method?, _compile_method):
  extract to separate implementation specific part.
  [ruby-core:78138] [Bug #12938]
------------------------------------------------------------------------
r56847 | shugo | 2016-11-20 10:49:25 +0900 (Sun, 20 Nov 2016) | 3 lines

remote_address should be called on @bare_sock.

Because @sock.remote_address fails if @sock is an SSLSocket.
------------------------------------------------------------------------
r56846 | shugo | 2016-11-20 10:44:07 +0900 (Sun, 20 Nov 2016) | 4 lines

shutdown(2) should not be called for SSLSocket.

SSLSocket#stop is a private method and cannot be called, but explicit calls
are not necessary because SSL_shutdown() is called from SSLSocket#close.
------------------------------------------------------------------------
r56845 | svn | 2016-11-20 08:51:50 +0900 (Sun, 20 Nov 2016) | 1 line

* 2016-11-20
------------------------------------------------------------------------
r56844 | suke | 2016-11-20 08:51:49 +0900 (Sun, 20 Nov 2016) | 3 lines

* ext/win32ole/win32ole.c: independent of libgcc_s_seh-1.dll [Bug #12959] 
  Thanks to Tsuyoshi Morita for bug report.

------------------------------------------------------------------------
r56843 | shugo | 2016-11-19 20:01:55 +0900 (Sat, 19 Nov 2016) | 1 line

Use Socket instead of TCPSocket/TCPServer.
------------------------------------------------------------------------
r56842 | shugo | 2016-11-19 16:02:32 +0900 (Sat, 19 Nov 2016) | 1 line

Expand abbreviated option names.
------------------------------------------------------------------------
r56840 | nobu | 2016-11-19 13:32:52 +0900 (Sat, 19 Nov 2016) | 4 lines

ruby.h: rb_big_sign

* include/ruby/ruby.h (RBIGNUM_SIGN): use a wrapper function to
  return the sign bit, instead of comparing with 0.
------------------------------------------------------------------------
r56839 | shugo | 2016-11-19 13:19:35 +0900 (Sat, 19 Nov 2016) | 1 line

Shut down TLS connections gracefully.
------------------------------------------------------------------------
r56837 | shugo | 2016-11-19 11:40:33 +0900 (Sat, 19 Nov 2016) | 1 line

Remove garbage.
------------------------------------------------------------------------
r56836 | shugo | 2016-11-19 11:37:39 +0900 (Sat, 19 Nov 2016) | 1 line

Move certificates to test/net/fixtures/.
------------------------------------------------------------------------
r56835 | svn | 2016-11-19 11:29:24 +0900 (Sat, 19 Nov 2016) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r56834 | shugo | 2016-11-19 11:29:23 +0900 (Sat, 19 Nov 2016) | 5 lines

Support TLS and hash styles options for Net::FTP.new.

If the :ssl options is specified, the control connection is protected with
TLS in the manner described in RFC 4217.  Data connections are also
protected with TLS unless the :private_data_connection is set to false.
------------------------------------------------------------------------
r56833 | nobu | 2016-11-19 10:55:34 +0900 (Sat, 19 Nov 2016) | 4 lines

math.c: unused_obj

* math.c (exp1, exp2): use immediate 0 instead of rb_mMath, which
  is never used.
------------------------------------------------------------------------
r56832 | nobu | 2016-11-19 10:16:50 +0900 (Sat, 19 Nov 2016) | 5 lines

dln.c: raise LoadError

* dln.c (dln_load): raise LoadError instead of fatal error on
  recent OSX, dlclose seems fixed in El Capitan or later.
  [ruby-core:78200] [Bug #12956]
------------------------------------------------------------------------
r56831 | tadd | 2016-11-19 00:31:05 +0900 (Sat, 19 Nov 2016) | 2 lines

* NEWS: Added entry for optimized Rational. [Feature #12484] [ci skip]

------------------------------------------------------------------------
r56830 | mrkn | 2016-11-19 00:17:19 +0900 (Sat, 19 Nov 2016) | 13 lines

complex.c: optimize f_negate

* complex.c (f_negate): optimize for special numeric types.

* complex.c (nucomp_expt): use rb_int_uminus instead of f_negate for
  fixnum value.

* internal.h (rb_float_uminus, rb_rational_uminus): exported.

* numeric.c (rb_float_uminus): rename from flo_uminus.

* rational.c (rb_rational_uminus): rename from nurat_negate, and add
  assertion for the parameter.
------------------------------------------------------------------------
r56829 | svn | 2016-11-19 00:04:37 +0900 (Sat, 19 Nov 2016) | 1 line

* 2016-11-19
------------------------------------------------------------------------
r56828 | mrkn | 2016-11-19 00:04:36 +0900 (Sat, 19 Nov 2016) | 8 lines

rational.c: optimization and refactoring

* rational.c (nurat_s_new_bang, nurat_canonicalize): small optimization
  by using rb_int_uminus instead of f_negate.

* rational.c (nurat_canonicalize): add assertions for parameters.

* rational.c (f_negate, id_negate): removed.
------------------------------------------------------------------------
r56827 | mrkn | 2016-11-18 23:24:15 +0900 (Fri, 18 Nov 2016) | 7 lines

complex.c: refactoring

* complex.c (nucomp_abs): use rb_math_hypot directly.

* complex.c (nucomp_arg): use rb_math_atan2 directly.

* complex.c (imp2, m_{atan2,hypot}_bang, m_hypot): removed.
------------------------------------------------------------------------
r56826 | yui-knk | 2016-11-18 20:05:20 +0900 (Fri, 18 Nov 2016) | 3 lines

objspace.c:: indent [ci skip]

* ext/objspace/objspace.c (memsize_of_m): adjust indent of comments.
------------------------------------------------------------------------
r56825 | yui-knk | 2016-11-18 19:58:30 +0900 (Fri, 18 Nov 2016) | 1 line

* NEWS: Fix class name
------------------------------------------------------------------------
r56824 | nobu | 2016-11-18 15:29:51 +0900 (Fri, 18 Nov 2016) | 4 lines

internal.h: round macros

* internal.h (ROUND_FUNC, ROUND_CALL): macros wrapping round
  functions.
------------------------------------------------------------------------
r56823 | svn | 2016-11-18 13:34:27 +0900 (Fri, 18 Nov 2016) | 1 line

* 2016-11-18
------------------------------------------------------------------------
r56822 | nobu | 2016-11-18 13:34:26 +0900 (Fri, 18 Nov 2016) | 6 lines

extmk.rb: removed compiled? method [ci skip]

* ext/extmk.rb (compiled?): removed.

* ext/win32/extconf.rb: try to install libraries regardless
  fiddle.
------------------------------------------------------------------------
r56821 | hsbt | 2016-11-17 22:05:46 +0900 (Thu, 17 Nov 2016) | 12 lines

Remove webhook notification to Travis CI [skip ci]

  As travis-rubies now uses 3 Mac jobs to create archives for various OS
  releases.

  This is a bit wasteful if multiple builds pass in a short period.

  Instead, Travis CI is now running a nightly build of ruby-head
  (around 22:30 UTC). This will happen regardless of the state of the
  master branch.

  Author: Hiro Asari <asari.ruby@gmail.com>
------------------------------------------------------------------------
r56820 | nobu | 2016-11-17 20:52:11 +0900 (Thu, 17 Nov 2016) | 4 lines

readline.c: str_subpos

* ext/readline/readline.c (str_subpos): make string instance only
  if necessary.
------------------------------------------------------------------------
r56819 | usa | 2016-11-17 17:50:36 +0900 (Thu, 17 Nov 2016) | 4 lines

numeric.c: get rid of a compile error on mingw64

* numeric.c (rb_fix2str): typo.

------------------------------------------------------------------------
r56818 | svn | 2016-11-17 16:19:50 +0900 (Thu, 17 Nov 2016) | 1 line

* 2016-11-17
------------------------------------------------------------------------
r56817 | shugo | 2016-11-17 16:19:49 +0900 (Thu, 17 Nov 2016) | 4 lines

mkconfig.rb: add a magic comment to rbconfig.rb

* tool/mkconfig.rb: add a magic comment to rbconfig.rb in case the command
  line option -K is specified.  [ruby-core:78181] [Bug #12949]
------------------------------------------------------------------------
r56815 | nobu | 2016-11-16 15:59:42 +0900 (Wed, 16 Nov 2016) | 7 lines

logger.rb: fix next rotate time

* lib/logger.rb (Logger::LogDevice#initialize): calculate next
  rotate time based on the mtime of the last existing file.
  [ruby-dev:49881] [Bug #12948]

Author: Tsukasa Oishi <tsukasa.oishi@gmail.com>
------------------------------------------------------------------------
r56814 | nobu | 2016-11-16 15:59:41 +0900 (Wed, 16 Nov 2016) | 1 line

test/logger/test_logdevice.rb: heredoc styles
------------------------------------------------------------------------
r56813 | nobu | 2016-11-16 15:59:40 +0900 (Wed, 16 Nov 2016) | 5 lines

ruby-additional.el: unquoted code block

* misc/ruby-additional.el (ruby-insert-heredoc-code-block): make
  code between "begin;" and "end;" unquoted.  still quotable
  before "begin;".
------------------------------------------------------------------------
r56812 | nobu | 2016-11-16 15:07:55 +0900 (Wed, 16 Nov 2016) | 4 lines

configure.in: compressed debug section option

* configure.in: make compressed debug section optional.
  [ruby-core:78121] [Bug #12934]
------------------------------------------------------------------------
r56811 | nobu | 2016-11-16 14:25:53 +0900 (Wed, 16 Nov 2016) | 4 lines

test_flip.rb: r56316

* test/ruby/test_flip.rb (test_input_line_number_range): test for
  r56316.  [ruby-core:78162] [Bug #12947]
------------------------------------------------------------------------
r56810 | mrkn | 2016-11-16 13:25:37 +0900 (Wed, 16 Nov 2016) | 4 lines

math.c: remove needless ifdef clause

* math.c (ifdef M_PI): M_PI is eventually defined in missing.h even if math.h
  doesn't supply it.
------------------------------------------------------------------------
r56809 | mrkn | 2016-11-16 13:25:35 +0900 (Wed, 16 Nov 2016) | 16 lines

complex.c: optimize Numeric#polar and Numeric#arg

* complex.c (numeric_polar): optimize for Integer, Float, and Rational.

* complex.c (numeric_arg): directly create the value of pi.

* complex.c (f_negative_p): optimize for Integer, Float, and Rational.

* rational.c (INT_NEGATIVE_P): move the definition into internal.h.

* internal.h (INT_NEGATIVE_P): ditto.

* numeric.c (rb_float_abs): rename from flo_abs and export to be used
  from other source files..

* internal.h (rb_float_abs): ditto.
------------------------------------------------------------------------
r56808 | mrkn | 2016-11-16 13:25:33 +0900 (Wed, 16 Nov 2016) | 4 lines

rational.c: optimize Rational#abs

* rational.c (rb_rational_abs): optimize Rational#abs with the
  specialized implementation.
------------------------------------------------------------------------
r56807 | hsbt | 2016-11-16 12:02:42 +0900 (Wed, 16 Nov 2016) | 3 lines

Fix a typo.

https://github.com/ruby/psych/commit/18d13b1df09504548feb4cb9b259fed552d6a4d5
------------------------------------------------------------------------
r56806 | hsbt | 2016-11-16 11:51:26 +0900 (Wed, 16 Nov 2016) | 4 lines

Fixed regression of typo fix.

Picked from upstream: https://github.com/ruby/psych/commit/66fb7fb77533d0606748940288858794752d95cb
[ci skip][ruby-dev:49879][Bug #12942]
------------------------------------------------------------------------
r56805 | svn | 2016-11-16 00:04:57 +0900 (Wed, 16 Nov 2016) | 1 line

* 2016-11-16
------------------------------------------------------------------------
r56804 | kazu | 2016-11-16 00:04:56 +0900 (Wed, 16 Nov 2016) | 1 line

Fix regexp and typo
------------------------------------------------------------------------
r56801 | naruse | 2016-11-15 21:42:04 +0900 (Tue, 15 Nov 2016) | 3 lines

Use rb_mod_name instead of classname

classname() is static function.
------------------------------------------------------------------------
r56799 | shugo | 2016-11-15 17:16:45 +0900 (Tue, 15 Nov 2016) | 1 line

ftp.rb: use Addrinfo interfaces
------------------------------------------------------------------------
r56797 | nobu | 2016-11-15 15:28:05 +0900 (Tue, 15 Nov 2016) | 6 lines

complex.c: purge id_eqeq_p and limit return value

* complex.c (f_eqeq_p): use rb_equal.

* complex.c (nucomp_eqeq_p): limit return value to true or false,
  instead of the result of the other as-is.
------------------------------------------------------------------------
r56795 | nobu | 2016-11-15 10:39:11 +0900 (Tue, 15 Nov 2016) | 4 lines

socket.rb: remove closed checks

* ext/socket/lib/socket.rb: remove unnecessary closed checks,
  close on closed socket no longer raises an exception.
------------------------------------------------------------------------
r56794 | nobu | 2016-11-15 10:39:10 +0900 (Tue, 15 Nov 2016) | 4 lines

ftp.rb: use Addrinfo

* lib/net/ftp.rb (sendport, makeport, makepasv, BufferedSocket):
  use Addrinfo interfaces.
------------------------------------------------------------------------
r56793 | normal | 2016-11-15 09:27:20 +0900 (Tue, 15 Nov 2016) | 11 lines

st.c: fix crashes on huge hash tables

From: Vladimir Makarov <vmakarov@redhat.com>

By Vladimir's estimation, this requires at least 64 GB of memory
to reproduce this bug due to the hash sizes required.  So there
is no new test case (and I am unable to test it, myself).

* st.c (get_bins_num): avoid out-of-bounds on shift by using correct type
  [ruby-core:78139] [Bug #12939]
* st.c (get_allocated_entries): ditto
------------------------------------------------------------------------
r56792 | headius | 2016-11-15 04:39:21 +0900 (Tue, 15 Nov 2016) | 2 lines

* test/thread/test_queue.rb: Give up to ten seconds for threads to
  reach expected state before proceeding.
------------------------------------------------------------------------
r56791 | svn | 2016-11-15 04:27:25 +0900 (Tue, 15 Nov 2016) | 1 line

* 2016-11-15
------------------------------------------------------------------------
r56790 | headius | 2016-11-15 04:27:24 +0900 (Tue, 15 Nov 2016) | 5 lines

* test/ruby/test_module.rb: Method tables are not guaranteed to be
  ordered.
* test/ruby/test_struct.rb: Ditto.
* test/ruby/test_thread.rb: Thread locals are not guaranteed to be
ordered.
------------------------------------------------------------------------
r56780 | nobu | 2016-11-14 16:59:50 +0900 (Mon, 14 Nov 2016) | 3 lines

net/ftp.rb: kwargs

* lib/net/ftp.rb (Net::FTP#open_socket): use keyword argument.
------------------------------------------------------------------------
r56779 | nobu | 2016-11-14 16:53:32 +0900 (Mon, 14 Nov 2016) | 4 lines

net/protocol.rb: kwargs

* lib/net/protocol.rb (Net::BufferedIO#initialize): add keyword
  arguments for initial attributes.
------------------------------------------------------------------------
r56778 | nobu | 2016-11-14 16:53:31 +0900 (Mon, 14 Nov 2016) | 6 lines

socket.rb: kwargs

* ext/socket/lib/socket.rb (connect_{from,to}, connect): let use
  keyword arguments.

* ext/socket/lib/socket.rb (Socket.tcp): ditto.
------------------------------------------------------------------------
r56777 | nobu | 2016-11-14 14:17:55 +0900 (Mon, 14 Nov 2016) | 4 lines

vm_eval.c: fstring instance_eval

* vm_eval.c (singleton_class_for_eval): enable fstring singleton
  class for instance_eval.  [ruby-core:78116] [Bug #12930]
------------------------------------------------------------------------
r56776 | nobu | 2016-11-14 13:06:15 +0900 (Mon, 14 Nov 2016) | 8 lines

complex.c: optimize

* complex.c (f_negative_p): use rb_num_negative_p instead of funcall.

* complex.c (f_kind_of_p, f_numeric_p): cast down to int because
  rb_obj_is_kind_of is safe.

* complex.c (f_signbit, f_tpositive_p): remove f_boolcast.
------------------------------------------------------------------------
r56775 | nobu | 2016-11-14 13:02:45 +0900 (Mon, 14 Nov 2016) | 4 lines

rational.c: cast to int

* rational.c (f_kind_of_p): rb_obj_is_kind_of returns Qtrue or
  Qfalse always, and is safe to cast down to int.
------------------------------------------------------------------------
r56774 | svn | 2016-11-14 09:40:06 +0900 (Mon, 14 Nov 2016) | 1 line

* remove trailing spaces.
------------------------------------------------------------------------
r56773 | hsbt | 2016-11-14 09:40:04 +0900 (Mon, 14 Nov 2016) | 4 lines

Update bundled psych to 2.2.0.

 * Merge libyaml-0.1.7 for bundled-libyaml option.
 * Update canonical url to https://github.com/ruby/psych.
------------------------------------------------------------------------
r56772 | mrkn | 2016-11-14 01:43:43 +0900 (Mon, 14 Nov 2016) | 5 lines

complex.c: refactoring

* complex.c (f_zero_p): return int rather than VALUE.

* complex.c (rb_complex_mul): remove needless negate operations.
------------------------------------------------------------------------
r56771 | mrkn | 2016-11-14 01:22:26 +0900 (Mon, 14 Nov 2016) | 3 lines

complex.c: refactoring

* complex.c (f_one_p): removed.
------------------------------------------------------------------------
r56770 | mrkn | 2016-11-14 01:22:08 +0900 (Mon, 14 Nov 2016) | 6 lines

complex.c: refactoring and small optimization

* complex.c (nucomp_expt): optimize the access to the numerator and
  denominator of a rational number.

* complex.c (k_rational_p): removed.
------------------------------------------------------------------------
r56769 | svn | 2016-11-14 01:21:55 +0900 (Mon, 14 Nov 2016) | 1 line

* 2016-11-14
------------------------------------------------------------------------
r56768 | mrkn | 2016-11-14 01:21:54 +0900 (Mon, 14 Nov 2016) | 3 lines

complex.c: refactoring

* complex.c (f_addsub, k_complex_p, k_float_p): removed.
------------------------------------------------------------------------
r56767 | nobu | 2016-11-13 14:25:54 +0900 (Sun, 13 Nov 2016) | 7 lines

error.c: redefined backtrace

* error.c (rb_get_backtrace): honor redefined Exception#backtrace
  method.  [ruby-core:78097] [Bug #12925]

* eval.c (setup_exception): rescue exceptions during backtrace
  setup.
------------------------------------------------------------------------
r56766 | nobu | 2016-11-13 14:25:53 +0900 (Sun, 13 Nov 2016) | 4 lines

error.c: rb_get_backtrace

* error.c (rb_get_backtrace): move from eval_error.c to call
  exc_backtrace directly.  [ruby-core:78097] [Bug #12925]
------------------------------------------------------------------------
r56765 | nobu | 2016-11-13 11:11:07 +0900 (Sun, 13 Nov 2016) | 7 lines

readline: remove dependency on internal.h

* ext/readline/depend: remove dependency on internal.h.

* ext/readline/readline.c (readline_s_delete_text): use
  rb_enc_str_new_static instead of rb_setup_fake_str not to depend
  on internal.h.
------------------------------------------------------------------------
r56764 | nobu | 2016-11-13 11:04:51 +0900 (Sun, 13 Nov 2016) | 4 lines

numeric.c: limit return value

* numeric.c (num_equal): limit return value to true or false,
  instead of the result of the other as-is.
------------------------------------------------------------------------
r56763 | nobu | 2016-11-13 10:51:29 +0900 (Sun, 13 Nov 2016) | 5 lines

purge id_eqeq_p

* rational.c (f_{eqeq,zero,one,minus_one}_p, nurat_eqeq_p): use
  rb_equal.  this function returns Qtrue or Qfalse always, so it
  is safe to cast down to int.
------------------------------------------------------------------------
r56762 | mrkn | 2016-11-13 03:42:30 +0900 (Sun, 13 Nov 2016) | 6 lines

complex.c: refactoring

* complex.c: refactor to use some specific macros and
  to reduce needless conversion by FIX2LONG.

* complex.c (k_fixnum_p, k_bignum_p): removed.
------------------------------------------------------------------------
r56761 | mrkn | 2016-11-13 01:29:11 +0900 (Sun, 13 Nov 2016) | 3 lines

rational.c: refactoring

* rational.c: use RB_INTEGER_TYPE_P, RB_FLOAT_TYPE_P, and FIXNUM_ZERO_P.
------------------------------------------------------------------------
r56760 | mrkn | 2016-11-13 00:43:34 +0900 (Sun, 13 Nov 2016) | 3 lines

rational.c: remove f_negative_p

* rational.c (f_negative_p): removed.
------------------------------------------------------------------------
r56759 | mrkn | 2016-11-13 00:43:26 +0900 (Sun, 13 Nov 2016) | 8 lines

rational.c: optimize Integer#lcm

* rational.c (f_div, f_mul, f_abs): optimize Integer#lcm
  Author: Tadashi Saito <tad.a.digger@gmail.com>

* numeric.c (rb_int_abs): rename from int_abs to be exported.

* internal.h (rb_int_div, rb_int_abs): exported.
------------------------------------------------------------------------
r56758 | mrkn | 2016-11-13 00:43:18 +0900 (Sun, 13 Nov 2016) | 4 lines

rational.c: optimize (-rational).rationalize(some)

* rational.c (nurat_rationalize): optimize (-rational).rationalize(some).
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56757 | svn | 2016-11-13 00:07:53 +0900 (Sun, 13 Nov 2016) | 1 line

* 2016-11-13
------------------------------------------------------------------------
r56756 | mrkn | 2016-11-13 00:07:53 +0900 (Sun, 13 Nov 2016) | 5 lines

rational.c: define Rational#{negative?,positive?}

* rational.c (nurat_{negative,positive}_p): define Rational#negative?
  and Rational#positive?, respectively.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56755 | mrkn | 2016-11-12 23:54:19 +0900 (Sat, 12 Nov 2016) | 4 lines

rational.c: refactoring

* rational.c (id_expt, id_fdiv, f_expt, f_fdiv, f_positive_p): removed.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56754 | nobu | 2016-11-12 22:24:23 +0900 (Sat, 12 Nov 2016) | 4 lines

test_fstring.rb: fix exception

* test/-ext-/string/test_fstring.rb (test_singleton_class): fix
  expected exception class.  [ruby-dev:49867] [Bug #12923]
------------------------------------------------------------------------
r56753 | mrkn | 2016-11-12 21:16:12 +0900 (Sat, 12 Nov 2016) | 3 lines

raitonal.c: remove needless macro

* rational.c (id_lshift, f_lshift): removed.
------------------------------------------------------------------------
r56752 | mrkn | 2016-11-12 21:14:10 +0900 (Sat, 12 Nov 2016) | 5 lines

rational.c: optimize Float#rationalize

* rational.c (rb_flt_rationalize{,_with_prec},float_rationalize):
  optimize Float#rationalize.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56751 | mrkn | 2016-11-12 20:52:09 +0900 (Sat, 12 Nov 2016) | 4 lines

rational.c: use rb_num_zerodiv instead of rb_raise_zerodiv

* rational.c (rb_raize_zerodiv): replace by rb_num_zerodiv.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56750 | mrkn | 2016-11-12 20:52:00 +0900 (Sat, 12 Nov 2016) | 7 lines

rational.c: optimize Float#to_r

* rational.c (float_to_r): optimize Float#to_r.

* numeric.c (rb_int_lshift): exported.

* internal.h (rb_int_lshift): ditto.
------------------------------------------------------------------------
r56749 | mrkn | 2016-11-12 20:51:51 +0900 (Sat, 12 Nov 2016) | 5 lines

rational.c: optimize Float#{numerator,denominator}

* rational.c (float_{numerator,denominator}): optimize
  Float#{numerator,denominator}.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56748 | mrkn | 2016-11-12 20:51:41 +0900 (Sat, 12 Nov 2016) | 4 lines

rational.c: optimize Numeric#quo

* rational.c (numeric_quo): optimize Numeric#quo.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56747 | nobu | 2016-11-12 18:43:05 +0900 (Sat, 12 Nov 2016) | 5 lines

class.c: no fstring singleton class

* class.c (singleton_class_of): prohibit fstrings from creating
  singleton classes.
  temporary measure for [ruby-dev:49867] [Bug #12923]
------------------------------------------------------------------------
r56746 | nobu | 2016-11-12 17:16:58 +0900 (Sat, 12 Nov 2016) | 4 lines

symbol/noninterned_name.rb

* test/-ext-/symbol/noninterned_name.rb: split from
  test_inadvertent_creation.rb.
------------------------------------------------------------------------
r56745 | mrkn | 2016-11-12 16:32:28 +0900 (Sat, 12 Nov 2016) | 3 lines

rational.c: refactor by removing needless ID vars

* rational.c (id_cmp, id_trunate): removed.
------------------------------------------------------------------------
r56744 | mrkn | 2016-11-12 16:28:47 +0900 (Sat, 12 Nov 2016) | 8 lines

rational.c: optimize Rational#fdiv

* rational.c (nurat_fdiv): optimize Rational#fdiv.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

* rational.c (f_to_f, id_to_f): removed.

* rational.c (f_expt): only used when FLT_RADIX is not 2.
------------------------------------------------------------------------
r56743 | mrkn | 2016-11-12 15:58:35 +0900 (Sat, 12 Nov 2016) | 4 lines

rational.c: optimize Rational#to_i

* rational.c (nurat_truncate): optimize Rational#to_i.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56742 | mrkn | 2016-11-12 15:45:11 +0900 (Sat, 12 Nov 2016) | 11 lines

rational.c: optimize Rational#{floor,ceil,round,truncate}

* rational.c (f_{expt10,round_common},nurat_{floor,ceil,round_half_{up,even}}):
  optimize Rational#{floor,ceil,round,truncate}.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

* numeric.c (rb_int_divmod): rename from int_divmod to be exported.

* numeric.c (rb_int_and): rename from int_and to be exported.

* intern.h (rb_int_{divmod,and}): exported.
------------------------------------------------------------------------
r56741 | mrkn | 2016-11-12 15:17:12 +0900 (Sat, 12 Nov 2016) | 5 lines

rational.c: optimize rational.coerce(float) and float [+-*/] rational

* rational.c (nurat_coerce): optimize rational.coerce(float).
  note that this makes `float [+-*/] rational` faster
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56740 | nobu | 2016-11-12 15:12:13 +0900 (Sat, 12 Nov 2016) | 7 lines

pack.c: simplify

* pack.c (str_associate): remove unnecessary branch.
  the argument must be a plain vanilla string object.

* pack.c (str_associated): use rb_ivar_lookup to give the
  undefined value.
------------------------------------------------------------------------
r56739 | nobu | 2016-11-12 15:12:12 +0900 (Sat, 12 Nov 2016) | 4 lines

class.c: trivial optimization

* class.c (singleton_class_of): just copy FROZEN flag without
  conditions.
------------------------------------------------------------------------
r56738 | nobu | 2016-11-12 15:12:09 +0900 (Sat, 12 Nov 2016) | 4 lines

.gdbinit: improve rp [ci skip]

* .gdbinit (rp): improve T_OBJECT dump.  show the contents of the
  instance variables table.
------------------------------------------------------------------------
r56737 | mrkn | 2016-11-12 15:07:46 +0900 (Sat, 12 Nov 2016) | 9 lines

rational.c: optimize construction of Rational

* rational.c (nurat_{s_new_bang,canonicalize,f_rational,s_convert}):
  optimize construction of Rational from numbers.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

* rational.c (read_{num,rat_nos}): optimize construction of Rational
  from string.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56736 | mrkn | 2016-11-12 15:07:24 +0900 (Sat, 12 Nov 2016) | 10 lines

rational.c: purge f_cmp

* rational.c (f_cmp, nurat_expt): purge f_cmp.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

* rational.c (INT_POSITIVE_P): added.

* numeric.c (FIXNUM_POSITIVE_P): move the definition into internal.h.

* internal.h (FIXNUM_POSITIVE_P): ditto.
------------------------------------------------------------------------
r56735 | mrkn | 2016-11-12 15:07:01 +0900 (Sat, 12 Nov 2016) | 4 lines

rational.c: optimize Rational#-@

* rational.c (nurat_negate): introduced to optimize Rational#-@.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56734 | mrkn | 2016-11-12 11:24:32 +0900 (Sat, 12 Nov 2016) | 9 lines

rational.c: optimize Rational#==

* rational.c (nurat_eqeq_p): optimize Rational#==.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

* numeric.c (rb_int_equal): rename from int_equal and remove static
  to be exported.

* internal.h (rb_int_equal): exported.
------------------------------------------------------------------------
r56733 | mrkn | 2016-11-12 10:29:01 +0900 (Sat, 12 Nov 2016) | 9 lines

rational.c: optimize Rational#<=>

* rational.c (nurat_cmp): optimize Rational#<=>.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

* numeric.c (rb_int_cmp): rename from int_cmp and remove static
  to be exported.

* internal.h (rb_int_cmp): exported.
------------------------------------------------------------------------
r56725 | mrkn | 2016-11-12 01:38:28 +0900 (Sat, 12 Nov 2016) | 9 lines

rational.c: optimize Rational#**

* rational.c (nurat_expt): optimize Rational#**.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

* numeric.c (rb_float_pow): rename flo_pow() to rb_float_pow()
  and remove static to be exporetd.

* internal.h (rb_int_pow, rb_float_pow): exported.
------------------------------------------------------------------------
r56724 | mrkn | 2016-11-12 01:18:13 +0900 (Sat, 12 Nov 2016) | 3 lines

rational.c: add argument type check assertions in f_muldiv

* rational.c (f_muldiv): add assertions to check argument types
------------------------------------------------------------------------
r56723 | mrkn | 2016-11-12 01:17:56 +0900 (Sat, 12 Nov 2016) | 4 lines

rational.c: optimize Rational#/

* rational.c (f_muldiv, nurat_div): optimize Rational#/.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56719 | mrkn | 2016-11-12 00:55:30 +0900 (Sat, 12 Nov 2016) | 25 lines

rational.c: avoid needless object allocation with nurat_to_double

* rational.c (nurat_to_double): introduce to convert rational to double
  without object allocation.

* rational.c (rb_rational_plus, nurat_{sub,mul,to_f}): rewrite by using
  nurat_to_double.

* bignum.c (rb_big_fdiv_double): introduce to calculate fdiv and return
  the result as a double value.

* bignum.c (big_fdiv{,_int,_float}): change the return types for
  implementing rb_big_fdiv_double.

* bignum.c (rb_big_fdiv): rewrite by using rb_big_fdiv_double.

* numeric.c (rb_int_fdiv_double): introduce to calculate fdiv and return
  the result as a double value.

* numeric.c (fix_fdiv_double): rewrite from fix_fdiv to return the
  result as a double value.

* numeric.c (rb_int_fdiv): rewrite by using rb_int_fdiv_double.

* internal.h (rb_{big,int}_fdiv_double): exported.
------------------------------------------------------------------------
r56716 | nagachika | 2016-11-12 00:43:43 +0900 (Sat, 12 Nov 2016) | 2 lines

fix a constant name typo in redmine-backporter.rb
[ci skip]
------------------------------------------------------------------------
r56713 | svn | 2016-11-12 00:11:05 +0900 (Sat, 12 Nov 2016) | 1 line

* 2016-11-12
------------------------------------------------------------------------
r56712 | mrkn | 2016-11-12 00:11:04 +0900 (Sat, 12 Nov 2016) | 5 lines

rational.c: optimize rational * {float, huge rational, bignum}

* rational.c (f_muldiv, nurat_mul):
  optimize rational * {float, huge rational, bignum}.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56711 | mrkn | 2016-11-11 23:57:11 +0900 (Fri, 11 Nov 2016) | 4 lines

rational.c: optimize rational - {float,rational}

* rational.c (f_addsub, nurat_sub): optimize rational - {float,rational}.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56710 | mrkn | 2016-11-11 23:45:11 +0900 (Fri, 11 Nov 2016) | 4 lines

rational.c: optimize rational - integer

* rational.c (nurat_sub): optimize rational - integer.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56709 | mrkn | 2016-11-11 23:42:53 +0900 (Fri, 11 Nov 2016) | 4 lines

rational.c: optimize rational + rational

* rational.c (f_addsub): optimize rational + rational.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56708 | mrkn | 2016-11-11 23:39:34 +0900 (Fri, 11 Nov 2016) | 4 lines

rational.c: prevent unused warning

* rational.c (f_mod): define only when NDEBUG is not defined to prevent
  unused warning
------------------------------------------------------------------------
r56707 | mrkn | 2016-11-11 23:39:25 +0900 (Fri, 11 Nov 2016) | 8 lines

numeric.c, rational.c: refactor by using FIXNUM_NEGATIVE_P and FIXNUM_ZERO_P

* numeric.c (num_zero_p, fix_divide, fix_mod, fix_divmod): refactor by using
  FIXNUM_NEGATIVE_P and FIXNUM_ZERO_P.

* rational.c (INT_NEGATIVE_P, INT_ZERO_P): ditto.

* internal.h: move FIXNUM_NEGATIVE_P and FIXNUM_ZERO_P from numeric.c
------------------------------------------------------------------------
r56706 | mrkn | 2016-11-11 23:39:16 +0900 (Fri, 11 Nov 2016) | 4 lines

rational.c: optimize Integer#gcd.

* rational.c (f_gcd_normal): optimize Integer#gcd.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56705 | mrkn | 2016-11-11 23:39:07 +0900 (Fri, 11 Nov 2016) | 4 lines

rational.c: optimize rational + integer.

* rational.c (rb_rational_plus): optimize rational + integer.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56704 | mrkn | 2016-11-11 23:38:59 +0900 (Fri, 11 Nov 2016) | 4 lines

rational.c: optimize rational + float.

* rational.c (rb_rational_plus): optimize rational + float.
  Author: Tadashi Saito <tad.a.digger@gmail.com>
------------------------------------------------------------------------
r56703 | nobu | 2016-11-11 20:52:03 +0900 (Fri, 11 Nov 2016) | 4 lines

range.c: check loading

* range.c (range_loader): check loading values if the data came
  from an initialized range object. [ruby-core:78067] [Bug #12915]
------------------------------------------------------------------------
r56702 | nobu | 2016-11-11 16:26:14 +0900 (Fri, 11 Nov 2016) | 4 lines

rational.c: check load

* rational.c (nurat_loader, nurat_marshal_load): check if loading
  values are Integer.  [ruby-core:78071] [Bug #12918]
------------------------------------------------------------------------
r56701 | nobu | 2016-11-11 16:08:53 +0900 (Fri, 11 Nov 2016) | 7 lines

rational.c: optimize

* rational.c (f_{lt,eqeq,zero,one,minus_one,kind_of}_p): add RTEST
  to results of funcalls.

* rational.c (f_negative_p, k_{integer,float,rational}_p):
  optimize.
------------------------------------------------------------------------
r56700 | nobu | 2016-11-11 16:08:52 +0900 (Fri, 11 Nov 2016) | 1 line

rational.c: use RB_INTEGER_TYPE_P
------------------------------------------------------------------------
r56699 | akr | 2016-11-11 12:04:38 +0900 (Fri, 11 Nov 2016) | 2 lines

Enable the document for Kernel[#.]pp.

------------------------------------------------------------------------
r56698 | nobu | 2016-11-11 09:08:41 +0900 (Fri, 11 Nov 2016) | 4 lines

vm_eval.c: reorder

* vm_eval.c (vm_call0_body): reorder the conditions.
  [ruby-core:78073] [Bug #12920]
------------------------------------------------------------------------
r56697 | mrkn | 2016-11-11 00:23:43 +0900 (Fri, 11 Nov 2016) | 3 lines

rational.c: optimize Rational#to_f by using rb_int_fdiv

* rational.c (nurat_to_f): optimize Rational#to_f by using rb_int_fdiv.
------------------------------------------------------------------------
r56696 | svn | 2016-11-11 00:23:34 +0900 (Fri, 11 Nov 2016) | 1 line

* 2016-11-11
------------------------------------------------------------------------
r56695 | mrkn | 2016-11-11 00:23:33 +0900 (Fri, 11 Nov 2016) | 5 lines

numeric.c, internal.h: export int_fdiv() as rb_int_fdiv()

* numeric.c (rb_int_fdiv): export int_fdiv() as rb_int_fdiv().

* internal.h (rb_int_fdiv): add declaration of rb_int_fdiv().
------------------------------------------------------------------------
r56694 | nobu | 2016-11-10 23:18:52 +0900 (Thu, 10 Nov 2016) | 4 lines

vm_eval.c: fix refined method when prepended

* vm_eval.c (vm_call0_body): refined module should not be skipped
  as prepended.  [ruby-core:78073] [Bug #12920]
------------------------------------------------------------------------
r56693 | nobu | 2016-11-10 19:39:51 +0900 (Thu, 10 Nov 2016) | 3 lines

range.c: check if range modifiable

* range.c (range_modify): frozen object cannot be modified.
------------------------------------------------------------------------
r56692 | nobu | 2016-11-10 16:47:44 +0900 (Thu, 10 Nov 2016) | 5 lines

parse.y: new_attr_op_assign in ripper needs symbol

* parse.y (command_asgn, arg): new_attr_op_assign in ripper
  expects a Symbol VALUE as the operator, not an ID, so convert
  literal IDs to Symbols.  [ruby-core:78069] [Bug #12916]
------------------------------------------------------------------------
r56691 | nobu | 2016-11-10 16:47:43 +0900 (Thu, 10 Nov 2016) | 4 lines

test_files.rb: sample size

* test/ripper/test_files.rb (assert_parse_files): extract at least
  one sample.
------------------------------------------------------------------------
r56690 | nobu | 2016-11-10 15:45:57 +0900 (Thu, 10 Nov 2016) | 4 lines

test_files.rb: separate tests

* test/ripper/test_files.rb (assert_parse_files): separate tests
  for each directories.
------------------------------------------------------------------------
r56689 | hsbt | 2016-11-10 15:38:14 +0900 (Thu, 10 Nov 2016) | 4 lines

Use environment variable for system ruby detection on appveyor.

 * Use ruby_version instead of 22-x64 and 21-x64
 * Use 23-x64 to build Ruby
------------------------------------------------------------------------
r56688 | nobu | 2016-11-10 12:50:47 +0900 (Thu, 10 Nov 2016) | 4 lines

make-snapshot: repository options

* tool/make-snapshot: add -svn and -git options to direct the
  repository to export.
------------------------------------------------------------------------
r56687 | nobu | 2016-11-10 12:50:46 +0900 (Thu, 10 Nov 2016) | 4 lines

make-snapshot: program name

* tool/make-snapshot (package): abort with the basename of this
  script.
------------------------------------------------------------------------
r56686 | shugo | 2016-11-10 11:23:58 +0900 (Thu, 10 Nov 2016) | 11 lines

Extend timeout for RubyCI chkbuild on Debian 8.2 x86_64.

On that machine, TestQueue#test_thr_kill often fails as follows:

      1) Failure:
    TestQueue#test_thr_kill [/home/hsbt/chkbuild/tmp/build/20161109T213002Z/ruby/test/thread/test_queue.rb:155]:
    only 171/250 done in 30 seconds.

Even if it passes, it takes about 30 seconds:

    [11160/16832] TestQueue#test_thr_kill = 29.80 s
------------------------------------------------------------------------
r56685 | svn | 2016-11-10 09:49:17 +0900 (Thu, 10 Nov 2016) | 1 line

* 2016-11-10
------------------------------------------------------------------------
r56684 | nobu | 2016-11-10 09:49:17 +0900 (Thu, 10 Nov 2016) | 5 lines

test_process.rb: fix pgroup test

* test/ruby/test_process.rb (TestProcess#test_execopts_pgroup):
  use dynamically assigned pid for the process group, instead of a
  magic number 2.  [ruby-core:78051] [Bug #12909]
------------------------------------------------------------------------
r56683 | nobu | 2016-11-10 09:49:16 +0900 (Thu, 10 Nov 2016) | 3 lines

range.c: indent [ci skip]

* range.c (range_alloc): adjust indent of comments.
------------------------------------------------------------------------
r56682 | nobu | 2016-11-09 11:42:30 +0900 (Wed, 09 Nov 2016) | 4 lines

default.mspec: end of options

* spec/default.mspec (MSpecScript): add the end of options to
  runruby.rb, to fix failure at ruby/spec@a0e55db.
------------------------------------------------------------------------
r56681 | a_matsuda | 2016-11-09 05:25:44 +0900 (Wed, 09 Nov 2016) | 6 lines

Fix undefined method 'dump' for nil:NilClass (NoMethodError)

Patch by: Dmitry Vorotilin <d.vorotilin@gmail.com> (@route)
Signed-off-by: Akira Matsuda <ronnie@dio.jp>

closes #1475
------------------------------------------------------------------------
r56680 | a_matsuda | 2016-11-09 04:55:59 +0900 (Wed, 09 Nov 2016) | 8 lines

Fix grammar errors

Patch by: Chris Tweedie <cltweedie@gmail.com> (@cltweedie)
Signed-off-by: Akira Matsuda <ronnie@dio.jp>

closes #1074

[ci skip]
------------------------------------------------------------------------
r56679 | a_matsuda | 2016-11-09 04:43:58 +0900 (Wed, 09 Nov 2016) | 9 lines

Update documentation of fetch

The sentence `Negative values of +index+ count from the end of the array.` can be interpreted that it only holds if a block is given. Clarify it.

Patch by: Lukas Elmer <lukas.elmer@gmail.com> (@lukaselmer)
Signed-off-by: Akira Matsuda <ronnie@dio.jp>

closes #1472
[ci skip]
------------------------------------------------------------------------
r56678 | a_matsuda | 2016-11-09 04:37:59 +0900 (Wed, 09 Nov 2016) | 15 lines

Fix typo in code doc of proc.c

Insure has a different meaning than ensure and we mean the latter in
this case.

*Ensure* is to do or have what is necessary for success.
Example: These blankets ensure that you?ll be warm enough.

*Insure* is to cover with an insurance policy.
Example: I will insure my home with additional fire and flood policies.

Patch by: Dimitris Zorbas <zorbash@skroutz.gr> (@Zorbash)
Signed-off-by: Akira Matsuda <ronnie@dio.jp>

closes #1352
------------------------------------------------------------------------
r56677 | kazu | 2016-11-09 00:04:29 +0900 (Wed, 09 Nov 2016) | 1 line

Add a space [ci skip]
------------------------------------------------------------------------
r56676 | svn | 2016-11-09 00:01:56 +0900 (Wed, 09 Nov 2016) | 1 line

* 2016-11-09
------------------------------------------------------------------------
r56675 | kazu | 2016-11-09 00:01:55 +0900 (Wed, 09 Nov 2016) | 1 line

Add ticket number [ci skip]
------------------------------------------------------------------------
r56674 | a_matsuda | 2016-11-08 20:57:00 +0900 (Tue, 08 Nov 2016) | 6 lines

Update comment about default constant

Patch by: Dave Takahashi <dtcello@gmail.com> (@dtakahas)
Signed-off-by: Akira Matsuda <ronnie@dio.jp>

closes #1151
------------------------------------------------------------------------
r56673 | nobu | 2016-11-08 19:44:21 +0900 (Tue, 08 Nov 2016) | 4 lines

vcs.rb: fix GIT.get_revisions

* tool/vcs.rb (VCS::GIT.get_revisions): fix for out-of-place
  build.
------------------------------------------------------------------------
r56672 | svn | 2016-11-08 18:31:53 +0900 (Tue, 08 Nov 2016) | 1 line

* properties.
------------------------------------------------------------------------
r56671 | naruse | 2016-11-08 18:31:52 +0900 (Tue, 08 Nov 2016) | 3 lines

Moved deleted ChangeLog into doc/ChangeLog-2.4.0

And Add doc/ChangeLog-2016 as an anchor.
------------------------------------------------------------------------
r56670 | nobu | 2016-11-08 16:47:23 +0900 (Tue, 08 Nov 2016) | 5 lines

vcs.rb: format from git-log

* tool/vcs.rb (VCS::GIT#export_changelog): re-format from git-log
  to svn style log, instead of git-svn, because cloned working
  directory would not have .git/svn.
------------------------------------------------------------------------
r56669 | nobu | 2016-11-08 16:45:19 +0900 (Tue, 08 Nov 2016) | 4 lines

vcs.rb: expand srcdir

* tool/vcs.rb (VCS::GIT#initialize): expand srcdir if it is a
  local path.
------------------------------------------------------------------------
r56668 | nobu | 2016-11-08 15:39:46 +0900 (Tue, 08 Nov 2016) | 6 lines

vcs.rb: fix srcdir in VCS::GIT

* tool/vcs.rb (VCS::GIT.cmd_args): add chdir option to arguments
  for IO.popen if srcdir is a local path.  unless -srcdir command
  line option is given, srcdir is the default URL.
  [ruby-core:78036] [Bug #12908]
------------------------------------------------------------------------
r56667 | svn | 2016-11-08 00:26:11 +0900 (Tue, 08 Nov 2016) | 1 line

* 2016-11-08
------------------------------------------------------------------------
r56666 | kazu | 2016-11-08 00:26:10 +0900 (Tue, 08 Nov 2016) | 3 lines

Add entry for Enumerator::Lazy#chunk_while

[ci skip][GH-1186]
------------------------------------------------------------------------
r56665 | kazu | 2016-11-07 21:10:36 +0900 (Mon, 07 Nov 2016) | 1 line

fix a typo [ci skip]
------------------------------------------------------------------------
r56664 | hsbt | 2016-11-07 18:46:42 +0900 (Mon, 07 Nov 2016) | 1 line

Added Entry for Rubygems 2.6.8 update.
------------------------------------------------------------------------
r56663 | nobu | 2016-11-07 16:45:18 +0900 (Mon, 07 Nov 2016) | 4 lines

test_optimization.rb: for r56208

* test/ruby/test_optimization.rb (test_tailcall_condition_block):
  test for r56208.  [ruby-core:78015] [Bug #12905]
------------------------------------------------------------------------
r56662 | shugo | 2016-11-07 15:57:14 +0900 (Mon, 07 Nov 2016) | 1 line

Extend Net::HTTP#open_timeout for chkbuild on Solaris 10s.
------------------------------------------------------------------------
r56660 | naruse | 2016-11-07 14:53:42 +0900 (Mon, 07 Nov 2016) | 1 line

Add NEWS about removing ChangeLog
------------------------------------------------------------------------
r56658 | nobu | 2016-11-07 12:47:46 +0900 (Mon, 07 Nov 2016) | 3 lines

vcs.rb: suppress warning

* tool/vcs.rb (DebugPOpen): suppress refinements warning in 2.0.
------------------------------------------------------------------------
r56657 | nobu | 2016-11-07 12:28:57 +0900 (Mon, 07 Nov 2016) | 3 lines

add cast

* hash.c (rb_objid_hash): need to cast down.
------------------------------------------------------------------------
r56656 | nobu | 2016-11-07 12:25:28 +0900 (Mon, 07 Nov 2016) | 7 lines

vcs.rb: exclude beginning revision

* tool/make-snapshot: pass the last revision in the last ChangeLog
  file without increment.

* tool/vcs.rb (export_changelog): exclude the beginning revision
  of the range uniformly. svn log includes it, but git log not.
------------------------------------------------------------------------
r56655 | nobu | 2016-11-07 11:54:28 +0900 (Mon, 07 Nov 2016) | 6 lines

vcs.rb: unnecessary arguments

* tool/make-snapshot: $srcdir is optional.

* tool/vcs.rb (export_changelog): remove unnecessary arguments.
  VCS should know srcdir and url.
------------------------------------------------------------------------
r56654 | nobu | 2016-11-07 11:54:27 +0900 (Mon, 07 Nov 2016) | 4 lines

vcs.rb: use chdir option

* tool/vcs.rb (export_changelog): for old git, use chdir option
  instead of git -C option, and set language environmets to C.
------------------------------------------------------------------------
r56653 | shugo | 2016-11-07 11:10:00 +0900 (Mon, 07 Nov 2016) | 1 line

Just check that interruption doesn't cause SEGV.
------------------------------------------------------------------------
r56652 | nobu | 2016-11-07 10:23:04 +0900 (Mon, 07 Nov 2016) | 4 lines

make-snapshot: sort globbed results

* tool/make-snapshot (package): globbed results order is
  undefined.
------------------------------------------------------------------------
r56651 | ko1 | 2016-11-07 10:03:04 +0900 (Mon, 07 Nov 2016) | 1 line

fix NEWS message
------------------------------------------------------------------------
r56650 | ko1 | 2016-11-07 09:45:00 +0900 (Mon, 07 Nov 2016) | 19 lines

	Introduce table improvement by Vladimir Makarov <vmakarov@redhat.com>.
	[Feature #12142]
	See header of st.c for improvment details.

	You can see all of code history here:
	<https://github.com/vnmakarov/ruby/tree/hash_tables_with_open_addressing>

	This improvement is discussed at
	<https://bugs.ruby-lang.org/issues/12142>
	with many people, especially with Yura Sokolov.

	* st.c: improve st_table.

	* include/ruby/st.h: ditto.

	* internal.h, numeric.c, hash.c (rb_dbl_long_hash): extract a function.

	* ext/-test-/st/foreach/foreach.c: catch up this change.

------------------------------------------------------------------------
r56649 | nobu | 2016-11-07 09:04:20 +0900 (Mon, 07 Nov 2016) | 3 lines

vcs.rb: popen with env

* tool/vcs.rb (IO.popen): support passing environment variables.
------------------------------------------------------------------------
r56648 | naruse | 2016-11-07 02:34:56 +0900 (Mon, 07 Nov 2016) | 3 lines

revision.h shouldn't depend ChangeLog

Maybe it needs vcs dependent ways.
------------------------------------------------------------------------