Open
Description
Looks like foreign objects do not expose #hash
? I think it should be provided through InteropLibrary
's identityHashCode
.
Repro Session
$ polyglot --jvm --shell
GraalVM MultiLanguage Shell 21.0.0-dev
Copyright (c) 2013-2020, Oracle and/or its affiliates
JavaScript version 21.0.0-dev
Python version 3.8.5
R version 3.6.1
Ruby version 2.6.6
ruby> x = {}
{}
ruby> x[Object.new] = true
true
ruby> x.keys
[#<Object:0x250>]
ruby> x[Polyglot.eval('python', 'object()')] = true
Unknown identifier: hash (NameError)
at <ruby> <top (required)>(resource:/truffleruby/core/truffle/boot.rb:16:15-59)
at <ruby> null(Unknown)