summaryrefslogtreecommitdiff
path: root/test/json/json_generator_test.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2023-10-11 13:55:39 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-10-11 15:45:17 +0900
commit1b19e9198d92e7eac3f3c5402243d6f7a052ede3 (patch)
treee9ac13eb6bc9302d40644575c5152941af151f4c /test/json/json_generator_test.rb
parente3afc212ec059525fe4e5387b2a3be920ffe0f0e (diff)
[flori/json] remove_method of Module is private at Ruby 2.3 and 2.4
https://github.com/flori/json/commit/6cbadf6b6e
Diffstat (limited to 'test/json/json_generator_test.rb')
-rwxr-xr-xtest/json/json_generator_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/json/json_generator_test.rb b/test/json/json_generator_test.rb
index 20f652dc9d..2b9a11efd4 100755
--- a/test/json/json_generator_test.rb
+++ b/test/json/json_generator_test.rb
@@ -396,7 +396,7 @@ EOT
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 @@ EOT
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