2017-12-26 06:36:07 -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
|
2017-12-28 15:09:24 -05:00
|
|
|
|
|
|
|
=== Language changes
|
|
|
|
|
|
|
|
* $SAFE is a process global state and we can set 0 again. [Feature #14250]
|
|
|
|
|
2018-01-24 01:32:46 -05:00
|
|
|
* refinements take place at block passing. [Feature #14223]
|
|
|
|
|
2017-12-28 15:09:24 -05:00
|
|
|
=== Core classes updates (outstanding ones only)
|
|
|
|
|
2018-02-25 08:52:07 -05:00
|
|
|
* Array
|
|
|
|
|
|
|
|
* Aliased methods:
|
|
|
|
|
|
|
|
* Array#filter is a new alias for Array#select [Feature #13784]
|
|
|
|
* Array#filter! is a new alias for Array#select! [Feature #13784]
|
|
|
|
|
2018-02-21 12:06:23 -05:00
|
|
|
* Binding
|
|
|
|
|
2018-02-21 23:13:02 -05:00
|
|
|
* New methods:
|
|
|
|
|
|
|
|
* added Binding#source_location. [Feature #14230]
|
|
|
|
|
|
|
|
This method returns the source location of binding, a 2-element
|
|
|
|
array of `__FILE__` and `__LINE__`. Traditionally, the same
|
|
|
|
information could be retrieved by `eval("[__FILE__, __LINE__]",
|
|
|
|
binding)`, 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-01-24 02:15:55 -05:00
|
|
|
* Dir
|
|
|
|
|
|
|
|
* New methods:
|
|
|
|
|
2018-02-21 23:55:58 -05:00
|
|
|
* added Dir#each_child and Dir#children instance methods. [Feature #13969]
|
2018-01-24 02:15:55 -05:00
|
|
|
|
2018-02-25 08:52:07 -05:00
|
|
|
* Enumerable
|
|
|
|
|
|
|
|
* Aliased methods:
|
|
|
|
|
|
|
|
* Enumerable#filter is a new alias for Enumerable#select [Feature #13784]
|
|
|
|
|
|
|
|
* Enumerator::Lazy
|
|
|
|
|
|
|
|
* Aliased methods:
|
|
|
|
|
|
|
|
* Enumerator::Lazy#filter is a new alias for Enumerator::Lazy#select [Feature #13784]
|
|
|
|
|
|
|
|
* Hash
|
|
|
|
|
|
|
|
* Aliased methods:
|
|
|
|
|
|
|
|
* Hash#filter is a new alias for Hash#select [Feature #13784]
|
|
|
|
* Hash#filter! is a new alias for Hash#select! [Feature #13784]
|
|
|
|
|
2018-01-24 09:31:40 -05:00
|
|
|
* Kernel
|
|
|
|
|
2018-02-21 23:13:02 -05:00
|
|
|
* Kernel.#system takes :exception option to raise an exception on
|
|
|
|
failure. [Feature #14386]
|
2018-01-24 09:31:40 -05:00
|
|
|
|
2018-02-21 22:33:42 -05:00
|
|
|
* KeyError
|
|
|
|
|
|
|
|
* KeyError#initialize accepts :receiver and :key options to set receiver and key in Ruby code. [Feature #14313]
|
|
|
|
|
|
|
|
* NameError
|
|
|
|
|
|
|
|
* NameError#initialize accepts :receiver option to set receiver in Ruby code. [Feature #14313]
|
|
|
|
|
|
|
|
* NoMethodError
|
|
|
|
|
|
|
|
* NoMethodError#initialize accepts :receiver option to set receiver in Ruby code. [Feature #14313]
|
|
|
|
|
2017-12-28 15:09:24 -05:00
|
|
|
* Proc
|
|
|
|
|
|
|
|
* Proc#call doesn't change $SAFE any more. [Feature #14250]
|
|
|
|
|
2018-02-20 04:26:38 -05:00
|
|
|
* Random
|
|
|
|
|
|
|
|
* New methods:
|
|
|
|
|
|
|
|
* added Random.bytes. [Feature #4938]
|
|
|
|
|
2017-12-28 15:09:24 -05:00
|
|
|
=== Stdlib updates (outstanding ones only)
|
|
|
|
|
2018-02-22 08:28:25 -05:00
|
|
|
* ERB
|
|
|
|
|
2018-02-28 07:12:20 -05: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.
|
|
|
|
|
|
|
|
* erb command's -S option is deprecated, which will be removed in the next version.
|
2018-02-22 08:28:25 -05:00
|
|
|
|
2018-01-11 14:37:25 -05:00
|
|
|
* Matrix
|
|
|
|
|
|
|
|
* New method:
|
|
|
|
|
|
|
|
* Matrix#antisymmetric?
|
|
|
|
|
2018-02-25 08:52:07 -05:00
|
|
|
* Set
|
|
|
|
|
|
|
|
* Aliased methods:
|
|
|
|
|
|
|
|
* Set#filter! is a new alias for Set#select! [Feature #13784]
|
|
|
|
|
2017-12-28 15:09:24 -05:00
|
|
|
=== Compatibility issues (excluding feature bug fixes)
|
|
|
|
|
|
|
|
=== Stdlib compatibility issues (excluding feature bug fixes)
|
|
|
|
|
|
|
|
=== C API updates
|
|
|
|
|
|
|
|
=== Supported platform changes
|
|
|
|
|
|
|
|
=== Implementation improvements
|
|
|
|
|
2018-02-22 00:06:46 -05:00
|
|
|
* Speedup `Proc#call` because we don't need to care about `$SAFE` any more. [Feature #14318]
|
2018-02-21 03:14:51 -05:00
|
|
|
With `lc_fizzbuzz` benchmark which uses so many `Proc#call` 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.
|
|
|
|
|
2018-02-23 20:05:20 -05:00
|
|
|
* Introduce an initial implementation of JIT (Just-in-time) compiler. [Feature #14235] [experimental]
|
|
|
|
* `--jit` option is added to enable JIT. `--jit-verbose=1` is good for inspection. See `ruby --help` for others.
|
|
|
|
* This JIT relies on C compiler used to build Ruby, on runtime. Only gcc and clang are supported for the JIT
|
|
|
|
for now, and MinGW support has some issues.
|
|
|
|
* As of 2.6.0-preview1, we're just preparing infrastructure for JIT and very few optimizations are implemented.
|
|
|
|
So it's not ready for benchmarking Ruby's JIT performance yet. It's known that current JIT enablement makes
|
|
|
|
Rails application slower for now.
|
2018-02-11 00:32:17 -05:00
|
|
|
|
2018-02-16 03:51:23 -05:00
|
|
|
* VM generator script renewal; makes the generated VM more optimized. [GH-1779]
|
|
|
|
|
2017-12-28 15:09:24 -05:00
|
|
|
=== Miscellaneous changes
|