Skip to content

[ji] proper key? checking semantics for Map#7238

Merged
enebo merged 3 commits intojruby:jruby-9.3from
kares:map-key-check
Jun 21, 2022
Merged

[ji] proper key? checking semantics for Map#7238
enebo merged 3 commits intojruby:jruby-9.3from
kares:map-key-check

Conversation

@kares
Copy link
Copy Markdown
Member

@kares kares commented Jun 7, 2022

the gist of the changes is to fix the java.util.Map#key? case with nil values

jruby -v -e "map = java.util.HashMap.new; map[:key] = nil; p map.size; p map.key? :key"

jruby 9.3.4.0 (2.6.8) 2022-03-23 eff48c1ebf OpenJDK 64-Bit Server VM 11.0.14.1+1 on 11.0.14.1+1 +jit [x86_64-linux]
1
false

also on the Java consumer side having a "clean" way of checking a IRubyObject is present in the Hash seemed lacking ...

@kares kares added this to the JRuby 9.3.5.0 milestone Jun 7, 2022
@enebo enebo merged commit fe30f82 into jruby:jruby-9.3 Jun 21, 2022
@headius headius modified the milestones: JRuby 9.3.5.0, JRuby 9.3.6.0 Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants