diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-14 05:17:55 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-14 05:17:55 +0000 |
commit | c8946b45b85d636bb38c6b79b483ab4c3acb9cb7 (patch) | |
tree | f121d0b4fced83873077f7f7fd1dd4f6a8cb92f2 /test/ruby/test_eval.rb | |
parent | 9c19130e7f13d96f57ba1b681bf14cc682ee8bce (diff) | |
download | ruby-c8946b45b85d636bb38c6b79b483ab4c3acb9cb7.tar.gz |
vm_eval.c: fstring instance_eval
* vm_eval.c (singleton_class_for_eval): enable fstring singleton
class for instance_eval. [ruby-core:78116] [Bug #12930]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_eval.rb')
-rw-r--r-- | test/ruby/test_eval.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_eval.rb b/test/ruby/test_eval.rb index dba54773cb..fc08d61ef5 100644 --- a/test/ruby/test_eval.rb +++ b/test/ruby/test_eval.rb @@ -503,6 +503,14 @@ class TestEval < Test::Unit::TestCase assert_same a, b end + def test_fstring_instance_eval + bug = "[ruby-core:78116] [Bug #12930]".freeze + assert_same bug, (bug.instance_eval {self}) + assert_raise(RuntimeError) { + bug.instance_eval {@ivar = true} + } + end + def test_gced_binding_block assert_normal_exit %q{ def m |