2016-12-26 07:00:02 -05:00
|
|
|
# -*- rdoc -*-
|
|
|
|
|
|
|
|
= NEWS for Ruby 2.5.0
|
|
|
|
|
|
|
|
This document is a list of user visible feature changes made between
|
|
|
|
releases except for bug fixes.
|
|
|
|
|
|
|
|
Note that each entry is kept so brief that no reason behind or
|
|
|
|
reference information is supplied with. For a full list of changes
|
|
|
|
with all sufficient information, see the ChangeLog file or Redmine
|
|
|
|
(e.g. <tt>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</tt>)
|
|
|
|
|
|
|
|
== Changes since the 2.4.0 release
|
|
|
|
|
|
|
|
=== Language changes
|
|
|
|
|
2017-01-01 04:07:56 -05:00
|
|
|
* Top-level constant look-up is removed. [Feature #11547]
|
|
|
|
|
2017-01-19 04:54:58 -05:00
|
|
|
* rescue/else/ensure are allowed inside do/end blocks. [Feature #12906]
|
|
|
|
|
2017-09-17 22:27:13 -04:00
|
|
|
* refinements take place in string interpolations. [Feature #13812]
|
|
|
|
|
2016-12-26 07:00:02 -05:00
|
|
|
=== Core classes updates (outstanding ones only)
|
|
|
|
|
2017-04-05 20:14:57 -04:00
|
|
|
* Array
|
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* New methods:
|
|
|
|
|
|
|
|
* Array#append [Feature #12746]
|
|
|
|
* Array#prepend [Feature #12746]
|
2017-04-05 20:14:57 -04:00
|
|
|
|
2017-11-29 03:23:16 -05:00
|
|
|
* Data
|
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* Is deprecated. It was a base class for C extensions, and it's not
|
|
|
|
necessary to expose in Ruby level. [Feature #3072]
|
2017-11-29 03:23:16 -05:00
|
|
|
|
2017-12-12 06:47:16 -05:00
|
|
|
* Exception
|
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* New methods:
|
|
|
|
|
|
|
|
* Exception#full_message to retrieve a String expression of an exception,
|
2018-10-17 07:35:27 -04:00
|
|
|
formatted in the same way in which Ruby prints out an uncaught
|
|
|
|
exception. [Feature #14141] [experimental]
|
2017-12-12 06:47:16 -05:00
|
|
|
|
2017-05-23 09:47:36 -04:00
|
|
|
* Dir
|
|
|
|
|
2018-10-17 07:35:27 -04:00
|
|
|
* Dir.glob provides new optional keyword argument, +:base+ . [Feature #13056]
|
2017-12-15 16:49:21 -05:00
|
|
|
* Dir.chdir (without block arg), Dir.open, Dir.new, Dir.mkdir, Dir.rmdir,
|
|
|
|
Dir.empty? releases GVL
|
2017-12-12 08:07:06 -05:00
|
|
|
|
|
|
|
* New methods:
|
|
|
|
|
|
|
|
* Dir.children [Feature #11302]
|
|
|
|
* Dir.each_child [Feature #11302]
|
2017-05-23 09:47:36 -04:00
|
|
|
|
2017-12-10 17:36:28 -05:00
|
|
|
* Enumerable
|
|
|
|
|
2018-10-17 07:35:27 -04:00
|
|
|
* Enumerable#any?, Enumerable#all?, Enumerable#none? and Enumerable#one?
|
|
|
|
accept a pattern argument. [Feature #11286]
|
2017-12-10 17:36:28 -05:00
|
|
|
|
2017-07-14 06:53:35 -04:00
|
|
|
* File
|
|
|
|
|
2018-10-17 07:35:27 -04:00
|
|
|
* File.open accepts +:newline+ option to imply text mode. [Bug #13350]
|
2017-12-12 08:07:06 -05:00
|
|
|
* File#path raises an IOError for files opened with
|
2017-08-31 07:22:15 -04:00
|
|
|
File::Constants::TMPFILE option. [Feature #13568]
|
2018-10-17 07:35:27 -04:00
|
|
|
* File.stat, File.exist? and other <code>rb_stat()</code>-using methods
|
|
|
|
release GVL. [Bug #13941]
|
|
|
|
* File.rename releases GVL. [Feature #13951]
|
|
|
|
* File::Stat#atime, File::Stat#mtime and File::Stat#ctime support fractional
|
|
|
|
second timestamps on Windows 8 and later. [Feature #13726]
|
2019-12-19 19:19:39 -05:00
|
|
|
* File::Stat#ino and File.identical? support ReFS 128bit ino on Windows 8.1
|
2018-10-17 07:35:27 -04:00
|
|
|
and later. [Feature #13731]
|
2017-12-15 16:49:21 -05:00
|
|
|
* File.readable?, File.readable_real?, File.writable?, File.writable_real?,
|
|
|
|
File.executable?, File.executable_real?, File.mkfifo, File.readlink,
|
|
|
|
File.truncate, File#truncate, File.chmod, File.lchmod, File.chown,
|
|
|
|
File.lchown, File.unlink, File.utime, File.lstat release GVL
|
2017-07-14 06:53:35 -04:00
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* New method:
|
|
|
|
|
|
|
|
* File.lutime [Feature #4052]
|
|
|
|
|
2017-07-19 09:59:58 -04:00
|
|
|
* Hash
|
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* New methods:
|
|
|
|
|
|
|
|
* Hash#transform_keys [Feature #13583]
|
|
|
|
* Hash#transform_keys! [Feature #13583]
|
|
|
|
* Hash#slice [Feature #8499]
|
2017-07-19 09:59:58 -04:00
|
|
|
|
2017-04-02 20:10:50 -04:00
|
|
|
* IO
|
|
|
|
|
2018-03-08 08:00:04 -05:00
|
|
|
* IO.copy_stream tries copy offload with copy_file_range(2) [Feature #13867]
|
2017-12-24 12:55:01 -05:00
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* New methods:
|
|
|
|
|
|
|
|
* IO#pread [Feature #4532]
|
|
|
|
* IO#pwrite [Feature #4532]
|
|
|
|
* IO#write accepts multiple arguments [Feature #9323]
|
2017-04-02 20:10:50 -04:00
|
|
|
|
2017-04-09 01:09:44 -04:00
|
|
|
* IOError
|
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* IO#close might raise an error with message "stream closed",
|
|
|
|
but it is refined to "stream closed in another thread". The new message
|
2018-10-17 07:35:27 -04:00
|
|
|
is more clear for user. [Bug #13405]
|
2017-04-09 01:09:44 -04:00
|
|
|
|
2017-07-19 11:01:01 -04:00
|
|
|
* Integer
|
|
|
|
|
2018-10-17 07:35:27 -04:00
|
|
|
* Integer#round, Integer#floor, Integer#ceil and Integer#truncate always
|
|
|
|
return an Integer. [Bug #13420]
|
2017-12-12 10:01:11 -05:00
|
|
|
* Integer#pow accepts modulo argument for calculating modular
|
2017-12-03 21:35:41 -05:00
|
|
|
exponentiation. [Feature #12508] [Feature #11003]
|
2017-12-12 08:07:06 -05:00
|
|
|
|
|
|
|
* New methods:
|
|
|
|
|
|
|
|
* Integer#allbits?, Integer#anybits?, Integer#nobits? [Feature #12753]
|
|
|
|
* Integer.sqrt [Feature #13219]
|
2017-07-19 11:01:01 -04:00
|
|
|
|
2017-05-01 03:50:53 -04:00
|
|
|
* Kernel
|
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* Kernel#yield_self [Feature #6721]
|
|
|
|
* Kernel#pp [Feature #14123]
|
|
|
|
* Kernel#warn(..., uplevel:n) [Feature #12882]
|
2017-05-01 03:50:53 -04:00
|
|
|
|
2017-12-12 07:12:40 -05:00
|
|
|
* Method
|
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* New methods:
|
|
|
|
|
|
|
|
* Method#=== that invokes Method#call, as same as Proc#=== [Feature #14142]
|
2017-12-12 07:12:40 -05:00
|
|
|
|
2017-11-29 12:47:47 -05:00
|
|
|
* Module
|
2017-12-12 08:07:06 -05:00
|
|
|
|
2018-10-17 07:35:27 -04:00
|
|
|
* Module#attr, Module#attr_accessor, Module#attr_reader and Module#attr_writer
|
|
|
|
become public. [Feature #14132]
|
|
|
|
* Module#define_method, Module#alias_method, Module#undef_method and
|
|
|
|
Module#remove_method become public. [Feature #14133]
|
2017-11-29 12:47:47 -05:00
|
|
|
|
2017-04-25 07:42:20 -04:00
|
|
|
* Numeric
|
|
|
|
|
2018-01-11 19:16:56 -05:00
|
|
|
* Numeric#step no longer hides errors from coerce method when
|
2018-10-17 07:35:27 -04:00
|
|
|
given a step value which cannot be compared with #> to 0. [Feature #7688]
|
2017-12-12 08:07:06 -05:00
|
|
|
* Numerical comparison operators (<,<=,>=,>) no longer hide exceptions
|
2017-12-12 10:01:10 -05:00
|
|
|
from #coerce method internally. Return nil in #coerce if the coercion is
|
2017-12-12 08:07:06 -05:00
|
|
|
impossible. [Feature #7688]
|
2017-04-25 07:42:20 -04:00
|
|
|
|
process.c: Use getrusage(2) in Process.times
if getrusage(2) is available, to improve precision of Process.times and
its user like lib/benchmark.rb.
On macOS, since getrusage(2) has better precision than times(3),
they are much improved like:
* Before
Process.times
=> #<struct Process::Tms utime=0.56, stime=0.35, cutime=0.04, cstime=0.03>
puts Benchmark.measure { "a" * 1_000_000_000 }
0.340000 0.310000 0.650000 ( 0.674025)
* After
Process.times
=> #<struct Process::Tms utime=0.561899, stime=0.35076, cutime=0.046483, cstime=0.038929>
puts Benchmark.measure { "a" * 1_000_000_000 }
0.343223 0.310037 0.653260 ( 0.674025)
On Linux, since struct rusage from getrusage(2) is used instead of struct tms
from times(2), they are slightly improved like:
* Before
Process.times
=> #<struct Process::Tms utime=0.43, stime=0.11, cutime=0.0, cstime=0.0>
puts Benchmark.measure { "a" * 1_000_000_000 }
0.120000 0.040000 0.170000 ( 0.171621)
* After
Process.times
=> #<struct Process::Tms utime=0.432, stime=0.116, cutime=0.0, cstime=0.0>
puts Benchmark.measure { "a" * 1_000_000_000 }
0.124000 0.048000 0.172000 ( 0.171621)
[ruby-dev:49471] [Feature #11952]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-27 21:48:11 -04:00
|
|
|
* Process
|
|
|
|
|
|
|
|
* Precision of Process.times is improved if getrusage(2) exists. [Feature #11952]
|
2017-12-12 08:07:06 -05:00
|
|
|
|
|
|
|
* New method:
|
|
|
|
|
2017-12-14 05:23:10 -05:00
|
|
|
* Process.last_status as an alias of $? [Feature #14043]
|
process.c: Use getrusage(2) in Process.times
if getrusage(2) is available, to improve precision of Process.times and
its user like lib/benchmark.rb.
On macOS, since getrusage(2) has better precision than times(3),
they are much improved like:
* Before
Process.times
=> #<struct Process::Tms utime=0.56, stime=0.35, cutime=0.04, cstime=0.03>
puts Benchmark.measure { "a" * 1_000_000_000 }
0.340000 0.310000 0.650000 ( 0.674025)
* After
Process.times
=> #<struct Process::Tms utime=0.561899, stime=0.35076, cutime=0.046483, cstime=0.038929>
puts Benchmark.measure { "a" * 1_000_000_000 }
0.343223 0.310037 0.653260 ( 0.674025)
On Linux, since struct rusage from getrusage(2) is used instead of struct tms
from times(2), they are slightly improved like:
* Before
Process.times
=> #<struct Process::Tms utime=0.43, stime=0.11, cutime=0.0, cstime=0.0>
puts Benchmark.measure { "a" * 1_000_000_000 }
0.120000 0.040000 0.170000 ( 0.171621)
* After
Process.times
=> #<struct Process::Tms utime=0.432, stime=0.116, cutime=0.0, cstime=0.0>
puts Benchmark.measure { "a" * 1_000_000_000 }
0.124000 0.048000 0.172000 ( 0.171621)
[ruby-dev:49471] [Feature #11952]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-27 21:48:11 -04:00
|
|
|
|
2017-04-25 07:42:43 -04:00
|
|
|
* Range
|
2017-12-14 05:23:10 -05:00
|
|
|
* Range#initialize no longer hides exceptions when comparing begin and
|
2017-04-25 07:42:43 -04:00
|
|
|
end with #<=> and raise a "bad value for range" ArgumentError
|
2018-10-17 07:35:27 -04:00
|
|
|
but instead lets the exception from the #<=> call go through. [Feature #7688]
|
2017-04-25 07:42:43 -04:00
|
|
|
|
2017-02-11 10:08:33 -05:00
|
|
|
* Regexp
|
2017-12-12 08:07:06 -05:00
|
|
|
|
2017-12-14 05:23:10 -05:00
|
|
|
* Update to Onigmo 6.1.3-669ac9997619954c298da971fcfacccf36909d05.
|
2017-12-12 08:07:06 -05:00
|
|
|
|
2017-12-20 04:31:58 -05:00
|
|
|
* Support absence operator https://github.com/k-takata/Onigmo/issues/82
|
2017-12-12 08:07:06 -05:00
|
|
|
|
|
|
|
* Support new 5 emoji-related Unicode character properties
|
2017-02-11 10:08:33 -05:00
|
|
|
|
2017-12-23 07:48:24 -05:00
|
|
|
* RubyVM::InstructionSequence
|
|
|
|
|
|
|
|
* New method:
|
|
|
|
|
|
|
|
* RubyVM::InstructionSequence#each_child
|
2017-12-23 09:46:59 -05:00
|
|
|
* RubyVM::InstructionSequence#trace_points
|
2017-12-23 07:48:24 -05:00
|
|
|
|
2017-02-24 21:31:03 -05:00
|
|
|
* String
|
|
|
|
|
2018-10-17 07:35:27 -04:00
|
|
|
* <code>String#-@</code> deduplicates unfrozen strings. Already-frozen
|
2017-02-24 21:31:03 -05:00
|
|
|
strings remain unchanged for compatibility. [Feature #13077]
|
2018-10-17 07:35:27 -04:00
|
|
|
* <code>-"literal"</code> (<code>String#-@</code>) optimized to return the same object
|
|
|
|
(same as <code>"literal".freeze</code> in Ruby 2.1+) [Feature #13295]
|
|
|
|
* String#casecmp and String#casecmp? return nil for non-string arguments
|
2017-05-21 15:29:58 -04:00
|
|
|
instead of raising a TypeError. [Bug #13312]
|
2017-12-12 08:07:06 -05:00
|
|
|
* String#start_with? accepts a regexp [Feature #13712]
|
|
|
|
|
|
|
|
* New methods:
|
|
|
|
|
|
|
|
* String#delete_prefix, String#delete_prefix! [Feature #12694]
|
|
|
|
* String#delete_suffix, String#delete_suffix! [Feature #13665]
|
|
|
|
* String#each_grapheme_cluster and String#grapheme_clusters to
|
|
|
|
enumerate grapheme clusters [Feature #13780]
|
2017-12-14 03:47:13 -05:00
|
|
|
* String#undump to unescape String#dump'ed string [Feature #12275]
|
2017-02-24 21:31:03 -05:00
|
|
|
|
2017-12-12 03:27:33 -05:00
|
|
|
* Struct
|
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* Struct.new takes `keyword_init: true` option to initialize members
|
2017-12-12 03:27:33 -05:00
|
|
|
with keyword arguments. [Feature #11925]
|
|
|
|
|
2017-11-02 16:25:37 -04:00
|
|
|
* Regexp/String: Update Unicode version from 9.0.0 to 10.0.0 [Feature #13685]
|
2017-09-06 04:19:12 -04:00
|
|
|
|
2017-07-19 11:01:01 -04:00
|
|
|
* Thread
|
|
|
|
|
2017-08-26 16:55:31 -04:00
|
|
|
* Description set by Thread#name= is now visible on Windows 10.
|
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* New method:
|
|
|
|
* Thread#fetch [Feature #13009]
|
|
|
|
|
2017-12-14 14:26:04 -05:00
|
|
|
* The default of Thread.report_on_exception is now true,
|
2018-10-17 07:35:27 -04:00
|
|
|
showing unhandled exceptions terminating threads on $stderr. [Feature #14143]
|
2017-12-14 14:26:04 -05:00
|
|
|
|
2017-09-25 02:20:10 -04:00
|
|
|
* Time
|
|
|
|
|
2018-10-17 07:35:27 -04:00
|
|
|
* Time.at receives 3rd argument which specifies the unit of 2nd argument. [Feature #13919]
|
2017-09-25 02:20:10 -04:00
|
|
|
|
2017-09-18 04:05:53 -04:00
|
|
|
* KeyError
|
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* New methods:
|
|
|
|
|
|
|
|
* KeyError#receiver [Feature #12063]
|
|
|
|
* KeyError#key [Feature #12063]
|
2017-09-18 04:05:53 -04:00
|
|
|
|
2017-12-12 06:33:26 -05:00
|
|
|
* FrozenError
|
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* New exception class. [Feature #13224]
|
2017-12-12 06:33:26 -05:00
|
|
|
|
2016-12-26 07:00:02 -05:00
|
|
|
=== Stdlib updates (outstanding ones only)
|
|
|
|
|
2017-12-13 10:36:25 -05:00
|
|
|
* BigDecimal
|
|
|
|
|
2017-12-24 01:24:57 -05:00
|
|
|
* Update to BigDecimal 1.3.4
|
2017-12-13 10:36:25 -05:00
|
|
|
|
|
|
|
* The following features are added:
|
|
|
|
|
|
|
|
* BigDecimal::VERSION
|
|
|
|
|
2017-12-14 05:23:10 -05:00
|
|
|
* The following features have been deprecated,
|
2017-12-13 10:36:25 -05:00
|
|
|
and are planned to be removed in the version 1.4.0:
|
|
|
|
|
|
|
|
* BigDecimal.new
|
|
|
|
|
|
|
|
* BigDecimal.ver
|
|
|
|
|
2017-12-24 05:12:21 -05:00
|
|
|
* BigDecimal#clone and #dup now do not make a new instance,
|
2017-12-24 01:24:57 -05:00
|
|
|
but returns the receiver itself.
|
2017-12-13 10:36:25 -05:00
|
|
|
|
2017-12-11 19:20:58 -05:00
|
|
|
* Coverage
|
2017-12-12 08:07:06 -05:00
|
|
|
|
2017-12-24 09:52:23 -05:00
|
|
|
* Support branch coverage and method coverage measurement. [Feature #13901]
|
|
|
|
Branch coverage tells you which branches are executed, and which not.
|
|
|
|
Method coverage tells you which methods are invoked, and which not.
|
|
|
|
By running a test suite with this new feature, you can know which branches
|
|
|
|
and methods are executed by a test, and evaluate total coverage of a test
|
|
|
|
suite more strictly.
|
|
|
|
|
2017-12-24 22:01:07 -05:00
|
|
|
You can specify the measuring target by an option to `Coverage.start`:
|
2017-12-24 09:52:23 -05:00
|
|
|
|
|
|
|
Coverage.start(lines: true, branches: true, methods: true)
|
|
|
|
|
|
|
|
After some Ruby files are loaded, you can use `Coverage.result` to get
|
|
|
|
the coverage result:
|
|
|
|
|
|
|
|
Coverage.result
|
|
|
|
#=> { "/path/to/file.rb"=>
|
|
|
|
# { :lines => [1, 2, 0, nil, ...],
|
|
|
|
# :branches =>
|
|
|
|
# { [:if, 0, 2, 1, 6, 4] =>
|
|
|
|
# { [:then, 1, 3, 2, 3, 8] => 0,
|
|
|
|
# [:else, 2, 5, 2, 5, 8] => 2
|
|
|
|
# }
|
|
|
|
# },
|
|
|
|
# :methods => {
|
|
|
|
# [Object, :foo, 1, 0, 7, 3] => 2
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
|
|
|
|
The result type of line coverage is not changed; it is just an array that
|
|
|
|
contains numbers, which means the count that each line was executed,
|
|
|
|
or `nil`s, which means that the line is not relevant.
|
|
|
|
|
|
|
|
The result type of branch coverage is:
|
|
|
|
|
|
|
|
{ (jump base) => { (jump target) => (counter) } }
|
|
|
|
|
|
|
|
where jump base and targets have the format
|
|
|
|
|
|
|
|
[type, unique-id, start lineno, start column, end lineno, end column]
|
|
|
|
|
|
|
|
For example, `[:if, 0, 2, 1, 6, 4]` reads an `if` statement that ranges from
|
|
|
|
line 2 and column 1, to line 6 and column 4. `[:then, 1, 3, 2, 3, 8]` reads
|
|
|
|
a `then` clause that ranges from line 3 and column 2, to line 3 and column 8.
|
|
|
|
Note that lineno starts from 1, and that columnno starts from 0. So, the
|
|
|
|
above example shows a branch from the `if` to the `then` was never executed,
|
2017-12-24 22:01:07 -05:00
|
|
|
and a branch from the `if` to the `else` was executed twice.
|
2017-12-24 09:52:23 -05:00
|
|
|
|
|
|
|
The result type of method coverage is:
|
|
|
|
|
|
|
|
{ (method key) => (counter) }
|
|
|
|
|
|
|
|
where method key has the format
|
|
|
|
|
|
|
|
[class, method-name, start lineno, start column, end lineno, end column]
|
|
|
|
|
|
|
|
For example, `[Object, :foo, 1, 0, 7, 3]` reads `Object#foo` that ranges from
|
|
|
|
line 1 and column 0, to line 7 and column 3. The above example shows this
|
|
|
|
`Object#foo` was invoked twice.
|
|
|
|
|
|
|
|
Note: To keep compatibility, passing no option to `Coverage.start` will measure
|
|
|
|
only line coverage, and `Coverage.result` will return the old format:
|
|
|
|
|
|
|
|
Coverage.result
|
|
|
|
#=> { "/path/to/file.rb"=> [1, 2, 0, nil, ...] }
|
2017-12-11 19:20:58 -05:00
|
|
|
|
2017-10-21 05:53:52 -04:00
|
|
|
* DRb
|
2017-12-12 08:07:06 -05:00
|
|
|
|
2017-10-21 05:53:52 -04:00
|
|
|
* ACL::ACLEntry.new no longer suppresses IPAddr::InvalidPrefixError.
|
|
|
|
|
2017-07-19 11:01:01 -04:00
|
|
|
* ERB
|
2017-12-12 08:07:06 -05:00
|
|
|
|
2017-07-19 11:01:01 -04:00
|
|
|
* Add ERB#result_with_hash to render a template with local variables passed
|
|
|
|
with a Hash object. [Feature #8631]
|
2017-12-24 11:43:17 -05:00
|
|
|
|
2017-11-10 08:59:01 -05:00
|
|
|
* Default template file encoding is changed from ASCII-8BIT to UTF-8 in erb
|
|
|
|
command. [Bug #14095]
|
2017-07-19 11:01:01 -04:00
|
|
|
|
|
|
|
* Carriage returns are changed to be trimmed properly if trim_mode is specified
|
|
|
|
and used. Duplicated newlines will be removed on Windows. [Bug #5339] [Bug #11464]
|
|
|
|
|
2017-10-21 09:34:19 -04:00
|
|
|
* IPAddr
|
2017-12-12 08:07:06 -05:00
|
|
|
|
|
|
|
* IPAddr no longer accepts invalid address mask. [Bug #13399]
|
2018-10-17 07:35:27 -04:00
|
|
|
* IPAddr#ipv4_compat and IPAddr#ipv4_compat? are marked for deprecation. [Bug #13769]
|
2017-12-12 08:07:06 -05:00
|
|
|
|
|
|
|
* New methods:
|
|
|
|
|
2017-10-21 09:34:19 -04:00
|
|
|
* IPAddr#prefix
|
|
|
|
* IPAddr#loopback?
|
|
|
|
* IPAddr#private? [Feature #11666]
|
|
|
|
* IPAddr#link_local? [Feature #10912]
|
2017-12-12 08:07:06 -05:00
|
|
|
|
2017-11-23 22:53:27 -05:00
|
|
|
* IRB
|
2017-12-12 08:07:06 -05:00
|
|
|
|
2017-12-23 13:17:39 -05:00
|
|
|
* Print backtrace and error message in reverse order [Feature #8661] [experimental]
|
2017-11-23 23:29:49 -05:00
|
|
|
* `binding.irb` automatically requires irb and runs [Bug #13099] [experimental]
|
2018-10-17 07:35:27 -04:00
|
|
|
* `binding.irb` on its start shows source around the line where it was called [Feature #14124]
|
2017-11-23 22:53:27 -05:00
|
|
|
|
2017-12-11 18:50:40 -05:00
|
|
|
* Matrix
|
2017-12-12 08:07:06 -05:00
|
|
|
|
2017-12-11 18:50:40 -05:00
|
|
|
* New methods:
|
2017-12-12 08:07:06 -05:00
|
|
|
|
2017-12-11 18:50:40 -05:00
|
|
|
* Matrix.combine and Matrix#combine [Feature #10903]
|
2018-10-17 07:35:27 -04:00
|
|
|
* Matrix#hadamard_product and Matrix#entrywise_product
|
2017-12-11 18:50:40 -05:00
|
|
|
|
2017-05-19 12:06:18 -04:00
|
|
|
* Net::HTTP
|
2017-12-01 03:35:58 -05:00
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* Net::HTTP.new supports no_proxy parameter [Feature #11195]
|
2018-10-17 07:35:27 -04:00
|
|
|
* Net::HTTP#min_version and Net::HTTP#max_version [Feature #9450]
|
2017-05-19 12:06:18 -04:00
|
|
|
* Add more HTTP status classes
|
2017-05-19 12:06:25 -04:00
|
|
|
* Net::HTTP::STATUS_CODES is added as HTTP Status Code Repository [Misc #12935]
|
2018-10-17 07:35:27 -04:00
|
|
|
* Net::HTTP#proxy_user and Net::HTTP#proxy_pass reflect http_proxy environment
|
|
|
|
variable if the system's environment variable is multiuser safe. [Bug #12921]
|
2017-04-23 12:19:23 -04:00
|
|
|
|
2017-12-21 09:15:04 -05:00
|
|
|
* open-uri
|
|
|
|
* URI.open method defined as an alias to open-uri's Kernel.open.
|
|
|
|
open-uri's Kernel.open will be deprecated in future.
|
|
|
|
|
2017-12-14 06:19:17 -05:00
|
|
|
* OpenSSL
|
|
|
|
|
|
|
|
* Updated Ruby/OpenSSL from version 2.0 to 2.1. Changes are noted in
|
|
|
|
"Version 2.1.0" section in ext/openssl/History.md.
|
|
|
|
|
2017-10-21 04:34:49 -04:00
|
|
|
* Pathname
|
2017-12-12 08:07:06 -05:00
|
|
|
|
2017-10-21 04:34:49 -04:00
|
|
|
* New method:
|
2017-12-12 08:07:06 -05:00
|
|
|
|
2017-10-21 04:34:49 -04:00
|
|
|
* Pathname#glob [Feature #7360]
|
|
|
|
|
2017-11-02 16:26:11 -04:00
|
|
|
* Psych
|
|
|
|
|
2017-12-19 07:28:18 -05:00
|
|
|
* Update to Psych 3.0.2.
|
2017-12-12 08:07:06 -05:00
|
|
|
|
2017-12-20 04:51:29 -05:00
|
|
|
* Convert fallback option to a keyword argument
|
|
|
|
https://github.com/ruby/psych/pull/342
|
2017-11-30 20:52:26 -05:00
|
|
|
* Add :symbolize_names option to Psych.load, Psych.safe_load like JSON.parse
|
|
|
|
https://github.com/ruby/psych/pull/333, https://github.com/ruby/psych/pull/337
|
|
|
|
* Add Psych::Handler#event_location
|
|
|
|
https://github.com/ruby/psych/pull/326
|
|
|
|
* Make frozen string literal = true
|
|
|
|
https://github.com/ruby/psych/pull/320
|
|
|
|
* Preserve time zone offset when deserializing times
|
|
|
|
https://github.com/ruby/psych/pull/316
|
2017-12-08 17:43:05 -05:00
|
|
|
* Remove deprecated method aliases for syck gem
|
2017-11-30 20:52:26 -05:00
|
|
|
https://github.com/ruby/psych/pull/312
|
2017-11-02 16:26:11 -04:00
|
|
|
|
2017-04-05 22:10:40 -04:00
|
|
|
* RbConfig
|
2017-12-12 08:07:06 -05:00
|
|
|
|
|
|
|
* RbConfig::LIMITS is added to provide the limits of C types.
|
|
|
|
This is available when rbconfig/sizeof is loaded.
|
2017-04-05 22:10:40 -04:00
|
|
|
|
2017-09-14 06:53:47 -04:00
|
|
|
* Ripper
|
2017-12-12 08:07:06 -05:00
|
|
|
|
|
|
|
* Ripper::EXPR_BEG and so on for Ripper#state.
|
|
|
|
|
2017-09-14 06:53:47 -04:00
|
|
|
* New method:
|
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* Ripper#state to tell the state of scanner. [Feature #13686]
|
2017-09-14 06:53:47 -04:00
|
|
|
|
2017-10-10 23:44:35 -04:00
|
|
|
* RDoc
|
|
|
|
|
2017-12-23 18:33:09 -05:00
|
|
|
* Update to RDoc 6.0.1.
|
2017-12-20 03:50:26 -05:00
|
|
|
|
2017-12-20 04:31:22 -05:00
|
|
|
* Replace IRB based lexer with Ripper.
|
2017-12-20 03:50:26 -05:00
|
|
|
* https://github.com/ruby/rdoc/pull/512
|
2017-12-20 04:31:22 -05:00
|
|
|
* This much improves the speed of generating documents.
|
|
|
|
* It also facilitates supporting new syntax in the future.
|
|
|
|
* Support many new syntaxes of Ruby from the past few years.
|
|
|
|
* Use "frozen_string_literal: true".
|
2018-03-31 09:48:32 -04:00
|
|
|
Performance survey: https://gist.github.com/aycabta/abdfaa75ea8a6877eeb734e942e73800
|
2017-12-20 04:31:22 -05:00
|
|
|
* Support did_you_mean.
|
2017-10-10 23:44:35 -04:00
|
|
|
|
|
|
|
* Rubygems
|
|
|
|
|
2017-12-19 07:23:21 -05:00
|
|
|
* Update to Rubygems 2.7.3.
|
|
|
|
* http://blog.rubygems.org/2017/11/28/2.7.3-released.html
|
|
|
|
* http://blog.rubygems.org/2017/11/08/2.7.2-released.html
|
|
|
|
* http://blog.rubygems.org/2017/11/03/2.7.1-released.html
|
2017-11-02 00:25:37 -04:00
|
|
|
* http://blog.rubygems.org/2017/11/01/2.7.0-released.html
|
2017-12-19 07:23:21 -05:00
|
|
|
* http://blog.rubygems.org/2017/10/09/2.6.14-released.html
|
2017-10-10 23:44:35 -04:00
|
|
|
* http://blog.rubygems.org/2017/08/27/2.6.13-released.html
|
|
|
|
|
2017-10-21 11:21:26 -04:00
|
|
|
* SecureRandom
|
2017-12-12 08:07:06 -05:00
|
|
|
|
|
|
|
* New method:
|
|
|
|
|
2017-10-21 11:21:26 -04:00
|
|
|
* SecureRandom.alphanumeric
|
|
|
|
|
2017-07-14 04:46:13 -04:00
|
|
|
* Set
|
2017-12-12 08:07:06 -05:00
|
|
|
|
|
|
|
* New methods:
|
|
|
|
|
|
|
|
* Set#to_s as alias to #inspect [Feature #13676]
|
|
|
|
* Set#=== as alias to #include? [Feature #13801]
|
|
|
|
* Set#reset [Feature #6589]
|
2017-07-14 04:46:13 -04:00
|
|
|
|
2017-10-23 02:25:39 -04:00
|
|
|
* StringIO
|
2017-12-12 08:07:06 -05:00
|
|
|
|
2017-10-23 02:25:39 -04:00
|
|
|
* StringIO#write accepts multiple arguments
|
|
|
|
|
2017-11-29 02:57:48 -05:00
|
|
|
* StringScanner
|
2017-12-12 08:07:06 -05:00
|
|
|
|
|
|
|
* New methods:
|
|
|
|
|
|
|
|
* StringScanner#size, StringScanner#captures, StringScanner#values_at [Feature #836]
|
2017-11-29 02:57:48 -05:00
|
|
|
|
2017-12-13 20:11:28 -05:00
|
|
|
* URI
|
|
|
|
|
|
|
|
* Relative path operations no longer collapse consecutive slashes to a single slash. [Bug #8352]
|
|
|
|
|
2017-07-07 13:41:08 -04:00
|
|
|
* WEBrick
|
|
|
|
|
|
|
|
* Add Server Name Indication (SNI) support [Feature #13729]
|
2017-12-15 16:55:50 -05:00
|
|
|
* support Proc objects as body responses [Feature #855]
|
2017-12-24 03:45:21 -05:00
|
|
|
* released as a RubyGem [Feature #13173]
|
|
|
|
* avoid unintended behavior from Kernel#open [Misc #14216]
|
2017-07-07 13:41:08 -04:00
|
|
|
|
2017-10-23 08:59:05 -04:00
|
|
|
* Zlib
|
2017-12-12 08:07:06 -05:00
|
|
|
|
2017-10-23 03:06:12 -04:00
|
|
|
* Zlib::GzipWriter#write accepts multiple arguments
|
|
|
|
|
2016-12-26 07:00:02 -05:00
|
|
|
=== Compatibility issues (excluding feature bug fixes)
|
|
|
|
|
2021-12-08 22:28:42 -05:00
|
|
|
* BasicSocket
|
2017-07-19 11:01:01 -04:00
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* BasicSocket#read_nonblock and BasicSocket#write_nonblock no
|
2017-12-14 05:23:10 -05:00
|
|
|
longer set the O_NONBLOCK file description flag as side effect
|
2017-12-12 08:07:06 -05:00
|
|
|
(on Linux only) [Feature #13362]
|
2017-05-19 11:13:42 -04:00
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* Random
|
2017-02-27 08:41:38 -05:00
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* Random.raw_seed renamed to become Random.urandom. It is now
|
|
|
|
applicable to non-seeding purposes due to [Bug #9569].
|
|
|
|
|
|
|
|
* Socket
|
|
|
|
|
|
|
|
* Socket::Ifaddr#vhid is added [Feature #13803]
|
2017-08-31 04:33:35 -04:00
|
|
|
|
2017-07-21 15:06:07 -04:00
|
|
|
* ConditionVariable, Queue and SizedQueue reimplemented for speed.
|
|
|
|
They no longer subclass Struct. [Feature #13552]
|
|
|
|
|
2016-12-26 07:00:02 -05:00
|
|
|
=== Stdlib compatibility issues (excluding feature bug fixes)
|
|
|
|
|
2017-12-24 19:33:19 -05:00
|
|
|
* Gemification
|
|
|
|
|
|
|
|
* Promote following standard libraries to default gems.
|
|
|
|
* cmath
|
|
|
|
* csv
|
|
|
|
* date
|
|
|
|
* dbm
|
|
|
|
* etc
|
|
|
|
* fcntl
|
|
|
|
* fiddle
|
|
|
|
* fileutils
|
|
|
|
* gdbm
|
|
|
|
* ipaddr
|
|
|
|
* scanf
|
|
|
|
* sdbm
|
|
|
|
* stringio
|
|
|
|
* strscan
|
|
|
|
* webrick
|
|
|
|
* zlib
|
|
|
|
|
2017-12-21 00:07:43 -05:00
|
|
|
* Logger
|
|
|
|
|
|
|
|
* Logger.new("| command") had been working to open a command
|
2017-12-24 03:40:11 -05:00
|
|
|
unintentionally. It was prohibited, and now Logger#initialize
|
2018-10-17 07:35:27 -04:00
|
|
|
treats a String argument only as a filename, as its specification. [Bug #14212]
|
2017-12-21 00:07:43 -05:00
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* Net::HTTP
|
|
|
|
|
2017-12-14 05:23:10 -05:00
|
|
|
* Net::HTTP#start now passes :ENV to p_addr by default. [Bug #13351]
|
2017-12-12 08:07:06 -05:00
|
|
|
To avoid this, pass nil explicitly.
|
|
|
|
|
2017-04-21 02:16:11 -04:00
|
|
|
* mathn.rb
|
2017-12-12 08:07:06 -05:00
|
|
|
|
|
|
|
* Removed from stdlib. [Feature #10169]
|
2017-04-21 02:16:11 -04:00
|
|
|
|
2017-09-24 04:10:08 -04:00
|
|
|
* Rubygems
|
2017-12-12 08:07:06 -05:00
|
|
|
|
2017-11-07 15:06:25 -05:00
|
|
|
* Removed "ubygems.rb" file from stdlib. It's needless since Ruby 1.9.
|
2017-09-24 04:10:08 -04:00
|
|
|
|
2016-12-26 07:00:02 -05:00
|
|
|
=== Supported platform changes
|
|
|
|
|
2017-12-12 08:07:06 -05:00
|
|
|
* Drop support of NaCl platform
|
|
|
|
|
2017-10-23 01:56:25 -04:00
|
|
|
* https://bugs.chromium.org/p/chromium/issues/detail?id=239656#c160
|
|
|
|
|
2016-12-26 07:00:02 -05:00
|
|
|
=== Implementation improvements
|
|
|
|
|
2017-01-21 23:02:42 -05:00
|
|
|
* (This might not be a "user visible feature change" but) Hash class's
|
|
|
|
hash function is now SipHash13. [Feature #13017]
|
|
|
|
|
2017-01-21 23:14:21 -05:00
|
|
|
* SecureRandom now prefers OS-provided sources than OpenSSL. [Bug #9569]
|
|
|
|
|
2017-07-21 15:06:07 -04:00
|
|
|
* Mutex rewritten to be smaller and faster [Feature #13517]
|
|
|
|
|
2017-10-24 09:59:59 -04:00
|
|
|
* Performance of block passing using block parameters is improved by
|
|
|
|
lazy Proc allocation [Feature #14045]
|
|
|
|
|
2017-11-14 07:58:36 -05:00
|
|
|
* Dynamic instrumentation for TracePoint hooks instead of using "trace"
|
|
|
|
instruction to avoid overhead [Feature #14104]
|
|
|
|
|
2018-01-07 12:47:53 -05:00
|
|
|
* ERB now generates code from a template twice as fast as Ruby 2.4
|
2017-12-24 12:20:04 -05:00
|
|
|
|
2016-12-26 07:00:02 -05:00
|
|
|
=== Miscellaneous changes
|
2017-04-21 01:35:34 -04:00
|
|
|
|
2018-10-17 07:35:27 -04:00
|
|
|
* Print backtrace and error message in reverse order if $stderr is unchanged
|
|
|
|
and a tty. [Feature #8661] [experimental]
|
2017-05-19 02:14:43 -04:00
|
|
|
|
2018-10-17 07:35:27 -04:00
|
|
|
* Print error message in bold/underlined text if $stderr is unchanged and a
|
|
|
|
tty. [Feature #14140] [experimental]
|
2017-11-29 06:14:23 -05:00
|
|
|
|
2017-04-21 01:35:34 -04:00
|
|
|
* configure option --with-ext now mandates its arguments. So for
|
|
|
|
instance if you run ./configure --with-ext=openssl,+ then the
|
|
|
|
openssl library is guaranteed compiled, otherwise the build fails
|
|
|
|
abnormally.
|
|
|
|
|
|
|
|
Note however to always add the ",+" at the end of the argument.
|
|
|
|
Otherwise nothing but openssl are built. [Feature #13302]
|