Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enumerator#any? and yield(*[[]]) bug #5710

marcandre opened this issue Apr 25, 2019 · 1 comment


None yet
2 participants
Copy link

commented Apr 25, 2019


$ ruby -v
jruby (2.5.3) 2019-04-25 9477784 Java HotSpot(TM) 64-Bit Server VM 25.102-b14 on 1.8.0_102-b14 +jit [darwin-x86_64]


class Foo
  def each
    return to_enum :each unless block_given?
    x = [[]]
enum =
p enum.to_a  # => [[]], ok
p enum.any?  # => false, should be true

Replacing the yield(*x) with yield(x[0]) circumvents the bug.


This comment has been minimized.

Copy link

commented Apr 25, 2019

Likely the same as other issues with yield + enumerator. There's still some places where we're not unwrapping properly, or unwrapping too much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.