Skip to content

Commit d8a6e9c

Browse files
committed
Imported Upstream version 2.5.0
1 parent bd8aa95 commit d8a6e9c

File tree

2,142 files changed

+734113
-72492
lines changed

Some content is hidden

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

2,142 files changed

+734113
-72492
lines changed

.revision.time

Whitespace-only changes.

ChangeLog

Lines changed: 32883 additions & 0 deletions
Large diffs are not rendered by default.

LEGAL

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -845,32 +845,3 @@ test/rubygems:
845845
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
846846
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
847847
PURPOSE.
848-
849-
lib/bundler:
850-
lib/bundler.rb:
851-
lib/bundler.gemspec:
852-
spec/bundler:
853-
854-
Portions copyright (c) 2010 Andre Arko
855-
Portions copyright (c) 2009 Engine Yard
856-
857-
MIT License
858-
859-
Permission is hereby granted, free of charge, to any person obtaining
860-
a copy of this software and associated documentation files (the
861-
"Software"), to deal in the Software without restriction, including
862-
without limitation the rights to use, copy, modify, merge, publish,
863-
distribute, sublicense, and/or sell copies of the Software, and to
864-
permit persons to whom the Software is furnished to do so, subject to
865-
the following conditions:
866-
867-
The above copyright notice and this permission notice shall be
868-
included in all copies or substantial portions of the Software.
869-
870-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
871-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
872-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
873-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
874-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
875-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
876-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

NEWS

Lines changed: 143 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ with all sufficient information, see the ChangeLog file or Redmine
4646

