diff --git a/tests/json_generator_test.rb b/tests/json_generator_test.rb index 20f652dc..2b9a11ef 100755 --- a/tests/json_generator_test.rb +++ b/tests/json_generator_test.rb @@ -396,7 +396,7 @@ def test_string_ext_included_calls_super included = false Module.send(:alias_method, :included_orig, :included) - Module.remove_method(:included) + Module.send(:remove_method, :included) Module.define_method(:included) do |base| included_orig(base) included = true @@ -409,9 +409,9 @@ def test_string_ext_included_calls_super assert included ensure if Module.private_method_defined?(:included_orig) - Module.remove_method(:included) if Module.method_defined?(:included) + Module.send(:remove_method, :included) if Module.method_defined?(:included) Module.send(:alias_method, :included, :included_orig) - Module.remove_method(:included_orig) + Module.send(:remove_method, :included_orig) end end end