From e63d45a5f910f0a1dc2de3aeb07b85bfe84b9051 Mon Sep 17 00:00:00 2001 From: nagachika Date: Sat, 15 Jun 2013 15:36:51 +0000 Subject: merge revision(s) 40759,40966,41305,41306: [Backport #8436] vm_eval.c: suppress warning * vm_eval.c (eval_string_with_cref): narrow a variable scope into the EXEC_TAG block to suppress -Wclobberd warning. * 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/branches/ruby_2_0_0@41317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_method.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/ruby/test_method.rb') diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index 1546e15107..688386774c 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -505,7 +505,9 @@ class TestMethod < Test::Unit::TestCase def test___dir__ assert_instance_of String, __dir__ - assert_equal(File.dirname(__FILE__), __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 -- cgit v1.2.3