From cb29cddbb1268f259a3b59033dfd356fd3726e9d Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Wed, 17 Aug 2022 08:38:05 +1000 Subject: [PATCH] fix: use send to invoke remove_method when removing as_json from Regexp remove_method is private in ruby 2.4 --- lib/pact/term.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pact/term.rb b/lib/pact/term.rb index 143c93f..0b27ca6 100644 --- a/lib/pact/term.rb +++ b/lib/pact/term.rb @@ -1,5 +1,5 @@ require 'pact/shared/active_support_support' -Regexp.remove_method(:as_json) if Regexp.method_defined?(:as_json) +Regexp.send(:remove_method, :as_json) if Regexp.method_defined?(:as_json) require 'json/add/regexp' require 'pact/errors'