summaryrefslogtreecommitdiff
path: root/test/ruby/namespace/string_ext_eval_caller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/namespace/string_ext_eval_caller.rb')
-rw-r--r--test/ruby/namespace/string_ext_eval_caller.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/namespace/string_ext_eval_caller.rb b/test/ruby/namespace/string_ext_eval_caller.rb
new file mode 100644
index 0000000000..0e6b20c19f
--- /dev/null
+++ b/test/ruby/namespace/string_ext_eval_caller.rb
@@ -0,0 +1,12 @@
+module Baz
+ def self.yay
+ eval 'String.new.yay'
+ end
+
+ def self.yay_with_binding
+ suffix = ", yay!"
+ eval 'String.new.yay + suffix', binding
+ end
+end
+
+Baz.yay # should not raise NeMethodError