2018-12-25 11:09:39 -05:00
|
|
|
# -*- rdoc -*-
|
|
|
|
|
|
|
|
= NEWS for Ruby 2.6.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.5.0 release
|
|
|
|
|
|
|
|
=== Language changes
|
|
|
|
|
|
|
|
* <code>$SAFE</code> now is a process global state and can be set to 0 again. [Feature #14250]
|
|
|
|
|
|
|
|
* Refinements take place at block passing. [Feature #14223]
|
|
|
|
|
|
|
|
* Refinements take place at Kernel#public_send. [Feature #15326]
|
|
|
|
|
|
|
|
* Refinements take place at Kernel#respond_to?. [Feature #15327]
|
|
|
|
|
|
|
|
* +else+ without +rescue+ now causes a syntax error. [EXPERIMENTAL] [Feature #14606]
|
|
|
|
|
|
|
|
* Constant names may start with a non-ASCII capital letter. [Feature #13770]
|
|
|
|
|
|
|
|
* Endless ranges are introduced. You can use a Range that has no end,
|
|
|
|
like <code>(0..)</code> (or similarly <code>(0...)</code>). [Feature #12912]
|
|
|
|
|
|
|
|
The following shows typical use cases:
|
|
|
|
|
|
|
|
ary[1..] # identical to ary[1..-1]
|
|
|
|
(1...).each {|index| block } # infinite loop from index 1
|
|
|
|
ary.zip(1..) {|elem, index| block } # ary.each.with_index(1) { }
|
|
|
|
|
|
|
|
* Non-Symbol keys in a keyword arguments hash cause an exception.
|
|
|
|
|
|
|
|
* The "shadowing outer local variable" warning is removed. [Feature #12490]
|
|
|
|
|
|
|
|
You can now write the following without warning:
|
|
|
|
|
|
|
|
user = users.find {|user| cond(user) }
|
|
|
|
|
|
|
|
* Print +cause+ of the exception if the exception is not caught and printed
|
|
|
|
its backtraces and error message. [Feature #8257]
|
|
|
|
|
|
|
|
* The flip-flop syntax is deprecated. [Feature #5400]
|
|
|
|
|
|
|
|
=== Core classes updates (outstanding ones only)
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Array::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Added Array#union and Array#difference instance methods. [Feature #14097]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Modified methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Array#to_h now accepts a block that maps elements to new key/value pairs. [Feature #15143]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Aliased methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Array#filter is a new alias for Array#select. [Feature #13784]
|
|
|
|
* Array#filter! is a new alias for Array#select!. [Feature #13784]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Binding::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Added Binding#source_location. [Feature #14230]
|
|
|
|
|
|
|
|
This method returns the source location of the binding, a 2-element
|
|
|
|
array of <code>__FILE__</code> and <code>__LINE__</code>.
|
|
|
|
Traditionally, the same information could be retrieved by
|
|
|
|
<code>eval("[__FILE__, __LINE__]", binding)</code>, but we are
|
|
|
|
planning to change this behavior so that Kernel#eval ignores
|
|
|
|
binding's source location [Bug #4352]. So, users should use this
|
|
|
|
newly-introduced method instead of Kernel#eval.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Dir::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Added Dir#each_child and Dir#children instance methods. [Feature #13969]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Enumerable::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Enumerable#chain returns an enumerator object that iterates over the
|
|
|
|
elements of the receiver and then those of each argument
|
|
|
|
in sequence. [Feature #15144]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Modified methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Enumerable#to_h now accepts a block that maps elements to new key/value pairs. [Feature #15143]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Aliased methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Enumerable#filter is a new alias for Enumerable#select. [Feature #13784]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Enumerator::ArithmeticSequence::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* This is a new class to represent a generator of an arithmetic sequence,
|
|
|
|
that is a number sequence defined by a common difference. It can be used
|
|
|
|
for representing what is similar to Python's slice. You can get an
|
|
|
|
instance of this class from Numeric#step and Range#step.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Enumerator::Chain::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* This is a new class to represent a chain of enumerables that works as a
|
|
|
|
single enumerator, generated by such methods as Enumerable#chain and
|
|
|
|
Enumerator#+.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Enumerator::Lazy::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Aliased methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Enumerator::Lazy#filter is a new alias for
|
|
|
|
Enumerator::Lazy#select. [Feature #13784]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Enumerator::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Enumerator#+ returns an enumerator object that iterates over the
|
|
|
|
elements of the receiver and then those of the other operand. [Feature #15144]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
ENV::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Modified methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* ENV.to_h now accepts a block that maps names and values to new keys and values. [Feature #15143]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Exception::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New options::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Exception#full_message takes +:highlight+ and +:order+
|
|
|
|
options. [Bug #14324]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Hash::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Modified methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Hash#merge, Hash#merge!, and Hash#update now accept multiple
|
|
|
|
arguments. [Feature #15111]
|
|
|
|
|
|
|
|
* Hash#to_h now accepts a block that maps keys and values to new keys and values. [Feature #15143]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Aliased methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Hash#filter is a new alias for Hash#select. [Feature #13784]
|
|
|
|
|
|
|
|
* Hash#filter! is a new alias for Hash#select!. [Feature #13784]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
IO::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New options::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Added new mode character <code>'x'</code> to open files for exclusive
|
|
|
|
access. [Feature #11258]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Kernel::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Aliased methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Kernel#then is a new alias for Kernel#yield_self. [Feature #14594]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New options::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Kernel#Complex, Kernel#Float, Kernel#Integer, and
|
|
|
|
Kernel#Rational take an +:exception+ option to specify the way of
|
|
|
|
error handling. [Feature #12732]
|
|
|
|
|
|
|
|
* Kernel#system takes an +:exception+ option to raise an exception
|
|
|
|
on failure. [Feature #14386]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Incompatible changes::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Kernel#system and Kernel#exec do not close non-standard file descriptors
|
|
|
|
(the default of the +:close_others+ option is changed to +false+,
|
|
|
|
but we still set the +FD_CLOEXEC+ flag on descriptors we
|
|
|
|
create). [Misc #14907]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
KeyError::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New options::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* KeyError.new accepts +:receiver+ and +:key+ options to set receiver and
|
|
|
|
key in Ruby code. [Feature #14313]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Method::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Added Method#<< and Method#>> for Proc composition. [Feature #6284]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Module::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Modified methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Module#method_defined?, Module#private_method_defined?, and
|
|
|
|
Module#protected_method_defined? now accept the second
|
|
|
|
parameter as optional. If it is +true+ (the default value), it checks
|
|
|
|
ancestor modules/classes, or checks only the class itself. [Feature #14944]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
NameError::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New options::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* NameError.new accepts a +:receiver+ option to set receiver in Ruby
|
|
|
|
code. [Feature #14313]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
NilClass::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* NilClass#=~ is added for compatibility. [Feature #15231]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
NoMethodError::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New options::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* NoMethodError.new accepts a +:receiver+ option to set receiver in Ruby
|
|
|
|
code. [Feature #14313]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Numeric::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Incompatible changes::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Numeric#step now returns an instance of the Enumerator::ArithmeticSequence
|
|
|
|
class rather than one of the Enumerator class.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
OpenStruct::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Modified methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* OpenStruct#to_h now accepts a block that maps keys and values to new keys and values. [Feature #15143]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Proc::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Added Proc#<< and Proc#>> for Proc composition. [Feature #6284]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Incompatible changes::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Proc#call doesn't change <code>$SAFE</code> any more. [Feature #14250]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Random::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Added Random.bytes. [Feature #4938]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Range::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Added Range#% instance method. [Feature #14697]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Incompatible changes::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Range#=== now uses the +#cover?+ instead of the +#include?+ method. [Feature #14575]
|
|
|
|
* Range#cover? now accepts a Range object. [Feature #14473]
|
|
|
|
* Range#step now returns an instance of the Enumerator::ArithmeticSequence
|
|
|
|
class rather than one of the Enumerator class.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Regexp/String::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Update Unicode version from 10.0.0 to 11.0.0. [Feature #14802]
|
|
|
|
|
|
|
|
This includes a rewrite of the grapheme cluster (/\X/) algorithm
|
|
|
|
and special-casing for Georgian MTAVRULI on String#downcase.
|
|
|
|
|
|
|
|
* Update Emoji version from 5.0 to 11.0.0 [Feature #14802]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
RubyVM::AbstractSyntaxTree::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* RubyVM::AbstractSyntaxTree.parse parses a given string and returns AST
|
|
|
|
nodes. [experimental]
|
|
|
|
|
|
|
|
* RubyVM::AbstractSyntaxTree.parse_file parses a given file and returns AST
|
|
|
|
nodes. [experimental]
|
|
|
|
|
|
|
|
* RubyVM::AbstractSyntaxTree.of returns AST nodes of the given proc or method.
|
2019-02-02 01:38:09 -05:00
|
|
|
experimental::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
RubyVM::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* RubyVM.resolve_feature_path identifies the file that will be loaded by
|
|
|
|
"require(feature)". [experimental] [Feature #15230]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
String::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* String#crypt is now deprecated. [Feature #14915]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New features::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* String#split yields each substring to the block if given. [Feature #4780]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Struct::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Modified methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Struct#to_h now accepts a block that maps keys and values to new keys and values. [Feature #15143]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Aliased method::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Struct#filter is a new alias for Struct#select. [Feature #13784]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Time::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New features::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Time.new and Time#getlocal accept a timezone object as well as
|
|
|
|
a UTC offset string. Time#+, Time#-, and Time#succ also preserve
|
|
|
|
the timezone. [Feature #14850]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
TracePoint::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New features::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* "script_compiled" event is supported. [Feature #15287]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* TracePoint#parameters [Feature #14694]
|
|
|
|
|
|
|
|
* TracePoint#instruction_sequence [Feature #15287]
|
|
|
|
|
|
|
|
* TracePoint#eval_script [Feature #15287]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Modified methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* TracePoint#enable accepts new keywords "target:" and "target_line:".
|
2019-02-02 01:38:09 -05:00
|
|
|
Feature #15289::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
=== Stdlib updates (outstanding ones only)
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
BigDecimal::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
Update to version 1.4.0. This version includes several compatibility
|
|
|
|
issues, see Compatibility issues section below for details.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Modified methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* BigDecimal() accepts the new keyword "exception:" similar to Float().
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Note for the differences among recent versions::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
You should want to know the differences among recent versions of bigdecimal.
|
|
|
|
Please select the suitable version of bigdecimal according to the following
|
|
|
|
information.
|
|
|
|
|
|
|
|
* 1.3.5 has BigDecimal.new without "exception:" keyword. You can see the
|
|
|
|
deprecation warning of BigDecimal.new when you specify "-w" option.
|
|
|
|
BigDecimal(), BigDecimal.new, and Object#to_d methods are the same.
|
|
|
|
|
|
|
|
* 1.4.0 has BigDecimal.new with "exception:" keyword. You always see the
|
|
|
|
deprecation warning of BigDecimal.new. Object#to_d method is different
|
|
|
|
from BigDecimal() and BigDecimal.new.
|
|
|
|
|
|
|
|
* 2.0.0 will be released soon after releasing Ruby 2.6.0. This version
|
|
|
|
will not have the BigDecimal.new method.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Bundler::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Add Bundler to Standard Library. [Feature #12733]
|
|
|
|
|
|
|
|
* Use 1.17.2, the latest stable version.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Coverage::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
A oneshot_lines mode is added. [Feature #15022]
|
|
|
|
|
|
|
|
This mode checks "whether each line was executed at least once or not",
|
|
|
|
instead of "how many times each line was executed".
|
|
|
|
A hook for each line is fired at most once, and after it is fired
|
|
|
|
the hook flag is removed, i.e., it runs with zero overhead.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New options::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Add +:oneshot_lines+ keyword argument to Coverage.start.
|
|
|
|
|
|
|
|
* Add +:stop+ and +:clear+ keyword arguments to Coverage.result.
|
|
|
|
If +clear+ is true, it clears the counters to zero.
|
|
|
|
If +stop+ is true, it disables coverage measurement.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Coverage.line_stub, which is a simple helper function that
|
|
|
|
creates the "stub" of line coverage from a given source code.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
CSV::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Upgrade to 3.0.2. This includes performance improvements especially
|
|
|
|
for writing. Writing is about 2 times faster.
|
|
|
|
See https://github.com/ruby/csv/blob/master/NEWS.md.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
ERB::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New options::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Add +:trim_mode+ and +:eoutvar+ keyword arguments to ERB.new.
|
|
|
|
Now non-keyword arguments other than the first one are softly deprecated
|
|
|
|
and will be removed when Ruby 2.5 becomes EOL. [Feature #14256]
|
|
|
|
|
|
|
|
* erb command's <tt>-S</tt> option is deprecated, and will be removed
|
|
|
|
in the next version.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
FileUtils::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* FileUtils#cp_lr. [Feature #4189]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Matrix::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Matrix#antisymmetric?, Matrix#skew_symmetric?
|
|
|
|
|
|
|
|
* Matrix#map!, Matrix#collect! [Feature #14151]
|
|
|
|
|
|
|
|
* Matrix#[]=
|
|
|
|
|
|
|
|
* Vector#map!, Vector#collect!
|
|
|
|
|
|
|
|
* Vector#[]=
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Net::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New options::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Add +:write_timeout+ keyword argument to Net::HTTP.new. [Feature #13396]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Add Net::HTTP#write_timeout and Net::HTTP#write_timeout=. [Feature #13396]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New constant::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Add Net::HTTPClientException to deprecate Net::HTTPServerException,
|
|
|
|
whose name is misleading. [Bug #14688]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
NKF::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Upgrade to nkf v2.1.5
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Psych::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Upgrade to Psych 3.1.0
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
RDoc::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Become about 2 times faster.
|
|
|
|
|
|
|
|
* Use SOURCE_DATE_EPOCH to generate files.
|
|
|
|
|
|
|
|
* Fix method line number that slipped off.
|
|
|
|
|
|
|
|
* Enable <code>--width</code>, <code>--exclude</code>,
|
|
|
|
and <code>--line-numbers</code> that were ignored.
|
|
|
|
|
|
|
|
* Add support for blockquote by ">>>" in default markup notation.
|
|
|
|
|
|
|
|
* Add support for "Raises" lines in TomDoc notation.
|
|
|
|
|
|
|
|
* Fix syntax error output.
|
|
|
|
|
|
|
|
* Fix many parsing bugs.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
REXML::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Upgrade to REXML 3.1.9.
|
|
|
|
See https://github.com/ruby/rexml/blob/master/NEWS.md.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Improved some XPath implementations::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* <code>concat()</code> function: Stringify all arguments before concatenating.
|
|
|
|
|
|
|
|
* <code>string()</code> function: Support context node.
|
|
|
|
|
|
|
|
* <code>string()</code> function: Support processing instruction node.
|
|
|
|
|
|
|
|
* Support <code>"*:#{ELEMENT_NAME}"</code> syntax in XPath 2.0.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Fixed some XPath implementations::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* <code>"//#{ELEMENT_NAME}[#{POSITION}]"</code> case
|
|
|
|
|
|
|
|
* <code>string()</code> function: Fix <code>function(document)</code>
|
|
|
|
returns nodes that are out of root elements.
|
|
|
|
|
|
|
|
* <code>"/ #{ELEMENT_NAME} "</code> case
|
|
|
|
|
|
|
|
* <code>"/ #{ELEMENT_NAME} [ #{PREDICATE} ]"</code> case
|
|
|
|
|
|
|
|
* <code>"/ #{AXIS}::#{ELEMENT_NAME}"</code> case
|
|
|
|
|
|
|
|
* <code>"#{N}-#{M}"</code> case: One or more white spaces were required
|
|
|
|
before <code>"-"</code>
|
|
|
|
|
|
|
|
* <code>"/child::node()"</code> case
|
|
|
|
|
|
|
|
* <code>"#{FUNCTION}()/#{PATH}"</code> case
|
|
|
|
|
|
|
|
* <code>"@#{ATTRIBUTE}/parent::"</code> case
|
|
|
|
|
|
|
|
* <code>"name(#{NODE_SET})"</code> case
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
RSS::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New options::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* RSS::Parser.parse now accepts options as Hash. +:validate+ ,
|
|
|
|
+:ignore_unknown_element+ , +:parser_class+ options are available.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
RubyGems::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Upgrade to RubyGems 3.0.1
|
|
|
|
|
|
|
|
* https://blog.rubygems.org/2018/12/19/3.0.0-released.html
|
|
|
|
|
|
|
|
* https://blog.rubygems.org/2018/12/23/3.0.1-released.html
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Set::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Aliased methods::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Set#filter! is a new alias for Set#select!. [Feature #13784]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
URI::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
New constant::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Add URI::File to handle the file URI scheme. [Feature #14035]
|
|
|
|
|
|
|
|
=== Compatibility issues (excluding feature bug fixes)
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Dir::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Dir.glob with <code>'\0'</code>-separated pattern list will be deprecated,
|
|
|
|
and is now warned. [Feature #14643]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
File::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* File.read, File.binread, File.write, File.binwrite, File.foreach, and
|
|
|
|
File.readlines do not invoke external commands even if the path starts
|
|
|
|
with the pipe character <code>'|'</code>. [Feature #14245]
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Object::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Object#=~ is deprecated. [Feature #15231]
|
|
|
|
|
|
|
|
=== Stdlib compatibility issues (excluding feature bug fixes)
|
|
|
|
|
|
|
|
* These standard libraries have been promoted to default gems.
|
|
|
|
|
|
|
|
* e2mmap
|
|
|
|
* forwardable
|
|
|
|
* irb
|
|
|
|
* logger
|
|
|
|
* matrix
|
|
|
|
* mutex_m
|
|
|
|
* ostruct
|
|
|
|
* prime
|
|
|
|
* rexml
|
|
|
|
* rss
|
|
|
|
* shell
|
|
|
|
* sync
|
|
|
|
* thwait
|
|
|
|
* tracer
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
BigDecimal::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* The following methods are removed.
|
|
|
|
|
|
|
|
* BigDecimal.allocate
|
|
|
|
* BigDecimal.ver
|
|
|
|
|
|
|
|
* Every BigDecimal object is frozen. [Feature #13984]
|
|
|
|
|
|
|
|
* BigDecimal() parses the given string similar to Float().
|
|
|
|
|
|
|
|
* String#to_d parses the receiver string similar to String#to_f.
|
|
|
|
|
|
|
|
* BigDecimal.new will be removed in version 2.0.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Pathname::
|
2018-12-25 11:09:39 -05:00
|
|
|
|
|
|
|
* Pathname#read, Pathname#binread, Pathname#write, Pathname#binwrite,
|
|
|
|
Pathname#each_line and Pathname#readlines do not invoke external
|
|
|
|
commands even if the path starts with the pipe character <code>'|'</code>.
|
|
|
|
This follows [Feature #14245].
|
|
|
|
|
|
|
|
=== Implementation improvements
|
|
|
|
|
|
|
|
* Speedup Proc#call because we don't need to care about <code>$SAFE</code>
|
|
|
|
any more. [Feature #14318]
|
|
|
|
|
|
|
|
With +lc_fizzbuzz+ benchmark which uses Proc#call many times we can
|
|
|
|
measure x1.4 improvements. [Bug #10212]
|
|
|
|
|
|
|
|
* Speedup block.call where +block+ is passed block parameter. [Feature #14330]
|
|
|
|
|
|
|
|
Ruby 2.5 improves block passing performance. [Feature #14045]
|
|
|
|
|
|
|
|
Additionally, Ruby 2.6 improves the performance of passed block calling.
|
|
|
|
|
|
|
|
* Introduce an initial implementation of a JIT (Just-in-time) compiler. [Feature #14235] [experimental]
|
|
|
|
|
|
|
|
* <tt>--jit</tt> command line option is added to enable JIT. <tt>--jit-verbose=1</tt>
|
|
|
|
is good for inspection. See <tt>ruby --help</tt> for others.
|
|
|
|
* To generate machine code, this JIT compiler uses the C compiler used for building
|
|
|
|
the interpreter. Currently GCC, Clang, and Microsoft Visual C++ are supported for it.
|
|
|
|
* <tt>--disable-mjit-support</tt> option is added to configure. This is added for JIT debugging,
|
|
|
|
but if you get an error on building a header file for JIT, you can use this option to skip
|
|
|
|
building it as a workaround.
|
|
|
|
* rb_waitpid reimplemented on Unix-like platforms to maintain
|
|
|
|
compatibility with processes created for JIT [Bug #14867]
|
|
|
|
|
|
|
|
* VM generator script renewal; makes the generated VM more optimized. [GH-1779]
|
|
|
|
|
|
|
|
* Thread cache enabled for pthreads platforms (for Thread.new and
|
|
|
|
Thread.start). [Feature #14757]
|
|
|
|
|
|
|
|
* timer thread is eliminated for platforms with POSIX timers. [Misc #14937]
|
|
|
|
|
|
|
|
* Transient Heap (theap) is supported. [Bug #14858] [Feature #14989]
|
|
|
|
|
|
|
|
theap is a managed heap for short-living memory objects. For example,
|
|
|
|
making a small and short-living Hash object is x2 faster. With rdoc benchmark,
|
|
|
|
we measured 6-7% performance improvement.
|
|
|
|
|
|
|
|
* Native implementations (arm32, arm64, ppc64le, win32, win64, x86, amd64) of
|
|
|
|
coroutines to improve performance of Fiber significantly. [Feature #14739]
|
|
|
|
|
|
|
|
=== Miscellaneous changes
|
|
|
|
|
|
|
|
* On macOS, shared libraries no longer include a full version number of Ruby
|
|
|
|
in their names. This eliminates the burden of each teeny upgrade on the
|
|
|
|
platform that users need to rebuild every extension library.
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
Before::
|
2018-12-25 11:09:39 -05:00
|
|
|
* libruby.2.6.0.dylib
|
|
|
|
* libruby.2.6.dylib -> libruby.2.6.0.dylib
|
|
|
|
* libruby.dylib -> libruby.2.6.0.dylib
|
|
|
|
|
2019-02-02 01:38:09 -05:00
|
|
|
After::
|
2018-12-25 11:09:39 -05:00
|
|
|
* libruby.2.6.dylib
|
|
|
|
* libruby.dylib -> libruby.2.6.dylib
|
|
|
|
|
|
|
|
* Extracted misc/*.el files to https://github.com/ruby/elisp
|