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.
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)
-
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)
Hash#except
(#15822)
-
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)
- do/end blocks work with ensure/rescue/else (#12906)
- Endless ranges (
1..
or1...
) (ref)
NOTE: transpiled into a[1..-1]
for indexes and (1...Float::INFINITY)
in other cases.
-
Pattern matching (
case ... in ... end
) (ref) -
Arguments forwarding (
def a(...) b(...); end
anddef 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.
-
"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:}
)