Skip to content

Commit 573ef94

Browse files
committed
alias_method is private on Ruby 2.3 and 2.4
1 parent d81a22c commit 573ef94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/json_generator_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def to_s; self; end
395395
def test_string_ext_included_calls_super
396396
included = false
397397

398-
Module.alias_method(:included_orig, :included)
398+
Module.send(:alias_method, [:included_orig, :included])
399399
Module.remove_method(:included)
400400
Module.define_method(:included) do |base|
401401
included_orig(base)
@@ -410,7 +410,7 @@ def test_string_ext_included_calls_super
410410
ensure
411411
if Module.private_method_defined?(:included_orig)
412412
Module.remove_method(:included) if Module.method_defined?(:included)
413-
Module.alias_method(:included, :included_orig)
413+
Module.send(:alias_method, [:included, :included_orig])
414414
Module.remove_method(:included_orig)
415415
end
416416
end

0 commit comments

Comments
 (0)