Skip to content

Commit

Permalink
Avoid causing method redefinition warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Oct 13, 2021
1 parent 019bbae commit 4f07fb9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/sprockets/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ def module_include(base, mod)

mod.instance_methods.each do |sym|
method = mod.instance_method(sym)
if base.method_defined?(sym)
base.send(:alias_method, sym, sym)
end
base.send(:define_method, sym, method)
end

Expand Down

0 comments on commit 4f07fb9

Please sign in to comment.