3 ms·
Definitely not a clear description, but I believe it stands for "pattern matching in". Ruby's new pattern matching uses a sytax of case {{ value }} in {{ patte
by dangerbird2 5y ago
Definitely not a clear description, but I believe it stands for "pattern matching in". Ruby's new pattern matching uses a sytax of
case {{ value }}
in {{ pattern }}
{{ code }}
...
end
the new feature apparently allows expressions, rather than just local variables, in the pattern spec.
They probably should have included the link to the feature ticket: https://bugs.ruby-lang.org/issues/17411 https://bugs.ruby-lang.org/issues/17411