Skip to content

Commit

Permalink
Correctly undefine methods for rebinding
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe authored and myronmarston committed Feb 9, 2014
1 parent 8b190a5 commit 19e3f08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rspec/core/formatters/legacy_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def self.append_features(other)
clashing_methods = (self.instance_methods & other.instance_methods).
map { |name| [name,other.instance_method(name)] }.
reject { |name, meth| our_formatters.include? meth.owner }
clashing_methods.each do |name, _|
other.__send__ :undef_method, name
clashing_methods.each do |name, meth|
meth.owner.__send__ :remove_method, name
end

# implement all of our methods
Expand Down

0 comments on commit 19e3f08

Please sign in to comment.