4747
* Dir.glob provides new optional keyword argument, :base.
4848
[Feature #13056]
49+
* Dir.chdir (without block arg), Dir.open, Dir.new, Dir.mkdir, Dir.rmdir,
50+
Dir.empty? releases GVL
4951

5052
* New methods:
5153

@@ -66,8 +68,12 @@ with all sufficient information, see the ChangeLog file or Redmine
6668
* File.rename releases GVL [Feature #13951]
6769
* File::Stat#{atime,mtime,ctime} support fractional second timestamps on
6870
Windows 8 and later [Feature #13726]
69-
* File::Stat.ino and File.indentical? support ReFS 128bit ino on Windows 8.1
71+
* File::Stat#ino and File.indentical? support ReFS 128bit ino on Windows 8.1
7072
and later [Feature #13731]
73+
* File.readable?, File.readable_real?, File.writable?, File.writable_real?,
74+
File.executable?, File.executable_real?, File.mkfifo, File.readlink,
75+
File.truncate, File#truncate, File.chmod, File.lchmod, File.chown,
76+
File.lchown, File.unlink, File.utime, File.lstat release GVL
7177

7278
* New method:
7379

@@ -83,11 +89,12 @@ with all sufficient information, see the ChangeLog file or Redmine
8389

8490
* IO
8591

92+
* IO#copy_stream tries copy offload with copy_file_range(2) [Feature #13867]
93+
8694
* New methods:
8795

8896
* IO#pread [Feature #4532]
8997
* IO#pwrite [Feature #4532]
90-
* IO#copy_stream tries copy offload with copy_file_range(2) [Feature #13867]
9198
* IO#write accepts multiple arguments [Feature #9323]
9299

93100
* IOError
@@ -153,10 +160,17 @@ with all sufficient information, see the ChangeLog file or Redmine
153160

154161
* Update to Onigmo 6.1.3-669ac9997619954c298da971fcfacccf36909d05.
155162

156-
* Support absent operator https://github.com/k-takata/Onigmo/issues/82
163+
* Support absence operator https://github.com/k-takata/Onigmo/issues/82
157164

158165
* Support new 5 emoji-related Unicode character properties
159166

167+
* RubyVM::InstructionSequence
168+
169+
* New method:
170+
171+
* RubyVM::InstructionSequence#each_child
172+
* RubyVM::InstructionSequence#trace_points
173+
160174
* String
161175

162176
* String#-@ deduplicates unfrozen strings. Already-frozen
@@ -189,6 +203,10 @@ with all sufficient information, see the ChangeLog file or Redmine
189203
* New method:
190204
* Thread#fetch [Feature #13009]
191205

206+
* The default of Thread.report_on_exception is now true,
207+
showing unhandled exceptions terminating threads on $stderr.
208+
[Feature #14143]
209+
192210
* Time
193211

194212
* Time#at receives 3rd argument which specifies the unit of 2nd argument.
@@ -209,7 +227,7 @@ with all sufficient information, see the ChangeLog file or Redmine
209227

210228
* BigDecimal
211229

212-
* Update to BigDecimal 1.3.3
230+
* Update to BigDecimal 1.3.4
213231

214232
* The following features are added:
215233

@@ -222,17 +240,76 @@ with all sufficient information, see the ChangeLog file or Redmine
222240

223241
* BigDecimal.ver
224242

225-
* BigDecimal#clone
243+
* BigDecimal#clone and #dup now do not make a new instance,
244+
but returns the receiver itself.
245+
246+
* Coverage
226247

227-
* BigDecimal#dup
248+
* Support branch coverage and method coverage measurement. [Feature #13901]
249+
Branch coverage tells you which branches are executed, and which not.
250+
Method coverage tells you which methods are invoked, and which not.
251+
By running a test suite with this new feature, you can know which branches
252+
and methods are executed by a test, and evaluate total coverage of a test
253+
suite more strictly.
228254

229-
* Bundler
255+
You can specify the measuring target by an option to `Coverage.start`:
230256

231-
* Add Bundler to Standard Library. [Feature #12733]
257+
Coverage.start(lines: true, branches: true, methods: true)
232258

233-
* Coverage
259+
After some Ruby files are loaded, you can use `Coverage.result` to get
260+
the coverage result:
261+
262+
Coverage.result
263+
#=> { "/path/to/file.rb"=>
264+
# { :lines => [1, 2, 0, nil, ...],
265+
# :branches =>
266+
# { [:if, 0, 2, 1, 6, 4] =>
267+
# { [:then, 1, 3, 2, 3, 8] => 0,
268+
# [:else, 2, 5, 2, 5, 8] => 2
269+
# }
270+
# },
271+
# :methods => {
272+
# [Object, :foo, 1, 0, 7, 3] => 2
273+
# }
274+
# }
275+
# }
276+
277+
The result type of line coverage is not changed; it is just an array that
278+
contains numbers, which means the count that each line was executed,
279+
or `nil`s, which means that the line is not relevant.
280+
281+
The result type of branch coverage is:
282+
283+
{ (jump base) => { (jump target) => (counter) } }
284+
285+
where jump base and targets have the format
234286

235-
* Support branch coverage and method coverage [Feature #13901]
287+
[type, unique-id, start lineno, start column, end lineno, end column]
288+
289+
For example, `[:if, 0, 2, 1, 6, 4]` reads an `if` statement that ranges from
290+
line 2 and column 1, to line 6 and column 4. `[:then, 1, 3, 2, 3, 8]` reads
291+
a `then` clause that ranges from line 3 and column 2, to line 3 and column 8.
292+
Note that lineno starts from 1, and that columnno starts from 0. So, the
293+
above example shows a branch from the `if` to the `then` was never executed,
294+
and a branch from the `if` to the `else` was executed twice.
295+
296+
The result type of method coverage is:
297+
298+
{ (method key) => (counter) }
299+
300+
where method key has the format
301+
302+
[class, method-name, start lineno, start column, end lineno, end column]
303+
304+
For example, `[Object, :foo, 1, 0, 7, 3]` reads `Object#foo` that ranges from
305+
line 1 and column 0, to line 7 and column 3. The above example shows this
306+
`Object#foo` was invoked twice.
307+
308+
Note: To keep compatibility, passing no option to `Coverage.start` will measure
309+
only line coverage, and `Coverage.result` will return the old format:
310+
311+
Coverage.result
312+
#=> { "/path/to/file.rb"=> [1, 2, 0, nil, ...] }
236313

237314
* DRb
238315

@@ -242,6 +319,7 @@ with all sufficient information, see the ChangeLog file or Redmine
242319

243320
* Add ERB#result_with_hash to render a template with local variables passed
244321
with a Hash object. [Feature #8631]
322+
245323
* Default template file encoding is changed from ASCII-8BIT to UTF-8 in erb
246324
command. [Bug #14095]
247325

@@ -263,6 +341,7 @@ with all sufficient information, see the ChangeLog file or Redmine
263341

264342
* IRB
265343

344+
* Print backtrace and error message in reverse order [Feature #8661] [experimental]
266345
* `binding.irb` automatically requires irb and runs [Bug #13099] [experimental]
267346
* `binding.irb` on its start shows source around the line where it was called
268347
[Feature #14124]
@@ -283,6 +362,10 @@ with all sufficient information, see the ChangeLog file or Redmine
283362
* Net::HTTP#{proxy_user,proxy_pass} reflect http_proxy environment variable
284363
if the system's environment variable is multiuser safe. [Bug #12921]
285364

365+
* open-uri
366+
* URI.open method defined as an alias to open-uri's Kernel.open.
367+
open-uri's Kernel.open will be deprecated in future.
368+
286369
* OpenSSL
287370

288371
* Updated Ruby/OpenSSL from version 2.0 to 2.1. Changes are noted in
@@ -296,8 +379,10 @@ with all sufficient information, see the ChangeLog file or Redmine
296379

297380
* Psych
298381

299-
* Update to Psych 3.0.0.
382+
* Update to Psych 3.0.2.
300383

384+
* Convert fallback option to a keyword argument
385+
https://github.com/ruby/psych/pull/342
301386
* Add :symbolize_names option to Psych.load, Psych.safe_load like JSON.parse
302387
https://github.com/ruby/psych/pull/333, https://github.com/ruby/psych/pull/337
303388
* Add Psych::Handler#event_location
@@ -324,16 +409,26 @@ with all sufficient information, see the ChangeLog file or Redmine
324409

325410
* RDoc
326411

327-
* Update to RDoc 6.0.0.beta3.
328-
* Replaced IRB based lexer with Ripper. It much improves the speed of generating document.
329-
* https://github.com/ruby/rdoc/pull/512
412+
* Update to RDoc 6.0.1.
413+
414+
* Replace IRB based lexer with Ripper.
415+
* https://github.com/ruby/rdoc/pull/512
416+
* This much improves the speed of generating documents.
417+
* It also facilitates supporting new syntax in the future.
418+
* Support many new syntaxes of Ruby from the past few years.
419+
* Use "frozen_string_literal: true".
420+
This reduces document generation time by 5%.
421+
* Support did_you_mean.
330422

331423
* Rubygems
332424

333-
* Update to Rubygems 2.7.0.
425+
* Update to Rubygems 2.7.3.
426+
* http://blog.rubygems.org/2017/11/28/2.7.3-released.html
427+
* http://blog.rubygems.org/2017/11/08/2.7.2-released.html
428+
* http://blog.rubygems.org/2017/11/03/2.7.1-released.html
334429
* http://blog.rubygems.org/2017/11/01/2.7.0-released.html
430+
* http://blog.rubygems.org/2017/10/09/2.6.14-released.html
335431
* http://blog.rubygems.org/2017/08/27/2.6.13-released.html
336-
* http://blog.rubygems.org/2017/10/09/unsafe-object-deserialization-vulnerability.html
337432

338433
* SecureRandom
339434

@@ -366,6 +461,9 @@ with all sufficient information, see the ChangeLog file or Redmine
366461
* WEBrick
367462

368463
* Add Server Name Indication (SNI) support [Feature #13729]
464+
* support Proc objects as body responses [Feature #855]
465+
* released as a RubyGem [Feature #13173]
466+
* avoid unintended behavior from Kernel#open [Misc #14216]
369467

370468
* Zlib
371469

@@ -393,6 +491,33 @@ with all sufficient information, see the ChangeLog file or Redmine
393491

394492
=== Stdlib compatibility issues (excluding feature bug fixes)
395493

494+
* Gemification
495+
496+
* Promote following standard libraries to default gems.
497+
* cmath
498+
* csv
499+
* date
500+
* dbm
501+
* etc
502+
* fcntl
503+
* fiddle
504+
* fileutils
505+
* gdbm
506+
* ipaddr
507+
* scanf
508+
* sdbm
509+
* stringio
510+
* strscan
511+
* webrick
512+
* zlib
513+
514+
* Logger
515+
516+
* Logger.new("| command") had been working to open a command
517+
unintentionally. It was prohibited, and now Logger#initialize
518+
treats a String argument only as a filename, as its specification.
519+
[Bug #14212]
520+
396521
* Net::HTTP
397522

398523
* Net::HTTP#start now passes :ENV to p_addr by default. [Bug #13351]
@@ -429,6 +554,8 @@ with all sufficient information, see the ChangeLog file or Redmine
429554
* Dynamic instrumentation for TracePoint hooks instead of using "trace"
430555
instruction to avoid overhead [Feature #14104]
431556

557+
* ERB now generates code from a template which runs 2 times faster than Ruby 2.4
558+
432559
=== Miscellaneous changes
433560

434561
* Print backtrace and error message in reverse order if STDERR is unchanged and a tty.

addr2line.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@
1313
#include "addr2line.h"
1414

1515
#include <stdio.h>
16-
#include <stdbool.h>
1716
#include <errno.h>
1817

18+
#ifdef HAVE_STDBOOL_H
19+
#include <stdbool.h>
20+
#else
21+
#include "missing/stdbool.h"
22+
#endif
23+
1924
#ifdef USE_ELF
2025

2126
#include <fcntl.h>

array.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
array.c -
44
5-
$Author$
5+
$Author: nobu $
66
created at: Fri Aug 6 09:46:12 JST 1993
77
88
Copyright (C) 1993-2007 Yukihiro Matsumoto
@@ -4163,7 +4163,7 @@ rb_ary_diff(VALUE ary1, VALUE ary2)
41634163
ary2 = to_ary(ary2);
41644164
ary3 = rb_ary_new();
41654165

4166-
if (RARRAY_LEN(ary2) <= SMALL_ARRAY_LEN) {
4166+
if (RARRAY_LEN(ary1) <= SMALL_ARRAY_LEN || RARRAY_LEN(ary2) <= SMALL_ARRAY_LEN) {
41674167
for (i=0; i<RARRAY_LEN(ary1); i++) {
41684168
VALUE elt = rb_ary_elt(ary1, i);
41694169
if (rb_ary_includes_by_eql(ary2, elt)) continue;

bignum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
bignum.c -
44
5-
$Author$
5+
$Author: stomar $
66
created at: Fri Jun 10 00:48:55 JST 1994
77
88
Copyright (C) 1993-2007 Yukihiro Matsumoto

bin/bundle

Lines changed: 0 additions & 31 deletions
This file was deleted.

bin/bundler

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)