lib/surrogate/endower.rb in surrogate-0.3.2 vs lib/surrogate/endower.rb in surrogate-0.4.2
- old
+ new
@@ -53,20 +53,20 @@
end
ensure
@hijacking_initialize = false
end
initialize = klass.instance_method :initialize
- klass.send :define_method, :initialize do |*args, &block|
+ klass.__send__ :define_method, :initialize do |*args, &block|
initialize.bind(self).call(*args, &block)
end
end
def singleton
klass.singleton_class
end
def remember_invocations_for_instances_of(klass)
- klass.send :define_method, :invocations do |method_name|
+ klass.__send__ :define_method, :invocations do |method_name|
@hatchling.invocations method_name
end
end
def add_hatchery_to(klass)