Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time

Ruby Next Status

Core

2.6

  • Kernel#then (ref)

NOTE: technically, we refine Object ('cause refining modules could break)

  • Proc#<<, Proc#>>(ref)

NOTE: we support 2.7 behaviour which is slightly different.

  • Array#union, Array#difference (ref)

  • Enumerable#filter/#filter! (ref)

  • String#split with block (ref)

NOTE: the implementation is very-straightforward and uses and intermediate array; it's only added to provide an API, not the optimization itself.

  • Hash#merge with multiple args (ref)

2.7

  • Enumerable#tally (ref)

  • Array#intersection (ref)

  • Enumerable#filter_map (ref)

  • Enumerator#produce (ref)

  • Time#ceil, Time#floor (ref)

  • UnboundMethod#bind_call (ref)

  • Symbol#start_with?, Symbol#end_with? (ref)

3.0

3.1

  • Array#intersect? (#15198)

  • Enumerable#tally with the resulting hash (#17744)

  • Refinement#import_methods (#17429). NOTE: The polyfill+transpiling only works for Ruby 2.7+; for older versions consider using #include instead.

  • MatchData#match (#18172)

  • Enumerable#compact, Enumerator::Lazy#compact (#17312)

  • Integer.try_convert (#15211)

Syntax

2.5

  • do/end blocks work with ensure/rescue/else (#12906)

2.6

  • Endless ranges (1.. or 1...) (ref)

NOTE: transpiled into a[1..-1] for indexes and (1...Float::INFINITY) in other cases.

2.7

  • Pattern matching (case ... in ... end) (ref)

  • Arguments forwarding (def a(...) b(...); end and def a(...) b(1, ...); end) (#16253, #16378)

  • Numbered parameters (block { _1 }) (ref)

  • (WONTFIX) Startless ranges (..1 or ...1) (ref)

The possible translation depends on the end type which could hardly be inferred from the source code.

3.0

  • "Endless" method definition (def foo() = 42) (#16746)

  • Find pattern ([0, 1, 2] in [*, 1 => a, *c]) (#16828).

  • Single-line pattern matching ({a: 2} in {a:, b:} or {a: 2} => {a:, b:})

3.1

  • Shorthand Hash/kwarg notation (data = {x:, y:} or foo(x:, y:)) (#15236).

  • Pinning instance, class and global variables and expressions (#17724, #17411).

  • Anonymous blocks def b(&); c(&); end (#11256).

  • Command syntax in endless methods (def foo() = puts "bar") (#17398)

Proposals

  • REVERTED IN RUBY (#16275) Method reference operator (Module.:method) (#12125, #13581)

  • Binding instance, class, global variables in pattern matching (42 => @v) (#18408).