Skip to content

Commit 74b2f5c

Browse files
committed
Merge branch 'master-2.5' into dist/2.5/stretch
2 parents 57f7d19 + 833fb42 commit 74b2f5c

File tree

116 files changed

+2845
-2320
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+2845
-2320
lines changed

ChangeLog

Lines changed: 249 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,254 @@
11
------------------------------------------------------------------------
2-
r67816 | usa | 2019-10-01 20:02:30 +0900 (Tue, 01 Oct 2019) | 1 line
2+
r67882 | usa | 2020-03-31 21:15:56 +0900 (Tue, 31 Mar 2020) | 1 line
3+
4+
add tag v2_5_8
5+
------------------------------------------------------------------------
6+
r67881 | usa | 2020-03-31 21:13:31 +0900 (Tue, 31 Mar 2020) | 5 lines
7+
8+
merge revision(s) 47a1872cd8b901b8aab6dedce7fa3807c97d290d: [Backport #16681]
9+
10+
Use osuosl instead of GitHub releases
11+
12+
Because the package provided by GitHub releases is different from sourceware.
13+
------------------------------------------------------------------------
14+
r67877 | usa | 2020-03-31 20:40:08 +0900 (Tue, 31 Mar 2020) | 8 lines
15+
16+
merge revision(s) 61b7f86248bd121be2e83768be71ef289e8e5b90
17+
18+
* ext/socket/init.c: do not return uninitialized buffer
19+
Resize string buffer only if some data is received in
20+
BasicSocket#read_nonblock and some methods.
21+
22+
Co-Authored-By: Samuel Williams <[email protected]>
23+
24+
------------------------------------------------------------------------
25+
r67872 | usa | 2020-03-31 07:47:56 +0900 (Tue, 31 Mar 2020) | 7 lines
26+
27+
merge revision(s) 4adb2d655dcd54b28366b4d17e86b21e2b622cd1: [Backport #16738]
28+
29+
Make RbConfig::CONFIG values mutable [Bug #16738]
30+
31+
As `RbConfig.expand` modifies the argument and involved `CONFIG`
32+
values, its values should be mutable.
33+
34+
------------------------------------------------------------------------
35+
r67871 | usa | 2020-03-31 07:44:13 +0900 (Tue, 31 Mar 2020) | 28 lines
36+
37+
merge revision(s) 62743: [Backport #16687]
38+
39+
Fix FrozenError on `Ripper.slice`
40+
41+
Currently `Ripper.slice` raises a FrozenError
42+
43+
```ruby
44+
require 'ripper'
45+
p Ripper.slice('foo', 'ident')
46+
```
47+
48+
```
49+
/path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:193:in `concat': can't modify frozen String (FrozenError)
50+
from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:193:in `block in compile'
51+
from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:190:in `scan'
52+
from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:190:in `compile'
53+
from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:169:in `initialize'
54+
from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:151:in `new'
55+
from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:151:in `token_match'
56+
from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:144:in `slice'
57+
from /tmp/tmp.kb4cnhvum2/test.rb:2:in `<main>'
58+
```
59+
60+
This patch will fix the problem.
61+
62+
[Fix GH-1837]
63+
64+
From: Masataka Pocke Kuwabara <[email protected]>
65+
------------------------------------------------------------------------
66+
r67870 | usa | 2020-03-31 07:33:37 +0900 (Tue, 31 Mar 2020) | 4 lines
67+
68+
merge revision(s) 8a6ba10f9dd456cf54de800203cf04bbe42271fb: [Backport #12392]
69+
70+
Do not make disabled directories at installation [Bug #12392]
71+
72+
------------------------------------------------------------------------
73+
r67869 | usa | 2020-03-31 07:22:10 +0900 (Tue, 31 Mar 2020) | 6 lines
74+
75+
merge revision(s) 36e9ed7fef6eb2d14becf6c52452e4ab16e4bf01: [Backport #16698]
76+
77+
backport 80b5a0ff2a7709367178f29d4ebe1c54122b1c27 partially as a
78+
securify fix for CVE-2020-10663. The patch was provided by Jeremy Evans.
79+
80+
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
81+
------------------------------------------------------------------------
82+
r67868 | usa | 2020-03-31 07:11:15 +0900 (Tue, 31 Mar 2020) | 7 lines
83+
84+
merge revision(s) 6e6844320de989cb88a154e2ac75066ccea1bba2: [Backport #16619]
85+
86+
Fixed duplicated warning
87+
88+
As `command_rhs` is always a "value expression", `command_asgn`
89+
does not need the same check.
90+
91+
------------------------------------------------------------------------
92+
r67867 | usa | 2020-03-31 07:05:30 +0900 (Tue, 31 Mar 2020) | 7 lines
93+
94+
merge revision(s) 6a2d779027818eda418c9118f700b36816e833a5: [Backport #16681]
95+
96+
Switch to download libffi source package to github releases from
97+
sourceware.org
98+
99+
[Bug #16681]
100+
(cherry picked from commit 86022167461dc90b70164e2bb23316959bbfd6ba)
101+
------------------------------------------------------------------------
102+
r67866 | usa | 2020-03-31 06:51:46 +0900 (Tue, 31 Mar 2020) | 10 lines
103+
104+
merge revision(s) 77596fb7a91cc119b25ac9e19b3c8682709765b4: [Backport #16138]
105+
106+
Do not turn on keyword_init for Struct subclass if keyword hash is
107+
empty
108+
109+
This was accidentally turned on because there was no checking for
110+
Qundef.
111+
112+
Also, since only a single keyword is currently supported, simplify
113+
the rb_get_kwargs call.
114+
------------------------------------------------------------------------
115+
r67865 | usa | 2020-03-31 06:49:42 +0900 (Tue, 31 Mar 2020) | 8 lines
116+
117+
merge revision(s) 4f19666e8b144600e959e4673f79d63f98bd637d: [Backport #16508]
118+
119+
`Regexp` in `MatchData` can be `nil`
120+
121+
`String#sub` with a string pattern defers creating a `Regexp`
122+
until `MatchData#regexp` creates a `Regexp` from the matched
123+
string. `Regexp#last_match(group_name)` accessed its content
124+
without creating the `Regexp` though. [Bug #16508]
125+
------------------------------------------------------------------------
126+
r67864 | usa | 2020-03-31 06:46:27 +0900 (Tue, 31 Mar 2020) | 28 lines
127+
128+
merge revision(s) d6a2bce64a7fa1099e507e1d36b5f1533f42f60f,c687be4bc01c9ce52ea990945d9304d6fe59fe9b: [Backport #16159]
129+
130+
time.c (find_time_t): fix round-to-zero bug
131+
132+
`find_time_t` did not work correctly for year older than the Epoch
133+
because it used C's integer division (which rounds negative to zero).
134+
135+
For example, `TIme.new(1933)` returned a wrong time whose year is 1922
136+
in Asia/Kuala_Lumpur because there is no 00:00:00 1st Jan. 1933 in the
137+
time zone.
138+
139+
```
140+
$ TZ=Asia/Kuala_Lumpur ruby -e 'p Time.new(1933)'
141+
1932-12-31 00:00:00 +0700
142+
```
143+
144+
This change fixes the issue by using `DIV` macro instead of `/`.
145+
Now `Time.new(1933)` returns a time in 1933.
146+
147+
```
148+
$ TZ=Asia/Kuala_Lumpur ruby -e 'p Time.new(1933)'
149+
1933-01-01 00:20:00 +0720
150+
```
151+
152+
[Bug #16159]
153+
154+
Added a test for [Bug #16159]
155+
156+
------------------------------------------------------------------------
157+
r67863 | usa | 2020-03-31 06:37:50 +0900 (Tue, 31 Mar 2020) | 21 lines
158+
159+
merge revision(s) 203b7fa1ae8cc40d41c38d684f70b3fea7fae813,0131fab749fb76800de09e49a6abf910201c5b58,9c0cd5c569ba22bc68d1a77ad6580a275cd99639,c144d7215b3444fa36d28d540b60170a5b30743d: [Backport #16196]
160+
161+
Guard static variable first
162+
163+
* ext/openssl/ossl_asn1.c (Init_ossl_asn1): register the static
164+
variable to grab an internal object, before creating the object.
165+
otherwise the just-created object could get collected during the
166+
global variable list allocation. [Bug #16196]
167+
168+
Slimed down test runtime by stressing openssl.so only [Bug #16196]
169+
170+
171+
Prefer rb_gc_register_mark_object
172+
173+
* ext/openssl/ossl_asn1.c (Init_ossl_asn1): prefer
174+
`rb_gc_register_mark_object`, which is better for constant
175+
objects, over `rb_gc_register_address` for global/static
176+
variables which can be re-assigned at runtime. [Bug #16196]
177+
178+
Skip very time consuming test [Bug #16196]
179+
180+
------------------------------------------------------------------------
181+
r67862 | usa | 2020-03-31 06:26:06 +0900 (Tue, 31 Mar 2020) | 4 lines
182+
183+
merge revision(s) 463092b84da7933f307cc8747f948f68ef19f5fd: [Backport #16279]
184+
185+
Update rake-12.3.3.
186+
187+
------------------------------------------------------------------------
188+
r67861 | usa | 2020-03-31 06:21:53 +0900 (Tue, 31 Mar 2020) | 14 lines
189+
190+
merge revision(s) c9423b016cfeab852bc5a829e55e0a11f80b3ab7,0b1e26398e018116180bf41cb63887f77d5d1b82,78ee2c245331e353e218b8fac9ca722a2bcd8fea: [Backport #15968]
191+
192+
marshal.c: check instance variable count
193+
194+
* marshal.c (w_obj_each): ensure that no instance variable was
195+
added while dumping other instance variables. [Bug #15968]
196+
197+
Hoisted out w_ivar_each
198+
199+
200+
marshal.c: check instance variable count
201+
202+
* marshal.c (w_ivar_each): ensure that no instance variable was
203+
removed while dumping other instance variables. [Bug #15968]
204+
------------------------------------------------------------------------
205+
r67860 | usa | 2020-03-31 06:11:41 +0900 (Tue, 31 Mar 2020) | 13 lines
206+
207+
merge revision(s) 78ef2d0f331c3e056ee367214710b41722de2fe0: [Backport #15935]
208+
209+
merge revision(s) 8b3774be3dd9f472bddd99e84e3c9fe2ff99d7ac: [Backport
210+
#15935]
211+
212+
Fix memory leak
213+
214+
* string.c (str_make_independent_expand): free independent buffer.
215+
[Bug# 15935]
216+
217+
Co-Authored-By: luke-gru (Luke Gruber) <[email protected]>
218+
219+
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
220+
------------------------------------------------------------------------
221+
r67829 | usa | 2019-12-04 15:52:01 +0900 (Wed, 04 Dec 2019) | 7 lines
222+
223+
merge revision(s) 2a477e0e444de6344048101466fb9189b9defddc: [Backport #16353]
224+
225+
test_ftp.rb: loosen timeout for Travis osx
226+
227+
https://travis-ci.org/ruby/ruby/jobs/454798071
228+
229+
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
230+
------------------------------------------------------------------------
231+
r67827 | usa | 2019-11-08 17:29:32 +0900 (Fri, 08 Nov 2019) | 14 lines
232+
233+
merge revision(s) 6333020fc924d3ae63775c032bbe8f57364cd42e:
234+
235+
atime may not updated unless strictatime is set on macOS Catalina
236+
237+
Cited from mount(8):
238+
239+
```
240+
strictatime
241+
Always update the file access time when reading from a
242+
file. Without this option the filesystem may default to a
243+
less strict update mode, where some access time updates
244+
are skipped for performance reasons. This option could be
245+
ignored if it is not supported by the filesystem.
246+
```
247+
------------------------------------------------------------------------
248+
r67826 | usa | 2019-10-03 11:27:34 +0900 (Thu, 03 Oct 2019) | 2 lines
249+
250+
Bump version
3251

4-
add tag v2_5_7
5252
------------------------------------------------------------------------
6253
r67815 | usa | 2019-10-01 20:02:16 +0900 (Tue, 01 Oct 2019) | 2 lines
7254

debian/Dockerfile.bionic

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM ubuntu:18.04
33

44
# just to invalidate cache
5-
ENV NKMIBUILDREV=1
5+
ARG BUILDDATE=99999999
66

77
ENV DEBIAN_FRONTEND=noninteractive
88
RUN mkdir -p /build \

debian/Dockerfile.stretch

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
FROM debian:stretch
33

44
# just to invalidate cache
5-
ENV NKMIBUILDREV=1
5+
ARG BUILDDATE=99999999
66

7+
ENV DEBIAN_FRONTEND=noninteractive
78
RUN mkdir -p /build \
89
&& apt-get update \
910
&& apt-get install -y debhelper dh-make devscripts gnupg2 vim equivs

debian/Dockerfile.xenial

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM ubuntu:16.04
33

44
# just to invalidate cache
5-
ENV NKMIBUILDREV=1
5+
ARG BUILDDATE=99999999
66

77
RUN mkdir -p /build \
88
&& apt-get update \

debian/changelog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
ruby2.5 (2.5.8-0nkmi1~dist) unstable; urgency=medium
2+
3+
* Ruby 2.5.8
4+
* explicitly pass runstatedir/localstatedir/sysconfdir
5+
6+
-- Sorah Fukumori <[email protected]> Tue, 31 Mar 2020 17:56:10 +0000
7+
18
ruby2.5 (2.5.7-0nkmi1~dist) unstable; urgency=medium
29

310
* Ruby 2.5.7

debian/rules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ configure_options += --enable-install-static-library
3030
configure_options += --disable-rpath
3131
configure_options += --with-sitedir='/usr/local/lib/site_ruby'
3232
configure_options += --with-sitearchdir="/usr/local/lib/$(DEB_HOST_MULTIARCH)/site_ruby"
33+
configure_options += --runstatedir=/var/run
34+
configure_options += --localstatedir=/var
35+
configure_options += --sysconfdir=/etc
3336

3437
ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
3538
# Cross-building. This is the same logic that debhelper's

ext/-test-/file/fs.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ get_noatime_p(VALUE self, VALUE str)
8989
rb_sys_fail_str(str);
9090
}
9191
# ifdef HAVE_STRUCT_STATFS_F_FLAGS
92+
# ifdef MNT_STRICTATIME
93+
if (!(st.f_flags & MNT_STRICTATIME)) return Qtrue;
94+
# endif
9295
# ifdef MNT_NOATIME
9396
return st.f_flags & MNT_NOATIME ? Qtrue : Qfalse;
9497
# elif defined(ST_NOATIME)

ext/fiddle/extlibs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
http://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz \
1+
https://ftp.osuosl.org/pub/blfs/conglomeration/libffi/libffi-3.2.1.tar.gz \
22
md5:83b89587607e3eb65c70d361f13bab43 \
33
sha512:980ca30a8d76f963fca722432b1fe5af77d7a4e4d2eac5144fbc5374d4c596609a293440573f4294207e1bdd9fda80ad1e1cafb2ffb543df5a275bc3bd546483 \
44
#

ext/json/parser/parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1815,7 +1815,7 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
18151815
} else {
18161816
json->max_nesting = 100;
18171817
json->allow_nan = 0;
1818-
json->create_additions = 1;
1818+
json->create_additions = 0;
18191819
json->create_id = rb_funcall(mJSON, i_create_id, 0);
18201820
json->object_class = Qnil;
18211821
json->array_class = Qnil;

ext/json/parser/parser.rl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
710710
} else {
711711
json->max_nesting = 100;
712712
json->allow_nan = 0;
713-
json->create_additions = 1;
713+
json->create_additions = 0;
714714
json->create_id = rb_funcall(mJSON, i_create_id, 0);
715715
json->object_class = Qnil;
716716
json->array_class = Qnil;

0 commit comments

Comments
 (0)