Skip to content

Commit

Permalink
[flori/json] alias_method is private on Ruby 2.3 and 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Sep 13, 2023
1 parent e22086b commit 1851824
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/json/json_generator_test.rb
Expand Up @@ -395,7 +395,7 @@ def to_s; self; end
def test_string_ext_included_calls_super
included = false

Module.alias_method(:included_orig, :included)
Module.send(:alias_method, [:included_orig, :included])
Module.remove_method(:included)
Module.define_method(:included) do |base|
included_orig(base)
Expand All @@ -410,7 +410,7 @@ def test_string_ext_included_calls_super
ensure
if Module.private_method_defined?(:included_orig)
Module.remove_method(:included) if Module.method_defined?(:included)
Module.alias_method(:included, :included_orig)
Module.send(:alias_method, [:included, :included_orig])
Module.remove_method(:included_orig)
end
end
Expand Down

0 comments on commit 1851824

Please sign in to comment.