Skip to content

Instantly share code, notes, and snippets.

@enebo
Created January 25, 2022 16:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enebo/6484b07f9d01dcd22fc4ba8f6e5d3e59 to your computer and use it in GitHub Desktop.
Save enebo/6484b07f9d01dcd22fc4ba8f6e5d3e59 to your computer and use it in GitHub Desktop.
a = case [0, 1, 2, 3, 4]
in [*pre, 2, *post]
[pre, post]
else
false
end
p a
system ~/work/jruby master * 3660% jruby --dev ../snippets/pattern2.rb
../snippets/pattern2.rb:2: warning: Find pattern is experimental, and the behavior may change in future versions of Ruby!
[[0, 1], [3, 4]]
system ~/work/jruby master * 3661% mri31 ../snippets/pattern2.rb
../snippets/pattern2.rb:2: warning: Find pattern is experimental, and the behavior may change in future versions of Ruby!
[[0, 1], [3, 4]]
@enebo
Copy link
Author

enebo commented Jan 25, 2022

Fixed with jruby/jruby@450129d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment