Skip to content

case when with an empty array#6989

Merged
enebo merged 1 commit intojruby:jruby-9.3from
ahorek:case_bug
Jan 10, 2022
Merged

case when with an empty array#6989
enebo merged 1 commit intojruby:jruby-9.3from
ahorek:case_bug

Conversation

@ahorek
Copy link
Contributor

@ahorek ahorek commented Jan 9, 2022

ZArray is a special case that stands for an empty array, but it doesn't inherit from the Array node

this fixes equality for

case []
when []
  puts 'correct ([])'
else
  puts 'did not match'
end

see #6981

@ahorek ahorek added this to the JRuby 9.3.3.0 milestone Jan 9, 2022
@enebo enebo merged commit deb070f into jruby:jruby-9.3 Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants