Incorrect case evaluation when evaluating variable with value of [] #3966

Closed
ckpeter opened this Issue Jun 14, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@ckpeter

ckpeter commented Jun 14, 2016

Environment

jruby 9.1.2.0 (2.3.0) 2016-05-26 7357c8f Java HotSpot(TM) Client VM 25.92-b14 on 1.8.0_92-b14 +jit [mswin32-x86]

Expected Behavior

When running this snippet:

var = []

case
  when var
    puts 1
  else
    puts 2
end

MRI 2.2.3 prints 1.

Actual Behavior

JRuby 9.1.2 prints 2.

@enebo enebo added this to the JRuby 9.1.3.0 milestone Jun 14, 2016

@enebo enebo added the ir label Jun 14, 2016

@enebo enebo closed this in cf4145c Jun 14, 2016

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