You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Argument values assigned to local variables aren't available from blocks supplied to a method call. The following is a simplified example of something RSpec does:
def x(the_caller)
yield
end
class X
def y
x(the_caller = caller) do
p the_caller.first
end
end
end
X.new.y
> bin/jruby -X+T -v yo.rb
jruby 9.0.0.0-SNAPSHOT (2.2.2) 2015-05-28 6ab4b4a Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [linux-amd64]
yo.rb:8:in `method_missing': undefined method `first' for NilClass (NoMethodError)
from yo.rb:8:in `block in y'
from yo.rb:2:in `x'
from yo.rb:7:in `y'
from yo.rb:13:in `<main>'
The text was updated successfully, but these errors were encountered:
You're right. I was tracking something else down and incorrectly reported that here. I'll update the title.
nirvdrum
changed the title
[Truffle] Default argument values not available in block
[Truffle] Argument values assigned to local variables not available in block
May 28, 2015
Argument values assigned to local variables aren't available from blocks supplied to a method call. The following is a simplified example of something RSpec does:
MRI 2.2.2:
JRuby+Truffle:
The text was updated successfully, but these errors were encountered: