Skip to content

Commit 6cbadf6

Browse files
committed
remove_method of Module is private at Ruby 2.3 and 2.4
1 parent 8743a0b commit 6cbadf6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/json_generator_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ def test_string_ext_included_calls_super
396396
included = false
397397

398398
Module.send(:alias_method, :included_orig, :included)
399-
Module.remove_method(:included)
399+
Module.send(:remove_method, :included)
400400
Module.define_method(:included) do |base|
401401
included_orig(base)
402402
included = true
@@ -409,9 +409,9 @@ def test_string_ext_included_calls_super
409409
assert included
410410
ensure
411411
if Module.private_method_defined?(:included_orig)
412-
Module.remove_method(:included) if Module.method_defined?(:included)
412+
Module.send(:remove_method, :included) if Module.method_defined?(:included)
413413
Module.send(:alias_method, :included, :included_orig)
414-
Module.remove_method(:included_orig)
414+
Module.send(:remove_method, :included_orig)
415415
end
416416
end
417417
end

0 commit comments

Comments
 (0)