2018-08-18 12:53:11 +03:00
|
|
|
# -*- markdown -*- markup: Markdown
|
2017-12-26 14:36:07 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
# NEWS for Ruby 2.6.0
|
2017-12-26 14:36:07 +03:00
|
|
|
|
|
|
|
This document is a list of user visible feature changes made between
|
|
|
|
releases except for bug fixes.
|
|
|
|
|
2018-08-18 12:53:11 +03: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
|
|
|
|
(e.g. `https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER`)
|
2017-12-26 14:36:07 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
## Changes since the 2.5.0 release
|
2017-12-28 23:09:24 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
### Language changes
|
2017-12-28 23:09:24 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `$SAFE` is a process global state and we can set 0 again.
|
|
|
|
[Feature #14250]
|
2017-12-28 23:09:24 +03:00
|
|
|
|
2018-01-24 09:32:46 +03:00
|
|
|
* refinements take place at block passing. [Feature #14223]
|
|
|
|
|
2018-04-27 23:25:49 +03:00
|
|
|
* `else` without `rescue` now causes a syntax error. [EXPERIMENTAL]
|
2018-03-23 03:40:08 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* constant names may start with a non-ASCII capital letter.
|
|
|
|
[Feature #13770]
|
2018-04-10 03:41:47 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* An endless range is introduced. You can write a range that has no end,
|
|
|
|
like `(0..)`. The following shows typical use cases. [Feature #12912]
|
2018-04-19 18:23:34 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
```ruby
|
2018-04-19 18:23:34 +03: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-08-18 12:53:11 +03:00
|
|
|
```
|
2018-04-19 18:23:34 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* Non-`Symbol` key in keyword arguments hash causes an exception.
|
2018-08-14 14:58:17 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
### Core classes updates (outstanding ones only)
|
2017-12-28 23:09:24 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Array`
|
2018-02-25 16:52:07 +03:00
|
|
|
|
2018-09-20 06:18:52 +03:00
|
|
|
* New methods:
|
|
|
|
|
2018-10-05 09:23:34 +03:00
|
|
|
* Added `Array#union` and `Array#difference` instance method.
|
2018-09-20 06:18:52 +03:00
|
|
|
[Feature #14097]
|
|
|
|
|
2018-09-20 18:06:56 +03:00
|
|
|
* Modified methods:
|
|
|
|
|
|
|
|
* `Array#to_h` now maps elements to new keys and values by the
|
2018-09-27 13:15:05 +03:00
|
|
|
block if given. [Feature #15143]
|
2018-09-20 18:06:56 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* Aliased methods:
|
2018-02-25 16:52:07 +03:00
|
|
|
|
2018-08-18 12:53:11 +03: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 16:52:07 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Binding`
|
2018-02-21 20:06:23 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* New methods:
|
2018-02-22 07:13:02 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* added `Binding#source_location`. [Feature #14230]
|
2018-02-22 07:13:02 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
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 20:06:23 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Dir`
|
2018-01-24 10:15:55 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* New methods:
|
2018-01-24 10:15:55 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* added `Dir#each_child` and `Dir#children` instance methods.
|
|
|
|
[Feature #13969]
|
2018-01-24 10:15:55 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Enumerable`
|
2018-02-25 16:52:07 +03:00
|
|
|
|
2018-09-20 18:06:56 +03:00
|
|
|
* Modified methods:
|
|
|
|
|
|
|
|
* `Enumerable#to_h` now maps elements to new keys and values
|
2018-09-27 13:15:05 +03:00
|
|
|
by the block if given. [Feature #15143]
|
2018-09-20 18:06:56 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* Aliased methods:
|
2018-02-25 16:52:07 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Enumerable#filter` is a new alias for `Enumerable#select`.
|
|
|
|
[Feature #13784]
|
2018-02-25 16:52:07 +03:00
|
|
|
|
2018-09-27 12:29:51 +03:00
|
|
|
* `Enumerator::ArithmeticSequence`
|
|
|
|
|
|
|
|
* 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-08-18 12:53:11 +03:00
|
|
|
* `Enumerator::Lazy`
|
2018-02-25 16:52:07 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* Aliased methods:
|
2018-02-25 16:52:07 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Enumerator::Lazy#filter` is a new alias for
|
|
|
|
`Enumerator::Lazy#select`. [Feature #13784]
|
2018-02-25 16:52:07 +03:00
|
|
|
|
2018-09-20 18:06:56 +03:00
|
|
|
* `ENV`
|
|
|
|
|
|
|
|
* Modified methods:
|
|
|
|
|
|
|
|
* `ENV.to_h` now maps names and values to new keys and values
|
2018-09-27 13:15:05 +03:00
|
|
|
by the block if given. [Feature #15143]
|
2018-09-20 18:06:56 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Exception`
|
2018-03-22 11:26:23 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* New options:
|
|
|
|
|
|
|
|
* `Exception#full_message` takes `:highlight` and `:order` options.
|
|
|
|
[Bug #14324]
|
2018-03-22 11:26:23 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Hash`
|
2018-02-25 16:52:07 +03:00
|
|
|
|
2018-09-19 05:10:05 +03:00
|
|
|
* Modified methods:
|
|
|
|
|
|
|
|
* `Hash#merge`, `update`, `merge!` and `update!` now accept multiple
|
|
|
|
arguments. [Feature #15111]
|
|
|
|
|
2018-09-20 18:06:56 +03:00
|
|
|
* `Hash#to_h` now maps keys and values to new keys and values
|
2018-09-27 13:15:05 +03:00
|
|
|
by the block if given. [Feature #15143]
|
2018-09-20 18:06:56 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* Aliased methods:
|
2018-02-25 16:52:07 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Hash#filter` is a new alias for `Hash#select`. [Feature #13784]
|
2018-08-19 04:55:27 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Hash#filter!` is a new alias for `Hash#select!`.
|
|
|
|
[Feature #13784]
|
2018-02-25 16:52:07 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `IO`
|
2018-08-09 11:49:09 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* New options:
|
|
|
|
|
|
|
|
* new mode character `'x'` to open files for exclusive access.
|
|
|
|
[Feature #11258]
|
2018-08-09 11:49:09 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Kernel`
|
2018-01-24 17:31:40 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* Aliased methods:
|
2018-07-01 11:12:14 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* `Kernel#then` is a new alias for `Kernel#yield_self`.
|
|
|
|
[Feature #14594]
|
2018-03-15 15:01:08 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* New options:
|
2018-03-15 15:01:08 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* `Kernel.#Complex`, `Kernel.#Float`, `Kernel.#Integer` and
|
|
|
|
`Kernel.#Rational` take `:exception` option to specify the way of
|
|
|
|
error handling. [Feature #12732]
|
2018-03-15 15:01:08 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* `Kernel.#system` takes `:exception` option to raise an exception
|
|
|
|
on failure. [Feature #14386]
|
2018-03-15 15:01:08 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* Incompatible changes:
|
2018-01-24 17:31:40 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `system()` and `exec()` do not close non-standard file descriptors
|
2018-08-18 12:56:43 +03:00
|
|
|
(The default of `:close_others` option is changed to `false` by
|
2018-08-18 12:53:11 +03:00
|
|
|
default. but we still set the `FD_CLOEXEC` flag on descriptors we
|
|
|
|
create). [Misc #14907]
|
2018-08-17 07:00:09 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `KeyError`
|
2018-02-22 06:33:42 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* New options:
|
|
|
|
|
|
|
|
* `KeyError#initialize` accepts `:receiver` and `:key` options to
|
|
|
|
set receiver and key in Ruby code. [Feature #14313]
|
2018-02-22 06:33:42 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Module`
|
2018-08-13 17:33:06 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* New methods:
|
|
|
|
|
|
|
|
* `Module#method_defined?`, `Module#private_method_defined?` and
|
|
|
|
`Module#protected_method_defined?` now accepts the second
|
|
|
|
parameter as optional. If it's `true` (=default), checks ancestor
|
|
|
|
modules/classes, or checks only the class itself.
|
|
|
|
[Feature #14944]
|
2018-08-13 17:33:06 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `NameError`
|
2018-02-22 06:33:42 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* New options:
|
|
|
|
|
|
|
|
* `NameError#initialize` accepts `:receiver` option to set receiver
|
|
|
|
in Ruby code. [Feature #14313]
|
2018-02-22 06:33:42 +03:00
|
|
|
|
2018-09-27 13:22:07 +03:00
|
|
|
* `NoMethodError`
|
|
|
|
|
|
|
|
* New options:
|
|
|
|
|
|
|
|
* `NoMethodError#initialize` accepts `:receiver` option to set
|
|
|
|
receiver in Ruby code. [Feature #14313]
|
|
|
|
|
2018-09-27 12:29:51 +03:00
|
|
|
* `Numeric`
|
|
|
|
|
|
|
|
* Incompatible changes:
|
|
|
|
|
|
|
|
* `Numeric#step` now returns an instance of
|
|
|
|
`Enumerator::ArithmeticSequence` class rather than one of
|
|
|
|
`Enumerator` class.
|
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Proc`
|
2017-12-28 23:09:24 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* Incompatible changes:
|
|
|
|
|
|
|
|
* `Proc#call` doesn't change `$SAFE` any more. [Feature #14250]
|
2017-12-28 23:09:24 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Random`
|
2018-02-20 12:26:38 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* New methods:
|
2018-02-20 12:26:38 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* added `Random.bytes`. [Feature #4938]
|
2018-02-20 12:26:38 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Range`
|
2018-05-17 13:46:21 +03:00
|
|
|
|
2018-09-28 05:18:58 +03:00
|
|
|
* New methods:
|
|
|
|
|
|
|
|
* Added `Range#%` instance method. [Feature #14697]
|
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* Incompatible changes:
|
|
|
|
|
|
|
|
* `Range#===` now uses `#cover?` instead of `#include?` method.
|
|
|
|
[Feature #14575]
|
2018-09-27 13:15:05 +03:00
|
|
|
* `Range#cover?` now accepts Range object. [Feature #14473]
|
2018-09-27 12:29:51 +03:00
|
|
|
* `Range#step` now returns an instance of
|
|
|
|
`Enumerator::ArithmeticSequence` class rather than one of
|
|
|
|
`Enumerator` class.
|
2018-05-17 13:46:21 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `RubyVM::AST`
|
2018-05-31 09:25:58 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* New methods:
|
|
|
|
|
|
|
|
* `RubyVM::AST.parse` parses a given string and returns AST nodes.
|
|
|
|
[experimental]
|
|
|
|
|
|
|
|
* `RubyVM::AST.parse_file` parses a given file and returns AST
|
|
|
|
nodes. [experimental]
|
2018-05-31 09:25:58 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `String`
|
2018-03-15 14:08:04 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* New features:
|
|
|
|
|
|
|
|
* `String#split` yields each substring to the block if given.
|
|
|
|
[Feature #4780]
|
2018-03-15 14:08:04 +03:00
|
|
|
|
2018-09-16 07:00:14 +03:00
|
|
|
* `Struct`
|
|
|
|
|
2018-09-20 18:06:56 +03:00
|
|
|
* Modified methods:
|
|
|
|
|
2018-09-21 05:14:33 +03:00
|
|
|
* `Struct#to_h` now maps keys and values to new keys and values
|
2018-09-27 13:15:05 +03:00
|
|
|
by the block if given. [Feature #15143]
|
2018-09-20 18:06:56 +03:00
|
|
|
|
2018-09-16 07:00:14 +03:00
|
|
|
* Aliased method:
|
|
|
|
|
|
|
|
* `Struct#filter` is a new alias for `Struct#select` [Feature #13784]
|
|
|
|
|
2018-10-08 05:35:31 +03:00
|
|
|
* `Time`
|
|
|
|
|
|
|
|
* New features:
|
|
|
|
|
|
|
|
* `Time.new` and `Time#getlocal` accept a timezone object as
|
2018-10-08 18:47:21 +03:00
|
|
|
well as UTC offset string. `Time#+`, `Time#-` and `Time#succ`
|
|
|
|
also preserve the timezone. [Feature #14850]
|
2018-10-08 05:35:31 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `TracePoint`
|
2018-06-10 10:01:53 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* New methods:
|
2018-06-10 10:01:53 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `TracePoint#parameters` [Feature #14694]
|
2018-06-10 10:01:53 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
### Stdlib updates (outstanding ones only)
|
2017-12-28 23:09:24 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `ERB`
|
2018-02-22 16:28:25 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* New options:
|
|
|
|
|
|
|
|
* 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 15:12:20 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* erb command's `-S` option is deprecated, which will be removed in
|
|
|
|
the next version.
|
2018-02-22 16:28:25 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `FileUtils`
|
2018-03-13 11:18:03 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* New method:
|
2018-03-13 11:18:03 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `FileUtils#cp_lr`. [Feature #4189]
|
2018-03-13 11:18:03 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Matrix`
|
2018-01-11 22:37:25 +03:00
|
|
|
|
2018-09-20 21:24:16 +03:00
|
|
|
* New methods:
|
2018-01-11 22:37:25 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Matrix#antisymmetric?`
|
2018-01-11 22:37:25 +03:00
|
|
|
|
2018-09-20 21:24:16 +03:00
|
|
|
* `Matrix#reflexive?`
|
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Net`
|
2018-06-06 11:03:47 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* New options:
|
2018-06-06 11:03:47 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* Add `:write_timeout` keyword argument to `Net::BufferedIO.new`.
|
|
|
|
[Feature #13396]
|
2018-06-06 11:03:47 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* New methods:
|
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* Add `Net::BufferedIO#write_timeout`,
|
|
|
|
`Net::BufferedIO#write_timeout=`, `Net::HTTP#write_timeout`, and
|
|
|
|
`Net::HTTP#write_timeout=`. [Feature #13396]
|
2018-06-06 11:03:47 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* New constant:
|
2018-06-06 12:01:04 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* Add `Net::HTTPClientException` to deprecate
|
|
|
|
`Net::HTTPServerException`, whose name is misleading. [Bug #14688]
|
2018-06-06 12:01:04 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `REXML`
|
2018-04-30 09:54:13 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* Improved some XPath implementations:
|
2018-04-30 09:54:13 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `concat()` function: Stringify all arguments before concatenating
|
2018-04-30 09:54:13 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `string()` function: Support context node
|
2018-04-30 09:54:13 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `string()` function: Support processing instruction node
|
2018-04-30 09:54:13 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* Support `"*:#{ELEMENT_NAME}"` syntax in XPath 2.0
|
2018-04-30 09:54:13 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* Fixed some XPath implementations:
|
2018-04-30 09:54:13 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `"//#{ELEMENT_NAME}[#{POSITION}]"` case
|
2018-04-30 09:54:13 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `string()` function: Fix `function(document)` returns nodes that
|
|
|
|
are out of root elements.
|
2018-04-30 09:54:13 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `"/ #{ELEMENT_NAME} "` case
|
2018-04-30 09:54:13 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `"/ #{ELEMENT_NAME} [ #{PREDICATE} ]"` case
|
2018-04-30 09:54:13 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `"/ #{AXIS}:: #{ELEMENT_NAME} "` case
|
2018-04-30 09:54:13 +03:00
|
|
|
|
2018-08-19 04:33:33 +03:00
|
|
|
* `"#{N}-#{M}"` case: One or more white spaces were required before
|
2018-08-18 12:53:11 +03:00
|
|
|
`"-"`
|
2018-04-30 09:54:13 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `"/child::node()"` case
|
2018-04-30 09:54:13 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `"#{FUNCTION}()/#{PATH}"` case
|
2018-04-30 09:54:13 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `"@#{ATTRIBUTE}/parent::"` case
|
2018-04-30 09:54:13 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `"name(#{NODE_SET})"` case
|
2018-04-30 09:54:13 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `RSS`
|
2018-05-12 12:06:00 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* New options:
|
|
|
|
|
|
|
|
* `RSS::Parser.parse`: Accept options as `Hash`. `:validate`,
|
|
|
|
`:ignore_unknown_element`, `:parser_class` options are available.
|
2018-05-12 12:06:00 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Set`
|
2018-02-25 16:52:07 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* Aliased methods:
|
2018-02-25 16:52:07 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Set#filter!` is a new alias for `Set#select!`. [Feature #13784]
|
2018-02-25 16:52:07 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `URI`
|
2018-03-15 19:51:31 +03:00
|
|
|
|
2018-08-19 04:55:27 +03:00
|
|
|
* New constant:
|
|
|
|
|
|
|
|
* Add `URI::File` to handle file URI scheme. [Feature #14035]
|
2018-03-15 19:51:31 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
### Compatibility issues (excluding feature bug fixes)
|
2017-12-28 23:09:24 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `File`
|
2018-03-20 12:09:49 +03:00
|
|
|
|
2018-08-18 12:53:11 +03: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 `'|'`.
|
|
|
|
[Feature #14245]
|
2018-03-20 12:09:49 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Dir`
|
2018-04-19 10:05:39 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* `Dir.glob` with `'\0'`-separated pattern list will be deprecated, and
|
|
|
|
is now warned. [Feature #14643]
|
2018-04-19 10:05:39 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
### Stdlib compatibility issues (excluding feature bug fixes)
|
2017-12-28 23:09:24 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
### C API updates
|
2017-12-28 23:09:24 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
### Supported platform changes
|
2017-12-28 23:09:24 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
### Implementation improvements
|
2017-12-28 23:09:24 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* Speedup `Proc#call` because we don't need to care about `$SAFE` any more.
|
|
|
|
[Feature #14318]
|
2018-02-21 11:14:51 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
With `lc_fizzbuzz` benchmark which uses so many `Proc#call` we can
|
|
|
|
measure x1.4 improvements. [Bug #10212]
|
2018-02-21 11:14:51 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* Speedup `block.call` where `block` is passed block parameter.
|
|
|
|
[Feature #14330]
|
2018-02-11 08:32:17 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
Ruby 2.5 improves block passing performance. [Feature #14045]
|
2018-02-16 11:51:23 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
Additionally, Ruby 2.6 improves the performance of passed block calling.
|
2018-05-29 04:18:06 +03:00
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
* Introduce an initial implementation of JIT (Just-in-time) compiler.
|
|
|
|
[Feature #14235] [experimental]
|
2018-08-23 11:33:54 +03:00
|
|
|
* `--enable=jit` option is added to enable JIT. `--jit-verbose=1` is good for
|
2018-08-18 12:53:11 +03:00
|
|
|
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-08-23 22:13:01 +03:00
|
|
|
* rb_waitpid reimplemented on Unix-like platforms to maintain
|
|
|
|
compatibility [Bug #14867]
|
2018-04-29 14:15:41 +03:00
|
|
|
|
2018-08-18 12:53:11 +03: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-23 22:13:01 +03:00
|
|
|
* timer thread is eliminated for platforms with POSIX timers [Misc #14937]
|
|
|
|
|
2018-08-18 12:53:11 +03:00
|
|
|
### 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.
|
2018-04-29 14:15:41 +03:00
|
|
|
|
|
|
|
* Before:
|
|
|
|
* libruby.2.6.0.dylib
|
|
|
|
* libruby.2.6.dylib -> libruby.2.6.0.dylib
|
|
|
|
* libruby.dylib -> libruby.2.6.0.dylib
|
|
|
|
|
|
|
|
* After:
|
|
|
|
* libruby.2.6.dylib
|
|
|
|
* libruby.dylib -> libruby.2.6.dylib
|
2018-10-05 13:28:38 +03:00
|
|
|
|
|
|
|
### Misc
|
|
|
|
|
|
|
|
* Extracted misc/*.el files to https://github.com/ruby/elisp
|