2018-10-17 07:35:28 -04:00
|
|
|
# -*- rdoc -*-
|
2017-12-26 06:36:07 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
= NEWS for Ruby 2.6.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-10-17 07:35:28 -04:00
|
|
|
== Changes since the 2.5.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
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* <code>$SAFE</code> is a process global state and we can set 0 again. [Feature #14250]
|
2017-12-28 15:09:24 -05:00
|
|
|
|
2018-11-22 02:53:07 -05:00
|
|
|
* refinements takes place at block passing. [Feature #14223]
|
|
|
|
|
|
|
|
* refinements takes place at Kernel#public_send. [Feature #15326]
|
2018-01-24 01:32:46 -05:00
|
|
|
|
2018-11-22 03:29:02 -05:00
|
|
|
* refinements takes place at Kernel#respond_to?. [Feature #15327]
|
|
|
|
|
2018-12-10 23:26:04 -05:00
|
|
|
* +else+ without +rescue+ now causes a syntax error. [EXPERIMENTAL] [Feature #14606]
|
2018-03-22 20:40:08 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* constant names may start with a non-ASCII capital letter. [Feature #13770]
|
2018-04-09 20:41:47 -04:00
|
|
|
|
2018-08-18 05:53:11 -04:00
|
|
|
* An endless range is introduced. You can write a range that has no end,
|
2018-10-17 07:35:28 -04:00
|
|
|
like <code>(0..)</code>. The following shows typical use cases. [Feature #12912]
|
2018-04-19 11:23:34 -04:00
|
|
|
|
|
|
|
ary[1..] # identical to ary[1..-1]
|
|
|
|
(1..).each {|index| ... } # infinite loop from index 1
|
|
|
|
ary.zip(1..) {|elem, index| ... } # ary.each.with_index(1) { }
|
|
|
|
|
2018-10-19 17:37:04 -04:00
|
|
|
* Non-Symbol key in keyword arguments hash causes an exception.
|
2018-08-14 07:58:17 -04:00
|
|
|
|
2018-10-25 23:10:02 -04:00
|
|
|
* "shadowing outer local variable" warning was removed. [Feature #12490]
|
|
|
|
You can now write the following without warning.
|
|
|
|
|
2018-10-27 03:22:38 -04:00
|
|
|
user = users.find {|user| cond(user) }
|
2018-10-25 23:10:02 -04:00
|
|
|
|
2018-10-27 17:45:30 -04:00
|
|
|
* Print exception backtrace and error message in reverse order when the
|
|
|
|
exception is not caught and STDOUT is unchanged and a tty. [Feature #8661]
|
|
|
|
|
2018-11-25 01:07:28 -05:00
|
|
|
* Print +cause+ of the exception if the exception is not caught and printed
|
2018-10-27 17:45:30 -04:00
|
|
|
its backtraces and error message [Feature #8257]
|
|
|
|
|
2018-12-10 18:40:14 -05:00
|
|
|
* Flip-flop syntax is deprecated. [Feature #5400]
|
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
=== Core classes updates (outstanding ones only)
|
2017-12-28 15:09:24 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Array]
|
2018-02-25 08:52:07 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New methods]
|
2018-09-19 23:18:52 -04:00
|
|
|
|
2018-10-19 17:37:04 -04:00
|
|
|
* Added Array#union and Array#difference instance methods. [Feature #14097]
|
2018-09-19 23:18:52 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Modified methods]
|
2018-09-20 11:06:56 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Array#to_h now maps elements to new keys and values by the
|
|
|
|
block if given. [Feature #15143]
|
2018-09-20 11:06:56 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Aliased methods]
|
2018-02-25 08:52:07 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Array#filter is a new alias for Array#select. [Feature #13784]
|
|
|
|
* Array#filter! is a new alias for Array#select!. [Feature #13784]
|
2018-02-25 08:52:07 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Binding]
|
2018-02-21 12:06:23 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New methods]
|
2018-02-21 23:13:02 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* added Binding#source_location. [Feature #14230]
|
2018-02-21 23:13:02 -05:00
|
|
|
|
2018-10-27 21:58:27 -04:00
|
|
|
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.
|
2018-02-21 12:06:23 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Dir]
|
2018-01-24 02:15:55 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New methods]
|
2018-01-24 02:15:55 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* added Dir#each_child and Dir#children instance methods. [Feature #13969]
|
2018-01-24 02:15:55 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Enumerable]
|
2018-02-25 08:52:07 -05:00
|
|
|
|
2018-11-24 03:38:36 -05:00
|
|
|
[New methods]
|
|
|
|
|
|
|
|
* Enumerable#chain returns an enumerator object that iterates over the
|
|
|
|
elements of the receiver and then those of each argument in sequence.
|
|
|
|
[Feature #15144]
|
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Modified methods]
|
2018-09-20 11:06:56 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Enumerable#to_h now maps elements to new keys and values by the block if
|
|
|
|
given. [Feature #15143]
|
2018-09-20 11:06:56 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Aliased methods]
|
2018-02-25 08:52:07 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Enumerable#filter is a new alias for Enumerable#select. [Feature #13784]
|
2018-02-25 08:52:07 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Enumerator::ArithmeticSequence]
|
2018-09-27 05:29:51 -04:00
|
|
|
|
2018-10-17 07:35:28 -04: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.
|
2018-09-27 05:29:51 -04:00
|
|
|
|
2018-11-24 03:38:36 -05:00
|
|
|
[Enumerator::Chain]
|
|
|
|
|
|
|
|
* 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#+.
|
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Enumerator::Lazy]
|
2018-02-25 08:52:07 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Aliased methods]
|
2018-02-25 08:52:07 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Enumerator::Lazy#filter is a new alias for
|
|
|
|
Enumerator::Lazy#select. [Feature #13784]
|
2018-02-25 08:52:07 -05:00
|
|
|
|
2018-12-10 18:52:59 -05:00
|
|
|
[Enumerator]
|
|
|
|
|
|
|
|
[New methods]
|
|
|
|
|
|
|
|
* Enumerator#+ returns an enumerator object that iterates over the
|
|
|
|
elements of the receiver and then those of the other operand.
|
|
|
|
[Feature #15144]
|
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[ENV]
|
2018-09-20 11:06:56 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Modified methods]
|
2018-09-20 11:06:56 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* ENV.to_h now maps names and values to new keys and values
|
|
|
|
by the block if given. [Feature #15143]
|
2018-09-20 11:06:56 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Exception]
|
2018-03-22 04:26:23 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New options]
|
2018-08-18 21:55:27 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Exception#full_message takes +:highlight+ and +:order+
|
|
|
|
options. [Bug #14324]
|
2018-03-22 04:26:23 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Hash]
|
2018-02-25 08:52:07 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Modified methods]
|
2018-09-18 22:10:05 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Hash#merge, merge!, and update now accept multiple
|
|
|
|
arguments. [Feature #15111]
|
2018-09-18 22:10:05 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Hash#to_h now maps keys and values to new keys and values
|
|
|
|
by the block if given. [Feature #15143]
|
2018-09-20 11:06:56 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Aliased methods]
|
2018-02-25 08:52:07 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Hash#filter is a new alias for Hash#select. [Feature #13784]
|
2018-08-18 21:55:27 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Hash#filter! is a new alias for Hash#select!. [Feature #13784]
|
2018-02-25 08:52:07 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[IO]
|
2018-08-09 04:49:09 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New options]
|
2018-08-18 21:55:27 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* new mode character <code>'x'</code> to open files for exclusive
|
|
|
|
access. [Feature #11258]
|
2018-08-09 04:49:09 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Kernel]
|
2018-01-24 09:31:40 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Aliased methods]
|
2018-07-01 04:12:14 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Kernel#then is a new alias for Kernel#yield_self. [Feature #14594]
|
2018-03-15 08:01:08 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New options]
|
2018-03-15 08:01:08 -04:00
|
|
|
|
2018-10-20 11:00:00 -04:00
|
|
|
* Kernel#Complex, Kernel#Float, Kernel#Integer, and
|
2018-10-17 07:35:28 -04:00
|
|
|
Kernel#Rational take +:exception+ option to specify the way of
|
|
|
|
error handling. [Feature #12732]
|
2018-03-15 08:01:08 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Kernel#system takes +:exception+ option to raise an exception
|
|
|
|
on failure. [Feature #14386]
|
2018-03-15 08:01:08 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Incompatible changes]
|
2018-01-24 09:31:40 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Kernel#system and Kernel#exec do not close non-standard file descriptors
|
2018-10-19 17:37:04 -04:00
|
|
|
(The default of the +:close_others+ option is changed to +false+,
|
|
|
|
but we still set the +FD_CLOEXEC+ flag on descriptors we
|
2018-10-17 07:35:28 -04:00
|
|
|
create). [Misc #14907]
|
2018-08-17 00:00:09 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[KeyError]
|
2018-02-21 22:33:42 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New options]
|
2018-08-18 21:55:27 -04:00
|
|
|
|
2018-11-15 23:32:48 -05:00
|
|
|
* KeyError.new accepts +:receiver+ and +:key+ options to set receiver and
|
|
|
|
key in Ruby code. [Feature #14313]
|
2018-02-21 22:33:42 -05:00
|
|
|
|
2018-11-22 00:51:43 -05:00
|
|
|
[Method]
|
|
|
|
|
|
|
|
[New methods]
|
|
|
|
|
|
|
|
* added Method#<< and Method#>> for Proc composition. [Feature #6284]
|
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Module]
|
2018-08-13 10:33:06 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New methods]
|
2018-08-18 21:55:27 -04:00
|
|
|
|
2018-10-20 11:00:00 -04:00
|
|
|
* Module#method_defined?, Module#private_method_defined?, and
|
2018-10-19 17:37:04 -04:00
|
|
|
Module#protected_method_defined? now accept the second
|
2018-10-17 07:35:28 -04:00
|
|
|
parameter as optional. If it's +true+ (=default), checks ancestor
|
|
|
|
modules/classes, or checks only the class itself. [Feature #14944]
|
2018-08-13 10:33:06 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[NameError]
|
2018-02-21 22:33:42 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New options]
|
2018-08-18 21:55:27 -04:00
|
|
|
|
2018-11-15 23:32:48 -05:00
|
|
|
* NameError.new accepts +:receiver+ option to set receiver in Ruby
|
|
|
|
code. [Feature #14313]
|
2018-02-21 22:33:42 -05:00
|
|
|
|
2018-11-26 02:55:07 -05:00
|
|
|
[NilClass]
|
|
|
|
|
|
|
|
[New methods]
|
|
|
|
|
|
|
|
* NilClass#=~ is added for compatibility. [Feature #15231]
|
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[NoMethodError]
|
2018-09-27 06:22:07 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New options]
|
2018-09-27 06:22:07 -04:00
|
|
|
|
2018-11-15 23:32:48 -05:00
|
|
|
* NoMethodError.new accepts +:receiver+ option to set receiver in Ruby
|
|
|
|
code. [Feature #14313]
|
2018-09-27 06:22:07 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Numeric]
|
2018-09-27 05:29:51 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Incompatible changes]
|
2018-09-27 05:29:51 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Numeric#step now returns an instance of Enumerator::ArithmeticSequence
|
|
|
|
class rather than one of Enumerator class.
|
2018-09-27 05:29:51 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Proc]
|
2017-12-28 15:09:24 -05:00
|
|
|
|
2018-11-22 00:51:43 -05:00
|
|
|
[New methods]
|
|
|
|
|
|
|
|
* added Proc#<< and Proc#>> for Proc composition. [Feature #6284]
|
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Incompatible changes]
|
2018-08-18 21:55:27 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Proc#call doesn't change <code>$SAFE</code> any more. [Feature #14250]
|
2017-12-28 15:09:24 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Random]
|
2018-02-20 04:26:38 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New methods]
|
2018-02-20 04:26:38 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* added Random.bytes. [Feature #4938]
|
2018-02-20 04:26:38 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Range]
|
2018-05-17 06:46:21 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New methods]
|
2018-09-27 22:18:58 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Added Range#% instance method. [Feature #14697]
|
2018-09-27 22:18:58 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Incompatible changes]
|
2018-08-18 21:55:27 -04:00
|
|
|
|
2018-10-27 21:58:27 -04:00
|
|
|
* Range#=== now uses +#cover?+ instead of +#include?+ method. [Feature #14575]
|
2018-10-17 07:35:28 -04:00
|
|
|
* Range#cover? now accepts Range object. [Feature #14473]
|
|
|
|
* Range#step now returns an instance of Enumerator::ArithmeticSequence
|
|
|
|
class rather than one of Enumerator class.
|
2018-05-17 06:46:21 -04:00
|
|
|
|
2018-12-10 18:52:59 -05:00
|
|
|
[Regexp/String]
|
2018-12-06 01:40:54 -05:00
|
|
|
|
2018-12-10 18:52:59 -05:00
|
|
|
* Update Unicode version from 10.0.0 to 11.0.0 [Feature #14802]
|
2018-12-10 19:44:24 -05:00
|
|
|
This includes a rewrite of the grapheme cluster (/\X/) algorithm
|
|
|
|
and special-casing for Georgian MTAVRULI on String#downcase.
|
2018-12-06 01:40:54 -05:00
|
|
|
|
2018-12-10 18:52:59 -05:00
|
|
|
* Update Emoji version from 5.0 to 11.0.0 [Feature #14802]
|
2018-12-06 01:40:54 -05:00
|
|
|
|
2018-11-08 20:37:41 -05:00
|
|
|
[RubyVM::AbstractSyntaxTree]
|
2018-05-31 02:25:58 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New methods]
|
2018-08-18 21:55:27 -04:00
|
|
|
|
2018-11-08 20:37:41 -05:00
|
|
|
* RubyVM::AbstractSyntaxTree.parse parses a given string and returns AST
|
2018-10-17 07:35:28 -04:00
|
|
|
nodes. [experimental]
|
2018-08-18 21:55:27 -04:00
|
|
|
|
2018-11-08 20:37:41 -05:00
|
|
|
* RubyVM::AbstractSyntaxTree.parse_file parses a given file and returns AST
|
2018-10-17 07:35:28 -04:00
|
|
|
nodes. [experimental]
|
2018-05-31 02:25:58 -04:00
|
|
|
|
2018-11-08 20:37:41 -05:00
|
|
|
* RubyVM::AbstractSyntaxTree.of returns AST nodes of the given proc or method.
|
2018-11-07 19:36:35 -05:00
|
|
|
[experimental]
|
|
|
|
|
2018-12-10 18:52:59 -05:00
|
|
|
[RubyVM]
|
2018-12-05 05:06:47 -05:00
|
|
|
|
2018-12-10 18:52:59 -05:00
|
|
|
[New methods]
|
2018-12-05 05:06:47 -05:00
|
|
|
|
2018-12-10 18:52:59 -05:00
|
|
|
* RubyVM.resolve_feature_path identifies the file that will be loaded by
|
|
|
|
"require(feature)". [experimental] [Feature #15230]
|
2018-12-05 05:06:47 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[String]
|
2018-03-15 07:08:04 -04:00
|
|
|
|
2018-12-03 00:46:46 -05:00
|
|
|
* String#crypt is now deprecated. [Feature #14915]
|
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New features]
|
2018-08-18 21:55:27 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* String#split yields each substring to the block if given. [Feature #4780]
|
2018-03-15 07:08:04 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Struct]
|
2018-09-16 00:00:14 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Modified methods]
|
2018-09-20 11:06:56 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Struct#to_h now maps keys and values to new keys and values
|
|
|
|
by the block if given. [Feature #15143]
|
2018-09-20 11:06:56 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Aliased method]
|
2018-09-16 00:00:14 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Struct#filter is a new alias for Struct#select [Feature #13784]
|
2018-09-16 00:00:14 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Time]
|
2018-10-07 22:35:31 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New features]
|
2018-10-07 22:35:31 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Time.new and Time#getlocal accept a timezone object as well as
|
|
|
|
UTC offset string. Time#+, Time#- and Time#succ also preserve
|
|
|
|
the timezone. [Feature #14850]
|
2018-10-07 22:35:31 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[TracePoint]
|
2018-06-10 03:01:53 -04:00
|
|
|
|
2018-12-06 08:56:36 -05:00
|
|
|
[New features]
|
|
|
|
|
|
|
|
* "compiled_script" event is supported. [Feature #15287]
|
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New methods]
|
2018-06-10 03:01:53 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* TracePoint#parameters [Feature #14694]
|
2018-06-10 03:01:53 -04:00
|
|
|
|
2018-12-06 08:56:36 -05:00
|
|
|
* TracePoint#compiled_instruction_sequence [Feature #15287]
|
|
|
|
|
|
|
|
* TracePoint#compiled_eval_script [Feature #15287]
|
|
|
|
|
2018-12-03 08:39:42 -05:00
|
|
|
[Modified methods]
|
|
|
|
|
|
|
|
* TracePoint#enable accepts new keywords "target:" and "target_line:".
|
|
|
|
[Feature #15289]
|
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
=== Stdlib updates (outstanding ones only)
|
2017-12-28 15:09:24 -05:00
|
|
|
|
2018-12-05 06:30:24 -05:00
|
|
|
[BigDecimal]
|
|
|
|
|
|
|
|
Update to the version 1.4.0. This version includes several compatibility
|
|
|
|
issues, see Compatibility issues section below for the detail.
|
|
|
|
|
2018-12-05 06:30:26 -05:00
|
|
|
[Modified methods]
|
|
|
|
|
|
|
|
* BigDecimal() accepts new keywords "exception:" likewise Float().
|
|
|
|
|
2018-12-10 18:52:59 -05:00
|
|
|
[Bundler]
|
|
|
|
|
|
|
|
* Add Bundler to Standard Library. [Feature #12733]
|
|
|
|
|
|
|
|
* Use 2.0.0. It's latest stable version.
|
|
|
|
|
2018-10-20 08:01:41 -04:00
|
|
|
[Coverage]
|
|
|
|
|
2018-10-26 08:16:25 -04:00
|
|
|
A oneshot_lines mode is added. [Feature #15022]
|
2018-10-20 08:01:41 -04:00
|
|
|
This mode checks "whether each line was executed at least once or not",
|
|
|
|
instead of "how many times each line was executed".
|
2018-10-26 08:16:25 -04:00
|
|
|
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.
|
2018-10-20 08:01:41 -04:00
|
|
|
|
|
|
|
[New options]
|
|
|
|
|
|
|
|
* Add +:oneshot_lines+ keyword argument to Coverage.start.
|
|
|
|
|
2018-10-20 11:00:02 -04:00
|
|
|
* Add +:stop+ and +:clear+ keyword arguments to Coverage.result.
|
2018-10-20 08:01:41 -04:00
|
|
|
If +clear+ is true, it clears the counters to zero.
|
|
|
|
If +stop+ is true, it disables coverage measurement.
|
|
|
|
|
|
|
|
[New methods]
|
|
|
|
|
|
|
|
* Coverage.line_stub, which is a simple helper function that
|
|
|
|
creates the "stub" of line coverage from a given source code.
|
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[ERB]
|
2018-02-22 08:28:25 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New options]
|
2018-08-18 21:55:27 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Add +:trim_mode+ and +:eoutvar+ keyword arguments to ERB.new.
|
|
|
|
Now non-keyword arguments other than first one are softly deprecated
|
|
|
|
and will be removed when Ruby 2.5 becomes EOL. [Feature #14256]
|
2018-02-28 07:12:20 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* erb command's <tt>-S</tt> option is deprecated, which will be removed
|
|
|
|
in the next version.
|
2018-02-22 08:28:25 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[FileUtils]
|
2018-03-13 04:18:03 -04:00
|
|
|
|
2018-10-19 17:37:04 -04:00
|
|
|
[New methods]
|
2018-03-13 04:18:03 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* FileUtils#cp_lr. [Feature #4189]
|
2018-03-13 04:18:03 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Matrix]
|
2018-01-11 14:37:25 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New methods]
|
2018-01-11 14:37:25 -05:00
|
|
|
|
2018-11-02 13:52:05 -04:00
|
|
|
* Matrix#antisymmetric? / #skew_symmetric?
|
2018-01-11 14:37:25 -05:00
|
|
|
|
2018-11-02 13:52:51 -04:00
|
|
|
* Matrix#map! / #collect! [Feature #14151]
|
|
|
|
|
|
|
|
* Matrix#[]=
|
|
|
|
|
|
|
|
* Vector#map! / #collect!
|
|
|
|
|
|
|
|
* Vector#[]=
|
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Net]
|
2018-06-06 04:03:47 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New options]
|
2018-06-06 04:03:47 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Add +:write_timeout+ keyword argument to Net::HTTP.new. [Feature #13396]
|
2018-06-06 04:03:47 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New methods]
|
2018-08-18 21:55:27 -04:00
|
|
|
|
2018-10-20 11:00:00 -04:00
|
|
|
* Add Net::HTTP#write_timeout and Net::HTTP#write_timeout=. [Feature #13396]
|
2018-06-06 04:03:47 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New constant]
|
2018-06-06 05:01:04 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Add Net::HTTPClientException to deprecate Net::HTTPServerException,
|
|
|
|
whose name is misleading. [Bug #14688]
|
2018-06-06 05:01:04 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[REXML]
|
2018-04-30 02:54:13 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Improved some XPath implementations]
|
2018-04-30 02:54:13 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* <code>concat()</code> function: Stringify all arguments before concatenating
|
2018-04-30 02:54:13 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* <code>string()</code> function: Support context node
|
2018-04-30 02:54:13 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* <code>string()</code> function: Support processing instruction node
|
2018-04-30 02:54:13 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Support <code>"*:#{ELEMENT_NAME}"</code> syntax in XPath 2.0
|
2018-04-30 02:54:13 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Fixed some XPath implementations]
|
2018-04-30 02:54:13 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* <code>"//#{ELEMENT_NAME}[#{POSITION}]"</code> case
|
2018-04-30 02:54:13 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* <code>string()</code> function: Fix <code>function(document)</code>
|
|
|
|
returns nodes that are out of root elements.
|
2018-04-30 02:54:13 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* <code>"/ #{ELEMENT_NAME} "</code> case
|
2018-04-30 02:54:13 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* <code>"/ #{ELEMENT_NAME} [ #{PREDICATE} ]"</code> case
|
2018-04-30 02:54:13 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* <code>"/ #{AXIS}::#{ELEMENT_NAME}"</code> case
|
2018-04-30 02:54:13 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* <code>"#{N}-#{M}"</code> case: One or more white spaces were required
|
|
|
|
before <code>"-"</code>
|
2018-04-30 02:54:13 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* <code>"/child::node()"</code> case
|
2018-04-30 02:54:13 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* <code>"#{FUNCTION}()/#{PATH}"</code> case
|
2018-04-30 02:54:13 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* <code>"@#{ATTRIBUTE}/parent::"</code> case
|
2018-04-30 02:54:13 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* <code>"name(#{NODE_SET})"</code> case
|
2018-04-30 02:54:13 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[RSS]
|
2018-05-12 05:06:00 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New options]
|
2018-08-18 21:55:27 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* RSS::Parser.parse: Accept options as Hash. +:validate+ ,
|
|
|
|
+:ignore_unknown_element+ , +:parser_class+ options are available.
|
2018-05-12 05:06:00 -04:00
|
|
|
|
2018-12-06 08:19:06 -05:00
|
|
|
[RubyGems]
|
|
|
|
|
|
|
|
* Upgrade RubyGems 3.0.0.beta3
|
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Set]
|
2018-02-25 08:52:07 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Aliased methods]
|
2018-02-25 08:52:07 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Set#filter! is a new alias for Set#select!. [Feature #13784]
|
2018-02-25 08:52:07 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[URI]
|
2018-03-15 12:51:31 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[New constant]
|
2018-08-18 21:55:27 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Add URI::File to handle file URI scheme. [Feature #14035]
|
2018-03-15 12:51:31 -04:00
|
|
|
|
2018-11-05 02:01:47 -05:00
|
|
|
=== Compatibility issues (excluding feature bug fixes)
|
2018-11-02 19:07:56 -04:00
|
|
|
|
2018-11-05 02:01:47 -05:00
|
|
|
[Dir]
|
2018-11-02 19:07:56 -04:00
|
|
|
|
2018-11-05 02:01:47 -05:00
|
|
|
* Dir.glob with <code>'\0'</code>-separated pattern list will be deprecated,
|
|
|
|
and is now warned. [Feature #14643]
|
2017-12-28 15:09:24 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[File]
|
2018-03-20 05:09:49 -04:00
|
|
|
|
2018-10-17 07:35:28 -04: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]
|
2018-03-20 05:09:49 -04:00
|
|
|
|
2018-11-26 02:55:07 -05:00
|
|
|
[Object]
|
|
|
|
|
|
|
|
* Object#=~ is deprecated. [Feature #15231]
|
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
=== Stdlib compatibility issues (excluding feature bug fixes)
|
2017-12-28 15:09:24 -05:00
|
|
|
|
2018-10-20 09:02:02 -04:00
|
|
|
* These standard libraries have been promoted to default gems.
|
2018-10-20 08:17:18 -04:00
|
|
|
|
|
|
|
* e2mmap
|
|
|
|
* forwardable
|
|
|
|
* irb
|
|
|
|
* logger
|
|
|
|
* matrix
|
|
|
|
* mutex_m
|
|
|
|
* ostruct
|
|
|
|
* prime
|
|
|
|
* rexml
|
|
|
|
* rss
|
|
|
|
* shell
|
|
|
|
* sync
|
|
|
|
* thwait
|
|
|
|
* tracer
|
|
|
|
|
2018-12-05 06:30:24 -05:00
|
|
|
[BigDecimal]
|
|
|
|
|
|
|
|
* The following methods are removed.
|
|
|
|
|
|
|
|
* BigDecimal.allocate
|
|
|
|
* BigDecimal.new
|
|
|
|
* BigDecimal.ver
|
|
|
|
|
|
|
|
* Every BigDecimal object is frozen. [Feature #13984]
|
|
|
|
|
|
|
|
* BigDecimal() parses the given string like Float().
|
|
|
|
|
|
|
|
* String#to_d parses the receiver string like String#to_f.
|
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
=== C API updates
|
2017-12-28 15:09:24 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
=== Implementation improvements
|
2017-12-28 15:09:24 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Speedup Proc#call because we don't need to care about <code>$SAFE</code>
|
|
|
|
any more. [Feature #14318]
|
2018-02-21 03:14:51 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
With +lc_fizzbuzz+ benchmark which uses so many Proc#call we can
|
|
|
|
measure x1.4 improvements. [Bug #10212]
|
2018-02-21 03:14:51 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Speedup block.call where +block+ is passed block parameter. [Feature #14330]
|
2018-02-11 00:32:17 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
Ruby 2.5 improves block passing performance. [Feature #14045]
|
2018-02-16 03:51:23 -05:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
Additionally, Ruby 2.6 improves the performance of passed block calling.
|
2018-05-28 21:18:06 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* Introduce an initial implementation of JIT (Just-in-time) compiler. [Feature #14235] [experimental]
|
2018-04-29 07:15:41 -04:00
|
|
|
|
2018-10-21 11:41:00 -04:00
|
|
|
* <tt>--jit</tt> command line option is added to enable JIT. <tt>--jit-verbose=1</tt>
|
2018-10-17 07:35:28 -04:00
|
|
|
is good for inspection. See <tt>ruby --help</tt> for others.
|
2018-10-20 08:08:48 -04:00
|
|
|
* To generate machine code, this JIT compiler uses C compiler used for building
|
2018-10-20 11:00:00 -04:00
|
|
|
the interpreter. Currently GCC, Clang, and Microsoft Visual C++ are supported for it.
|
2018-10-21 11:41:00 -04:00
|
|
|
* <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.
|
2018-10-17 07:35:28 -04:00
|
|
|
* rb_waitpid reimplemented on Unix-like platforms to maintain
|
2018-10-20 08:08:48 -04:00
|
|
|
compatibility with processes created for JIT [Bug #14867]
|
2018-08-18 05:53:11 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
* 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]
|
2018-08-18 05:53:11 -04:00
|
|
|
|
2018-08-23 15:13:01 -04:00
|
|
|
* timer thread is eliminated for platforms with POSIX timers [Misc #14937]
|
|
|
|
|
2018-10-30 18:24:35 -04:00
|
|
|
* Transient Heap (theap) is supported. [Bug #14858] [Feature #14989]
|
|
|
|
theap is managed heap for short-living memory objects. For example,
|
|
|
|
making small and short-living Hash object is x2 faster. With rdoc benchmark,
|
2018-12-06 05:09:35 -05:00
|
|
|
we measured 6-7% performance improvement.
|
2018-10-30 18:24:35 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
=== Miscellaneous changes
|
2018-08-18 05:53:11 -04:00
|
|
|
|
2018-10-19 17:37:04 -04:00
|
|
|
* On macOS, shared libraries no longer include a full version number of Ruby
|
2018-08-18 05:53:11 -04:00
|
|
|
in their names. This eliminates the burden of each teeny upgrade on the
|
|
|
|
platform that users need to rebuild every extension library.
|
2018-04-29 07:15:41 -04:00
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[Before]
|
2018-04-29 07:15:41 -04:00
|
|
|
* libruby.2.6.0.dylib
|
|
|
|
* libruby.2.6.dylib -> libruby.2.6.0.dylib
|
|
|
|
* libruby.dylib -> libruby.2.6.0.dylib
|
|
|
|
|
2018-10-17 07:35:28 -04:00
|
|
|
[After]
|
2018-04-29 07:15:41 -04:00
|
|
|
* libruby.2.6.dylib
|
|
|
|
* libruby.dylib -> libruby.2.6.dylib
|
2018-10-05 06:28:38 -04:00
|
|
|
|
|
|
|
* Extracted misc/*.el files to https://github.com/ruby/elisp
|