diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-08 07:31:45 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-08 07:31:45 +0000 |
commit | 459894160ec03ba01fc4c4e574480f83604ac410 (patch) | |
tree | 3eeebbb132a910a19b0e443287ba0263d1be2a3e /test | |
parent | 759a31b4a3fbacb5a8528a3875c7f2395a2f9187 (diff) | |
download | ruby-459894160ec03ba01fc4c4e574480f83604ac410.tar.gz |
vm_method.c: fix change refined new method visibility
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_refinement.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb index 11077b6e4d..8553c42e18 100644 --- a/test/ruby/test_refinement.rb +++ b/test/ruby/test_refinement.rb @@ -1165,6 +1165,20 @@ class TestRefinement < Test::Unit::TestCase end; end + def test_change_refined_new_method_visibility + assert_separately([], <<-"end;") + bug10706 = '[ruby-core:67387] [Bug #10706]' + module RefinementBug + refine Object do + def foo + end + end + end + + assert_raise(NameError, bug10706) {private(:foo)} + end; + end + private def eval_using(mod, s) |