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

case doesn't match empty array #3558

Closed
rcrogers opened this Issue Dec 21, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@rcrogers
Copy link

rcrogers commented Dec 21, 2015

jruby-9.0.0.0.pre1 :014 > a = []; case a; when a; true; else 'BROKEN'; end
 => "BROKEN"

Strangely, case equality works as expected:

jruby-9.0.0.0.pre1 :019 > a = []; a === a
 => true 
@subbuss

This comment has been minimized.

Copy link
Contributor

subbuss commented Dec 21, 2015

Please use a newer version (9.0.4.0 is the latest release). In any case, this is not a problem on master. See below.

[subbu@earth ir] jruby --version
jruby 9.0.5.0-SNAPSHOT (2.2.3) 2015-12-21 aa2f5d6 Java HotSpot(TM) 64-Bit Server VM 24.80-b11 on 1.7.0_80-b15 +jit [linux-amd64]
[subbu@earth ir] jruby -S irb
Ignoring jruby-launcher-1.1.0-java because its extensions are not built.  Try: gem pristine jruby-launcher --version 1.1.0
Ignoring ruby-debug-ide-0.4.23.beta1 because its extensions are not built.  Try: gem pristine ruby-debug-ide --version 0.4.23.beta1
irb(main):001:0> case []; when []; true; else 'BROKEN'; end
=> true
irb(main):002:0>

@subbuss subbuss closed this Dec 21, 2015

@rcrogers

This comment has been minimized.

Copy link
Author

rcrogers commented Dec 21, 2015

Oops, thanks. RVM lied to me about what jruby versions were available.

@rcrogers

This comment has been minimized.

Copy link
Author

rcrogers commented Dec 21, 2015

For anyone else reading, this is still broken on 9.0.4.0:

jruby-9.0.4.0 :001 > a = []; case a; when a; true; else 'BROKEN'; end
 => "BROKEN"

@subbuss subbuss added this to the JRuby 9.0.5.0 milestone Dec 22, 2015

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.