summaryrefslogtreecommitdiff
path: root/test/ruby/test_method.rb
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-22 15:13:18 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-22 15:13:18 +0000
commit65dc7d004e6a458155a5f1ddd42439695e1ef10c (patch)
tree542276f24a4bcdcf0d2bec59045d43e58e6b583b /test/ruby/test_method.rb
parent7029875b20fa7f231b8145442b46a1f31cd89809 (diff)
merge revision(s) 42103: [Backport #8662]
* 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/branches/ruby_2_0_0@42116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_method.rb')
-rw-r--r--test/ruby/test_method.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb
index 688386774c..1935bf2ad8 100644
--- a/test/ruby/test_method.rb
+++ b/test/ruby/test_method.rb
@@ -508,6 +508,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