summaryrefslogtreecommitdiff
path: root/test/ruby/test_method.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-14 23:37:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-14 23:37:35 +0000
commitf3b537c5248e77d55ade4f86719e6dbf3310bcbb (patch)
tree02d7bcec92b506efc52955953f077fcfd4fa48ab /test/ruby/test_method.rb
parentb135b8d084063598f8603b675a933d13f9874624 (diff)
vm_eval.c: __dir__ in eval
* vm_eval.c (eval_string_with_cref): propagate absolute path from the binding if it is given explicitly. patch by Gat (Dawid Janczak) at [ruby-core:55123]. [Bug #8436] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41306 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 6faf564546..dda4190bd8 100644
--- a/test/ruby/test_method.rb
+++ b/test/ruby/test_method.rb
@@ -545,6 +545,8 @@ class TestMethod < Test::Unit::TestCase
def test___dir__
assert_instance_of String, __dir__
assert_equal(File.dirname(File.realpath(__FILE__)), __dir__)
+ bug8436 = '[ruby-core:55123] [Bug #8436]'
+ assert_equal(__dir__, eval("__dir__", binding), bug8436)
end
def test_alias_owner