summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_eval.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_eval.rb b/test/ruby/test_eval.rb
index 0bc0390d64..eba00f80bd 100644
--- a/test/ruby/test_eval.rb
+++ b/test/ruby/test_eval.rb
@@ -503,6 +503,12 @@ class TestEval < Test::Unit::TestCase
assert_same a, b
end
+ def test_eval_location_binding
+ assert_warning(/__FILE__ in eval/) do
+ assert_equal(__FILE__, eval("__FILE__", binding))
+ end
+ end
+
def test_fstring_instance_eval
bug = "[ruby-core:78116] [Bug #12930]".freeze
assert_same bug, (bug.instance_eval {self})