lib/sprockets/helpers.rb in sprockets-helpers-0.7.1 vs lib/sprockets/helpers.rb in sprockets-helpers-0.7.2
- old
+ new
@@ -52,11 +52,12 @@
# Hack to ensure methods from Sprockets::Helpers override the
# methods of Sprockets::Context when included.
def append_features(context) # :nodoc:
context.class_eval do
+ context_methods = context.instance_methods(false)
Helpers.public_instance_methods.each do |method|
- remove_method(method) if method_defined?(method)
+ remove_method(method) if context_methods.include?(method)
end
end
super(context)
end