Class: Class

Inherits:
Object show all
Defined in:
lib/contrast.rb

Overview

This fixes Ruby 3.0 issues with Module#(some instance method) patching by preventing the prepending of a JSON helper on protobuf load. String.instance_method(:+) is one of the most noticeable. This is fixed in Ruby 3.1.0 TODO: RUBY-1132 Remove this once Ruby 3 support is dropped. See bug here: bugs.ruby-lang.org/issues/17725

Instance Method Summary collapse

Instance Method Details

#cs__orig_prependObject



49
# File 'lib/contrast.rb', line 49

alias_method(:cs__orig_prepend, :prepend)

#prepend(other) ⇒ Object



50
51
52
# File 'lib/contrast.rb', line 50

def prepend other
  include(other)
end