2018-10-17 07:35:28 -04:00
|
|
|
# -*- rdoc -*-
|
2017-12-26 06:36:07 -05:00
|
|
|
|
2018-12-25 10:58:49 -05:00
|
|
|
= NEWS for Ruby 2.7.0
|
2017-12-26 06:36:07 -05:00
|
|
|
|
|
|
|
This document is a list of user visible feature changes made between
|
|
|
|
releases except for bug fixes.
|
|
|
|
|
2018-08-18 05:53:11 -04:00
|
|
|
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
|
2018-10-17 07:35:28 -04:00
|
|
|
(e.g. <tt>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</tt>)
|
2017-12-26 06:36:07 -05:00
|
|
|
|
2018-12-25 10:58:49 -05:00
|
|
|
== Changes since the 2.6.0 release
|
2017-12-28 15:09:24 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
=== Language changes
|
2017-12-28 15:09:24 -05:00
|
|
|
|
2019-04-26 23:09:48 -04:00
|
|
|
* Pattern matching is introduced as an experimental feature. [Feature #14912]
|
2019-04-17 02:48:03 -04:00
|
|
|
|
2018-12-31 10:00:37 -05:00
|
|
|
* Method reference operator, <code>.:</code> is introduced as an
|
|
|
|
experimental feature. [Feature #12125] [Feature #13581]
|
|
|
|
|
2019-09-27 12:43:31 -04:00
|
|
|
* Automatic conversion of keyword arguments and positional arguments is
|
|
|
|
deprecated, and conversion will be removed in Ruby 3. [Feature #14183]
|
2019-09-02 01:31:22 -04:00
|
|
|
|
2019-09-27 12:43:31 -04:00
|
|
|
* When a method call passes a Hash at the last argument, and when it
|
|
|
|
passes no keywords, and when the called method accepts keywords, a
|
|
|
|
warning is emitted. To continue treating as keywords, add a double
|
|
|
|
splat operator to avoid the warning and ensure correct behavior in
|
|
|
|
Ruby 3.
|
2019-08-30 18:03:27 -04:00
|
|
|
|
|
|
|
def foo(key: 42); end; foo({key: 42}) # warned
|
|
|
|
def foo(**kw); end; foo({key: 42}) # warned
|
|
|
|
def foo(key: 42); end; foo(**{key: 42}) # OK
|
2019-09-27 12:43:31 -04:00
|
|
|
def foo(**kw); end; foo(**{key: 42}) # OK
|
|
|
|
|
|
|
|
* When a method call passes keywords to a method that accepts keywords,
|
|
|
|
but it does not pass enough required positional arguments, the
|
|
|
|
keywords are treated as a final required positional argument, and a
|
|
|
|
warning is emitted. Pass the argument as a hash instead of keywords
|
|
|
|
to avoid the warning and ensure correct behavior in Ruby 3.
|
|
|
|
|
|
|
|
def foo(h, **kw); end; foo(key: 42) # warned
|
|
|
|
def foo(h, key: 42); end; foo(key: 42) # warned
|
|
|
|
def foo(h, **kw); end; foo({key: 42}) # OK
|
|
|
|
def foo(h, key: 42); end; foo({key: 42}) # OK
|
|
|
|
|
|
|
|
* When a method accepts specific keywords but not a keyword splat, and
|
|
|
|
a hash or keywords splat is passed to the method that includes both
|
|
|
|
Symbol and non-Symbol keys, the hash will continue to be split, and
|
|
|
|
a warning will be emitted. You will need to update the calling code
|
|
|
|
to pass separate hashes to ensure correct behavior in Ruby 3.
|
|
|
|
|
|
|
|
def foo(h={}, key: 42); end; foo("key" => 43, key: 42) # warned
|
|
|
|
def foo(h={}, key: 42); end; foo({"key" => 43, key: 42}) # warned
|
|
|
|
def foo(h={}, key: 42); end; foo({"key" => 43}, key: 42) # OK
|
|
|
|
def foo(h={}, key: 42); end; foo({"key" => 43}, key: 42) # OK
|
|
|
|
|
|
|
|
* If a method does not accept keywords, and is called with keywords,
|
|
|
|
the keywords are still treated as a positional hash, with no warning.
|
|
|
|
This behavior will continue to work in Ruby 3.
|
|
|
|
|
2019-08-30 18:03:27 -04:00
|
|
|
def foo(opt={}); end; foo( key: 42 ) # OK
|
|
|
|
|
2019-09-27 12:43:31 -04:00
|
|
|
* Non-symbols are allowed as a keyword argument keys if method accepts
|
|
|
|
arbitrary keywords. [Feature #14183]
|
|
|
|
|
|
|
|
def foo(**kw); p kw; end; foo("str" => 1) #=> {"str"=>1}
|
|
|
|
|
2019-09-28 00:51:27 -04:00
|
|
|
* <code>**nil</code> is allowed in method definitions to explicitly mark
|
|
|
|
that the method accepts no keywords. Calling such a method with keywords
|
|
|
|
will result in an ArgumentError. [Feature #14183]
|
2019-09-27 12:43:31 -04:00
|
|
|
|
|
|
|
def foo(h, **nil); end; foo(key: 1) # ArgumentError
|
|
|
|
def foo(h, **nil); end; foo(**{key: 1}) # ArgumentError
|
|
|
|
def foo(h, **nil); end; foo("str" => 1) # ArgumentError
|
|
|
|
def foo(h, **nil); end; foo({key: 1}) # OK
|
|
|
|
def foo(h, **nil); end; foo({"str" => 1}) # OK
|
2019-08-30 18:03:27 -04:00
|
|
|
|
2019-09-27 12:43:31 -04:00
|
|
|
* Passing an empty keyword splat to a method that does not accept keywords
|
|
|
|
no longer passes an empty hash, unless the empty hash is necessary for
|
|
|
|
a required parameter, in which case a warning will be emitted. Remove
|
|
|
|
the double splat to continue passing a positional hash. [Feature #14183]
|
2019-08-30 18:03:27 -04:00
|
|
|
|
2019-09-27 12:43:31 -04:00
|
|
|
h = {}; def foo(*a) a end; foo(**h) # []
|
|
|
|
h = {}; def foo(a) a end; foo(**h) # {} and warning
|
|
|
|
h = {}; def foo(*a) a end; foo(h) # [{}]
|
|
|
|
h = {}; def foo(a) a end; foo(h) # {}
|
2019-08-30 18:03:27 -04:00
|
|
|
|
2019-09-28 00:49:49 -04:00
|
|
|
* Proc.new and Kernel#proc with no block in a method called with a block is
|
|
|
|
warned now.
|
2019-01-10 03:19:14 -05:00
|
|
|
|
2019-09-28 00:49:49 -04:00
|
|
|
* Kernel#lambda with no block in a method called with a block errs.
|
2019-01-10 03:19:14 -05:00
|
|
|
|
2019-05-04 09:02:20 -04:00
|
|
|
* Non-Symbol keys in a keyword arguments hash were prohibited in 2.6.0,
|
|
|
|
but are now allowed again. [Bug #15658]
|
2019-03-11 08:48:33 -04:00
|
|
|
|
2019-03-17 01:21:18 -04:00
|
|
|
* Numbered parameter as the default block parameter is introduced as an
|
|
|
|
experimental feature. [Feature #4475]
|
|
|
|
|
2019-04-03 04:11:41 -04:00
|
|
|
* A beginless range is experimentally introduced. It might not be as useful
|
2019-04-28 12:17:27 -04:00
|
|
|
as an endless range, but would be good for DSL purpose. [Feature #14799]
|
2019-04-03 04:11:41 -04:00
|
|
|
|
|
|
|
ary[..3] # identical to ary[0..3]
|
|
|
|
where(sales: ..100)
|
|
|
|
|
2019-04-18 05:34:40 -04:00
|
|
|
* Setting <code>$;</code> to non-nil value is warned now. Use of it in
|
|
|
|
String#split is warned too.
|
|
|
|
|
2019-04-25 10:46:37 -04:00
|
|
|
* Setting <code>$,</code> to non-nil value is warned now. Use of it in
|
|
|
|
Array#join is warned too.
|
|
|
|
|
2019-04-28 11:24:26 -04:00
|
|
|
* Quoted here-document identifier must end within the same line.
|
|
|
|
|
|
|
|
<<"EOS
|
|
|
|
" # This has been warned since 2.4
|
|
|
|
EOS
|
|
|
|
|
2019-04-23 00:14:27 -04:00
|
|
|
|
2019-07-14 01:40:38 -04:00
|
|
|
* The flip-flop syntax deprecation is reverted. [Feature #5400]
|
|
|
|
|
2019-09-15 10:12:24 -04:00
|
|
|
* Comment lines can be placed between fluent dot now.
|
|
|
|
|
|
|
|
foo
|
|
|
|
# .bar
|
|
|
|
.baz # => foo.baz
|
|
|
|
|
2019-09-20 02:50:42 -04:00
|
|
|
* Calling a private method with a literal <code>self</code> as the receiver
|
2019-09-19 13:32:50 -04:00
|
|
|
is now allowed. [Feature #11297] [Feature #16123]
|
|
|
|
|
2019-10-07 15:55:22 -04:00
|
|
|
* Modifier rescue now operates the same for multiple assignment as single
|
|
|
|
assignment:
|
|
|
|
|
|
|
|
a, b = raise rescue [1, 2]
|
|
|
|
# Previously parsed as: (a, b = raise) rescue [1, 2]
|
|
|
|
# Now parsed as: a, b = (raise rescue [1, 2])
|
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
=== Core classes updates (outstanding ones only)
|
2017-12-28 15:09:24 -05:00
|
|
|
|
2019-10-07 01:12:29 -04:00
|
|
|
Array::
|
|
|
|
|
|
|
|
New method::
|
|
|
|
|
|
|
|
* Added Array#intersection. [Feature #16155]
|
|
|
|
|
2019-06-05 00:41:02 -04:00
|
|
|
Complex::
|
|
|
|
|
|
|
|
New method::
|
|
|
|
|
2019-09-02 01:31:22 -04:00
|
|
|
* Added Complex#<=>. So 0 <=> 0i will not raise NoMethodError. [Bug #15857]
|
2019-06-05 00:41:02 -04:00
|
|
|
|
2019-09-02 02:08:53 -04:00
|
|
|
Dir::
|
|
|
|
|
|
|
|
Modified method::
|
|
|
|
|
|
|
|
* Dir#glob and Dir#[] no longer allow NUL-separated glob pattern.
|
|
|
|
Use Array instead. [Feature #14643]
|
|
|
|
|
2019-06-16 19:50:44 -04:00
|
|
|
Encoding::
|
|
|
|
|
|
|
|
* Added new encoding CESU-8 [Feature #15931]
|
|
|
|
|
2019-02-07 03:14:10 -05:00
|
|
|
Enumerable::
|
|
|
|
|
2019-07-14 04:54:22 -04:00
|
|
|
New methods::
|
2019-02-07 03:14:10 -05:00
|
|
|
|
2019-05-23 10:24:22 -04:00
|
|
|
* Added Enumerable#filter_map. [Feature #15323]
|
|
|
|
|
2019-03-14 21:19:31 -04:00
|
|
|
* Added Enumerable#tally. [Feature #11076]
|
2019-02-07 03:14:10 -05:00
|
|
|
|
2019-03-11 05:52:40 -04:00
|
|
|
Enumerator::
|
|
|
|
|
|
|
|
New method::
|
|
|
|
|
2019-06-05 07:39:21 -04:00
|
|
|
* Added Enumerator::Lazy#eager that generates a non-lazy enumerator
|
|
|
|
from a lazy enumerator. [Feature #15901]
|
|
|
|
|
2019-04-09 09:08:29 -04:00
|
|
|
* Added Enumerator::Yielder#to_proc so that a Yielder object
|
|
|
|
can be directly passed to another method as a block
|
|
|
|
argument. [Feature #15618]
|
2019-03-11 05:52:40 -04:00
|
|
|
|
2019-09-14 06:43:51 -04:00
|
|
|
Fiber::
|
|
|
|
|
|
|
|
New method::
|
|
|
|
|
|
|
|
* Added Fiber#raise that behaves like Fiber#resume but raises an
|
|
|
|
exception on the resumed fiber. [Feature #10344]
|
|
|
|
|
2019-04-06 03:02:11 -04:00
|
|
|
FrozenError::
|
|
|
|
|
|
|
|
New method::
|
|
|
|
|
|
|
|
* Added FrozenError#receiver to return the frozen object that
|
|
|
|
modification was attempted on. To set this object when raising
|
|
|
|
FrozenError in Ruby code, pass it as the second argument to
|
|
|
|
FrozenError.new.
|
|
|
|
|
2019-06-01 11:42:57 -04:00
|
|
|
GC::
|
|
|
|
|
|
|
|
New method::
|
|
|
|
|
|
|
|
* Added GC.compact method for compacting the heap.
|
|
|
|
This function compacts live objects in the heap so that fewer pages may
|
|
|
|
be used, and the heap may be more CoW friendly. [Feature #15626]
|
|
|
|
|
|
|
|
Details on the algorithm and caveats can be found here:
|
|
|
|
https://bugs.ruby-lang.org/issues/15626
|
|
|
|
|
2019-06-08 08:35:33 -04:00
|
|
|
IO::
|
|
|
|
|
|
|
|
New method::
|
|
|
|
|
|
|
|
* Added IO#set_encoding_by_bom to check the BOM and set the external
|
|
|
|
encoding. [Bug #15210]
|
|
|
|
|
2019-04-28 21:11:44 -04:00
|
|
|
Integer::
|
|
|
|
|
|
|
|
Modified method::
|
|
|
|
|
|
|
|
* Integer#[] now supports range operation. [Feature #8842]
|
|
|
|
|
|
|
|
0b01001101[2, 4] #=> 0b0011
|
|
|
|
0b01001100[2..5] #=> 0b0011
|
|
|
|
0b01001100[2...6] #=> 0b0011
|
|
|
|
^^^^
|
|
|
|
|
2019-09-26 11:27:47 -04:00
|
|
|
NilClass / TrueClass / FalseClass::
|
|
|
|
|
|
|
|
Modified method::
|
|
|
|
|
|
|
|
* NilClass#to_s, TrueClass#to_s and FalseClass#to_s now always returns a
|
|
|
|
frozen String. The returned String is always the same for each of these
|
|
|
|
values. This change is experimental. [Feature #16150]
|
|
|
|
|
2019-05-07 06:52:24 -04:00
|
|
|
Module::
|
|
|
|
|
2019-06-22 12:44:07 -04:00
|
|
|
New method::
|
|
|
|
|
2019-06-30 11:47:55 -04:00
|
|
|
* Added Module#const_source_location to retrieve the location where a
|
2019-06-22 12:44:07 -04:00
|
|
|
constant is defined. [Feature #10771]
|
|
|
|
|
2019-10-07 15:55:22 -04:00
|
|
|
* Added Module#ruby2_keywords for marking a method as passing keyword
|
|
|
|
arguments through a regular argument splat, useful when delegating
|
|
|
|
all arguments to another method in a way that can be backwards
|
|
|
|
compatible with older Ruby versions. [Bug #16154]
|
|
|
|
|
2019-05-07 06:52:24 -04:00
|
|
|
Modified method::
|
|
|
|
|
|
|
|
* Module#autoload? now takes an +inherit+ optional argument, like as
|
|
|
|
Module#const_defined?. [Feature #15777]
|
2019-09-26 07:25:42 -04:00
|
|
|
|
2019-09-26 04:41:43 -04:00
|
|
|
* Module#name now always return a frozen String. The returned String is
|
2019-09-26 07:41:41 -04:00
|
|
|
always the same for a given Module. This change is
|
|
|
|
experimental. [Feature #16150]
|
2019-05-07 06:52:24 -04:00
|
|
|
|
2019-08-29 09:06:05 -04:00
|
|
|
ObjectSpace::WeakMap::
|
|
|
|
|
|
|
|
Modified method::
|
|
|
|
|
|
|
|
* ObjectSpace::WeakMap#[]= now accepts special objects as either key or
|
|
|
|
values. [Feature #16035]
|
|
|
|
|
2019-06-01 11:42:11 -04:00
|
|
|
Regexp / String::
|
2019-03-05 22:15:06 -05:00
|
|
|
|
2019-04-09 09:08:29 -04:00
|
|
|
* Update Unicode version and Emoji version from 11.0.0 to
|
|
|
|
12.0.0. [Feature #15321]
|
2019-03-05 22:15:06 -05:00
|
|
|
|
2019-04-09 05:41:00 -04:00
|
|
|
* Update Unicode version to 12.1.0, adding support for
|
2019-04-09 09:08:29 -04:00
|
|
|
U+32FF SQUARE ERA NAME REIWA. [Feature #15195]
|
2019-04-09 05:41:00 -04:00
|
|
|
|
2019-07-14 07:33:41 -04:00
|
|
|
RubyVM::
|
|
|
|
|
|
|
|
Removed method::
|
|
|
|
|
2019-09-26 11:48:48 -04:00
|
|
|
* +RubyVM.resolve_feature_path+ moved to
|
|
|
|
<code>$LOAD_PATH.resolve_feature_path</code>. [Feature #15903] [Feature #15230]
|
2019-07-14 07:33:41 -04:00
|
|
|
|
2019-09-08 05:53:27 -04:00
|
|
|
Symbol::
|
|
|
|
|
|
|
|
Modified method::
|
|
|
|
|
2019-09-26 11:48:48 -04:00
|
|
|
* Symbol#to_s now always returns a frozen String. The returned String
|
|
|
|
is always the same for a given Symbol. This change is
|
|
|
|
experimental. [Feature #16150]
|
2019-09-08 05:53:27 -04:00
|
|
|
|
2019-05-23 09:47:55 -04:00
|
|
|
Time::
|
|
|
|
|
2019-07-14 04:58:25 -04:00
|
|
|
New methods::
|
|
|
|
|
2019-05-23 09:47:55 -04:00
|
|
|
* Added Time#ceil method. [Feature #15772]
|
|
|
|
|
|
|
|
* Added Time#floor method. [Feature #15653]
|
|
|
|
|
2019-09-19 06:49:12 -04:00
|
|
|
Modified method::
|
|
|
|
|
2019-09-26 11:48:48 -04:00
|
|
|
* Time#inspect is separated from Time#to_s and it shows its sub
|
|
|
|
second. [Feature #15958]
|
2019-09-19 06:49:12 -04:00
|
|
|
|
2019-08-29 22:01:25 -04:00
|
|
|
UnboundMethod::
|
|
|
|
|
|
|
|
New methods::
|
|
|
|
|
|
|
|
* Added UnboundMethod#bind_call method. [Feature #15955]
|
|
|
|
|
2019-09-26 11:48:48 -04:00
|
|
|
<code>umethod.bind_call(obj, ...)</code> is semantically equivalent
|
|
|
|
to <code>umethod.bind(obj).call(...)</code>. This idiom is used in
|
|
|
|
some libraries to call a method that is overridden. The added
|
|
|
|
method does the same without allocation of intermediate Method
|
|
|
|
object.
|
|
|
|
|
|
|
|
class Foo
|
|
|
|
def add_1(x)
|
|
|
|
x + 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
class Bar < Foo
|
|
|
|
def add_1(x) # override
|
|
|
|
x + 2
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
obj = Bar.new
|
|
|
|
p obj.add_1(1) #=> 3
|
|
|
|
p Foo.instance_method(:add_1).bind(obj).call(1) #=> 2
|
|
|
|
p Foo.instance_method(:add_1).bind_call(obj, 1) #=> 2
|
2019-08-29 22:01:25 -04:00
|
|
|
|
|
|
|
|
2019-07-13 09:26:47 -04:00
|
|
|
$LOAD_PATH::
|
|
|
|
|
2019-07-14 04:58:25 -04:00
|
|
|
New method::
|
|
|
|
|
2019-09-26 11:48:48 -04:00
|
|
|
* Added <code>$LOAD_PATH.resolve_feature_path</code>. [Feature #15903] [Feature #15230]
|
2019-07-13 09:26:47 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
=== Stdlib updates (outstanding ones only)
|
2017-12-28 15:09:24 -05:00
|
|
|
|
2019-04-17 09:20:02 -04:00
|
|
|
Bundler::
|
|
|
|
|
|
|
|
* Upgrade to Bundler 2.1.0.pre.1
|
|
|
|
Bundled from https://github.com/bundler/bundler/commit/a53709556b95a914e874b22ed2116a46b0528852
|
|
|
|
|
2019-06-05 09:29:53 -04:00
|
|
|
CGI::
|
|
|
|
|
|
|
|
* CGI.escapeHTML becomes 2~5x faster when there's at least one escaped character.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
CSV::
|
2019-01-25 01:49:59 -05:00
|
|
|
|
2019-10-12 01:03:21 -04:00
|
|
|
* Upgrade to 3.1.2.
|
2019-01-25 01:49:59 -05:00
|
|
|
See https://github.com/ruby/csv/blob/master/NEWS.md.
|
|
|
|
|
2019-04-08 21:27:36 -04:00
|
|
|
Date::
|
|
|
|
|
2019-05-31 06:12:24 -04:00
|
|
|
* Date.jisx0301, Date#jisx0301, and Date.parse support the new Japanese
|
|
|
|
era. [Feature #15742]
|
2019-04-08 21:27:36 -04:00
|
|
|
|
2019-06-01 11:42:11 -04:00
|
|
|
Delegator::
|
2019-05-11 19:32:00 -04:00
|
|
|
|
|
|
|
* Object#DelegateClass accepts a block and module_evals it in the context
|
|
|
|
of the returned class, similar to Class.new and Struct.new.
|
|
|
|
|
2019-03-28 07:50:19 -04:00
|
|
|
ERB::
|
|
|
|
|
2019-03-28 08:35:20 -04:00
|
|
|
* Prohibit marshaling ERB instance.
|
2019-03-28 07:50:19 -04:00
|
|
|
|
2019-04-25 11:53:36 -04:00
|
|
|
IRB::
|
|
|
|
|
2019-06-01 11:42:11 -04:00
|
|
|
* Introduce syntax highlight inspired by pry.gem to Binding#irb source lines,
|
2019-05-25 00:21:22 -04:00
|
|
|
REPL input, and inspect output of some core-class objects.
|
2019-04-25 11:53:36 -04:00
|
|
|
|
2019-07-15 03:25:50 -04:00
|
|
|
* Introduce multiline mode by Reline.
|
|
|
|
|
|
|
|
* Show documents when completion.
|
|
|
|
|
|
|
|
* Enable auto indent and save/load history by default.
|
|
|
|
|
2019-09-02 01:43:35 -04:00
|
|
|
Net::FTP::
|
|
|
|
|
|
|
|
* Add features and options. [Feature #15964]
|
|
|
|
|
2019-04-15 19:58:06 -04:00
|
|
|
Net::IMAP::
|
|
|
|
|
|
|
|
* Add Server Name Indication (SNI) support. [Feature #15594]
|
|
|
|
|
2019-07-14 04:22:13 -04:00
|
|
|
open-uri::
|
|
|
|
|
|
|
|
* Warn open-uri's "open" method at Kernel.
|
2019-07-14 20:36:52 -04:00
|
|
|
Use URI.open instead. [Misc #15893]
|
|
|
|
|
2019-09-02 01:31:22 -04:00
|
|
|
* The default charset of text/* media type is UTF-8 instead of
|
|
|
|
ISO-8859-1. [Bug #15933]
|
2019-07-14 04:22:13 -04:00
|
|
|
|
2019-07-15 02:45:51 -04:00
|
|
|
Pathname::
|
2019-07-14 04:44:33 -04:00
|
|
|
|
|
|
|
* Delegates 3 arguments from Pathname.glob to Dir.glob to
|
|
|
|
accept base: keyword.
|
|
|
|
|
2019-06-20 02:59:20 -04:00
|
|
|
Racc::
|
|
|
|
|
2019-06-20 04:40:08 -04:00
|
|
|
* Merge 1.4.15 from upstream repository and added cli of racc.
|
2019-06-20 02:59:20 -04:00
|
|
|
|
2019-07-15 02:49:59 -04:00
|
|
|
Reline::
|
|
|
|
|
|
|
|
* New stdlib that is compatible with readline stdlib by pure Ruby and also
|
|
|
|
has a multiline mode.
|
|
|
|
|
2019-10-11 23:07:15 -04:00
|
|
|
REXML::
|
|
|
|
|
|
|
|
* Upgrade to 3.2.3.
|
|
|
|
See https://github.com/ruby/rexml/blob/master/NEWS.md.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
RSS::
|
2019-01-25 01:35:04 -05:00
|
|
|
|
|
|
|
* Upgrade to RSS 0.2.8.
|
|
|
|
See https://github.com/ruby/rss/blob/master/NEWS.md.
|
|
|
|
|
2019-04-17 09:20:02 -04:00
|
|
|
RubyGems::
|
|
|
|
|
|
|
|
* Upgrade to RubyGems 3.1.0.pre1
|
|
|
|
Bundled from https://github.com/rubygems/rubygems/commit/97b264f0fa248c864b6ee9a23d3ff1cdd217dddb
|
|
|
|
|
2019-10-13 23:40:50 -04:00
|
|
|
StringScanner::
|
|
|
|
|
|
|
|
* Upgrade to 1.0.3.
|
|
|
|
See https://github.com/ruby/strscan/blob/master/NEWS.md.
|
|
|
|
|
2018-11-05 02:01:47 -05:00
|
|
|
=== Compatibility issues (excluding feature bug fixes)
|
2018-11-02 19:07:56 -04:00
|
|
|
|
2019-09-19 23:12:37 -04:00
|
|
|
* Removed unmaintained libraries.
|
|
|
|
* CMath
|
2019-09-19 23:42:53 -04:00
|
|
|
* Scanf
|
2019-09-19 23:56:18 -04:00
|
|
|
* Shell
|
2019-09-20 01:06:22 -04:00
|
|
|
* Synchronizer
|
2019-09-20 01:21:04 -04:00
|
|
|
* ThreadsWait
|
2019-09-19 23:12:37 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
=== Stdlib compatibility issues (excluding feature bug fixes)
|
2017-12-28 15:09:24 -05:00
|
|
|
|
2019-10-07 15:55:22 -04:00
|
|
|
pathname::
|
|
|
|
|
|
|
|
* Kernel#Pathname when called with a Pathname argument now returns
|
|
|
|
the argument instead of creating a new Pathname. This is more
|
|
|
|
similar to other Kernel methods, but can break code that modifies
|
|
|
|
the return value and expects the argument not to be modified.
|
|
|
|
|
2019-03-11 09:00:31 -04:00
|
|
|
profile.rb, Profiler__::
|
|
|
|
|
|
|
|
* Removed from standard library. No one maintains it from Ruby 2.0.0.
|
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
=== C API updates
|
2017-12-28 15:09:24 -05:00
|
|
|
|
2019-10-07 15:55:22 -04:00
|
|
|
* Many <code>*_kw</code> functions have been added for setting whether
|
|
|
|
the final argument being passed should be treated as keywords. You
|
|
|
|
may need to switch to these functions to avoid keyword argument
|
|
|
|
separation warnings, and to ensure correct behavior in Ruby 3.
|
|
|
|
|
|
|
|
* The <code>:</code> character in rb_scan_args format string is now
|
|
|
|
treated as keyword arguments. Passing a positional hash instead of
|
|
|
|
keyword arguments will emit a deprecation warning.
|
|
|
|
|
2019-09-26 13:31:39 -04:00
|
|
|
* C API declarations with +ANYARGS+ are changed not to use +ANYARGS+
|
|
|
|
https://github.com/ruby/ruby/pull/2404
|
2019-09-01 01:54:04 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
=== Implementation improvements
|
2017-12-28 15:09:24 -05:00
|
|
|
|
2019-07-01 00:24:39 -04:00
|
|
|
Fiber::
|
|
|
|
|
|
|
|
* Allow selecting different coroutine implementation by using
|
|
|
|
`--with-coroutine=`, e.g.
|
|
|
|
|
|
|
|
./confgure --with-coroutine=ucontext
|
|
|
|
./confgure --with-coroutine=copy
|
|
|
|
|
|
|
|
* Replace previous stack cache with fiber pool cache. The fiber pool
|
|
|
|
allocates many stacks in a single memory region. Stack allocation
|
|
|
|
becomes O(log N) and fiber creation is amortized O(1). Around 10x
|
|
|
|
performance improvement was measured in micro-benchmarks.
|
|
|
|
|
2019-10-07 15:55:22 -04:00
|
|
|
File::
|
|
|
|
* File.realpath now uses realpath(3) on many platforms, which can
|
|
|
|
significantly improve performance.
|
|
|
|
|
2019-06-23 09:28:23 -04:00
|
|
|
Thread::
|
|
|
|
|
|
|
|
* VM stack memory allocation is now combined with native thread stack,
|
|
|
|
improving thread allocation performance and reducing allocation related
|
|
|
|
failures. ~10x performance improvement was measured in micro-benchmarks.
|
|
|
|
|
2019-03-17 01:28:54 -04:00
|
|
|
JIT::
|
|
|
|
|
2019-04-17 05:24:48 -04:00
|
|
|
* JIT-ed code is recompiled to less-optimized code when an optimization assumption is invalidated.
|
|
|
|
|
|
|
|
* Method inlining is performed when a method is considered as pure.
|
2019-04-21 11:04:06 -04:00
|
|
|
This optimization is still experimental and many methods are NOT considered as pure yet.
|
2019-04-17 05:24:48 -04:00
|
|
|
|
2019-04-09 09:08:30 -04:00
|
|
|
* Default value of +--jit-max-cache+ is changed from 1,000 to 100
|
2019-03-17 01:28:54 -04:00
|
|
|
|
2019-04-09 09:08:30 -04:00
|
|
|
* Default value of +--jit-min-calls+ is changed from 5 to 10,000
|
2019-03-17 01:28:54 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
=== Miscellaneous changes
|
2019-01-10 03:22:23 -05:00
|
|
|
|
2019-06-30 11:47:55 -04:00
|
|
|
* Support for IA64 architecture has been removed. Hardware for testing was
|
2019-06-23 09:28:23 -04:00
|
|
|
difficult to find, native fiber code is difficult to implement, and it added
|
|
|
|
non-trivial complexity to the interpreter. [Feature #15894]
|
|
|
|
|
2019-01-10 03:22:23 -05:00
|
|
|
* Require compilers to support C99 [Misc #15347]
|
2019-04-22 08:23:37 -04:00
|
|
|
|
2019-01-10 03:22:23 -05:00
|
|
|
* Details of our dialect: https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/C99
|
2019-04-22 08:23:37 -04:00
|
|
|
|
2019-08-12 06:13:30 -04:00
|
|
|
* Ruby's upstream repository is changed from Subversion to Git.
|
2019-04-22 08:23:37 -04:00
|
|
|
|
2019-04-23 09:26:40 -04:00
|
|
|
* https://git.ruby-lang.org/ruby.git
|
|
|
|
|
2019-04-22 08:23:37 -04:00
|
|
|
* RUBY_REVISION class is changed from Integer to String.
|
|
|
|
|
|
|
|
* RUBY_DESCRIPTION includes Git revision instead of Subversion's one.
|