From a6d34e75019f484baf6e27ae9af93d0093554ef3 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 3 Aug 2014 01:43:10 +0000 Subject: vm_insnhelper.c: fix unusable super class * vm_insnhelper.c (vm_call_method): unusable super class should cause method missing when BasicObject is refined but not been using. [ruby-core:64166] [Bug #10106] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_refinement.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test') diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb index 88754df75b..5a60a6afe9 100644 --- a/test/ruby/test_refinement.rb +++ b/test/ruby/test_refinement.rb @@ -1151,6 +1151,21 @@ class TestRefinement < Test::Unit::TestCase INPUT end + def test_refine_basic_object + assert_separately([], <<-"end;") + bug10106 = '[ruby-core:64166] [Bug #10106]' + module RefinementBug + refine BasicObject do + def foo + 1 + end + end + end + + assert_raise(NoMethodError, bug10106) {Object.new.foo} + end; + end + private def eval_using(mod, s) -- cgit v1.2.3