aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_refinement.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-06 13:49:57 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-06 13:49:57 +0000
commitc16cf23b6cbb58a2de417d1c7d467ee7354a6f72 (patch)
tree4f49ef39b167b0aa16b0b1886f5cd3bec29b0b1c /test/ruby/test_refinement.rb
parent340cf805764a1d6bf5ed608c2c4af7abe8578e0b (diff)
downloadruby-c16cf23b6cbb58a2de417d1c7d467ee7354a6f72.tar.gz
vm_eval.c: undefined refined check_funcall
* vm_eval.c (rb_method_call_status): undefined refined method is not callable unless using. [ruby-core:69064] [Bug #11117] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_refinement.rb')
-rw-r--r--test/ruby/test_refinement.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb
index 70cffa86f4..0a8f6e45cb 100644
--- a/test/ruby/test_refinement.rb
+++ b/test/ruby/test_refinement.rb
@@ -1428,6 +1428,23 @@ class TestRefinement < Test::Unit::TestCase
INPUT
end
+ def test_check_funcall_undefined
+ bug11117 = '[ruby-core:69064] [Bug #11117]'
+
+ x = Class.new
+ Module.new do
+ refine x do
+ def to_regexp
+ //
+ end
+ end
+ end
+
+ assert_nothing_raised(NoMethodError, bug11117) {
+ assert_nil(Regexp.try_convert(x.new))
+ }
+ end
+
private
def eval_using(mod, s)