# Struct creation with a block
a = Struct.new(:foo, :bar) {
def hello
"hello"
end
}
test_equal("hello", a.new(0, 0).hello)
With JIT it cannot find hello. I believe this is because block is using containing scope (main in this case) and defining it there...though the only thing I know for sure is that a does not have it.
Description
From test/testStruct.rb
# Struct creation with a block
a = Struct.new(:foo, :bar) {
def hello
"hello"
end
}
test_equal("hello", a.new(0, 0).hello)
With JIT it cannot find hello. I believe this is because block is using containing scope (main in this case) and defining it there...though the only thing I know for sure is that a does not have it.