Skip to content

Commit 20f6677

Browse files
committed
New upstream version 2.6.2
1 parent 2366cec commit 20f6677

Some content is hidden

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

52 files changed

+10335
-8801
lines changed

.travis.yml

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ dist: xenial
2222

2323
osx_image: xcode10.1
2424

25-
sudo: false
26-
2725
git:
2826
quiet: true
2927

@@ -195,7 +193,6 @@ env:
195193
- &i686-linux
196194
name: i686-linux
197195
<<: *linux
198-
sudo: required
199196
env:
200197
- GCC_FLAGS=-m32
201198
- debugflags=-g0
@@ -224,42 +221,6 @@ env:
224221
- zlib1g-dev:i386
225222
- zlib1g:i386
226223

227-
- &pedanticism
228-
name: -ansi -pedantic
229-
<<: *linux
230-
<<: *make-test-only
231-
compiler: clang
232-
env:
233-
- GCC_FLAGS='-ansi -Werror=pedantic -pedantic-errors -std=iso9899:1990'
234-
- CONFIG_FLAG=
235-
- JOBS=
236-
- >-
237-
warnflags='
238-
-Wall
239-
-Wextra
240-
-Werror=declaration-after-statement
241-
-Werror=deprecated-declarations
242-
-Werror=division-by-zero
243-
-Werror=extra-tokens
244-
-Werror=implicit-function-declaration
245-
-Werror=implicit-int
246-
-Werror=long-long
247-
-Werror=pointer-arith
248-
-Werror=shorten-64-to-32
249-
-Werror=write-strings
250-
-Wmissing-noreturn
251-
-Wno-constant-logical-operand
252-
-Wno-missing-field-initializers
253-
-Wno-overlength-strings
254-
-Wno-parentheses-equality
255-
-Wno-self-assign
256-
-Wno-tautological-compare
257-
-Wno-unused-local-typedef
258-
-Wno-unused-parameter
259-
-Wunused-variable
260-
'
261-
- LDFLAGS=-Wno-unused-command-line-argument
262-
263224
- &rubyspec
264225
name: ruby/spec on Ruby 2.3 # to ensure version guards are correctly added
265226
<<: *linux
@@ -299,7 +260,6 @@ matrix:
299260
- <<: *x86_64-linux
300261
- <<: *i686-linux
301262
- <<: *jemalloc
302-
- <<: *pedanticism
303263
- <<: *ASAN
304264
- <<: *MSAN
305265
- <<: *UBSAN

ChangeLog

Lines changed: 181 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,186 @@
11
------------------------------------------------------------------------
2-
r66950 | naruse | 2019-01-30 19:35:50 +0900 (Wed, 30 Jan 2019) | 1 line
2+
r67232 | naruse | 2019-03-13 05:23:16 +0900 (Wed, 13 Mar 2019) | 1 line
3+
4+
add tag v2_6_2
5+
------------------------------------------------------------------------
6+
r67231 | naruse | 2019-03-13 05:22:33 +0900 (Wed, 13 Mar 2019) | 2 lines
7+
8+
bump up teeny version to 2.6.2
9+
10+
------------------------------------------------------------------------
11+
r67223 | naruse | 2019-03-11 23:33:45 +0900 (Mon, 11 Mar 2019) | 5 lines
12+
13+
fix merge conflict
14+
15+
Reported by Krzysztof Rybka
16+
https://github.com/ruby/ruby/commit/dca69588f4a46e1ecc94eeb9e01efc8cd7cb82e4#r32684541
17+
18+
------------------------------------------------------------------------
19+
r67222 | naruse | 2019-03-11 22:49:09 +0900 (Mon, 11 Mar 2019) | 7 lines
20+
21+
merge revision(s) 67203: [Backport #15651]
22+
23+
numeric.c: fix infinite loop
24+
25+
* numeric.c (int_pow): fix infinite loop in the case of y equal 1
26+
and power of x does not overflow.
27+
[ruby-core:91734] [Bug #15651]
28+
------------------------------------------------------------------------
29+
r67220 | naruse | 2019-03-11 21:57:34 +0900 (Mon, 11 Mar 2019) | 5 lines
30+
31+
merge revision(s) 67217: [Backport #15658]
32+
33+
The combination of non-Symbol keys and Symbol keys is now allowed again
34+
35+
Revert r64358. [Bug #15658]
36+
------------------------------------------------------------------------
37+
r67210 | naruse | 2019-03-11 16:18:45 +0900 (Mon, 11 Mar 2019) | 3 lines
38+
39+
merge revision(s) 66973: [Backport #15577]
40+
41+
Run r66972 assertion only when a sticky-bit makes sense
42+
------------------------------------------------------------------------
43+
r67209 | naruse | 2019-03-11 16:01:19 +0900 (Mon, 11 Mar 2019) | 6 lines
44+
45+
merge revision(s) 67201: [Backport #15650]
46+
47+
eval.c: clear internal errinfo
48+
49+
* eval.c (ruby_cleanup): clear internal error info when invoking
50+
end procs. [ruby-core:91731] [Bug #15650]
51+
------------------------------------------------------------------------
52+
r67208 | naruse | 2019-03-11 15:52:01 +0900 (Mon, 11 Mar 2019) | 7 lines
53+
54+
merge revision(s) 67200: [Backport #15648]
55+
56+
Add ignored_sp event
57+
58+
* ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer): add ignored_sp
59+
event which will be fired from Ripper::Lexer#on_heredoc_dedent
60+
method. [ruby-core:91727] [Bug #15648]
61+
------------------------------------------------------------------------
62+
r67207 | naruse | 2019-03-11 15:45:29 +0900 (Mon, 11 Mar 2019) | 6 lines
63+
64+
merge revision(s) 67188: [Backport #15642]
65+
66+
io.c: chomp CR at the end of read buffer
67+
68+
* io.c (rb_io_getline_fast): chomp CR followed by LF but separated
69+
by the read buffer boundary. [ruby-core:91707] [Bug #15642]
70+
------------------------------------------------------------------------
71+
r67184 | naruse | 2019-03-06 18:49:16 +0900 (Wed, 06 Mar 2019) | 5 lines
72+
73+
merge revision(s) 67183: [Backport #15607]
74+
75+
Fix PTY.open on OpenBSD [Bug #15607]
76+
77+
From: Jeremy Evans <[email protected]>
78+
------------------------------------------------------------------------
79+
r67182 | naruse | 2019-03-06 18:01:48 +0900 (Wed, 06 Mar 2019) | 12 lines
80+
81+
Backport RubyGems 3.0.3: [Backport #15637]
82+
83+
* Fixed following vulnerabilities:
84+
* CVE-2019-8320: Delete directory using symlink when decompressing tar
85+
* CVE-2019-8321: Escape sequence injection vulnerability in verbose
86+
* CVE-2019-8322: Escape sequence injection vulnerability in gem owner
87+
* CVE-2019-8323: Escape sequence injection vulnerability in API response handling
88+
* CVE-2019-8324: Installing a malicious gem may lead to arbitrary code execution
89+
* CVE-2019-8325: Escape sequence injection vulnerability in errors
90+
91+
* see also https://blog.rubygems.org/2019/03/05/3.0.3-released.html
92+
93+
------------------------------------------------------------------------
94+
r67181 | naruse | 2019-03-06 17:53:51 +0900 (Wed, 06 Mar 2019) | 7 lines
95+
96+
merge revision(s) 67167: [Backport #15635]
97+
98+
string.c: respect the actual encoding
99+
100+
* string.c (rb_enc_str_coderange): respect the actual encoding of
101+
if a BOM presents, and scan for the actual code range.
102+
[ruby-core:91662] [Bug #15635]
103+
------------------------------------------------------------------------
104+
r67180 | naruse | 2019-03-06 17:48:50 +0900 (Wed, 06 Mar 2019) | 10 lines
105+
106+
merge revision(s) 66984: [Backport #15582]
107+
108+
Fixed gemspec location of bundler.
109+
110+
FileCollector of rbinstall.rb requires location of gemspec under
111+
the sub-direcotry with the same name as default gems.
112+
113+
I forgot to fix it with r66867.
114+
115+
[Bug #15582][ruby-core:91374]
116+
------------------------------------------------------------------------
117+
r67179 | naruse | 2019-03-06 16:47:53 +0900 (Wed, 06 Mar 2019) | 5 lines
118+
119+
merge revision(s) 67006: [Backport #15469]
120+
121+
Ignore to add bundler lib direcotry if it is same as rubylibdir.
122+
123+
[Bug #15469][ruby-core:90742]
124+
------------------------------------------------------------------------
125+
r67178 | naruse | 2019-03-06 16:31:29 +0900 (Wed, 06 Mar 2019) | 6 lines
126+
127+
merge revision(s) 67172:
128+
129+
Remove deprecated `sudo: false` in .travis.yml
130+
131+
- https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
132+
- https://docs.travis-ci.com/user/reference/overview/#deprecated-virtualization-environments
133+
------------------------------------------------------------------------
134+
r67177 | naruse | 2019-03-06 16:14:13 +0900 (Wed, 06 Mar 2019) | 8 lines
135+
136+
merge revision(s) 66972: [Backport #15577]
137+
138+
Fix exception namespace
139+
140+
* lib/fileutils.rb (remove_entry_secure): EISDIR is under the
141+
Errno namespace. [ruby-core:91362] [Bug #15577]
142+
143+
From: Tietew (Toru Iwase) <[email protected]>
144+
------------------------------------------------------------------------
145+
r67176 | naruse | 2019-03-06 15:58:04 +0900 (Wed, 06 Mar 2019) | 2 lines
146+
147+
Drop pedantic matrix from .travis.yml
148+
149+
------------------------------------------------------------------------
150+
r67175 | naruse | 2019-03-06 15:36:32 +0900 (Wed, 06 Mar 2019) | 18 lines
151+
152+
merge revision(s) 67169,67173,67174: [Backport #15641]
153+
154+
update Unicode version (and Emoji version) to 12.0.0
155+
156+
- common.mk: set UNICODE_VERSION and UNICODE_EMOJI_VERSION to 12.0.0
157+
158+
- lib/unicode_normalize/tables.rb: update table data to Unicode version 12.0.0
159+
160+
- enc/unicode/12.0.0/casefold.h, enc/unicode/12.0.0/name2ctype.h: add generated
161+
files for Unicode version 12.0.0
162+
163+
This is the main commit for #15321.
164+
165+
add news about Unicode version update (issue #15321) to NEWS [ci skip]
166+
167+
delete directory and files related to Unicode version 11.0.0
168+
169+
this completes and closes feature #15321
170+
------------------------------------------------------------------------
171+
r66953 | naruse | 2019-01-30 23:41:42 +0900 (Wed, 30 Jan 2019) | 2 lines
172+
173+
Ruby 2.6 is still C90
174+
175+
------------------------------------------------------------------------
176+
r66952 | naruse | 2019-01-30 22:09:26 +0900 (Wed, 30 Jan 2019) | 6 lines
177+
178+
merge revision(s) 66888: [Backport #15460]
179+
180+
* Fix rubyspec to follow IO#ungetbyte's fix
181+
Merge CRuby r66824
182+
With fixing actual spec and the version the change applied.
3183

4-
add tag v2_6_1
5184
------------------------------------------------------------------------
6185
r66949 | naruse | 2019-01-30 15:20:10 +0900 (Wed, 30 Jan 2019) | 13 lines
7186

NEWS

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ sufficient information, see the ChangeLog file or Redmine
3535
(1...).each {|index| block } # infinite loop from index 1
3636
ary.zip(1..) {|elem, index| block } # ary.each.with_index(1) { }
3737

38-
* Non-Symbol keys in a keyword arguments hash cause an exception.
39-
4038
* The "shadowing outer local variable" warning is removed. [Feature #12490]
4139

4240
You can now write the following without warning:
@@ -48,6 +46,9 @@ sufficient information, see the ChangeLog file or Redmine
4846

4947
* The flip-flop syntax is deprecated. [Feature #5400]
5048

49+
* Non-Symbol keys in a keyword arguments hash was prohibited at 2.6.0, but
50+
now allowed again. [Bug #15658]
51+
5152
=== Core classes updates (outstanding ones only)
5253

5354
[Array]
@@ -271,6 +272,9 @@ sufficient information, see the ChangeLog file or Redmine
271272

272273
[Regexp/String]
273274

275+
* Update Unicode version and Emoji version from 11.0.0 to 12.0.0.
276+
[Feature #15321]
277+
274278
* Update Unicode version from 10.0.0 to 11.0.0. [Feature #14802]
275279

276280
This includes a rewrite of the grapheme cluster (/\X/) algorithm

class.c

Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
class.c -
44
5-
$Author: nobu $
5+
$Author: naruse $
66
created at: Tue Aug 10 15:05:44 JST 1993
77
88
Copyright (C) 1993-2007 Yukihiro Matsumoto
@@ -1801,57 +1801,33 @@ unknown_keyword_error(VALUE hash, const ID *table, int keywords)
18011801
rb_keyword_error("unknown", rb_hash_keys(hash));
18021802
}
18031803

1804-
struct extract_keywords {
1805-
VALUE kwdhash, nonsymkey;
1806-
};
18071804

18081805
static int
18091806
separate_symbol(st_data_t key, st_data_t value, st_data_t arg)
18101807
{
1811-
struct extract_keywords *argp = (struct extract_keywords *)arg;
1812-
VALUE k = (VALUE)key, v = (VALUE)value;
1813-
1814-
if (argp->kwdhash) {
1815-
if (UNLIKELY(!SYMBOL_P(k))) {
1816-
argp->nonsymkey = k;
1817-
return ST_STOP;
1818-
}
1819-
}
1820-
else if (SYMBOL_P(k)) {
1821-
if (UNLIKELY(argp->nonsymkey != Qundef)) {
1822-
argp->kwdhash = Qnil;
1823-
return ST_STOP;
1824-
}
1825-
argp->kwdhash = rb_hash_new();
1826-
}
1827-
else {
1828-
if (argp->nonsymkey == Qundef)
1829-
argp->nonsymkey = k;
1830-
return ST_CONTINUE;
1831-
}
1832-
rb_hash_aset(argp->kwdhash, k, v);
1808+
VALUE *kwdhash = (VALUE *)arg;
1809+
if (!SYMBOL_P(key)) kwdhash++;
1810+
if (!*kwdhash) *kwdhash = rb_hash_new();
1811+
rb_hash_aset(*kwdhash, (VALUE)key, (VALUE)value);
18331812
return ST_CONTINUE;
18341813
}
18351814

18361815
VALUE
18371816
rb_extract_keywords(VALUE *orighash)
18381817
{
1839-
struct extract_keywords arg = {0, Qundef};
1818+
VALUE parthash[2] = {0, 0};
18401819
VALUE hash = *orighash;
18411820

18421821
if (RHASH_EMPTY_P(hash)) {
18431822
*orighash = 0;
18441823
return hash;
18451824
}
1846-
rb_hash_foreach(hash, separate_symbol, (st_data_t)&arg);
1847-
if (arg.kwdhash) {
1848-
if (arg.nonsymkey != Qundef) {
1849-
rb_raise(rb_eArgError, "non-symbol key in keyword arguments: %+"PRIsVALUE,
1850-
arg.nonsymkey);
1851-
}
1852-
*orighash = 0;
1825+
rb_hash_foreach(hash, separate_symbol, (st_data_t)&parthash);
1826+
*orighash = parthash[1];
1827+
if (parthash[1] && RBASIC_CLASS(hash) != rb_cHash) {
1828+
RBASIC_SET_CLASS(parthash[1], RBASIC_CLASS(hash));
18531829
}
1854-
return arg.kwdhash;
1830+
return parthash[0];
18551831
}
18561832

18571833
int

common.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ mflags = $(MFLAGS)
1515
gnumake_recursive =
1616
enable_shared = $(ENABLE_SHARED:no=)
1717

18-
UNICODE_VERSION = 11.0.0
19-
UNICODE_EMOJI_VERSION = 11.0
18+
UNICODE_VERSION = 12.0.0
19+
UNICODE_EMOJI_VERSION = 12.0
2020
UNICODE_BETA = NO
2121

2222
### set the following environment variable or uncomment the line if

0 commit comments

Comments
 (0)