mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* compile.c (iseq_compile_each): call on special object instead of
self. since stabby lambda is a syntax, so it should not be affected by the context. [ruby-core:42349][Bug #5966] * insns.def (send): no special deal for FCALL. self should be put on TOS instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
767848e0b7
commit
6a8d009709
4 changed files with 19 additions and 3 deletions
|
@ -63,4 +63,11 @@ class TestLambdaParameters < Test::Unit::TestCase
|
|||
def foo
|
||||
assert_equal(nil, ->(&b){ b }.call)
|
||||
end
|
||||
|
||||
def test_in_basic_object
|
||||
bug5966 = '[ruby-core:42349]'
|
||||
called = false
|
||||
BasicObject.new.instance_eval {->() {called = true}.()}
|
||||
assert_equal(true, called, bug5966)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue