diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-18 13:59:57 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-18 13:59:57 +0000 |
commit | b7bb9b6a42d790bb9f4a8ec9786bc23322035999 (patch) | |
tree | fb9fe1722a1370cf886fa0099312699c1873848a /test | |
parent | 26c3422a6e37be244b88481928d7cb19280b7e9c (diff) | |
download | ruby-b7bb9b6a42d790bb9f4a8ec9786bc23322035999.tar.gz |
* vm_method.c (rb_class_clear_method_cache): should clear all
RCLASS_CALLABLE_M_TBLs of all sub-classes (T_ICLASS).
RCLASS_CALLABLE_M_TBL() caches complemented method entries.
It should be cleared when the modules are cleared.
On previous version clears only for direct children.
It is enough for normal modules because corresponding T_ICLASSes
are direct children.
However, refinements create complex data structure. So that
we need to clear all children (and descendants).
[ruby-core:71423] [Bug #11672]
* vm_method.c (rb_clear_method_cache_by_class): rb_mKernel
doesn't call rb_class_clear_method_cache, so that
clear child T_ICLASSes.
* test/ruby/test_refinement.rb: enable disabled test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_refinement.rb | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb index b69135f321..43f58b1038 100644 --- a/test/ruby/test_refinement.rb +++ b/test/ruby/test_refinement.rb @@ -1495,7 +1495,6 @@ class TestRefinement < Test::Unit::TestCase end def test_reopen_refinement_module - flag = false assert_separately([], <<-"end;") $VERBOSE = nil class C @@ -1522,11 +1521,6 @@ class TestRefinement < Test::Unit::TestCase assert_equal(:bar, C.new.m, "[ruby-core:71423] [Bug #11672]") end; - flag = true - rescue MiniTest::Assertion - skip 'expected to fail' - ensure - raise MiniTest::Assertion, 'this test is expected to fail' if flag end private |