-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Labels
Milestone
Description
class AA < BasicObject
def to_hash
{}
end
end
obj = AA.new
def func(**hash)
puts hash
end
func **obj # <- error on this line
run ok in MRI,but jruby report error :
NoMethodError: undefined method `respond_to?' for #<AA:0x282003e1>
<main> at test.rb:13
load at org/jruby/RubyKernel.java:974
<main> at -e:1
i found jruby call respond_to? :to_hash before call to_hash,but MRI not.
ENV
jruby 9.1.5.0 (2.3.1) 2016-09-23 fffffff Java HotSpot(TM) Client VM 25.101-b13 on 1.8.0_101-b13 +jit [mswin32-x86]
Reactions are currently unavailable