Skip to content

@palkan palkan released this Sep 2, 2020 · 24 commits to master since this release

RubyKaigi 2020 special.

🔬 Experimental

  • Added proposed shorthand Hash syntax.

From https://bugs.ruby-lang.org/issues/15236.

Give it a try: x = 1; y = 2; data = {x, y}.

Here is a real-life example usage: anycable/anycable_rails_demo@d4ee4c6

Ruby 3.0

  • Added find pattern support to pattern matching.

Example: [0, 1, 2] in [*, 1 => a, *c].

  • Added leading argument support to args forwarding.

Example: def a(...) b(1, ...); end.

  • Added Hash#except.

Example: {a: 1, b: 2}.except(:a) == {b: 2}

Misc

  • Added Ruby 2.2 support.

With support for safe navigation operator (&.) and squiggly heredocs (<<~TXT).

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