Skip to content

@palkan palkan released this Dec 24, 2020 · 19 commits to master since this release

This release is dedicated to the upcoming release of Ruby 3.0.

Features

  • Added find pattern support (case v; in [*, 42, *]; true; end)
  • Added endless method support (def foo() = "bar")
  • Added leading arguments support to arguments forwarding (def foo(...) = bar(1, ...)).

Changes

  • Right-hand assignment replaced with single-line pattern matching (a => x)
  • Behavior of a in x single-line pattern matching changed to comply with Ruby 3.0 (returns true/false instead of raising errors).
  • Transpiler now uses rewrite mode by default.

Bonus features

we also extended the proposed shorthand Hash syntax to support kwargs in method calls as well:

x = 1
y = 2

foo x:, y: #= foo x: x, y: y

Could this be the future Ruby? Share your thoughts!.

Assets 2
You can’t perform that action at this time.