diff --git a/lib/power_assert.rb b/lib/power_assert.rb index 8de209e..035e0a9 100644 --- a/lib/power_assert.rb +++ b/lib/power_assert.rb @@ -28,7 +28,6 @@ module PowerAssert class << self def start(assertion_proc_or_source, assertion_method: nil, source_binding: TOPLEVEL_BINDING) - clear_global_method_cache yield Context.new(assertion_proc_or_source, assertion_method, source_binding) end @@ -48,16 +47,5 @@ def internal_file?(file) file.start_with?(dir) end end - - CLEAR_CACHE_ISEQ = RubyVM::InstructionSequence.compile('using PowerAssert.const_get(:Empty)') - private_constant :CLEAR_CACHE_ISEQ - - def clear_global_method_cache - CLEAR_CACHE_ISEQ.eval - end - end - - module Empty end - private_constant :Empty end diff --git a/test/block_test.rb b/test/block_test.rb index cd43a62..6b903e1 100644 --- a/test/block_test.rb +++ b/test/block_test.rb @@ -351,19 +351,17 @@ def inspect; '#'; end end end - if PowerAssert.respond_to?(:clear_global_method_cache, true) - t do - 3.times do - assert_equal <