Preview: ChangeLog
Size: 1.25 MB
/proc/thread-self/root/opt/alt/ruby25/share/doc/alt-ruby25/ChangeLog
------------------------------------------------------------------------
r67939 | usa | 2021-04-05 20:46:35 +0900 (Mon, 05 Apr 2021) | 1 line
add tag v2_5_9
------------------------------------------------------------------------
r67938 | usa | 2021-04-05 20:46:23 +0900 (Mon, 05 Apr 2021) | 2 lines
Oops, forgotten to add
------------------------------------------------------------------------
r67937 | usa | 2021-04-05 20:45:31 +0900 (Mon, 05 Apr 2021) | 2 lines
REXML 3.1.7.4
------------------------------------------------------------------------
r67893 | usa | 2021-02-16 22:35:19 +0900 (Tue, 16 Feb 2021) | 4 lines
Backport webrick patch for CVE-2020-25613
[Backport #17201]
------------------------------------------------------------------------
r67889 | usa | 2020-12-09 22:55:29 +0900 (Wed, 09 Dec 2020) | 2 lines
[Backport #17381] repalce the old certs in RubyGems
------------------------------------------------------------------------
r67887 | usa | 2020-10-28 22:12:06 +0900 (Wed, 28 Oct 2020) | 21 lines
merge revision(s): 07786ed
* test/net/http/test_https.rb: Stop the error due to openssl 1.1.1h
On some environments that uses OpenSSL 1.1.1h, the two tests now fail.
http://rubyci.s3.amazonaws.com/android29-x86_64/ruby-master/log/20200924T062352Z.fail.html.gz
https://github.com/ruby/ruby/runs/1159288773?check_suite_focus=true
```
1) Failure:
TestNetHTTPS#test_get [/data/data/com.termux/files/home/cb/tmp/build/202 00924T062352Z/ruby/test/net/http/test_https.rb:47]:
<"0\x82\x03\xED0\x82\x02\xD5\xA0\x03..."> expected but was
<"0\x82\x03\xE30\x82\x02\xCB\xA0\x03...">.
```
Not sure why, but verify_callback now seems to receive only SERVER_CERT
but not CA_CERT.
It would be good to investigate the issue furthermore, but tentatively,
I want to stop the failures.
------------------------------------------------------------------------
r67885 | usa | 2020-06-14 01:03:14 +0900 (Sun, 14 Jun 2020) | 13 lines
merge revision(s) 7e289cdf3fed588b2d5a6973e29f9ff95cb8d76c: [Backport #16949]
[ruby/psych] Fixing compatibility with libyaml 0.2.5
The main issue is that commas aren't allowed in local tags. libyaml
was updated to follow the spec, and our tests were out of date.
See: https://github.com/yaml/libyaml/issues/196
https://github.com/ruby/psych/commit/3f5e520fd3
Note that this is not security fix, but need for release processs.
------------------------------------------------------------------------
r67881 | usa | 2020-03-31 21:13:31 +0900 (Tue, 31 Mar 2020) | 5 lines
merge revision(s) 47a1872cd8b901b8aab6dedce7fa3807c97d290d: [Backport #16681]
Use osuosl instead of GitHub releases
Because the package provided by GitHub releases is different from sourceware.
------------------------------------------------------------------------
r67877 | usa | 2020-03-31 20:40:08 +0900 (Tue, 31 Mar 2020) | 8 lines
merge revision(s) 61b7f86248bd121be2e83768be71ef289e8e5b90
* ext/socket/init.c: do not return uninitialized buffer
Resize string buffer only if some data is received in
BasicSocket#read_nonblock and some methods.
Co-Authored-By: Samuel Williams <samuel.williams@oriontransfer.co.nz>
------------------------------------------------------------------------
r67872 | usa | 2020-03-31 07:47:56 +0900 (Tue, 31 Mar 2020) | 7 lines
merge revision(s) 4adb2d655dcd54b28366b4d17e86b21e2b622cd1: [Backport #16738]
Make RbConfig::CONFIG values mutable [Bug #16738]
As `RbConfig.expand` modifies the argument and involved `CONFIG`
values, its values should be mutable.
------------------------------------------------------------------------
r67871 | usa | 2020-03-31 07:44:13 +0900 (Tue, 31 Mar 2020) | 28 lines
merge revision(s) 62743: [Backport #16687]
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>
------------------------------------------------------------------------
r67870 | usa | 2020-03-31 07:33:37 +0900 (Tue, 31 Mar 2020) | 4 lines
merge revision(s) 8a6ba10f9dd456cf54de800203cf04bbe42271fb: [Backport #12392]
Do not make disabled directories at installation [Bug #12392]
------------------------------------------------------------------------
r67869 | usa | 2020-03-31 07:22:10 +0900 (Tue, 31 Mar 2020) | 6 lines
merge revision(s) 36e9ed7fef6eb2d14becf6c52452e4ab16e4bf01: [Backport #16698]
backport 80b5a0ff2a7709367178f29d4ebe1c54122b1c27 partially as a
securify fix for CVE-2020-10663. The patch was provided by Jeremy Evans.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
------------------------------------------------------------------------
r67868 | usa | 2020-03-31 07:11:15 +0900 (Tue, 31 Mar 2020) | 7 lines
merge revision(s) 6e6844320de989cb88a154e2ac75066ccea1bba2: [Backport #16619]
Fixed duplicated warning
As `command_rhs` is always a "value expression", `command_asgn`
does not need the same check.
------------------------------------------------------------------------
r67867 | usa | 2020-03-31 07:05:30 +0900 (Tue, 31 Mar 2020) | 7 lines
merge revision(s) 6a2d779027818eda418c9118f700b36816e833a5: [Backport #16681]
Switch to download libffi source package to github releases from
sourceware.org
[Bug #16681]
(cherry picked from commit 86022167461dc90b70164e2bb23316959bbfd6ba)
------------------------------------------------------------------------
r67866 | usa | 2020-03-31 06:51:46 +0900 (Tue, 31 Mar 2020) | 10 lines
merge revision(s) 77596fb7a91cc119b25ac9e19b3c8682709765b4: [Backport #16138]
Do not turn on keyword_init for Struct subclass if keyword hash is
empty
This was accidentally turned on because there was no checking for
Qundef.
Also, since only a single keyword is currently supported, simplify
the rb_get_kwargs call.
------------------------------------------------------------------------
r67865 | usa | 2020-03-31 06:49:42 +0900 (Tue, 31 Mar 2020) | 8 lines
merge revision(s) 4f19666e8b144600e959e4673f79d63f98bd637d: [Backport #16508]
`Regexp` in `MatchData` can be `nil`
`String#sub` with a string pattern defers creating a `Regexp`
until `MatchData#regexp` creates a `Regexp` from the matched
string. `Regexp#last_match(group_name)` accessed its content
without creating the `Regexp` though. [Bug #16508]
------------------------------------------------------------------------
r67864 | usa | 2020-03-31 06:46:27 +0900 (Tue, 31 Mar 2020) | 28 lines
merge revision(s) d6a2bce64a7fa1099e507e1d36b5f1533f42f60f,c687be4bc01c9ce52ea990945d9304d6fe59fe9b: [Backport #16159]
time.c (find_time_t): fix round-to-zero bug
`find_time_t` did not work correctly for year older than the Epoch
because it used C's integer division (which rounds negative to zero).
For example, `TIme.new(1933)` returned a wrong time whose year is 1922
in Asia/Kuala_Lumpur because there is no 00:00:00 1st Jan. 1933 in the
time zone.
```
$ TZ=Asia/Kuala_Lumpur ruby -e 'p Time.new(1933)'
1932-12-31 00:00:00 +0700
```
This change fixes the issue by using `DIV` macro instead of `/`.
Now `Time.new(1933)` returns a time in 1933.
```
$ TZ=Asia/Kuala_Lumpur ruby -e 'p Time.new(1933)'
1933-01-01 00:20:00 +0720
```
[Bug #16159]
Added a test for [Bug #16159]
------------------------------------------------------------------------
r67863 | usa | 2020-03-31 06:37:50 +0900 (Tue, 31 Mar 2020) | 21 lines
merge revision(s) 203b7fa1ae8cc40d41c38d684f70b3fea7fae813,0131fab749fb76800de09e49a6abf910201c5b58,9c0cd5c569ba22bc68d1a77ad6580a275cd99639,c144d7215b3444fa36d28d540b60170a5b30743d: [Backport #16196]
Guard static variable first
* ext/openssl/ossl_asn1.c (Init_ossl_asn1): register the static
variable to grab an internal object, before creating the object.
otherwise the just-created object could get collected during the
global variable list allocation. [Bug #16196]
Slimed down test runtime by stressing openssl.so only [Bug #16196]
Prefer rb_gc_register_mark_object
* ext/openssl/ossl_asn1.c (Init_ossl_asn1): prefer
`rb_gc_register_mark_object`, which is better for constant
objects, over `rb_gc_register_address` for global/static
variables which can be re-assigned at runtime. [Bug #16196]
Skip very time consuming test [Bug #16196]
------------------------------------------------------------------------
r67862 | usa | 2020-03-31 06:26:06 +0900 (Tue, 31 Mar 2020) | 4 lines
merge revision(s) 463092b84da7933f307cc8747f948f68ef19f5fd: [Backport #16279]
Update rake-12.3.3.
------------------------------------------------------------------------
r67861 | usa | 2020-03-31 06:21:53 +0900 (Tue, 31 Mar 2020) | 14 lines
merge revision(s) c9423b016cfeab852bc5a829e55e0a11f80b3ab7,0b1e26398e018116180bf41cb63887f77d5d1b82,78ee2c245331e353e218b8fac9ca722a2bcd8fea: [Backport #15968]
marshal.c: check instance variable count
* marshal.c (w_obj_each): ensure that no instance variable was
added while dumping other instance variables. [Bug #15968]
Hoisted out w_ivar_each
marshal.c: check instance variable count
* marshal.c (w_ivar_each): ensure that no instance variable was
removed while dumping other instance variables. [Bug #15968]
------------------------------------------------------------------------
r67860 | usa | 2020-03-31 06:11:41 +0900 (Tue, 31 Mar 2020) | 13 lines
merge revision(s) 78ef2d0f331c3e056ee367214710b41722de2fe0: [Backport #15935]
merge revision(s) 8b3774be3dd9f472bddd99e84e3c9fe2ff99d7ac: [Backport
#15935]
Fix memory leak
* string.c (str_make_independent_expand): free independent buffer.
[Bug# 15935]
Co-Authored-By: luke-gru (Luke Gruber) <luke.gru@gmail.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
------------------------------------------------------------------------
r67829 | usa | 2019-12-04 15:52:01 +0900 (Wed, 04 Dec 2019) | 7 lines
merge revision(s) 2a477e0e444de6344048101466fb9189b9defddc: [Backport #16353]
test_ftp.rb: loosen timeout for Travis osx
https://travis-ci.org/ruby/ruby/jobs/454798071
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
------------------------------------------------------------------------
r67827 | usa | 2019-11-08 17:29:32 +0900 (Fri, 08 Nov 2019) | 14 lines
merge revision(s) 6333020fc924d3ae63775c032bbe8f57364cd42e:
atime may not updated unless strictatime is set on macOS Catalina
Cited from mount(8):
```
strictatime
Always update the file access time when reading from a
file. Without this option the filesystem may default to a
less strict update mode, where some access time updates
are skipped for performance reasons. This option could be
ignored if it is not supported by the filesystem.
```
------------------------------------------------------------------------
r67826 | usa | 2019-10-03 11:27:34 +0900 (Thu, 03 Oct 2019) | 2 lines
Bump version
------------------------------------------------------------------------
r67815 | usa | 2019-10-01 20:02:16 +0900 (Tue, 01 Oct 2019) | 2 lines
Forgotten to update :)
------------------------------------------------------------------------
r67814 | usa | 2019-10-01 20:01:53 +0900 (Tue, 01 Oct 2019) | 6 lines
lib/shell/command-processor.rb (Shell#[]): prevent unknown command
`FileTest.send(command, ...)` allows to call not only FileTest-related
methods but also any method that belongs to Kernel, Object, etc.
patched by <mame@ruby-lang.org>
------------------------------------------------------------------------
r67813 | usa | 2019-10-01 20:01:05 +0900 (Tue, 01 Oct 2019) | 10 lines
merge revision(s) 3ce238b5f9795581eb84114dcfbdf4aa086bfecc
WEBrick: prevent response splitting and header injection
This is a follow up to d9d4a28.
The commit prevented CRLR, but did not address an isolated CR or an
isolated LF.
Co-Authored-By: NARUSE, Yui <naruse@airemix.jp>
------------------------------------------------------------------------
r67811 | usa | 2019-10-01 19:59:42 +0900 (Tue, 01 Oct 2019) | 7 lines
merge revision(s) 36e057e26ef2104bc2349799d6c52d22bb1c7d03
Loop with String#scan without creating substrings
Create the substrings necessary parts only, instead of cutting the
rest of the buffer. Also removed a useless, probable typo, regexp.
------------------------------------------------------------------------
r67809 | usa | 2019-10-01 19:58:14 +0900 (Tue, 01 Oct 2019) | 7 lines
merge revision(s) a0a2640b398cffd351f87d3f6243103add66575b
Fix for wrong fnmatch patttern
* dir.c (file_s_fnmatch): ensure that pattern does not contain a
NUL character. https://hackerone.com/reports/449617
------------------------------------------------------------------------
r67800 | usa | 2019-09-02 05:10:27 +0900 (Mon, 02 Sep 2019) | 2 lines
Bump version to 2.5.7
------------------------------------------------------------------------
r67793 | usa | 2019-08-28 15:43:56 +0900 (Wed, 28 Aug 2019) | 3 lines
merger revision(s): f308ab2131ee675000926540cbb8c13c91dc3be5
Remove jquery.js
------------------------------------------------------------------------
r67790 | usa | 2019-08-28 13:57:58 +0900 (Wed, 28 Aug 2019) | 4 lines
merge revision(s) 989e8ad322afdfa3aa06e74b89fc42aef42895d0:
Remove debug print [ci skip]
------------------------------------------------------------------------
r67786 | usa | 2019-08-28 00:10:35 +0900 (Wed, 28 Aug 2019) | 2 lines
Bump version to 2.5.7
------------------------------------------------------------------------
r67779 | usa | 2019-08-27 21:53:55 +0900 (Tue, 27 Aug 2019) | 2 lines
Update rdoc version from 6.0.1 to 6.0.1.1.
------------------------------------------------------------------------
r67778 | usa | 2019-08-27 18:04:54 +0900 (Tue, 27 Aug 2019) | 2 lines
Skip test_gc_stress_at_startup because it causes SEGV on some platforms
------------------------------------------------------------------------
r67777 | usa | 2019-08-27 14:28:30 +0900 (Tue, 27 Aug 2019) | 5 lines
merge revision(s) 1613917ae64: [Backport #15784]
Defer setting gc_stress instead of setting dont_gc
[Bug #15784]
------------------------------------------------------------------------
r67776 | usa | 2019-08-27 14:02:29 +0900 (Tue, 27 Aug 2019) | 3 lines
Revert a part of r67767
it was not necessary for ruby_2_5.
------------------------------------------------------------------------
r67775 | usa | 2019-08-27 12:08:53 +0900 (Tue, 27 Aug 2019) | 5 lines
merge revision(s) f1a52d96a59c63d46cb23af60cdcaf38e30e0512 [Backport #15784]
Defer setting gc_stress until inits done
[Bug #15784]
------------------------------------------------------------------------
r67774 | usa | 2019-08-27 02:03:41 +0900 (Tue, 27 Aug 2019) | 11 lines
merge revision(s) f91879a7b548284c93743168acfd11e3d2aeefac,9557069299ac3b96691040a541afa65761a724ad: [Backport #15992]
handle_interrupt to defend monitor state [Bug #15992]
If an exception is raised from another thread for example Timeout
and this thread is just after `mon_exit`'s `@mon_owner = nil`,
the exception breaks the state of MonitorMixin. To prevent that situation,
it need to block interruption in mon_enter and mon_exit.
Avoid creating Hash objects per each mon_synchronize call (#2393)
------------------------------------------------------------------------
r67773 | usa | 2019-08-27 01:49:07 +0900 (Tue, 27 Aug 2019) | 7 lines
merge revision(s) d5c33364e3c0efb15e11df417c925afee2cdb9c9: [Backport #16105]
Fixed heap-use-after-free
* string.c (rb_str_sub_bang): retrieves a pointer to the
replacement string buffer just before using it, for the case of
replacement with the receiver string itself. [Bug #16105]
------------------------------------------------------------------------
r67772 | usa | 2019-08-27 01:44:03 +0900 (Tue, 27 Aug 2019) | 6 lines
merge revision(s) 5b1bf8dd2d08ae7371ecf025967376bb794ed651: [Backport #16099]
UTF LE is fixed at least the first 2 bytes
* io.c (io_strip_bom): if the first 2 bytes are 0xFF0xFE, it
should be a little-endian UTF, 16 or 32. [Bug #16099]
------------------------------------------------------------------------
r67771 | usa | 2019-08-27 01:20:36 +0900 (Tue, 27 Aug 2019) | 13 lines
merge revision(s) ec8e5f5aa64e2a54cf1e303f2b012c98e8d521ba,5a187e26adc8aa32367f294c1496935c7356d386: [Backport #15952]
array.c: always check frozenness in Array#unshift. Fixes [Bug #15952]
Closes: https://github.com/ruby/ruby/pull/2251
array.c add back shared array optimization to
ary_ensure_room_for_unshift
Bug fix in commit ec8e5f5aa64e2a [Bug #15952] disabled an
optimization in this function.
Closes: https://github.com/ruby/ruby/pull/2252
------------------------------------------------------------------------
r67770 | usa | 2019-08-27 01:17:49 +0900 (Tue, 27 Aug 2019) | 6 lines
merge revision(s) 8f51da5d41f0642d5a971e4223d1ba14643c6398: [Backport #15946]
Get rid of undefined behavior
* string.c (rb_str_sub_bang): str and repl can be same.
[Bug #15946]
------------------------------------------------------------------------
r67769 | usa | 2019-08-27 01:16:39 +0900 (Tue, 27 Aug 2019) | 11 lines
merge revision(s) 28678997e40869f5591eae60edd9757334426ffb,8797f48373dcfa3ff8e748667732dea8aea4347e: [Backport #15937]
Preserve the string content at self-copying
* string.c (rb_str_init): preserve the embedded content when
self-copying with a capacity. [Bug #15937]
New buffer for shared string
* string.c (rb_str_init): allocate new buffer if the string is
shared. [Bug #15937]
------------------------------------------------------------------------
r67768 | usa | 2019-08-27 01:12:14 +0900 (Tue, 27 Aug 2019) | 21 lines
merge revision(s) ae2a904ce9bffedee7d110dc60fd51c0a2879a5b,165ddfda20f6db8a3149d14c4f431fc242ddab70,fa7a768fdfe5223a29db4fa71b3e6101fb02ad51: [Backport #16051]
Update the certificate files to make the test pass on Debian 10
The old certificate files (for example, test/rubygems/ca_cert.pem) were
signed by SHA1. This message digest is considered too weak and rejected
by OpenSSL 1.1.1 or later. Because of this, the test suite does not
pass on Debian 10.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20190527T123003Z.fail.html.gz#test%2Frubygems
This change regenerates the files.
A shell script for the regeneration (util/create_certs.sh) is also
added.
* remove trailing spaces.
Removed inconsistency file from upstream repository of rubygems.
followed up ae2a904ce9bffedee7d110dc60fd51c0a2879a5b
------------------------------------------------------------------------
r67767 | usa | 2019-08-27 01:09:14 +0900 (Tue, 27 Aug 2019) | 25 lines
merge revision(s) 9dec4e8fc3a6018261834b5ac9b9877f787b97ca: [Backport #15934]
String#b: Don't depend on dependent string
Registering a string that depend on a dependent string as fstring
can lead to use-after-free. See c06ddfe and 3f95620 for details.
The following script triggers use-after-free on trunk, 2.4.6, 2.5.5
and 2.6.3. Credits to @wanabe for using eval as a cross-version way
of registering a fstring.
```ruby
a = ('j' * 24).b.b
eval('', binding, a)
p a
4.times { GC.start }
p a
```
- string.c (str_replace_shared_without_enc): when given a
dependent string, depend on the root of the dependent
string.
[Bug #15934]
------------------------------------------------------------------------
r67766 | usa | 2019-08-27 00:58:57 +0900 (Tue, 27 Aug 2019) | 80 lines
merge revision(s) 3f9562015e651735bfc2fdd14e8f6963b673e22a,c06ddfee878524168e4af07443217ed2f8d0954b,3b3b4a44e5: [Backport #15792]
Get rid of indirect sharing
* string.c (str_duplicate): share the root shared string if the
original string is already sharing, so that all shared strings
refer the root shared string directly. indirect sharing can
cause a dangling pointer.
[Bug #15792]
str_duplicate: Don't share with a frozen shared string
This is a follow up for 3f9562015e651735bfc2fdd14e8f6963b673e22a.
Before this commit, it was possible to create a shared string which
shares with another shared string by passing a frozen shared string
to `str_duplicate`.
Such string looks like:
```
-------- -----------------
| root | ------ owns -----> | root's buffer |
-------- -----------------
^ ^ ^
----------- | |
| shared1 | ------ references ----- |
----------- |
^ |
----------- |
| shared2 | ------ references ---------
-----------
```
This is bad news because `rb_fstring(shared2)` can make `shared1`
independent, which severs the reference from `shared1` to `root`:
```c
/* from fstr_update_callback() */
str = str_new_frozen(rb_cString, shared2); /* can return shared1 */
if (STR_SHARED_P(str)) { /* shared1 is also a shared string */
str_make_independent(str); /* no frozen check */
}
```
If `shared1` was the only reference to `root`, then `root` can be
reclaimed by the GC, leaving `shared2` in a corrupted state:
```
----------- --------------------
| shared1 | -------- owns --------> | shared1's buffer |
----------- --------------------
^
|
----------- -------------------------
| shared2 | ------ references ----> | root's buffer (freed) |
----------- -------------------------
```
Here is a reproduction script for the situation this commit fixes.
```ruby
a = ('a' * 24).strip.freeze.strip
-a
p a
4.times { GC.start }
p a
```
- string.c (str_duplicate): always share with the root string when
the original is a shared string.
- test_rb_str_dup.rb: specifically test `rb_str_dup` to make
sure it does not try to share with a shared string.
[Bug #15792]
Closes: https://github.com/ruby/ruby/pull/2159
Update dependencies
------------------------------------------------------------------------
r67765 | usa | 2019-08-27 00:40:44 +0900 (Tue, 27 Aug 2019) | 5 lines
merge revision(s) 5e018214e7435030727a97ac49db038d96438e74: [Backport #15720]
Fix SystemStackError when calling a method in an unused refinement
Fixes [Bug #15720]
------------------------------------------------------------------------
r67764 | usa | 2019-08-27 00:39:06 +0900 (Tue, 27 Aug 2019) | 5 lines
merge revision(s) c1d78a7f0ece2004822193a0c1f1fd3dc38c2fdf: [Backport #15360]
do_mutex_lock: release mutex before checking for interrupts (fixes
issue 15360)
------------------------------------------------------------------------
r67763 | usa | 2019-08-27 00:36:38 +0900 (Tue, 27 Aug 2019) | 12 lines
merge revision(s) 6375c68f8851e1e0fee8a95afba91c4555097127,c05eaa93258ddc01e685b6cc3a0da82998a2af48: [Backport #15839]
parse.y: function parser_mixed_error & parser_mixed_escape
Fix mixed encoding in heredoc
Heredocs are parsed line-by-line, so we need to keep track of the
temporary encoding of the string. Previously, a heredoc would
only detect mixed encoding errors if they were on the same line,
this changes things so they will be caught on different lines.
Fixes [Bug #15839]
------------------------------------------------------------------------
r67762 | usa | 2019-08-27 00:13:49 +0900 (Tue, 27 Aug 2019) | 7 lines
merge revision(s) 5bab1304af25a843728dbcd2f3594913740aecb0: [Backport #15847]
fix visibility of SecureRandom.gen_random
Aliasing a method preserves its visibility. These aliases turn
formerly-public methods into private. Should make them public
again. [Bug #15847]
------------------------------------------------------------------------
r67761 | usa | 2019-08-27 00:10:32 +0900 (Tue, 27 Aug 2019) | 9 lines
merge revision(s) ea42423908ed055f9039b1dce6e9a232a3b2dd90: [Backport #15887]
Keep vm->orig_progname alive
`vm->orig_progname` can be different from `vm->progname` when user
code assigns to `$0`. While `vm->progname` is kept alive by the
global table, nothing marked `vm->orig_progname`.
[Bug #15887]
------------------------------------------------------------------------
r67760 | svn | 2019-08-27 00:02:19 +0900 (Tue, 27 Aug 2019) | 1 line
* 2019-08-27
------------------------------------------------------------------------
r67759 | usa | 2019-08-27 00:02:19 +0900 (Tue, 27 Aug 2019) | 6 lines
merge revision(s) ac00bdc8a8ac2c62a94dd36a7784d15bbcb7df19: [Backport #15821]
Do not modify shared array
[Bug #15821]
------------------------------------------------------------------------
r67758 | usa | 2019-08-26 23:54:04 +0900 (Mon, 26 Aug 2019) | 13 lines
merge revision(s) d0ba4abf1a00339ebbb5d405db3240a8bdb7b68b,54eac83b2ad77ddea84fa6d66c09e0bb014cf61e: [Backport #15786]
Add RB_ID_SERIAL_MAX
Hide internal IDs
* parse.y (internal_id): number the ID serial for internal use by
counting down from the neary maximum value, not to accidentally
match permanent IDs.
[Bug #15768]
------------------------------------------------------------------------
r67757 | usa | 2019-08-26 23:45:41 +0900 (Mon, 26 Aug 2019) | 5 lines
merge revision(s) a6a26e42b15c46f117f4fce07a2050e9d727355d: [Backport #15906]
compile.c: Partially revert r63870 which caused wrong optimization
[Bug #15906]
------------------------------------------------------------------------
r67756 | usa | 2019-08-26 23:39:01 +0900 (Mon, 26 Aug 2019) | 5 lines
merge revision(s) b72623012d74abdb06210153ed48c9e2fa075bbd: [Backport #15775]
Update broken URL in Float documentation.
[Misc #15775][ruby-core:92332]
------------------------------------------------------------------------
r67755 | usa | 2019-08-26 23:37:29 +0900 (Mon, 26 Aug 2019) | 18 lines
merge revision(s) a15f7dd1fb1148c3d586238ee6907875f2e40379: [Backport #15803]
Always mark the string returned by File.realpath as tainted
This string can include elements that were not in either string
passed to File.realpath, even if one of the strings is an
absolute path, due to symlinks:
```ruby
Dir.mkdir('b') unless File.directory?('b')
File.write('b/a', '') unless File.file?('b/a')
File.symlink('b', 'c') unless File.symlink?('c')
path = File.realpath('c/a'.untaint, Dir.pwd.untaint)
path # "/home/testr/ruby/b/a"
path.tainted? # should be true, as 'b' comes from file system
```
[Bug #15803]
------------------------------------------------------------------------
r67754 | usa | 2019-08-26 23:18:58 +0900 (Mon, 26 Aug 2019) | 8 lines
merge revision(s) d118c84b0b9110462e479487ffaf175a75e5718e: [Backport #15199]
Fix IO#scanf on pipes on Windows
IO.seek on a pipe on Windows raises Errno::EINVAL instead of
Errno::ESPIPE.
Fixes Ruby Bug #15199
------------------------------------------------------------------------
r67753 | usa | 2019-08-26 23:15:13 +0900 (Mon, 26 Aug 2019) | 3 lines
merge revision(s) 5e23b1138f16af0defb184d7deeffadfd2ce3c04 [backport #15820]
Fix potential memory leak
------------------------------------------------------------------------
r67752 | usa | 2019-08-26 23:06:52 +0900 (Mon, 26 Aug 2019) | 9 lines
merge revision(s) 179045acaf5de8398c321ada86a76f1afb77a796: [Backport #14539]
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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
------------------------------------------------------------------------
r67751 | usa | 2019-08-26 22:49:50 +0900 (Mon, 26 Aug 2019) | 4 lines
merge revision(s) af1e487e9bb763b939dc6704c9a343c9eafa1637: [Backport #15801]
Updated marked commits for ChangeLog
------------------------------------------------------------------------
r67748 | usa | 2019-08-19 15:35:25 +0900 (Mon, 19 Aug 2019) | 124 lines
merge revision(s) f4fe2a76b0564e8e572936dec3bd724ac22b7a44: [Backport #15793]
merge revision(s) 7b7043e5da8589e01b94575d4ed647e909e5c875: [Backport
#15793]
eliminate use of freed memory
rb_io_fptr_finalize_internal frees the memory region.
=================================================================
==85264==ERROR: AddressSanitizer: heap-use-after-free on address 0x610000000d8c at pc 0x5608e38077f7 bp 0x7ffee12d5440 sp 0x7ffee12d5438
READ of size 4 at 0x610000000d8c thread T0
#0 0x5608e38077f6 in rb_io_memsize io.c:4749:24
#1 0x5608e37a0481 in obj_memsize_of gc.c:3547:14
#2 0x5608e37a4f30 in check_rvalue_consistency gc.c:1107:2
#3 0x5608e37a2624 in RVALUE_OLD_P gc.c:1218:5
#4 0x5608e37a5bae in rb_gc_force_recycle gc.c:6652:18
#5 0x5608e38191f9 in rb_f_backquote io.c:9021:5
#6 0x5608e3d8aa14 in call_cfunc_1 vm_insnhelper.c:2058:12
#7 0x5608e3d6e23d in vm_call_cfunc_with_frame vm_insnhelper.c:2211:11
#8 0x5608e3d54a35 in vm_call_cfunc vm_insnhelper.c:2229:12
#9 0x5608e3d5253b in vm_call_method_each_type vm_insnhelper.c:2564:9
#10 0x5608e3d51f50 in vm_call_method vm_insnhelper.c:2701:13
#11 0x5608e3cf2de4 in vm_call_general vm_insnhelper.c:2734:12
#12 0x5608e3d79918 in vm_sendish vm_insnhelper.c:3627:11
#13 0x5608e3d06cf5 in vm_exec_core insns.def:789:11
#14 0x5608e3d43700 in rb_vm_exec vm.c:1892:22
#15 0x5608e3d47cbf in rb_iseq_eval_main vm.c:2151:11
#16 0x5608e37620ca in ruby_exec_internal eval.c:262:2
#17 0x5608e376198b in ruby_exec_node eval.c:326:12
#18 0x5608e37617d0 in ruby_run_node eval.c:318:25
#19 0x5608e35c9486 in main main.c:42:9
#20 0x7f62e9421b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
#21 0x5608e3522289 in _start (miniruby+0x15f289)
0x610000000d8c is located 76 bytes inside of 192-byte region [0x610000000d40,0x610000000e00)
freed by thread T0 here:
#0 0x5608e359a2ed in free (miniruby+0x1d72ed)
#1 0x5608e37af421 in objspace_xfree gc.c:9591:5
#2 0x5608e37af3da in ruby_sized_xfree gc.c:9687:2
#3 0x5608e3799ac8 in ruby_xfree gc.c:9694:5
#4 0x5608e380746d in rb_io_fptr_finalize_internal io.c:4728:5
#5 0x5608e38191ed in rb_f_backquote io.c:9020:5
#6 0x5608e3d8aa14 in call_cfunc_1 vm_insnhelper.c:2058:12
#7 0x5608e3d6e23d in vm_call_cfunc_with_frame vm_insnhelper.c:2211:11
#8 0x5608e3d54a35 in vm_call_cfunc vm_insnhelper.c:2229:12
#9 0x5608e3d5253b in vm_call_method_each_type vm_insnhelper.c:2564:9
#10 0x5608e3d51f50 in vm_call_method vm_insnhelper.c:2701:13
#11 0x5608e3cf2de4 in vm_call_general vm_insnhelper.c:2734:12
#12 0x5608e3d79918 in vm_sendish vm_insnhelper.c:3627:11
#13 0x5608e3d06cf5 in vm_exec_core insns.def:789:11
#14 0x5608e3d43700 in rb_vm_exec vm.c:1892:22
#15 0x5608e3d47cbf in rb_iseq_eval_main vm.c:2151:11
#16 0x5608e37620ca in ruby_exec_internal eval.c:262:2
#17 0x5608e376198b in ruby_exec_node eval.c:326:12
#18 0x5608e37617d0 in ruby_run_node eval.c:318:25
#19 0x5608e35c9486 in main main.c:42:9
#20 0x7f62e9421b96 in __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
previously allocated by thread T0 here:
#0 0x5608e359a56d in malloc (miniruby+0x1d756d)
#1 0x5608e37aed12 in objspace_xmalloc0 gc.c:9416:5
#2 0x5608e37aebe7 in ruby_xmalloc0 gc.c:9600:12
#3 0x5608e37aea8b in ruby_xmalloc_body gc.c:9609:12
#4 0x5608e37a6d64 in ruby_xmalloc gc.c:11469:12
#5 0x5608e380e4b4 in rb_io_fptr_new io.c:8040:19
#6 0x5608e380e446 in rb_io_make_open_file io.c:8077:10
#7 0x5608e3850ea0 in pipe_open io.c:6707:5
#8 0x5608e384edb4 in pipe_open_s io.c:6772:12
#9 0x5608e381910b in rb_f_backquote io.c:9014:12
#10 0x5608e3d8aa14 in call_cfunc_1 vm_insnhelper.c:2058:12
#11 0x5608e3d6e23d in vm_call_cfunc_with_frame vm_insnhelper.c:2211:11
#12 0x5608e3d54a35 in vm_call_cfunc vm_insnhelper.c:2229:12
#13 0x5608e3d5253b in vm_call_method_each_type vm_insnhelper.c:2564:9
#14 0x5608e3d51f50 in vm_call_method vm_insnhelper.c:2701:13
#15 0x5608e3cf2de4 in vm_call_general vm_insnhelper.c:2734:12
#16 0x5608e3d79918 in vm_sendish vm_insnhelper.c:3627:11
#17 0x5608e3d06cf5 in vm_exec_core insns.def:789:11
#18 0x5608e3d43700 in rb_vm_exec vm.c:1892:22
#19 0x5608e3d47cbf in rb_iseq_eval_main vm.c:2151:11
#20 0x5608e37620ca in ruby_exec_internal eval.c:262:2
#21 0x5608e376198b in ruby_exec_node eval.c:326:12
#22 0x5608e37617d0 in ruby_run_node eval.c:318:25
#23 0x5608e35c9486 in main main.c:42:9
#24 0x7f62e9421b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
SUMMARY: AddressSanitizer: heap-use-after-free io.c:4749:24 in
rb_io_memsize
Shadow bytes around the buggy address:
0x0c207fff8160: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
0x0c207fff8170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c207fff8180: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
0x0c207fff8190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c207fff81a0: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
=>0x0c207fff81b0: fd[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c207fff81c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c207fff81d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c207fff81e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c207fff81f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c207fff8200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==85264==ABORTING
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
------------------------------------------------------------------------
r67722 | usa | 2019-07-31 23:58:36 +0900 (Wed, 31 Jul 2019) | 5 lines
merge revision(s) 374c8f4ebab1a740990330c732b9de965c5e8d10: [Backport #15823]
Fixed about ARGF.lineno
[Bug #15823]
------------------------------------------------------------------------
r67717 | usa | 2019-07-31 23:02:50 +0900 (Wed, 31 Jul 2019) | 9 lines
merge revision(s) 67563: [Backport #15769]
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>
------------------------------------------------------------------------
r67709 | usa | 2019-05-30 18:14:41 +0900 (Thu, 30 May 2019) | 3 lines
merge revision(s) dcb6a6ae3e2b8a3e298e7f0d4a3e7f8ff102a30e:[Backport #15845]
Windows simply causes an error to open invalid path
------------------------------------------------------------------------
r67708 | usa | 2019-05-03 06:16:27 +0900 (Fri, 03 May 2019) | 3 lines
merge revision(s) 66324: [Backport #15385]
Modify insn list only when compiling
------------------------------------------------------------------------
r67707 | usa | 2019-04-30 22:20:09 +0900 (Tue, 30 Apr 2019) | 3 lines
merge revision(s) 67270: [Backport #15670]
dsym should be treated as string [ruby-core:91852] [Bug #15670]
------------------------------------------------------------------------
r67706 | usa | 2019-04-30 22:04:57 +0900 (Tue, 30 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]
------------------------------------------------------------------------
r67705 | usa | 2019-04-30 22:02:42 +0900 (Tue, 30 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]
------------------------------------------------------------------------
r67704 | usa | 2019-04-30 22:00:04 +0900 (Tue, 30 Apr 2019) | 3 lines
merge revision(s) 67247: [Backport #15666]
Guard out the test when it is run under root permission
------------------------------------------------------------------------
r67703 | usa | 2019-04-30 21:55:24 +0900 (Tue, 30 Apr 2019) | 7 lines
merge revision(s) 64057: [Backport #14952]
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>
------------------------------------------------------------------------
r67702 | usa | 2019-04-30 21:40:20 +0900 (Tue, 30 Apr 2019) | 11 lines
merge revision(s) 66326,66649: [Backport #15385]
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]
test_optimization.rb: increase timeout for RubyCI
https://rubyci.org/logs/rubyci.s3.amazonaws.com/opensuseleap/ruby-trunk/log/20181230T040002Z.fail.html.gz
------------------------------------------------------------------------
r67268 | nagachika | 2019-03-15 20:32:41 +0900 (Fri, 15 Mar 2019) | 1 line
bump up teeny version to 2.5.6
------------------------------------------------------------------------
r67263 | nagachika | 2019-03-15 07:51:25 +0900 (Fri, 15 Mar 2019) | 4 lines
merge revision(s) 67261:
tool/make-snapshot: Use 6-spaces indent for SIZE and digests
to align with release note markdown.
------------------------------------------------------------------------
r67259 | nagachika | 2019-03-15 07:21:30 +0900 (Fri, 15 Mar 2019) | 8 lines
merge revision(s) 63309:
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]
------------------------------------------------------------------------
r67258 | nagachika | 2019-03-15 07:16:48 +0900 (Fri, 15 Mar 2019) | 1 line
bump up teeny version to 2.5.5
------------------------------------------------------------------------
r67242 | nagachika | 2019-03-13 09:32:12 +0900 (Wed, 13 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]
------------------------------------------------------------------------
r67241 | nagachika | 2019-03-13 09:21:46 +0900 (Wed, 13 Mar 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]
------------------------------------------------------------------------
r67240 | nagachika | 2019-03-13 09:06:19 +0900 (Wed, 13 Mar 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>
------------------------------------------------------------------------
r67239 | nagachika | 2019-03-13 08:36:51 +0900 (Wed, 13 Mar 2019) | 7 lines
merge revision(s) 66618: [Backport #15660]
test_io.rb: increase timeout for RubyCI
to stabilize AIX powerpc CI
https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20181227T113302Z.fail.html.gz
------------------------------------------------------------------------
r67238 | nagachika | 2019-03-13 08:35:29 +0900 (Wed, 13 Mar 2019) | 8 lines
merge revision(s) 66436: [Backport #15427]
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]
------------------------------------------------------------------------
r67237 | nagachika | 2019-03-13 08:23:17 +0900 (Wed, 13 Mar 2019) | 26 lines
merge revision(s) 64234,64252: [Backport #15219]
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.
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
------------------------------------------------------------------------
r67236 | nagachika | 2019-03-13 07:01:32 +0900 (Wed, 13 Mar 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.
------------------------------------------------------------------------
r67235 | nagachika | 2019-03-13 06:44:56 +0900 (Wed, 13 Mar 2019) | 1 line
Merge RubyGems 2.7.6.2 patch [Bug #15643]
------------------------------------------------------------------------
r67234 | nagachika | 2019-03-13 06:32:03 +0900 (Wed, 13 Mar 2019) | 1 line
Merge RubyGems 2.7.6.1 patch [Bug #15637]
------------------------------------------------------------------------
r67233 | nagachika | 2019-03-13 06:05:56 +0900 (Wed, 13 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]
------------------------------------------------------------------------
r67228 | nagachika | 2019-03-12 21:59:25 +0900 (Tue, 12 Mar 2019) | 8 lines
merge revision(s) 64636,64637: [Backport #15659]
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
fix typo
------------------------------------------------------------------------
r67219 | nagachika | 2019-03-11 21:51:59 +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]
------------------------------------------------------------------------
r67192 | nagachika | 2019-03-08 00:31:42 +0900 (Fri, 08 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]
------------------------------------------------------------------------
r67191 | nagachika | 2019-03-08 00:19:34 +0900 (Fri, 08 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]
------------------------------------------------------------------------
r67186 | nagachika | 2019-03-06 20:32:02 +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>
------------------------------------------------------------------------
r67050 | nagachika | 2019-02-11 20:04:41 +0900 (Mon, 11 Feb 2019) | 12 lines
merge revision(s) 62872,62873: [Backport #14621]
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]
parse.y: terminator at continued line
* parse.y (here_document): a continuing line is not the
terminator. [ruby-core:86283] [Bug #14621]
------------------------------------------------------------------------
r67013 | nagachika | 2019-02-05 21:15:47 +0900 (Tue, 05 Feb 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]
------------------------------------------------------------------------
r66912 | nagachika | 2019-01-23 23:14:25 +0900 (Wed, 23 Jan 2019) | 70 lines
merge revision(s) 62934,63210,63215,63309: [Backport #14634]
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]
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]
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]
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]
------------------------------------------------------------------------
r66881 | nagachika | 2019-01-20 19:48:26 +0900 (Sun, 20 Jan 2019) | 7 lines
merge revision(s) 64879: [Backport #15162]
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]
------------------------------------------------------------------------
r66880 | nagachika | 2019-01-20 18:17:59 +0900 (Sun, 20 Jan 2019) | 7 lines
merge revision(s) 63334: [Backport #14729]
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]
------------------------------------------------------------------------
r66879 | nagachika | 2019-01-20 14:13:27 +0900 (Sun, 20 Jan 2019) | 7 lines
merge revision(s) 63322: [Backport #14731]
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]
------------------------------------------------------------------------
r66878 | nagachika | 2019-01-20 13:51:41 +0900 (Sun, 20 Jan 2019) | 9 lines
merge revision(s) 63720: [Backport #14864]
dir.c: define O_CLOEXEC for older systems
SuSE 10 has openat(), but not O_CLOEXEC
Reported-by: wangpeiwen
[ruby-core:87591] [Bug #14864]
------------------------------------------------------------------------
r66877 | nagachika | 2019-01-20 13:49:40 +0900 (Sun, 20 Jan 2019) | 6 lines
merge revision(s) 66401: [Backport #15412]
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.
------------------------------------------------------------------------
r66876 | nagachika | 2019-01-20 13:47:51 +0900 (Sun, 20 Jan 2019) | 7 lines
merge revision(s) 66242: [Backport #15387]
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.
------------------------------------------------------------------------
r66839 | nagachika | 2019-01-17 00:32:54 +0900 (Thu, 17 Jan 2019) | 6 lines
merge revision(s) 65974: [Backport #15340]
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]
------------------------------------------------------------------------
r66837 | nagachika | 2019-01-16 21:04:57 +0900 (Wed, 16 Jan 2019) | 15 lines
merge revision(s) 64476: [Backport #15084]
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]
------------------------------------------------------------------------
r66818 | nagachika | 2019-01-14 18:23:45 +0900 (Mon, 14 Jan 2019) | 17 lines
merge revision(s) 64589,64593: [Backport #15041]
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]
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"
------------------------------------------------------------------------
r66785 | svn | 2019-01-11 00:02:22 +0900 (Fri, 11 Jan 2019) | 1 line
* 2019-01-11
------------------------------------------------------------------------
r66784 | nagachika | 2019-01-11 00:02:21 +0900 (Fri, 11 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]
------------------------------------------------------------------------
r66780 | nagachika | 2019-01-10 23:46:41 +0900 (Thu, 10 Jan 2019) | 11 lines
merge revision(s) 63823,63839: [Backport #14890]
time.c: [DOC] Time#localtime
* time.c: state that Time#localtime does nothing when nothing
changes. [ruby-core:87675] [Bug #14880]
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
------------------------------------------------------------------------
r66777 | nagachika | 2019-01-10 23:18:09 +0900 (Thu, 10 Jan 2019) | 6 lines
merge revision(s) 66111: [Backport #14561]
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>.
------------------------------------------------------------------------
r66748 | nagachika | 2019-01-07 21:05:16 +0900 (Mon, 07 Jan 2019) | 18 lines
merge revision(s) 62671: [Backport #14571]
resolv.rb: close socket
* lib/resolv.rb (UnconnectedUDP#lazy_initialize): store new
sockets before binding, so the sockets get closed when the
requester is closing.
* lib/resolv.rb (ConnectedUDP#lazy_initialize): ditto.
* lib/resolv.rb (UnconnectedUDP#close): synchronize to get rid of
race condition.
* lib/resolv.rb (ConnectedUDP#close): ditto.
[ruby-core:85901] [Bug #14571]
From: quixoten (Devin Christensen) <quixoten@gmail.com>
------------------------------------------------------------------------
r66689 | nagachika | 2019-01-02 15:44:14 +0900 (Wed, 02 Jan 2019) | 5 lines
merge revision(s) 66685,66686: [Backport #15495]
Try to update cert
Try to update cert (2nd try)
------------------------------------------------------------------------
r66309 | nagachika | 2018-12-10 21:31:18 +0900 (Mon, 10 Dec 2018) | 7 lines
merge revision(s) 62621: [Backport #15396]
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.
------------------------------------------------------------------------
r66298 | nagachika | 2018-12-09 15:46:44 +0900 (Sun, 09 Dec 2018) | 5 lines
conceptually partial backport from r63103, r65567.
All ISeq#to_binary should rescue to skip when running with coverage.
current trunk (2.6-) has assert_iseq_to_binary.
------------------------------------------------------------------------
r66297 | nagachika | 2018-12-09 14:38:38 +0900 (Sun, 09 Dec 2018) | 5 lines
merge revision(s) 61535:
iseq.c: fix build error when VM_CHECK_MODE is enabled
Follow up of r61534. Sorry.
------------------------------------------------------------------------
r66285 | nagachika | 2018-12-08 17:00:22 +0900 (Sat, 08 Dec 2018) | 3 lines
merge revision(s) 65667: [Backport #15284]
Fix for bison 3.2 [Bug #15284]
------------------------------------------------------------------------
r66225 | nagachika | 2018-12-05 23:35:07 +0900 (Wed, 05 Dec 2018) | 26 lines
merge revision(s) 64736,65567: [Backport #15270]
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
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>
------------------------------------------------------------------------
r66131 | nagachika | 2018-12-02 16:37:49 +0900 (Sun, 02 Dec 2018) | 6 lines
merge revision(s) 62776: [Backport #15365]
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.
------------------------------------------------------------------------
r66130 | nagachika | 2018-12-02 16:13:22 +0900 (Sun, 02 Dec 2018) | 7 lines
merge revision(s) 63040: [Backport #14553]
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]
------------------------------------------------------------------------
r66112 | nagachika | 2018-12-01 13:19:25 +0900 (Sat, 01 Dec 2018) | 3 lines
merge revision(s) 65365:
Update for tzdata-2018f
------------------------------------------------------------------------
r66105 | nagachika | 2018-11-30 20:59:43 +0900 (Fri, 30 Nov 2018) | 3 lines
merge revision(s) 65956:
fix r65954; Keep tainty
------------------------------------------------------------------------
r66074 | nagachika | 2018-11-28 22:55:17 +0900 (Wed, 28 Nov 2018) | 25 lines
merge revision(s) 64799,64800,64801: [Backport #15105]
fix typo.
* vm_exec.h (DEBUG_END_INSN()): use `ec` instead of `th`.
This macro is used when `VMDEBUG > 0`.
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.
* remove trailing spaces.
------------------------------------------------------------------------
r66073 | nagachika | 2018-11-28 22:36:08 +0900 (Wed, 28 Nov 2018) | 17 lines
merge revision(s) 65954,65955,65958: [Backport #15337]
Don't use single byte optimization on grapheme clusters
Unicode Text Segmentation considers CRLF as a character. [Bug #15337]
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
remove guard against bug #15337, because it is fixed
------------------------------------------------------------------------
r65728 | nagachika | 2018-11-15 00:21:50 +0900 (Thu, 15 Nov 2018) | 8 lines
merge revision(s) 62772: [Backport #14738]
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>
------------------------------------------------------------------------
r65582 | nagachika | 2018-11-07 00:52:16 +0900 (Wed, 07 Nov 2018) | 3 lines
merge revision(s) 65554: [Backport #15282]
Don't set throw data as cause [Bug #15282]
------------------------------------------------------------------------
r65581 | nagachika | 2018-11-07 00:31:15 +0900 (Wed, 07 Nov 2018) | 7 lines
merge revision(s) 65460: [Backport #15271]
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]
------------------------------------------------------------------------
r65580 | nagachika | 2018-11-07 00:13:01 +0900 (Wed, 07 Nov 2018) | 7 lines
merge revision(s) 65350: [Backport #15245]
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]
------------------------------------------------------------------------
r65579 | nagachika | 2018-11-06 23:49:59 +0900 (Tue, 06 Nov 2018) | 7 lines
merge revision(s) 64786: [Backport #15087]
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]
------------------------------------------------------------------------
r65274 | nagachika | 2018-10-21 20:19:59 +0900 (Sun, 21 Oct 2018) | 7 lines
merge revision(s) 64515:
remove `const` warning.
* compile.c (iseq_ibf_load): remove `const` to pass iseq as no `const`
parameter.
------------------------------------------------------------------------
r65273 | nagachika | 2018-10-21 20:16:49 +0900 (Sun, 21 Oct 2018) | 1 line
bump up teeny version to 2.5.4.
------------------------------------------------------------------------
r65155 | nagachika | 2018-10-18 19:45:08 +0900 (Thu, 18 Oct 2018) | 1 line
bump up teeny version to 2.5.3.
------------------------------------------------------------------------
r65132 | nagachika | 2018-10-18 00:26:54 +0900 (Thu, 18 Oct 2018) | 28 lines
Import Ruby/OpenSSL 2.1.2.
Original patches are written by rhe.
Changes since v2.1.1 can be found at the upstream GitHub repository:
https://github.com/ruby/openssl/compare/v2.1.1..v2.1.2
Kazuki Yamaguchi (9):
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
x509name: fix OpenSSL::X509::Name#{cmp,<=>}
Ruby/OpenSSL 2.0.9
Ruby/OpenSSL 2.1.2
nobu (6):
no ID cache in Init functions
search winsock libraries explicitly
openssl: search winsock
openssl_missing.h: constified
reduce LibreSSL warnings
needs openssl/opensslv.h
------------------------------------------------------------------------
r65128 | nagachika | 2018-10-18 00:06:18 +0900 (Thu, 18 Oct 2018) | 8 lines
merge revision(s) 65125:
infect taint flag on Array#pack and String#unpack
with the directives "B", "b", "H" and "h".
* pack.c (pack_pack, pack_unpack_internal): infect taint flag.
* test/ruby/test_pack.rb: add test for above.
------------------------------------------------------------------------
r65100 | nagachika | 2018-10-17 08:23:05 +0900 (Wed, 17 Oct 2018) | 6 lines
merge revision(s) 64913: [Backport #15223]
Support ubasecrt.dll 10.0.17763.1 included in Windows 10 October 2018 Update
------------------------------------------------------------------------
r65002 | nagachika | 2018-10-12 00:12:06 +0900 (Fri, 12 Oct 2018) | 11 lines
merge revision(s) 64745: [Backport #15118]
Use opt_{aref,aset} over opt_{aref,aset}_with
* compile.c (iseq_compile_each0): Use `opt_aref`/`opt_aset` over
`opt_aref_with`/`opt_aset_with` when frozen_string_literal: true,
not to resurrect the index string on non-Hash receiver.
[Fix GH-1957]
From: chopraanmol1 <chopraanmol1@gmail.com>
------------------------------------------------------------------------
r64999 | nagachika | 2018-10-11 23:58:30 +0900 (Thu, 11 Oct 2018) | 20 lines
merge revision(s) 64062: [Backport #14939]
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]
------------------------------------------------------------------------
r64998 | nagachika | 2018-10-11 23:40:04 +0900 (Thu, 11 Oct 2018) | 22 lines
merge revision(s) 63711,64398: [Backport #14841]
thread_sync.c (rb_mutex_lock): fix deadlock
* thread_sync.c (rb_mutex_lock): fix deadlock
[ruby-core:87467] [Bug #14841]
thread_sync.c (rb_mutex_lock): acquire lock before being killed
We (the thread acquiring the mutex) need to acquire the mutex
before being killed to work with ConditionVariable#wait.
Thus we reinstate the acquire-immediately-after-sleeping logic
from pre-r63711 while still retaining the
acquire-after-checking-for-interrupts logic from r63711.
This regression was introduced in
commit 501069b8a4013f2e3fdde35c50e9527ef0061963 (r63711)
("thread_sync.c (rb_mutex_lock): fix deadlock") for
[Bug #14841]
[ruby-core:88503] [Bug #14999] [Bug #14841]
------------------------------------------------------------------------
r64997 | nagachika | 2018-10-11 23:20:25 +0900 (Thu, 11 Oct 2018) | 11 lines
merge revision(s) 64514: [Backport #14702]
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.
------------------------------------------------------------------------
r64996 | nagachika | 2018-10-11 22:51:19 +0900 (Thu, 11 Oct 2018) | 7 lines
merge revision(s) 63030: [Backport #14639]
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]
------------------------------------------------------------------------
r64982 | nagachika | 2018-10-09 23:43:06 +0900 (Tue, 09 Oct 2018) | 10 lines
merge revision(s) 64860,64861: [Backport #15164]
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]
* properties.
------------------------------------------------------------------------
r64981 | nagachika | 2018-10-09 23:39:16 +0900 (Tue, 09 Oct 2018) | 14 lines
merge revision(s) 63067,63068: [Backport #14658]
Fix Kernel#singleton_method with Module#Prepend
* proc.c (rb_obj_singleton_method): search the method entry from
the origin class, for fix prepended modules. [Bug #14658]
From: Vasiliy Ermolovich <younash@gmail.com>
proc.c: fix segfault when no singleton class
* proc.c (rb_obj_singleton_method): bail out if the receiver does
not have the singleton class without accessing the origin class
not to segfault. [Bug #14658]
------------------------------------------------------------------------
r64980 | nagachika | 2018-10-09 23:25:37 +0900 (Tue, 09 Oct 2018) | 5 lines
merge revision(s) 64900: [Backport #15190]
Just a shebang is valid code
[ruby-core:89240] [Bug #15190]
------------------------------------------------------------------------
r64979 | nagachika | 2018-10-09 23:09:35 +0900 (Tue, 09 Oct 2018) | 12 lines
merge revision(s) 62007,62024: [Backport #13069]
mkmf.rb: ignore linker warnings
* lib/mkmf.rb (try_ldflags): ignore linker warnings. they cause
unexpected failures on OpenBSD. [ruby-core:78827] [Bug #13069]
mkmf.rb: werror on mswin
* lib/mkmf.rb (MakeMakefile#try_ldflags): enable warning checking
on mswin, link.exe warns -l options but does not fail.
[Bug #13069]
------------------------------------------------------------------------
r64978 | nagachika | 2018-10-09 22:59:53 +0900 (Tue, 09 Oct 2018) | 7 lines
merge revision(s) 64915: [Backport #15205]
check argument type.
* iseq.c (iseqw_s_compile): check argument type (T_STRING) to
avoid SEGV.
------------------------------------------------------------------------
r64893 | nagachika | 2018-10-01 21:02:17 +0900 (Mon, 01 Oct 2018) | 33 lines
merge revision(s) 63868,63870: [Backport #14897]
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].
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]
------------------------------------------------------------------------
r64621 | nagachika | 2018-09-03 20:04:55 +0900 (Mon, 03 Sep 2018) | 1 line
test/test_tmpdir.rb(TRAVERSAL_PATH): re-apply r62990 partially. [Backport #14966]
------------------------------------------------------------------------
r64617 | nagachika | 2018-09-02 20:23:06 +0900 (Sun, 02 Sep 2018) | 7 lines
merge revision(s) 64092: [Backport #14942]
win32.c: limit write size on console
* win32/win32.c (constat_parse): split long buffer and limit write
size on a console, as well as rb_w32_write.
[ruby-dev:50597] [Bug #14942]
------------------------------------------------------------------------
r64616 | nagachika | 2018-09-02 20:20:33 +0900 (Sun, 02 Sep 2018) | 6 lines
merge revision(s) 64071: [Backport #14941]
ruby.c: taint ARGV on Windows
* ruby.c (external_str_new_cstr): strings come from the external
should be tainted. [ruby-dev:50596] [Bug #14941]
------------------------------------------------------------------------
r64613 | nagachika | 2018-09-02 12:43:25 +0900 (Sun, 02 Sep 2018) | 1 line
test/ruby/test_io.rb (test_select_leak): extend timeout for Arch Linux[Backport 14929]
------------------------------------------------------------------------
r64612 | nagachika | 2018-09-01 19:50:39 +0900 (Sat, 01 Sep 2018) | 1 line
bump up patchlevel for r64611
------------------------------------------------------------------------
r64611 | nagachika | 2018-09-01 19:49:09 +0900 (Sat, 01 Sep 2018) | 1 line
test/ruby/test_io.rb (test_select_leak): extend timeout [Bug 14929]
------------------------------------------------------------------------
r64605 | nagachika | 2018-09-01 14:40:02 +0900 (Sat, 01 Sep 2018) | 21 lines
merge revision(s) 64007,64019,64020: [Backport #14929]
thread.c (do_select): fix leak on exception
When do_select is interrupted and raise happens from
RUBY_VM_CHECK_INTS_BLOCKING, the original FD sets we copied
do not get freed, leading to a memory leak. Wrap up all the
FD sets into a Ruby object to ensure the GC can release an
allocations made for rb_fdset_t.
This leak existed since Ruby 2.0.0 (r36430)
[Bug #14929]
increase timeout seconds.
* test/ruby/test_io.rb (test_select_leak): increase timeout seconds
to pass this test on a high-load machine.
60 sec is not enough at all
------------------------------------------------------------------------
r64603 | nagachika | 2018-09-01 11:31:27 +0900 (Sat, 01 Sep 2018) | 8 lines
merge revision(s) 64014: [Backport #14926]
fix sum on infinity
* array.c (rb_ary_sum): consider non-finite floats.
[ruby-core:88024] [Bug #14926]
* enum.c (sum_iter): ditto.
------------------------------------------------------------------------
r64602 | nagachika | 2018-09-01 11:03:24 +0900 (Sat, 01 Sep 2018) | 6 lines
merge revision(s) 63994: [Backport #14920]
reduce tzset
* time.c (rb_localtime_r): call tzset() only after TZ environment
variable is changed.
------------------------------------------------------------------------
r64443 | nagachika | 2018-08-18 17:35:42 +0900 (Sat, 18 Aug 2018) | 9 lines
merge revision(s) 62099: [Backport #14416]
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
------------------------------------------------------------------------
r64439 | nagachika | 2018-08-18 14:20:55 +0900 (Sat, 18 Aug 2018) | 9 lines
merge revision(s) 63741: [Backport #14868]
process.c (ruby_fork_ruby): fix race in signal handling
We must block signals before stopping timer-thread, otherwise
signal handing may be delayed until (and if) another signal
is received after timer-thread is restarted.
[ruby-core:87622] [Bug #14868] [Bug #13916]
------------------------------------------------------------------------
r64438 | nagachika | 2018-08-18 14:04:31 +0900 (Sat, 18 Aug 2018) | 8 lines
merge revision(s) 63727: [Backport #14865]
vm.c: fix infinite loop
* vm.c: use EXEC_EVENT_HOOK_AND_POP_FRAME. While exception handling, if an exception
is raised in hooks, need to pop current frame and raise this raised exception by hook.
[ruby-dev:50582] [Bug #14865]
------------------------------------------------------------------------
r64437 | nagachika | 2018-08-18 13:40:01 +0900 (Sat, 18 Aug 2018) | 15 lines
merge revision(s) 63698: [Backport #14856]
lib/drb/extservm.rb (service): do not return `false'
invoke_service_command may set entries in @servers to `false',
making it incompatible with the intended use of the
safe navigation operator.
This caused occasional DRb test failures, but they were hidden
with automatic retry.
[ruby-core:87524] [Bug #14856]
Fixes: r53111 ("use safe navigation operator")
commit 059c9c1cf371e049c7481c78b76e9620da52757f [GH-1142]
------------------------------------------------------------------------
r64435 | nagachika | 2018-08-18 13:19:42 +0900 (Sat, 18 Aug 2018) | 9 lines
merge revision(s) 63112: [Backport #14818]
Remove outdated example from Numeric documentation
Since 2.5, Numeric instances can be cloned and duplicated.
[Fix GH-1850]
From: Miguel Landaeta <miguel@miguel.cc>
------------------------------------------------------------------------
r64434 | nagachika | 2018-08-18 13:18:32 +0900 (Sat, 18 Aug 2018) | 24 lines
merge revision(s) 63571,63572: [Backport #14816]
`int isnan(double)` is a POSIXism
- `isnan` is something relatively new. We need to provide one for
those systems without it. However:
- X/Open defines `int isnan(double)`. Note the `int`.
- C99 defines `isnan(x)` to be a macro.
- C++11 nukes them all, undefines all the "masking macro"s, and
defines its own `bool isnan(double)`. Note the `bool`.
- In C++, `int isnan(double)` and `bool isnan(double)` are
incompatible.
- So the mess.
[Bug #14816][ruby-core:87364]
further reading: https://developers.redhat.com/blog/2016/02/29/why-cstdlib-is-more-complicated-than-you-might-think/
include/ruby/missing.h: defined(__cplusplus) before using __cplusplus
* include/ruby/missing.h (isinf, isnan): For non-C++ programs,
defined(__cplusplus) may be needed before using __cplusplus.
[Bug #14816]
------------------------------------------------------------------------
r64432 | nagachika | 2018-08-18 12:37:56 +0900 (Sat, 18 Aug 2018) | 21 lines
merge revision(s) 63549,63551,63554: [Backport #14805]
memo->u3.cnt is long not int [Bug #14805]
enum.c: mitigate overflows
* enum.c (enum_count): convert counters to Integer as unsigned
long, instead of long, to mitigate overflows.
[ruby-core:87348] [Bug #14805]
* enum.c (ary_inject_op): ditto.
* enum.c (each_with_index_i): ditto, instead of int.
* enum.c (find_index_i, find_index_iter_i): ditto, instead of
unsigned int.
enum.c: bignum counter
* enum.c (imemo_count_up, imemo_count_value): promote the counter
value to a bignum on overflow. [Bug #14805]
------------------------------------------------------------------------
r64431 | nagachika | 2018-08-18 12:07:15 +0900 (Sat, 18 Aug 2018) | 12 lines
merge revision(s) 63512,63514: [Backport #14790]
time.rb: fix parsing time zone in iso8601
* lib/time.rb (Time.xmlschema): a colon in time zone designator
can be omitted. [ruby-core:87277] [Bug #14790]
time.rb: fix parsing time zone in iso8601
* lib/time.rb (Time.xmlschema): the minute in time zone designator
can be omitted together with the preceding colon.
[ruby-core:87277] [Bug #14790]
------------------------------------------------------------------------
r64430 | nagachika | 2018-08-18 11:56:32 +0900 (Sat, 18 Aug 2018) | 6 lines
merge revision(s) 63417: [Backport #14756]
error.c: check redefined backtrace result
* error.c (rb_get_backtrace): check the result of `backtrace` even
if the method is redefined. [ruby-core:87013] [Bug #14756]
------------------------------------------------------------------------
r64428 | nagachika | 2018-08-18 11:39:09 +0900 (Sat, 18 Aug 2018) | 17 lines
merge revision(s) 63406: [Backport #14754]
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
------------------------------------------------------------------------
r64421 | nagachika | 2018-08-18 01:27:13 +0900 (Sat, 18 Aug 2018) | 7 lines
merge revision(s) 62952: [Backport #14638]
win32/file.c: relative path with drive letter
* win32/file.c (IS_ABSOLUTE_PATH_P): home directory should not be
a relative path regardless a drive letter. PathIsRelativeW
returns FALSE on such path. [ruby-core:86356] [Bug #14638]
------------------------------------------------------------------------
r64420 | nagachika | 2018-08-18 01:20:53 +0900 (Sat, 18 Aug 2018) | 6 lines
merge revision(s) 63396: [Backport #14750]
net/imap: Fix ArgumentError in send_string_data
Thanks to ShockwaveNN (Pavel Lobashov) for reporting the bug.
[ruby-core:86990] [Bug #14750]
------------------------------------------------------------------------
r64419 | nagachika | 2018-08-18 00:48:46 +0900 (Sat, 18 Aug 2018) | 7 lines
merge revision(s) 63255: [Backport #14708]
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]
------------------------------------------------------------------------
r64418 | nagachika | 2018-08-18 00:33:57 +0900 (Sat, 18 Aug 2018) | 5 lines
merge revision(s) 61567: [Backport #14693]
fix uninitialized variable
Likewise this can easily be noticed if you read the warnings.
------------------------------------------------------------------------
r64320 | nagachika | 2018-08-12 20:51:02 +0900 (Sun, 12 Aug 2018) | 7 lines
merge revision(s) 63252: [Backport #14707]
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]
------------------------------------------------------------------------
r64319 | nagachika | 2018-08-12 19:37:03 +0900 (Sun, 12 Aug 2018) | 8 lines
merge revision(s) 63133: [Backport #14566]
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]
------------------------------------------------------------------------
r64195 | nagachika | 2018-08-05 19:59:57 +0900 (Sun, 05 Aug 2018) | 7 lines
merge revision(s) 61766: [Backport #14350]
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]
------------------------------------------------------------------------
r63826 | nagachika | 2018-07-02 18:15:33 +0900 (Mon, 02 Jul 2018) | 9 lines
merge revision(s) 63304: [Backport #14713]
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.
------------------------------------------------------------------------
r63825 | nagachika | 2018-07-02 17:53:52 +0900 (Mon, 02 Jul 2018) | 7 lines
merge revision(s) 63696: [Backport #14853]
variable.c: fix receiver on private constant
* variable.c (rb_const_search): fix NameError :receiver attribute
on private constant, should raise with the included module, not
the ICLASS.
------------------------------------------------------------------------
r63824 | nagachika | 2018-07-02 17:30:36 +0900 (Mon, 02 Jul 2018) | 27 lines
merge revision(s) 62731,62735: [Backport #14495]
Bug Fix Enumerator::Lazy#uniq state for multiple call
* enumerator.c (lazy_uniq_i): create new hash for each calls.
[Fix GH-1820]
Currently
2.5.0-preview1 :001 > arr = (0..100).lazy.uniq{|i| i % 10}
=> #<Enumerator::Lazy: #<Enumerator::Lazy: 0..100>:uniq>
2.5.0-preview1 :002 > arr.to_a
=> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
2.5.0-preview1 :003 > arr.to_a
=> []
Expected
arr.to_a to always return same output
From: Anmol Chopra <anmolchopra@rocketbox.in>
test_enumerator.rb: duplicate assertions
* test/ruby/test_enumerator.rb (test_uniq): remove assertions
which ared duplicate of lazy enumerator tests in
test_lazy_enumerator.rb.
------------------------------------------------------------------------
r63819 | nagachika | 2018-07-02 09:31:27 +0900 (Mon, 02 Jul 2018) | 23 lines
merge revision(s) 61525,61527,63062,63650: [Backport #14846]
error.c: negative uplevel
* error.c (rb_warn_m): negative uplevel is not allowed.
[ruby-core:84568] [Bug #14262]
error.c: limit depth
* error.c (rb_warn_m): limit backtrace depth to reduce objects to
be created but not used.
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.
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
------------------------------------------------------------------------
r63818 | nagachika | 2018-07-02 09:17:38 +0900 (Mon, 02 Jul 2018) | 1 line
bump up teeny version to 2.5.2.
------------------------------------------------------------------------
r63817 | nagachika | 2018-07-02 09:14:53 +0900 (Mon, 02 Jul 2018) | 19 lines
merge revision(s) 63054,63055,63056: [Backport #14655]
test_time_tz.rb: Kiritimati tzdata fix
* test/ruby/test_time_tz.rb (TestTimeTZ#test_pacific_kiritimati):
fix the expected data at the skip of New Year's Eve 1994.
[Bug #14655]
test_time_tz.rb: Kiritimati tzdata fix
* test/ruby/test_time_tz.rb (gen_zdump_test): fix the expected
data at the Kiritimati's skip of New Year's Eve 1994.
[Bug #14655]
test_time_tz.rb: Lisbon tzdata fix
* test/ruby/test_time_tz.rb (gen_variational_zdump_test): Update
Lisbon zdump data, which fixed the 1912-01-01 transition for
Portugual and its colonies. [Bug #14655]
------------------------------------------------------------------------
r63049 | naruse | 2018-03-31 22:50:56 +0900 (Sat, 31 Mar 2018) | 3 lines
merge revision(s) 63048: [Backport #14654]
Resurvey performance of RDoc by frozen_string_literal: true [Bug #14654]
------------------------------------------------------------------------
r63035 | naruse | 2018-03-29 19:05:57 +0900 (Thu, 29 Mar 2018) | 3 lines
merge revision(s) 61470:
Add ruby_2_5 branch to .travis.yml
------------------------------------------------------------------------
r63027 | naruse | 2018-03-29 01:45:58 +0900 (Thu, 29 Mar 2018) | 2 lines
p57
------------------------------------------------------------------------
r63026 | svn | 2018-03-29 01:44:34 +0900 (Thu, 29 Mar 2018) | 1 line
* 2018-03-29
------------------------------------------------------------------------
r63025 | naruse | 2018-03-29 01:44:33 +0900 (Thu, 29 Mar 2018) | 4 lines
revert r62985 (r62966 in trunk)
It breaks test-all
------------------------------------------------------------------------
r63011 | naruse | 2018-03-28 22:46:14 +0900 (Wed, 28 Mar 2018) | 9 lines
merge revision(s) 63008:
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.
------------------------------------------------------------------------
r63010 | naruse | 2018-03-28 22:45:50 +0900 (Wed, 28 Mar 2018) | 2 lines
Revert wrong commit r62976-r62978
------------------------------------------------------------------------
r63009 | naruse | 2018-03-28 22:43:23 +0900 (Wed, 28 Mar 2018) | 6 lines
merge revision(s) 63000:
unixsocket.c: abstract namespace
* ext/socket/unixsocket.c (unixsock_path_value): fix r62991 for
Linux abstract namespace.
------------------------------------------------------------------------
r63007 | naruse | 2018-03-28 21:54:26 +0900 (Wed, 28 Mar 2018) | 2 lines
fix r62970 as r62990
------------------------------------------------------------------------
r63006 | naruse | 2018-03-28 21:50:56 +0900 (Wed, 28 Mar 2018) | 98 lines
merge revision(s) 62953-62959:
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]
------------------------------------------------------------------------
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
------------------------------------------------------------------------
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]
------------------------------------------------------------------------
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
------------------------------------------------------------------------
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
------------------------------------------------------------------------
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
------------------------------------------------------------------------
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
------------------------------------------------------------------------
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
------------------------------------------------------------------------
r62986 | naruse | 2018-03-28 18:26:17 +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
------------------------------------------------------------------------
r62985 | naruse | 2018-03-28 18:26:16 +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
------------------------------------------------------------------------
r62984 | naruse | 2018-03-28 18:26:14 +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
------------------------------------------------------------------------
r62983 | naruse | 2018-03-28 18:26:13 +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
------------------------------------------------------------------------
r62982 | naruse | 2018-03-28 18:26:12 +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
------------------------------------------------------------------------
r62981 | naruse | 2018-03-28 18:26:12 +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
------------------------------------------------------------------------
r62980 | naruse | 2018-03-28 18:26:11 +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)
------------------------------------------------------------------------
r62979 | naruse | 2018-03-28 18:26:10 +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
------------------------------------------------------------------------
r62978 | naruse | 2018-03-28 18:26:09 +0900 (Wed, 28 Mar 2018) | 1 line
sdbm: constified
------------------------------------------------------------------------
r62977 | naruse | 2018-03-28 18:26:08 +0900 (Wed, 28 Mar 2018) | 4 lines
sdbm: check offset
* ext/sdbm/_sdbm.c (splpage): check offset range.
https://hackerone.com/reports/271291
------------------------------------------------------------------------
r62976 | naruse | 2018-03-28 18:26:07 +0900 (Wed, 28 Mar 2018) | 6 lines
sdbm: check offset
* ext/sdbm/_sdbm.c (getpair, getnkey): check offset range.
https://hackerone.com/reports/271096
* ext/sdbm/init.c (fsdbm_each_pair): raise if fetch failed.
------------------------------------------------------------------------
r62975 | naruse | 2018-03-28 18:26:06 +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
------------------------------------------------------------------------
r62974 | naruse | 2018-03-28 18:26:04 +0900 (Wed, 28 Mar 2018) | 9 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
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
------------------------------------------------------------------------
r62973 | naruse | 2018-03-28 18:26:01 +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
------------------------------------------------------------------------
r62972 | svn | 2018-03-28 18:26:01 +0900 (Wed, 28 Mar 2018) | 1 line
* 2018-03-28
------------------------------------------------------------------------
r62971 | naruse | 2018-03-28 18:26:00 +0900 (Wed, 28 Mar 2018) | 1 line
Remove directory separators
------------------------------------------------------------------------
r62911 | naruse | 2018-03-25 01:00:27 +0900 (Sun, 25 Mar 2018) | 18 lines
merge revision(s) 61587,61617,61618: [Backport #14273]
compile.c: next label
* compile.c (compile_next): label for jump to the end of block is
removable.
compile.c: remove more unreachable chunk
* compile.c (remove_unreachable_chunk): remove beyond labels to be
removed.
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]
------------------------------------------------------------------------
r62909 | naruse | 2018-03-24 20:43:50 +0900 (Sat, 24 Mar 2018) | 13 lines
merge revision(s) 62723,62724: [Backport #14584]
parse.y: reduce duplicate code
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.
------------------------------------------------------------------------
r62905 | naruse | 2018-03-24 19:57:34 +0900 (Sat, 24 Mar 2018) | 11 lines
merge revision(s) 62548,62894: [Backport #14324]
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.
error.c: full_message options
* error.c (exc_full_message): add highlight: and reverse: keyword
options. [Bug #14324]
------------------------------------------------------------------------
r62896 | naruse | 2018-03-22 20:18:00 +0900 (Thu, 22 Mar 2018) | 7 lines
merge revision(s) 62892,62893: [Backport #14363]
fix each_grapheme_cluster's size [Bug #14363]
From: Hugo Peixoto <hugo.peixoto@gmail.com>
Factor out get_reg_grapheme_cluster
------------------------------------------------------------------------
r62895 | naruse | 2018-03-22 19:02:54 +0900 (Thu, 22 Mar 2018) | 2 lines
teenyup
------------------------------------------------------------------------
r62890 | svn | 2018-03-22 16:00:18 +0900 (Thu, 22 Mar 2018) | 1 line
* 2018-03-22
------------------------------------------------------------------------
r62889 | naruse | 2018-03-22 16:00:17 +0900 (Thu, 22 Mar 2018) | 14 lines
merge revision(s) 62042,62044: [Backport #14380]
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
Fix rubyspec against the change in Hash#transform_keys!
[Bug #14380] [ruby-core:84951]
------------------------------------------------------------------------
r62860 | naruse | 2018-03-20 18:52:52 +0900 (Tue, 20 Mar 2018) | 9 lines
merge revision(s) 62725: [Backport #14604]
Fix setting method visibility on method wrapped with prepend
Ignore prepended modules when looking for already defined methods on a
class to set the visibility on.
[Fix GH-1834]
From: Dylan Thacker-Smith <Dylan.Smith@shopify.com>
------------------------------------------------------------------------
r62859 | naruse | 2018-03-20 18:39:52 +0900 (Tue, 20 Mar 2018) | 7 lines
merge revision(s) 62734: [Backport #14613]
Add missing class FrozenError to Exception subclasses list documentation
[Fix GH-1818]
From: Miguel Landaeta <miguel@miguel.cc>
------------------------------------------------------------------------
r62858 | naruse | 2018-03-20 18:37:39 +0900 (Tue, 20 Mar 2018) | 37 lines
merge revision(s) 62396: [Backport #14357]
st.c: retry operations if rebuilt
Calling the .eql? and .hash methods during a Hash operation can
result in a thread switch or a signal handler to run: allowing
one execution context to rebuild the hash table while another is
still reading or writing the table. This results in a
use-after-free bug affecting the thread_safe-0.3.6 test suite
and likely other bugs.
This bug did not affect users of commonly keys (String, Symbol,
Fixnum) as those are optimized to avoid method dispatch
for .eql? and .hash methods.
A separate version of this change needs to be ported to Ruby 2.3.x
which had a different implementation of st.c but was affected
by the same bug.
* st.c: Add comment about table rebuilding during comparison.
(DO_PTR_EQUAL_CHECK): New macro.
(REBUILT_TABLE_ENTRY_IND, REBUILT_TABLE_BIN_IND): New macros.
(find_entry, find_table_entry_ind, find_table_bin_ind): Use new
macros. Return the rebuild flag.
(find_table_bin_ptr_and_reserve): Ditto.
(st_lookup, st_get_key, st_insert, st_insert2): Retry the
operation if the table was rebuilt.
(st_general_delete, st_shift, st_update, st_general_foreach):
Ditto.
(st_rehash_linear, st_rehash_indexed): Use DO_PTR_EQUAL_CHECK.
Return the rebuild flag.
(st_rehash): Retry the operation if the table was rebuilt.
[ruby-core:85510] [Ruby trunk Bug#14357]
Thanks to Vit Ondruch for reporting the bug.
From: Vladimir Makarov <vmakarov@redhat.com>
------------------------------------------------------------------------
r62854 | naruse | 2018-03-20 11:09:21 +0900 (Tue, 20 Mar 2018) | 7 lines
merge revision(s) 62673: [Backport #14577]
thread.c: deadlock in backtrace
* thread.c (unblock_function_set): check interrupts just once
during raising exceptions, as they are deferred since r16651.
[ruby-core:85939] [Bug #14577]
------------------------------------------------------------------------
r62853 | svn | 2018-03-20 11:08:28 +0900 (Tue, 20 Mar 2018) | 1 line
* 2018-03-20
------------------------------------------------------------------------
r62852 | naruse | 2018-03-20 11:08:27 +0900 (Tue, 20 Mar 2018) | 13 lines
merge revision(s) 62668: [Backport #14578]
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")
------------------------------------------------------------------------
r62837 | naruse | 2018-03-19 17:27:04 +0900 (Mon, 19 Mar 2018) | 34 lines
merge revision(s) 62244,62246,62301,62302,62303,62422,62436,62452: [Backport #14481]
Merge RubyGems-2.7.5 from upstream.
Please see its details: http://blog.rubygems.org/2018/02/06/2.7.5-released.html
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.
test_gem_commands_setup_command.rb: BUNDLER_VERS
* test/rubygems/test_gem_commands_setup_command.rb: run bundled
gem command, instead of installed one.
no need to set bundled bundler unless Gem::USE_BUNDLER_FOR_GEMDEPS
revert r62302 and force to define the version constant
Merge RubyGems 2.7.6 from upstream.
It fixed some security vulnerabilities.
http://blog.rubygems.org/2018/02/15/2.7.6-released.html
fix regexp literal warning.
test/rubygems/test_gem_server.rb: eliminate duplicated character class warning.
[Bug #14481]
Remove unnecessary `[]`s
------------------------------------------------------------------------
r62835 | naruse | 2018-03-19 17:15:50 +0900 (Mon, 19 Mar 2018) | 2 lines
Merge r62197 to ease next merge
------------------------------------------------------------------------
r62834 | naruse | 2018-03-19 17:15:16 +0900 (Mon, 19 Mar 2018) | 20 lines
merge revision(s) 61501,61758: [Backport #14481]
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.
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.
------------------------------------------------------------------------
r62761 | naruse | 2018-03-15 16:35:54 +0900 (Thu, 15 Mar 2018) | 15 lines
merge revision(s) 62394,62395: [Backport #14469]
vm_insnhelper.c: rb_autoloading_value flag
* vm_insnhelper.c (vm_get_ev_const): add flag argument of
`rb_autoloading_value`.
* constant.h (rb_autoloading_value): moved the declaration from
vm_core.h for `rb_const_flag_t`. [ruby-core:85516] [Bug #14469]
variable.c: flags at autoloading
* variable.c (const_tbl_update): flags by deprecate_constant /
private_constant set during autoloading should be preserved
after required. [ruby-core:85516] [Bug #14469]
------------------------------------------------------------------------
r62632 | naruse | 2018-03-02 17:25:51 +0900 (Fri, 02 Mar 2018) | 13 lines
merge revision(s) 62606,62607: [Backport #14557]
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.
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]
------------------------------------------------------------------------
r62610 | naruse | 2018-02-28 18:52:40 +0900 (Wed, 28 Feb 2018) | 8 lines
merge revision(s) 62572: [Backport #14549]
date_core.c: defensive code
* ext/date/date_core.c (f_cmp): check comparison failure.
* ext/date/date_core.c (d_lite_step): deal with the comparison
result more defensively. [ruby-core:85796] [Bug #14549]
------------------------------------------------------------------------
r62609 | naruse | 2018-02-28 18:49:29 +0900 (Wed, 28 Feb 2018) | 12 lines
merge revision(s) 62506,62508: [Backport #14438]
test_time_tz.rb: past Japanese DST tzdata fix
* test/ruby/test_time_tz.rb (TestTimeTZ#test_asia_tokyo): follow
the tzdata 2018 fix of Japanese DST transitions (1948-1951).
[ruby-core:85373] [Bug #14438]
test_time_tz.rb: past Japanese DST tzdata fix
* test/ruby/test_time_tz.rb (TestTimeTZ#test_asia_tokyo): fix
the expected data at the end of DST. [Bug #14438]
------------------------------------------------------------------------
r62587 | svn | 2018-02-26 17:43:45 +0900 (Mon, 26 Feb 2018) | 1 line
* 2018-02-26
------------------------------------------------------------------------
r62586 | naruse | 2018-02-26 17:43:44 +0900 (Mon, 26 Feb 2018) | 5 lines
merge revision(s) 62094,62584: [Backport #14407]
Merge ruby/spec@fd56cd4
------------------------------------------------------------------------
r62569 | svn | 2018-02-25 09:36:44 +0900 (Sun, 25 Feb 2018) | 1 line
* 2018-02-25
------------------------------------------------------------------------
r62568 | naruse | 2018-02-25 09:36:43 +0900 (Sun, 25 Feb 2018) | 9 lines
merge revision(s) 62071: [Backport #14407]
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>
------------------------------------------------------------------------
r62562 | naruse | 2018-02-24 16:19:48 +0900 (Sat, 24 Feb 2018) | 8 lines
merge revision(s) 62555: [Backport #14547]
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]
------------------------------------------------------------------------
r62561 | naruse | 2018-02-24 16:19:06 +0900 (Sat, 24 Feb 2018) | 10 lines
merge revision(s) 62513: [Backport #12762]
Update url with 404 status on LEGAL file.
* Update redirected and upstream url.
* Added the Wayback Machine url for missing link.
[Bug #12762][ruby-dev:49802]
From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
------------------------------------------------------------------------
r62539 | naruse | 2018-02-23 07:04:35 +0900 (Fri, 23 Feb 2018) | 6 lines
merge revision(s) 61862: [Backport #14368]
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.
------------------------------------------------------------------------
r62538 | naruse | 2018-02-23 06:41:46 +0900 (Fri, 23 Feb 2018) | 8 lines
merge revision(s) 62107: [Backport #14420]
force fixable
* complex.c (nucomp_hash): force hash values fixable.
[ruby-core:85224] [Bug #14420]
* rational.c (nurat_hash): ditto.
------------------------------------------------------------------------
r62537 | naruse | 2018-02-23 06:29:36 +0900 (Fri, 23 Feb 2018) | 12 lines
merge revision(s) 61605,62359,62361: [Backport #14356]
Try to fix Travis CI configuration.
.travis.yml: send notification to #alerts
instead of #commits.
.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.
------------------------------------------------------------------------
r62527 | naruse | 2018-02-22 20:01:13 +0900 (Thu, 22 Feb 2018) | 6 lines
merge revision(s) 62333: [Backport #14459]
compile.c: popped hash
* compile.c (compile_array): skip creating new hash if preceeding
elements are popped all. [ruby-core:85486] [Bug #14459]
------------------------------------------------------------------------
r62511 | naruse | 2018-02-21 15:16:32 +0900 (Wed, 21 Feb 2018) | 8 lines
merge revision(s) 61484: [Backport #14232]
vm_method.c: fix super in refined module
* vm_method.c (rb_method_entry_complement_defined_class): clone
the original method entry of refined module instance method with
the active ICLASS, to track super method chain.
[ruby-dev:50390] [Bug #14232]
------------------------------------------------------------------------
r62510 | naruse | 2018-02-21 15:00:51 +0900 (Wed, 21 Feb 2018) | 6 lines
merge revision(s) 61469: [Backport #14427]
irb.rb: fix highlight
* lib/irb.rb (IRB::Irb#eval_input): fix highlight for multiple
lines exception messages.
------------------------------------------------------------------------
r62509 | naruse | 2018-02-21 14:42:42 +0900 (Wed, 21 Feb 2018) | 6 lines
merge revision(s) 61523: [Backport #14261]
parse.y: assignable_error
* parse.y (assignable_gen): should return valid NODE always even
on errors. [ruby-core:84565] [Bug #14261]
------------------------------------------------------------------------
r62507 | naruse | 2018-02-21 13:36:00 +0900 (Wed, 21 Feb 2018) | 8 lines
merge revision(s) 62115: [Backport #14421]
proc: fix super_method segfault after bind
* proc.c: handle undefined iclass
[ruby-core:85231] [Bug #14421]
From: Eric Wong <e@80x24.org>
------------------------------------------------------------------------
r62501 | naruse | 2018-02-21 05:11:47 +0900 (Wed, 21 Feb 2018) | 21 lines
merge revision(s) 62116,62151: [Backport #14425]
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>
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]
------------------------------------------------------------------------
r62483 | naruse | 2018-02-19 15:51:53 +0900 (Mon, 19 Feb 2018) | 7 lines
merge revision(s) 62040: [Backport #14388]
string.c: clear substring code range
* string.c (str_substr): substring of broken code range string may
be valid or broken. patch by tommy (Masahiro Tomita) at
[ruby-dev:50430] [Bug #14388].
------------------------------------------------------------------------
r62482 | naruse | 2018-02-19 15:36:03 +0900 (Mon, 19 Feb 2018) | 5 lines
merge revision(s) 61645: [Backport #14333]
Added bundler for `test-bundled-gems` dependency.
rake, did_you_mean, test-unit depends on bundler.
------------------------------------------------------------------------
r62481 | naruse | 2018-02-19 15:33:01 +0900 (Mon, 19 Feb 2018) | 14 lines
merge revision(s) 61711:
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]>.
------------------------------------------------------------------------
r62472 | naruse | 2018-02-18 23:25:43 +0900 (Sun, 18 Feb 2018) | 3 lines
merge revision(s) 61591: [Backport #14312]
iseq.c (rb_iseq_new_with_opt): handle the case where node is imemo_func
------------------------------------------------------------------------
r62471 | svn | 2018-02-18 20:53:15 +0900 (Sun, 18 Feb 2018) | 1 line
* 2018-02-18
------------------------------------------------------------------------
r62470 | naruse | 2018-02-18 20:53:14 +0900 (Sun, 18 Feb 2018) | 4 lines
Revert r62426
it cause test failure
------------------------------------------------------------------------
r62428 | naruse | 2018-02-16 17:34:45 +0900 (Fri, 16 Feb 2018) | 11 lines
merge revision(s) 61616: [Backport #14314]
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]
------------------------------------------------------------------------
r62427 | naruse | 2018-02-16 17:31:35 +0900 (Fri, 16 Feb 2018) | 10 lines
merge revision(s) 61754: [Backport #14346]
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]
------------------------------------------------------------------------
r62426 | naruse | 2018-02-16 17:28:48 +0900 (Fri, 16 Feb 2018) | 13 lines
merge revision(s) 61617,61618: [Backport #14273]
compile.c: remove more unreachable chunk
* compile.c (remove_unreachable_chunk): remove beyond labels to be
removed.
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]
------------------------------------------------------------------------
r62425 | naruse | 2018-02-16 17:17:36 +0900 (Fri, 16 Feb 2018) | 13 lines
merge revision(s) 61639: [Backport #14323]
net/ftp: fix FrozenError in BufferedSocket
I noticed this bug while working on something else with
RUBYOPT=-d on, existing test cases all passed with it.
Note: I use String.new because it is the local style, here,
I prefer +'' (or ''.b, for a future commit)
* lib/net/ftp.rb (BufferedSocket#read): use String.new
* test/net/ftp/test_buffered_socket.rb (test_read_nil): new test
[ruby-core:84675] [Bug #14323]
------------------------------------------------------------------------
r62421 | naruse | 2018-02-16 16:36:21 +0900 (Fri, 16 Feb 2018) | 6 lines
merge revision(s) 61636: [Backport #14257]
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]
------------------------------------------------------------------------
r62420 | naruse | 2018-02-16 16:32:11 +0900 (Fri, 16 Feb 2018) | 9 lines
merge revision(s) 61603: [Backport #14279]
check array for zsuper. [Bug #14279]
* compile.c (iseq_compile_each0): for zsuper (NODE_ZSUPER), we need to check
given argument is Array or not.
* test/ruby/test_super.rb: add a test for this bug.
------------------------------------------------------------------------
r62096 | svn | 2018-01-30 02:00:37 +0900 (Tue, 30 Jan 2018) | 1 line
* 2018-01-30
------------------------------------------------------------------------
r62095 | naruse | 2018-01-30 02:00:36 +0900 (Tue, 30 Jan 2018) | 108 lines
merge revision(s) 61564,61565,61571: [Backport #14270]
fix SEGV touching uninitialized memory
This function can be called from Init_VM().
No assumption can be made about object internals.
(lldb) run
Process 15734 launched: './miniruby' (x86_64)
Process 15734 stopped
* thread #1: tid = 0x1441d4, 0x00000001000bdfcb miniruby`rb_raw_iseq_info(buff="0x0000000100f61f48 [0 ] T_IMEMO iseq", buff_size=256, iseq=0x0000000100f61f48) + 27 at gc.c:9273, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x50)
frame #0: 0x00000001000bdfcb miniruby`rb_raw_iseq_info(buff="0x0000000100f61f48 [0 ] T_IMEMO iseq", buff_size=256, iseq=0x0000000100f61f48) + 27 at gc.c:9273
9270 static void
9271 rb_raw_iseq_info(char *buff, const int buff_size, const rb_iseq_t *iseq)
9272 {
-> 9273 if (iseq->body->location.label) {
9274 VALUE path = rb_iseq_path(iseq);
9275 snprintf(buff, buff_size, "%s %s@%s:%d", buff,
9276 RSTRING_PTR(iseq->body->location.label),
(lldb) p *iseq
(rb_iseq_t) $0 = {
flags = 28698
reserved1 = 0
body = 0x0000000000000000
aux = {
compile_data = 0x0000000000000000
loader = (obj = 0, index = 0)
trace_events = 0
}
}
(lldb) bt
* thread #1: tid = 0x1441d4, 0x00000001000bdfcb miniruby`rb_raw_iseq_info(buff="0x0000000100f61f48 [0 ] T_IMEMO iseq", buff_size=256, iseq=0x0000000100f61f48) + 27 at gc.c:9273, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x50)
* frame #0: 0x00000001000bdfcb miniruby`rb_raw_iseq_info(buff="0x0000000100f61f48 [0 ] T_IMEMO iseq", buff_size=256, iseq=0x0000000100f61f48) + 27 at gc.c:9273
frame #1: 0x00000001000bde72 miniruby`rb_raw_obj_info(buff="0x0000000100f61f48 [0 ] T_IMEMO iseq", buff_size=256, obj=4311097160) + 2786 at gc.c:9396
frame #2: 0x00000001000b7c5f miniruby`obj_info(obj=4311097160) + 95 at gc.c:9428
frame #3: 0x00000001000c16a8 miniruby`newobj_init(klass=0, flags=28698, v1=0, v2=0, v3=0, wb_protected=1, objspace=0x00000001007ee280, obj=4311097160) + 424 at gc.c:1887
frame #4: 0x00000001000b44c9 miniruby`newobj_of(klass=0, flags=28698, v1=0, v2=0, v3=0, wb_protected=1) + 217 at gc.c:1970
frame #5: 0x00000001000b464b miniruby`rb_imemo_new(type=imemo_iseq, v1=0, v2=0, v3=0, v0=0) + 75 at gc.c:2017
frame #6: 0x00000001000fd914 miniruby`iseq_imemo_alloc + 36 at iseq.h:156
frame #7: 0x00000001000f6e1d miniruby`iseq_alloc + 13 at iseq.c:211
frame #8: 0x00000001000f6bf8 miniruby`rb_iseq_new_with_opt(node=0x0000000000000000, name=4311097200, path=4311097200, realpath=8, first_lineno=1, parent=0x0000000000000000, type=ISEQ_TYPE_TOP, option=0x0000000100335c30) + 56 at iseq.c:519
frame #9: 0x00000001000f6bb6 miniruby`rb_iseq_new(node=0x0000000000000000, name=4311097200, path=4311097200, realpath=8, parent=0x0000000000000000, type=ISEQ_TYPE_TOP) + 86 at iseq.c:480
frame #10: 0x0000000100284bb0 miniruby`Init_VM + 1040 at vm.c:3022
frame #11: 0x00000001000d4f7d miniruby`rb_call_inits + 189 at inits.c:55
frame #12: 0x000000010009fe06 miniruby`ruby_setup + 198 at eval.c:61
frame #13: 0x000000010009fe5d miniruby`ruby_init + 13 at eval.c:78
frame #14: 0x00000001000009ed miniruby`main(argc=2, argv=0x00007fff5fbfdbf0) + 93 at main.c:41
frame #15: 0x00007fff88eda5ad libdyld.dylib`start + 1
(lldb)
fix SEGV touching uninitialized memory
This function can be called from rb_data_typed_object_zalloc().
No assumption can be made about object internals.
(lldb) run
Process 22135 launched: './miniruby' (x86_64)
Process 22135 stopped
* thread #1: tid = 0x14a3af, 0x000000010008ac8a miniruby`vm_block_type(block=0x0000000000000000) + 12 at vm_core.h:1364, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x18)
frame #0: 0x000000010008ac8a miniruby`vm_block_type(block=0x0000000000000000) + 12 at vm_core.h:1364
1361 break;
1362 }
1363 #endif
-> 1364 return block->type;
1365 }
1366
1367 static inline void
(lldb) bt
* thread #1: tid = 0x14a3af, 0x000000010008ac8a miniruby`vm_block_type(block=0x0000000000000000) + 12 at vm_core.h:1364, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x18)
* frame #0: 0x000000010008ac8a miniruby`vm_block_type(block=0x0000000000000000) + 12 at vm_core.h:1364
frame #1: 0x000000010008acdb miniruby`vm_block_iseq(block=0x0000000000000000) + 24 at vm_core.h:1399
frame #2: 0x000000010008acc1 miniruby`vm_proc_iseq(procval=4310866360) + 32 at vm_core.h:1387
frame #3: 0x000000010009cbed miniruby`rb_raw_obj_info(buff="0x0000000100f299b8 [0 ] proc (Proc)", buff_size=256, obj=4310866360) + 1513 at gc.c:9349
frame #4: 0x000000010009cf01 miniruby`obj_info(obj=4310866360) + 98 at gc.c:9428
frame #5: 0x000000010008ca1b miniruby`newobj_init(klass=4311027960, flags=12, v1=4298186080, v2=1, v3=0, wb_protected=32, objspace=0x00000001007cf280, obj=4310866360) + 338 at gc.c:1887
frame #6: 0x000000010008cce5 miniruby`newobj_of(klass=4311027960, flags=12, v1=4298186080, v2=1, v3=0, wb_protected=32) + 171 at gc.c:1970
frame #7: 0x000000010008d01d miniruby`rb_data_typed_object_wrap(klass=4311027960, datap=0x0000000000000000, type=0x0000000100311d60) + 133 at gc.c:2062
frame #8: 0x000000010008d04e miniruby`rb_data_typed_object_zalloc(klass=4311027960, size=40, type=0x0000000100311d60) + 42 at gc.c:2073
frame #9: 0x000000010011b459 miniruby`rb_proc_alloc(klass=4311027960) + 36 at proc.c:113
frame #10: 0x0000000100204d8e miniruby`vm_proc_create_from_captured(klass=4311027960, captured=0x00000001025003f8, block_type=block_type_iseq, is_from_method='\0', is_lambda='\x01') + 44 at vm.c:814
frame #11: 0x00000001002050d8 miniruby`rb_vm_make_proc_lambda(ec=0x00000001007cf548, captured=0x00000001025003f8, klass=4311027960, is_lambda='\x01') + 134 at vm.c:892
frame #12: 0x000000010011c0d2 miniruby`proc_new(klass=4311027960, is_lambda='\x01') + 445 at proc.c:752
frame #13: 0x000000010011c154 miniruby`rb_block_lambda + 27 at proc.c:808
frame #14: 0x00000001001ee7e3 miniruby`call_cfunc_0(func=(miniruby`rb_block_lambda at proc.c:807), recv=4310991600, argc=0, argv=0x0000000102400480) + 41 at vm_insnhelper.c:1729
frame #15: 0x00000001001ef2c3 miniruby`vm_call_cfunc_with_frame(ec=0x00000001007cf548, reg_cfp=0x00000001025003e0, calling=0x00007fff5fbfd4d0, ci=0x0000000102537be0, cc=0x000000010253e0f0) + 386 at vm_insnhelper.c:1918
frame #16: 0x00000001001ef412 miniruby`vm_call_cfunc(ec=0x00000001007cf548, reg_cfp=0x00000001025003e0, calling=0x00007fff5fbfd4d0, ci=0x0000000102537be0, cc=0x000000010253e0f0) + 149 at vm_insnhelper.c:1934
frame #17: 0x00000001001f0655 miniruby`vm_call_method_each_type(ec=0x00000001007cf548, cfp=0x00000001025003e0, calling=0x00007fff5fbfd4d0, ci=0x0000000102537be0, cc=0x000000010253e0f0) + 239 at vm_insnhelper.c:2232
frame #18: 0x00000001001f0ce0 miniruby`vm_call_method(ec=0x00000001007cf548, cfp=0x00000001025003e0, calling=0x00007fff5fbfd4d0, ci=0x0000000102537be0, cc=0x000000010253e0f0) + 117 at vm_insnhelper.c:2355
frame #19: 0x00000001001f0eb6 miniruby`vm_call_general(ec=0x00000001007cf548, reg_cfp=0x00000001025003e0, calling=0x00007fff5fbfd4d0, ci=0x0000000102537be0, cc=0x000000010253e0f0) + 59 at vm_insnhelper.c:2398
frame #20: 0x00000001001f6e61 miniruby`vm_exec_core(ec=0x00000001007cf548, initial=0) + 7480 at insns.def:850
frame #21: 0x0000000100207995 miniruby`vm_exec(ec=0x00000001007cf548) + 230 at vm.c:1771
frame #22: 0x0000000100208647 miniruby`rb_iseq_eval_main(iseq=0x0000000100f29fd0) + 52 at vm.c:2019
frame #23: 0x000000010007b750 miniruby`ruby_exec_internal(n=0x0000000100f29fd0) + 297 at eval.c:246
frame #24: 0x000000010007b876 miniruby`ruby_exec_node(n=0x0000000100f29fd0) + 36 at eval.c:310
frame #25: 0x000000010007b849 miniruby`ruby_run_node(n=0x0000000100f29fd0) + 62 at eval.c:302
frame #26: 0x0000000100000c05 miniruby`main(argc=2, argv=0x00007fff5fbfdbf0) + 113 at main.c:42
frame #27: 0x00007fff88eda5ad libdyld.dylib`start + 1
(lldb)
check an existence of block.
* gc.c (rb_raw_obj_info): check block before using it.
* vm_core.h (vm_block_iseq): r61565 introduced NULL check but this
check is only needed by `rb_raw_obj_info()` and it is called at GC
debug mode. Above fix for `rb_raw_obj_info()` solves this problem and
NULL check should not be needed any more.
------------------------------------------------------------------------
r62023 | naruse | 2018-01-24 17:11:16 +0900 (Wed, 24 Jan 2018) | 292 lines
merge revision(s) 61562,61563,61566,61568,61569: [Backport #14269]
fix SEGV touching uninitialized memory
This function can be called from boot_defclass().
No assumption can be made about object internals.
(lldb) run
Process 2386 launched: './miniruby' (x86_64)
Process 2386 stopped
* thread #1: tid = 0x13f3b6, 0x00000001001e0b26 miniruby`rb_class_path_cached(klass=4311373720) + 20 at variable.c:321, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x8)
frame #0: 0x00000001001e0b26 miniruby`rb_class_path_cached(klass=4311373720) + 20 at variable.c:321
318 VALUE
319 rb_class_path_cached(VALUE klass)
320 {
-> 321 st_table *ivtbl = RCLASS_IV_TBL(klass);
322 st_data_t n;
323
324 if (!ivtbl) return Qnil;
(lldb) bt
* thread #1: tid = 0x13f3b6, 0x00000001001e0b26 miniruby`rb_class_path_cached(klass=4311373720) + 20 at variable.c:321, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x8)
* frame #0: 0x00000001001e0b26 miniruby`rb_class_path_cached(klass=4311373720) + 20 at variable.c:321
frame #1: 0x000000010009cbd0 miniruby`rb_raw_obj_info(buff="0x0000000100fa5798 [2 ] T_CLASS", buff_size=256, obj=4311373720) + 1393 at gc.c:9341
frame #2: 0x000000010009cf16 miniruby`obj_info(obj=4311373720) + 98 at gc.c:9423
frame #3: 0x000000010008ca87 miniruby`newobj_init(klass=0, flags=66, v1=0, v2=0, v3=0, wb_protected=1, objspace=0x00000001007cf280, obj=4311373720) + 338 at gc.c:1887
frame #4: 0x000000010008cd51 miniruby`newobj_of(klass=0, flags=66, v1=0, v2=0, v3=0, wb_protected=1) + 171 at gc.c:1970
frame #5: 0x000000010008ce1b miniruby`rb_wb_protected_newobj_of(klass=0, flags=66) + 54 at gc.c:1990
frame #6: 0x0000000100027563 miniruby`class_alloc(flags=2, klass=0) + 46 at class.c:165
frame #7: 0x000000010002761a miniruby`rb_class_boot(super=0) + 35 at class.c:203
frame #8: 0x0000000100028612 miniruby`boot_defclass(name="BasicObject", super=0) + 28 at class.c:537
frame #9: 0x000000010002868b miniruby`Init_class_hierarchy + 26 at class.c:548
frame #10: 0x00000001000efe69 miniruby`InitVM_Object + 9 at object.c:3892
frame #11: 0x00000001000f138e miniruby`Init_Object + 57 at object.c:4122
frame #12: 0x00000001000a59bd miniruby`rb_call_inits + 29 at inits.c:23
frame #13: 0x000000010007af30 miniruby`ruby_setup + 229 at eval.c:61
frame #14: 0x000000010007af7e miniruby`ruby_init + 13 at eval.c:78
frame #15: 0x0000000100000c58 miniruby`main(argc=2, argv=0x00007fff5fbfdbf0) + 88 at main.c:41
frame #16: 0x00007fff88eda5ad libdyld.dylib`start + 1
(lldb)
fix SEGV touching uninitialized memory
This function can be called from InitVM_Object().
No assumption can be made about object internals.
(lldb) run
Process 10675 launched: './miniruby' (x86_64)
Process 10675 stopped
* thread #1: tid = 0x14252c, 0x00000001000bdda9 miniruby`rb_raw_obj_info(buff="0x0000000100fc1588 [0 ] T_IMEMO ment", buff_size=256, obj=4311487880) + 2489 at gc.c:9383, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
frame #0: 0x00000001000bdda9 miniruby`rb_raw_obj_info(buff="0x0000000100fc1588 [0 ] T_IMEMO ment", buff_size=256, obj=4311487880) + 2489 at gc.c:9383
9380 const rb_method_entry_t *me = &RANY(obj)->as.imemo.ment;
9381 snprintf(buff, buff_size, "%s (called_id: %s, type: %s, alias: %d, owner: %s, defined_class: %s)", buff,
9382 rb_id2name(me->called_id),
-> 9383 method_type_name(me->def->type),
9384 me->def->alias_count,
9385 obj_info(me->owner),
9386 obj_info(me->defined_class));
(lldb) p *me
(rb_method_entry_t) $0 = {
flags = 24602
defined_class = 4311488400
def = 0x0000000000000000
called_id = 3057
owner = 4311488400
}
(lldb) bt
* thread #1: tid = 0x14252c, 0x00000001000bdda9 miniruby`rb_raw_obj_info(buff="0x0000000100fc1588 [0 ] T_IMEMO ment", buff_size=256, obj=4311487880) + 2489 at gc.c:9383, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
* frame #0: 0x00000001000bdda9 miniruby`rb_raw_obj_info(buff="0x0000000100fc1588 [0 ] T_IMEMO ment", buff_size=256, obj=4311487880) + 2489 at gc.c:9383
frame #1: 0x00000001000b7cbf miniruby`obj_info(obj=4311487880) + 95 at gc.c:9423
frame #2: 0x00000001000c16a8 miniruby`newobj_init(klass=4311488400, flags=24602, v1=0, v2=3057, v3=4311488400, wb_protected=1, objspace=0x00000001007ee280, obj=4311487880) + 424 at gc.c:1887
frame #3: 0x00000001000b4529 miniruby`newobj_of(klass=4311488400, flags=24602, v1=0, v2=3057, v3=4311488400, wb_protected=1) + 217 at gc.c:1970
frame #4: 0x00000001000b46ab miniruby`rb_imemo_new(type=imemo_ment, v1=0, v2=3057, v3=4311488400, v0=4311488400) + 75 at gc.c:2017
frame #5: 0x00000001002773b4 miniruby`rb_method_entry_alloc(called_id=3057, owner=4311488400, defined_class=4311488400, def=0x0000000000000000) + 52 at vm_method.c:368
frame #6: 0x0000000100277307 miniruby`rb_method_entry_create(called_id=3057, klass=4311488400, visi=METHOD_VISI_PRIVATE, def=0x0000000000000000) + 71 at vm_method.c:389
frame #7: 0x00000001002784c7 miniruby`rb_method_entry_make(klass=4311488400, mid=3057, defined_class=4311488400, visi=METHOD_VISI_PRIVATE, type=VM_METHOD_TYPE_CFUNC, def=0x0000000000000000, original_id=3057, opts=0x00007fff5fbfd9e8) + 1207 at vm_method.c:594
frame #8: 0x00000001002770f9 miniruby`rb_add_method(klass=4311488400, mid=3057, type=VM_METHOD_TYPE_CFUNC, opts=0x00007fff5fbfd9e8, visi=METHOD_VISI_PRIVATE) + 73 at vm_method.c:650
frame #9: 0x000000010027708a miniruby`rb_add_method_cfunc(klass=4311488400, mid=3057, func=(miniruby`rb_obj_dummy at object.c:1125), argc=0, visi=METHOD_VISI_PRIVATE) + 138 at vm_method.c:137
frame #10: 0x00000001000391e4 miniruby`rb_define_private_method(klass=4311488400, name="initialize", func=(miniruby`rb_obj_dummy at object.c:1125), argc=0) + 68 at class.c:1529
frame #11: 0x000000010013f5bf miniruby`InitVM_Object + 47 at object.c:3905
frame #12: 0x0000000100142ffd miniruby`Init_Object + 61 at object.c:4122
frame #13: 0x00000001000d4edd miniruby`rb_call_inits + 29 at inits.c:23
frame #14: 0x000000010009fe66 miniruby`ruby_setup + 198 at eval.c:61
frame #15: 0x000000010009febd miniruby`ruby_init + 13 at eval.c:78
frame #16: 0x0000000100000a4d miniruby`main(argc=2, argv=0x00007fff5fbfdbf0) + 93 at main.c:41
frame #17: 0x00007fff88eda5ad libdyld.dylib`start + 1
(lldb)
fix SEGV touching uninitialized local variable
This imemo_name is used uninitialized because the switch
above does not cover all possible imemo types.
(lldb) run
Process 26068 launched: './miniruby' (x86_64)
Process 26068 stopped
* thread #1: tid = 0x14ba96, 0x00007fff8a402132 libsystem_c.dylib`strlen + 18, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xfffffffffffffff0)
frame #0: 0x00007fff8a402132 libsystem_c.dylib`strlen + 18
libsystem_c.dylib`strlen:
-> 0x7fff8a402132 <+18>: pcmpeqb (%rdi), %xmm0
0x7fff8a402136 <+22>: pmovmskb %xmm0, %esi
0x7fff8a40213a <+26>: andq $0xf, %rcx
0x7fff8a40213e <+30>: orq $-0x1, %rax
(lldb) bt
* thread #1: tid = 0x14ba96, 0x00007fff8a402132 libsystem_c.dylib`strlen + 18, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xfffffffffffffff0)
* frame #0: 0x00007fff8a402132 libsystem_c.dylib`strlen + 18
frame #1: 0x00000001001f1531 miniruby`BSD_vfprintf(fp=0x00007fff5fbfc9e0, fmt0="%s %s", ap=0x00007fff5fbfcbf0) + 5873 at vsnprintf.c:1026
frame #2: 0x00000001001ef213 miniruby`ruby_do_vsnprintf(str="0x0000000100f46450 [0 ] T_IMEMO", n=256, fmt="%s %s", ap=0x00007fff5fbfcbf0) + 131 at sprintf.c:1285
frame #3: 0x00000001001ef3ea miniruby`ruby_snprintf(str="0x0000000100f46450 [0 ] T_IMEMO", n=256, fmt="%s %s") + 426 at sprintf.c:1300
frame #4: 0x00000001000bdc61 miniruby`rb_raw_obj_info(buff="0x0000000100f46450 [0 ] T_IMEMO", buff_size=256, obj=4310983760) + 2353 at gc.c:9376
frame #5: 0x00000001000b7bff miniruby`obj_info(obj=4310983760) + 95 at gc.c:9428
frame #6: 0x00000001000c1658 miniruby`newobj_init(klass=0, flags=36890, v1=0, v2=4303040512, v3=4310983800, wb_protected=1, objspace=0x00000001007ee280, obj=4310983760) + 424 at gc.c:1887
frame #7: 0x00000001000b4469 miniruby`newobj_of(klass=0, flags=36890, v1=0, v2=4303040512, v3=4310983800, wb_protected=1) + 217 at gc.c:1970
frame #8: 0x00000001000b45eb miniruby`rb_imemo_new(type=imemo_ast, v1=0, v2=4303040512, v3=4310983800, v0=0) + 75 at gc.c:2017
frame #9: 0x000000010011daed miniruby`rb_ast_new + 61 at node.c:1146
frame #10: 0x0000000100160e15 miniruby`rb_parser_compile_file_path(vparser=4310984400, fname=4310984960, file=4310984080, start=1) + 53 at parse.y:5776
frame #11: 0x00000001001e18ea miniruby`load_file_internal(argp_v=140734799795024) + 1834 at ruby.c:1907
frame #12: 0x00000001000a1bb5 miniruby`rb_ensure(b_proc=(miniruby`load_file_internal at ruby.c:1795), data1=140734799795024, e_proc=(miniruby`restore_load_file at ruby.c:2007), data2=140734799795024) + 245 at eval.c:1037
frame #13: 0x00000001001df4a4 miniruby`load_file(parser=4310984400, fname=4310984960, f=4310984080, script=1, opt=0x00007fff5fbfda28) + 100 at ruby.c:2026
frame #14: 0x00000001001e084e miniruby`process_options(argc=0, argv=0x00007fff5fbfdc00, opt=0x00007fff5fbfda28) + 3454 at ruby.c:1682
frame #15: 0x00000001001dfaae miniruby`ruby_process_options(argc=2, argv=0x00007fff5fbfdbf0) + 238 at ruby.c:2257
frame #16: 0x000000010009ff43 miniruby`ruby_options(argc=2, argv=0x00007fff5fbfdbf0) + 211 at eval.c:105
frame #17: 0x0000000100000989 miniruby`main(argc=2, argv=0x00007fff5fbfdbf0) + 105 at main.c:42
frame #18: 0x00007fff88eda5ad libdyld.dylib`start + 1
(lldb) up 4
frame #4: 0x00000001000bdc61 miniruby`rb_raw_obj_info(buff="0x0000000100f46450 [0 ] T_IMEMO", buff_size=256, obj=4310983760) + 2353 at gc.c:9376
9373 #undef IMEMO_NAME
9374 default: UNREACHABLE;
9375 }
-> 9376 snprintf(buff, buff_size, "%s %s", buff, imemo_name);
9377
9378 switch (imemo_type(obj)) {
9379 case imemo_ment: {
(lldb) p imemo_name
(const char *) $0 = 0xffffffffffffffff
(lldb) p imemo_type(obj)
(imemo_type) $1 = imemo_ast
(lldb)
fix SEGV inspecting already freed objects
obj_info() assumes the given object is alive. Passing freed
objects to it results in SEGV.
(lldb) run
Process 29718 launched: './miniruby' (x86_64)
Process 29718 stopped
* thread #1: tid = 0x3082c5, 0x00000001000bfaab miniruby`pathobj_path(pathobj=4478683640) + 70 at vm_core.h:269, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
frame #0: 0x00000001000bfaab miniruby`pathobj_path(pathobj=4478683640) + 70 at vm_core.h:269
266 }
267 else {
268 VM_ASSERT(RB_TYPE_P(pathobj, T_ARRAY));
-> 269 return RARRAY_AREF(pathobj, PATHOBJ_PATH);
270 }
271 }
272
(lldb) bt
* thread #1: tid = 0x3082c5, 0x00000001000bfaab miniruby`pathobj_path(pathobj=4478683640) + 70 at vm_core.h:269, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
* frame #0: 0x00000001000bfaab miniruby`pathobj_path(pathobj=4478683640) + 70 at vm_core.h:269
frame #1: 0x00000001000c25ff miniruby`rb_iseq_path(iseq=0x000000010af34a20) + 32 at iseq.c:723
frame #2: 0x000000010009db09 miniruby`rb_raw_iseq_info(buff="0x000000010af34a20 [1 ] T_IMEMO iseq", buff_size=256, iseq=0x000000010af34a20) + 69 at gc.c:9274
frame #3: 0x000000010009e45a miniruby`rb_raw_obj_info(buff="0x000000010af34a20 [1 ] T_IMEMO iseq", buff_size=256, obj=4478683680) + 2191 at gc.c:9397
frame #4: 0x000000010009e4d5 miniruby`obj_info(obj=4478683680) + 98 at gc.c:9429
frame #5: 0x0000000100091ae3 miniruby`gc_page_sweep(objspace=0x00000001007d3280, heap=0x00000001007d32a0, sweep_page=0x000000010ae07bc0) + 622 at gc.c:3529
frame #6: 0x000000010009206a miniruby`gc_sweep_step(objspace=0x00000001007d3280, heap=0x00000001007d32a0) + 188 at gc.c:3705
frame #7: 0x0000000100092254 miniruby`gc_sweep_continue(objspace=0x00000001007d3280, heap=0x00000001007d32a0) + 133 at gc.c:3772
frame #8: 0x000000010008d7f9 miniruby`heap_prepare(objspace=0x00000001007d3280, heap=0x00000001007d32a0) + 48 at gc.c:1746
frame #9: 0x000000010008d8a1 miniruby`heap_get_freeobj_from_next_freepage(objspace=0x00000001007d3280, heap=0x00000001007d32a0) + 37 at gc.c:1769
frame #10: 0x000000010008d98d miniruby`heap_get_freeobj(objspace=0x00000001007d3280, heap=0x00000001007d32a0) + 83 at gc.c:1803
frame #11: 0x000000010008dcb0 miniruby`newobj_slowpath(klass=4334386280, flags=5, v1=0, v2=0, v3=0, objspace=0x00000001007d3280, wb_protected=1) + 220 at gc.c:1930
frame #12: 0x000000010008dd6c miniruby`newobj_slowpath_wb_protected(klass=4334386280, flags=5, v1=0, v2=0, v3=0, objspace=0x00000001007d3280) + 76 at gc.c:1942
frame #13: 0x000000010008dea1 miniruby`newobj_of(klass=4334386280, flags=5, v1=0, v2=0, v3=0, wb_protected=1) + 221 at gc.c:1974
frame #14: 0x000000010008df39 miniruby`rb_wb_protected_newobj_of(klass=4334386280, flags=5) + 54 at gc.c:1990
frame #15: 0x0000000100195f7c miniruby`str_alloc(klass=4334386280) + 29 at string.c:692
frame #16: 0x0000000100195fe9 miniruby`str_new0(klass=4334386280, ptr="gitm", len=4, termlen=1) + 73 at string.c:714
frame #17: 0x000000010019633e miniruby`rb_enc_str_new(ptr="gitm", len=4, enc=0x00000001025d50a0) + 81 at string.c:766
frame #18: 0x000000010010a80a miniruby`parser_str_new(p="gitm", n=4, enc=0x00000001025d50a0, func=66, enc0=0x00000001025d50a0) + 50 at parse.y:5817
frame #19: 0x000000010010ce1a miniruby`parser_parse_string(parser=0x00000001042ac5c0, quote=0x000000010460c028) + 795 at parse.y:6675
frame #20: 0x00000001001120bd miniruby`parser_yylex(parser=0x00000001042ac5c0) + 159 at parse.y:8281
frame #21: 0x0000000100115068 miniruby`yylex(lval=0x00007fff5fbf9948, yylloc=0x00007fff5fbf9ab0, parser=0x00000001042ac5c0) + 55 at parse.y:8931
frame #22: 0x00000001000fc79f miniruby`ruby_yyparse(parser=0x00000001042ac5c0) + 1198 at parse.c:5798
frame #23: 0x0000000100109f5a miniruby`yycompile0(arg=4364879296) + 317 at parse.y:5595
frame #24: 0x0000000100214ef0 miniruby`rb_suppress_tracing(func=(miniruby`yycompile0 at parse.y:5565), arg=4364879296) + 349 at vm_trace.c:397
frame #25: 0x000000010010a1df miniruby`yycompile(parser=0x00000001042ac5c0, fname=4443743440, line=1) + 126 at parse.y:5637
frame #26: 0x000000010010a4c1 miniruby`parser_compile_string(vparser=4443743480, fname=4443743440, s=4443743520, line=1) + 191 at parse.y:5706
frame #27: 0x000000010010a5b7 miniruby`rb_parser_compile_string_path(vparser=4443743480, f=4443743440, s=4443743520, line=1) + 58 at parse.y:5730
frame #28: 0x0000000100206025 miniruby`eval_make_iseq(src=4443743520, fname=4443743440, line=1, bind=0x0000000000000000, base_block=0x00007fff5fbfb370) + 266 at vm_eval.c:1274
frame #29: 0x0000000100206153 miniruby`eval_string_with_cref(self=4334412520, src=4443743520, cref=0x0000000000000000, file=52, line=1) + 197 at vm_eval.c:1307
frame #30: 0x0000000100206389 miniruby`rb_f_eval(argc=1, argv=0x0000000102400eb8, self=4334412520) + 219 at vm_eval.c:1382
frame #31: 0x00000001001f247c miniruby`call_cfunc_m1(func=(miniruby`rb_f_eval at vm_eval.c:1364), recv=4334412520, argc=1, argv=0x0000000102400eb8) + 47 at vm_insnhelper.c:1723
frame #32: 0x00000001001f2f87 miniruby`vm_call_cfunc_with_frame(ec=0x00000001007d3548, reg_cfp=0x0000000102500d80, calling=0x00007fff5fbfbf50, ci=0x000000010263f240, cc=0x0000000100749b50) + 386 at vm_insnhelper.c:1918
frame #33: 0x00000001001f30d6 miniruby`vm_call_cfunc(ec=0x00000001007d3548, reg_cfp=0x0000000102500d80, calling=0x00007fff5fbfbf50, ci=0x000000010263f240, cc=0x0000000100749b50) + 149 at vm_insnhelper.c:1934
frame #34: 0x00000001001faf0e miniruby`vm_exec_core(ec=0x00000001007d3548, initial=0) + 8471 at insns.def:915
frame #35: 0x000000010020b75d miniruby`vm_exec(ec=0x00000001007d3548) + 230 at vm.c:1771
frame #36: 0x00000001002093f8 miniruby`invoke_block(ec=0x00000001007d3548, iseq=0x000000010252d7f0, self=4334412520, captured=0x0000000102500df8, cref=0x0000000000000000, type=572653569, opt_pc=0) + 224 at vm.c:988
frame #37: 0x0000000100209766 miniruby`invoke_iseq_block_from_c(ec=0x00000001007d3548, captured=0x0000000102500df8, self=4334412520, argc=0, argv=0x0000000000000000, passed_block_handler=0, cref=0x0000000000000000, is_lambda=0) + 389 at vm.c:1040
frame #38: 0x0000000100209824 miniruby`invoke_block_from_c_bh(ec=0x00000001007d3548, block_handler=4333768185, argc=0, argv=0x0000000000000000, passed_block_handler=0, cref=0x0000000000000000, is_lambda=0, force_blockarg=0) + 138 at vm.c:1058
frame #39: 0x00000001002099d0 miniruby`vm_yield(ec=0x00000001007d3548, argc=0, argv=0x0000000000000000) + 69 at vm.c:1103
frame #40: 0x0000000100205623 miniruby`rb_yield_0(argc=0, argv=0x0000000000000000) + 40 at vm_eval.c:970
frame #41: 0x0000000100205964 miniruby`loop_i + 19 at vm_eval.c:1049
frame #42: 0x000000010007db07 miniruby`rb_rescue2(b_proc=(miniruby`loop_i at vm_eval.c:1047), data1=0, r_proc=(miniruby`loop_stop at vm_eval.c:1056), data2=0) + 369 at eval.c:896
frame #43: 0x0000000100205a2e miniruby`rb_f_loop(self=4334412520) + 121 at vm_eval.c:1100
frame #44: 0x00000001001f24a7 miniruby`call_cfunc_0(func=(miniruby`rb_f_loop at vm_eval.c:1098), recv=4334412520, argc=0, argv=0x0000000102400e80) + 41 at vm_insnhelper.c:1729
frame #45: 0x00000001001f2f87 miniruby`vm_call_cfunc_with_frame(ec=0x00000001007d3548, reg_cfp=0x0000000102500de0, calling=0x00007fff5fbfd4d0, ci=0x000000010263bbf0, cc=0x0000000102642118) + 386 at vm_insnhelper.c:1918
frame #46: 0x00000001001f30d6 miniruby`vm_call_cfunc(ec=0x00000001007d3548, reg_cfp=0x0000000102500de0, calling=0x00007fff5fbfd4d0, ci=0x000000010263bbf0, cc=0x0000000102642118) + 149 at vm_insnhelper.c:1934
frame #47: 0x00000001001f4319 miniruby`vm_call_method_each_type(ec=0x00000001007d3548, cfp=0x0000000102500de0, calling=0x00007fff5fbfd4d0, ci=0x000000010263bbf0, cc=0x0000000102642118) + 239 at vm_insnhelper.c:2232
frame #48: 0x00000001001f4a2c miniruby`vm_call_method(ec=0x00000001007d3548, cfp=0x0000000102500de0, calling=0x00007fff5fbfd4d0, ci=0x000000010263bbf0, cc=0x0000000102642118) + 253 at vm_insnhelper.c:2366
frame #49: 0x00000001001f4b7a miniruby`vm_call_general(ec=0x00000001007d3548, reg_cfp=0x0000000102500de0, calling=0x00007fff5fbfd4d0, ci=0x000000010263bbf0, cc=0x0000000102642118) + 59 at vm_insnhelper.c:2398
frame #50: 0x00000001001fab2f miniruby`vm_exec_core(ec=0x00000001007d3548, initial=0) + 7480 at insns.def:850
frame #51: 0x000000010020b75d miniruby`vm_exec(ec=0x00000001007d3548) + 230 at vm.c:1771
frame #52: 0x000000010020c40f miniruby`rb_iseq_eval_main(iseq=0x000000010252dd90) + 52 at vm.c:2019
frame #53: 0x000000010007c768 miniruby`ruby_exec_internal(n=0x000000010252dd90) + 297 at eval.c:246
frame #54: 0x000000010007c88e miniruby`ruby_exec_node(n=0x000000010252dd90) + 36 at eval.c:310
frame #55: 0x000000010007c861 miniruby`ruby_run_node(n=0x000000010252dd90) + 62 at eval.c:302
frame #56: 0x000000010000138d miniruby`main(argc=2, argv=0x00007fff5fbfdbf0) + 113 at main.c:42
frame #57: 0x00007fff88eda5ad libdyld.dylib`start + 1
(lldb) p ((struct RVALUE*)pathobj)->as.basic
(RBasic) $0 = (flags = 0, klass = 4478683600)
(lldb)
fix SEGV inspecting uninitialized objects
obj_info() assumes the given object is alive. OTOH
gc_writebarrier_incremental is called before or in middle of
object initialization. Can casue SEGV.
(lldb) run
Process 48188 launched: './miniruby' (x86_64)
Process 48188 stopped
* thread #1: tid = 0x30fd53, 0x00000001000bf7a9 miniruby`rb_array_const_ptr(a=5251291222225483145) + 12 at ruby.h:2072, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
frame #0: 0x00000001000bf7a9 miniruby`rb_array_const_ptr(a=5251291222225483145) + 12 at ruby.h:2072
2069 static inline const VALUE *
2070 rb_array_const_ptr(VALUE a)
2071 {
-> 2072 return FIX_CONST_VALUE_PTR((RBASIC(a)->flags & RARRAY_EMBED_FLAG) ?
2073 RARRAY(a)->as.ary : RARRAY(a)->as.heap.ptr);
2074 }
2075
(lldb) bt
* thread #1: tid = 0x30fd53, 0x00000001000bf7a9 miniruby`rb_array_const_ptr(a=5251291222225483145) + 12 at ruby.h:2072, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
* frame #0: 0x00000001000bf7a9 miniruby`rb_array_const_ptr(a=5251291222225483145) + 12 at ruby.h:2072
frame #1: 0x00000001000bfaab miniruby`pathobj_path(pathobj=5251291222225483145) + 70 at vm_core.h:269
frame #2: 0x00000001000c25ff miniruby`rb_iseq_path(iseq=0x00000001025b71a8) + 32 at iseq.c:723
frame #3: 0x000000010009db09 miniruby`rb_raw_iseq_info(buff="0x00000001025b7158 [0 ] proc (Proc)", buff_size=256, iseq=0x00000001025b71a8) + 69 at gc.c:9274
frame #4: 0x000000010009e1d5 miniruby`rb_raw_obj_info(buff="0x00000001025b7158 [0 ] proc (Proc)", buff_size=256, obj=4334514520) + 1546 at gc.c:9351
frame #5: 0x000000010009e4d5 miniruby`obj_info(obj=4334514520) + 98 at gc.c:9429
frame #6: 0x0000000100096658 miniruby`gc_writebarrier_incremental(a=4334514520, b=4334514600, objspace=0x00000001007d3280) + 61 at gc.c:5963
frame #7: 0x00000001000968ca miniruby`rb_gc_writebarrier(a=4334514520, b=4334514600) + 127 at gc.c:6009
frame #8: 0x00000001001eabe0 miniruby`rb_obj_written(a=4334514520, oldv=52, b=4334514600, filename="/Users/urabe.shyouhei/data/src/pedantic/vm.c", line=821) + 72 at ruby.h:1472
frame #9: 0x00000001001eac2c miniruby`rb_obj_write(a=4334514520, slot=0x000000010259ff10, b=4334514600, filename="/Users/urabe.shyouhei/data/src/pedantic/vm.c", line=821) + 70 at ruby.h:1489
frame #10: 0x0000000100208b6f miniruby`vm_proc_create_from_captured(klass=4311027960, captured=0x0000000102500338, block_type=block_type_ifunc, is_from_method='\0', is_lambda='\x01') + 137 at vm.c:821
frame #11: 0x0000000100208e5c miniruby`rb_vm_make_proc_lambda(ec=0x00000001007d3548, captured=0x0000000102500338, klass=4311027960, is_lambda='\x01') + 134 at vm.c:892
frame #12: 0x000000010011f08e miniruby`proc_new(klass=4311027960, is_lambda='\x01') + 445 at proc.c:752
frame #13: 0x000000010011f110 miniruby`rb_block_lambda + 27 at proc.c:808
frame #14: 0x00000001001f24a7 miniruby`call_cfunc_0(func=(miniruby`rb_block_lambda at proc.c:807), recv=4310991600, argc=0, argv=0x0000000000000000) + 41 at vm_insnhelper.c:1729
frame #15: 0x00000001002033de miniruby`vm_call0_cfunc_with_frame(ec=0x00000001007d3548, calling=0x00007fff5fbfb080, ci=0x00007fff5fbfb070, cc=0x00007fff5fbfb0a0, argv=0x0000000000000000) + 370 at vm_eval.c:85
frame #16: 0x00000001002034d9 miniruby`vm_call0_cfunc(ec=0x00000001007d3548, calling=0x00007fff5fbfb080, ci=0x00007fff5fbfb070, cc=0x00007fff5fbfb0a0, argv=0x0000000000000000) + 59 at vm_eval.c:100
frame #17: 0x000000010020368f miniruby`vm_call0_body(ec=0x00000001007d3548, calling=0x00007fff5fbfb080, ci=0x00007fff5fbfb070, cc=0x00007fff5fbfb0a0, argv=0x0000000000000000) + 436 at vm_eval.c:131
frame #18: 0x000000010020326a miniruby`vm_call0(ec=0x00000001007d3548, recv=4310991600, id=2993, argc=0, argv=0x0000000000000000, me=0x0000000100f48110) + 142 at vm_eval.c:58
frame #19: 0x0000000100203c60 miniruby`rb_call0(ec=0x00000001007d3548, recv=4310991600, mid=2993, argc=0, argv=0x0000000000000000, scope=CALL_FCALL, self=4334514640) + 166 at vm_eval.c:296
frame #20: 0x0000000100204827 miniruby`rb_call(recv=4310991600, mid=2993, argc=0, argv=0x0000000000000000, scope=CALL_FCALL) + 84 at vm_eval.c:589
frame #21: 0x000000010020518b miniruby`rb_funcallv(recv=4310991600, mid=2993, argc=0, argv=0x0000000000000000) + 52 at vm_eval.c:815
frame #22: 0x000000010012242e miniruby`mlambda(method=0) + 45 at proc.c:2661
frame #23: 0x0000000100205bac miniruby`rb_iterate0(it_proc=(miniruby`mlambda at proc.c:2660), data1=0, ifunc=0x00000001025b71a8, ec=0x00000001007d3548) + 380 at vm_eval.c:1134
frame #24: 0x0000000100205d16 miniruby`rb_iterate(it_proc=(miniruby`mlambda at proc.c:2660), data1=0, bl_proc=(miniruby`bmcall at proc.c:2666), data2=4334514640) + 88 at vm_eval.c:1166
frame #25: 0x00000001001224c7 miniruby`method_to_proc(method=4334514640) + 43 at proc.c:2701
frame #26: 0x00000001001f24a7 miniruby`call_cfunc_0(func=(miniruby`method_to_proc at proc.c:2688), recv=4334514640, argc=0, argv=0x0000000102400568) + 41 at vm_insnhelper.c:1729
frame #27: 0x00000001001f2f87 miniruby`vm_call_cfunc_with_frame(ec=0x00000001007d3548, reg_cfp=0x0000000102500350, calling=0x00007fff5fbfc030, ci=0x0000000100f2ec70, cc=0x0000000102735718) + 386 at vm_insnhelper.c:1918
frame #28: 0x00000001001f30d6 miniruby`vm_call_cfunc(ec=0x00000001007d3548, reg_cfp=0x0000000102500350, calling=0x00007fff5fbfc030, ci=0x0000000100f2ec70, cc=0x0000000102735718) + 149 at vm_insnhelper.c:1934
frame #29: 0x00000001001f4319 miniruby`vm_call_method_each_type(ec=0x00000001007d3548, cfp=0x0000000102500350, calling=0x00007fff5fbfc030, ci=0x0000000100f2ec70, cc=0x0000000102735718) + 239 at vm_insnhelper.c:2232
frame #30: 0x00000001001f49a4 miniruby`vm_call_method(ec=0x00000001007d3548, cfp=0x0000000102500350, calling=0x00007fff5fbfc030, ci=0x0000000100f2ec70, cc=0x0000000102735718) + 117 at vm_insnhelper.c:2355
frame #31: 0x00000001001f4b7a miniruby`vm_call_general(ec=0x00000001007d3548, reg_cfp=0x0000000102500350, calling=0x00007fff5fbfc030, ci=0x0000000100f2ec70, cc=0x0000000102735718) + 59 at vm_insnhelper.c:2398
frame #32: 0x00000001001faf0e miniruby`vm_exec_core(ec=0x00000001007d3548, initial=0) + 8471 at insns.def:915
frame #33: 0x000000010020b75d miniruby`vm_exec(ec=0x00000001007d3548) + 230 at vm.c:1771
frame #34: 0x000000010020c3d1 miniruby`rb_iseq_eval(iseq=0x00000001007f8270) + 52 at vm.c:2008
frame #35: 0x00000001000caa4a miniruby`rb_load_internal0(ec=0x00000001007d3548, fname=4310799960, wrap=0) + 631 at load.c:611
frame #36: 0x00000001000cab36 miniruby`rb_load_internal(fname=4310799960, wrap=0) + 46 at load.c:642
frame #37: 0x00000001000cae1d miniruby`rb_f_load(argc=1, argv=0x00000001024004b8) + 217 at load.c:710
frame #38: 0x00000001001f247c miniruby`call_cfunc_m1(func=(miniruby`rb_f_load at load.c:695), recv=4311327440, argc=1, argv=0x00000001024004b8) + 47 at vm_insnhelper.c:1723
frame #39: 0x00000001001f2f87 miniruby`vm_call_cfunc_with_frame(ec=0x00000001007d3548, reg_cfp=0x00000001025003e0, calling=0x00007fff5fbfd3e0, ci=0x0000000102541070, cc=0x0000000100f9e918) + 386 at vm_insnhelper.c:1918
frame #40: 0x00000001001f30d6 miniruby`vm_call_cfunc(ec=0x00000001007d3548, reg_cfp=0x00000001025003e0, calling=0x00007fff5fbfd3e0, ci=0x0000000102541070, cc=0x0000000100f9e918) + 149 at vm_insnhelper.c:1934
frame #41: 0x00000001001f4319 miniruby`vm_call_method_each_type(ec=0x00000001007d3548, cfp=0x00000001025003e0, calling=0x00007fff5fbfd3e0, ci=0x0000000102541070, cc=0x0000000100f9e918) + 239 at vm_insnhelper.c:2232
frame #42: 0x00000001001f4a2c miniruby`vm_call_method(ec=0x00000001007d3548, cfp=0x00000001025003e0, calling=0x00007fff5fbfd3e0, ci=0x0000000102541070, cc=0x0000000100f9e918) + 253 at vm_insnhelper.c:2366
frame #43: 0x00000001001f4b7a miniruby`vm_call_general(ec=0x00000001007d3548, reg_cfp=0x00000001025003e0, calling=0x00007fff5fbfd3e0, ci=0x0000000102541070, cc=0x0000000100f9e918) + 59 at vm_insnhelper.c:2398
frame #44: 0x00000001001faf0e miniruby`vm_exec_core(ec=0x00000001007d3548, initial=0) + 8471 at insns.def:915
frame #45: 0x000000010020b75d miniruby`vm_exec(ec=0x00000001007d3548) + 230 at vm.c:1771
frame #46: 0x000000010020c40f miniruby`rb_iseq_eval_main(iseq=0x0000000100f21240) + 52 at vm.c:2019
frame #47: 0x000000010007c774 miniruby`ruby_exec_internal(n=0x0000000100f21240) + 297 at eval.c:246
frame #48: 0x000000010007c89a miniruby`ruby_exec_node(n=0x0000000100f21240) + 36 at eval.c:310
frame #49: 0x000000010007c86d miniruby`ruby_run_node(n=0x0000000100f21240) + 62 at eval.c:302
frame #50: 0x0000000100001399 miniruby`main(argc=9, argv=0x00007fff5fbfdae0) + 113 at main.c:42
frame #51: 0x00007fff88eda5ad libdyld.dylib`start + 1
(lldb)
------------------------------------------------------------------------
r61661 | naruse | 2018-01-08 07:26:45 +0900 (Mon, 08 Jan 2018) | 7 lines
merge revision(s) 61561: [Backport #14272]
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.
------------------------------------------------------------------------
r61660 | naruse | 2018-01-08 07:25:29 +0900 (Mon, 08 Jan 2018) | 10 lines
merge revision(s) 61518: [Backport #14260]
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]
------------------------------------------------------------------------
r61630 | naruse | 2018-01-06 05:40:54 +0900 (Sat, 06 Jan 2018) | 9 lines
merge revision(s) 61625,61626,61627:
extend timeout to 15 seconds for ARMv8 environment
Show how many seconds it timeouts
By this we can easily extend timeout.
Extend timeout of test_clear_unreachable_keyword_args
------------------------------------------------------------------------
r61629 | naruse | 2018-01-06 05:40:12 +0900 (Sat, 06 Jan 2018) | 8 lines
merge revision(s) 61517: [Backport #14259]
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.
------------------------------------------------------------------------
r61628 | naruse | 2018-01-06 05:39:03 +0900 (Sat, 06 Jan 2018) | 8 lines
merge revision(s) 61513: [Backport #14257]
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]
------------------------------------------------------------------------
r61583 | naruse | 2018-01-04 03:14:56 +0900 (Thu, 04 Jan 2018) | 5 lines
merge revision(s) 61507: [Backport #14247]
Fix KeyError#{key,receiver} of Thread#fetch
[ruby-core:84508] [Bug #14247]
------------------------------------------------------------------------
r61582 | naruse | 2018-01-04 03:12:16 +0900 (Thu, 04 Jan 2018) | 8 lines
merge revision(s) 61500: [Backport #14248]
fix fd mask detection on os x
This was broken in r59440 (3215b27a9abd8de793cf517f32d8901fd421eb1c)
[Bug #14248]
From: Stefan Kaes <skaes@railsexpress.de>
------------------------------------------------------------------------
r61581 | naruse | 2018-01-04 03:11:47 +0900 (Thu, 04 Jan 2018) | 14 lines
merge revision(s) 61497: [Backport #14243]
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]
------------------------------------------------------------------------
r61580 | naruse | 2018-01-04 03:03:49 +0900 (Thu, 04 Jan 2018) | 6 lines
merge revision(s) 61479: [Backport #14236]
variable.c: public rb_autoload
* variable.c (rb_autoload): restore the visibility for backward
compatibility. [ruby-core:84454] [Bug #14236]
------------------------------------------------------------------------
r61579 | naruse | 2018-01-04 03:02:17 +0900 (Thu, 04 Jan 2018) | 23 lines
merge revision(s) 61471,61472: [Backport #14231]
Use UINT128_T support flag from configure
Current check for __uint128_t in hash.c is not valid, since it ignores
compilers other than gcc. We hit this on lcc on e2k platform.
Configure script properly checks from 128-bit data types support and
sets HAVE_UINT128_T accordingly. This approach is already used within
ruby at bignum.c, random.c, etc.
Probably hash.c is an overlooked remnant of old days. This patch fixes
this.
[ruby-core:84438] [Bug #14231] [Fix GH-1781]
From: Andrew Savchenko <bircoph@altlinux.org>
hash.c: use uint128_t
* hash.c (mult_and_mix): use uint128_t instead of __uint128_t.
[ruby-core:84438] [Bug #14231]
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
------------------------------------------------------------------------
r61496 | naruse | 2017-12-27 19:25:32 +0900 (Wed, 27 Dec 2017) | 6 lines
merge revision(s) 61478: [Backport #14234]
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]
------------------------------------------------------------------------
r61467 | naruse | 2017-12-25 15:56:44 +0900 (Mon, 25 Dec 2017) | 2 lines
v2.5.0p0
------------------------------------------------------------------------
r61466 | naruse | 2017-12-25 15:51:11 +0900 (Mon, 25 Dec 2017) | 1 line
Release branch of Ruby 2.5
------------------------------------------------------------------------
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 Maria Martinez Gomez <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 ({U+00B1} 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 ({U+00B1} 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 ({U+00B1} 1.8%) i/s - 7.614M in 5.019819s
* After
String#prepend 2.236M ({U+00B1} 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 ({U+00B1} 5.9%) i/s - 6.358M in 5.002022s
Small string interpolation
5.156M ({U+00B1} 5.5%) i/s - 25.728M in 5.005731s
```
* After
```
Calculating -------------------------------------
Large string interpolation
2.201M ({U+00B1} 5.8%) i/s - 11.063M in 5.043724s
Small string interpolation
5.192M ({U+00B1} 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 (S
Showing 512.00 KB of 1.25 MB. Use Edit/Download for full content.
Directory Contents
Dirs: 0 × Files: 11