Skip to content

Commit

Permalink
fix: use send to invoke remove_method when removing as_json from Regexp
Browse files Browse the repository at this point in the history
remove_method is private in ruby 2.4
  • Loading branch information
bethesque committed Aug 16, 2022
1 parent 186774d commit cb29cdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pact/term.rb
Original file line number Diff line number Diff line change
@@ -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'

Expand Down

0 comments on commit cb29cdd

Please sign in to comment.