diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-22 00:48:38 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-22 00:48:38 +0000 |
commit | c7a56bd6d0b49d6311821991f9cc7d3499e92891 (patch) | |
tree | c3aedd182b38d8b5b114aa23e48df461a68e84a0 /test | |
parent | 38eb518feb76efd629a5d28899d5d837c5dc9236 (diff) | |
download | ruby-c7a56bd6d0b49d6311821991f9cc7d3499e92891.tar.gz |
vm_eval.c: use file argument
* vm_eval.c (eval_string_with_cref): use the given file name unless
eval even if scope is given. additional fix for [Bug #8436].
based on the patch by srawlins at [ruby-core:56099] [Bug #8662].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_method.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index dda4190bd8..c11dcf9269 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -547,6 +547,8 @@ class TestMethod < Test::Unit::TestCase assert_equal(File.dirname(File.realpath(__FILE__)), __dir__) bug8436 = '[ruby-core:55123] [Bug #8436]' assert_equal(__dir__, eval("__dir__", binding), bug8436) + bug8662 = '[ruby-core:56099] [Bug #8662]' + assert_equal("arbitrary", eval("__dir__", binding, "arbitrary/file.rb"), bug8662) end def test_alias_owner |