Permalink
Browse files

what's wrong with super?

  • Loading branch information...
1 parent cad36b9 commit 5cfdcd361ab9866cb3958eff41f64eccb0dc0930 @dchelimsky dchelimsky committed Mar 11, 2010
Showing with 2 additions and 6 deletions.
  1. +2 −6 lib/rspec/matchers/matcher.rb
@@ -22,13 +22,9 @@ def initialize(name, *expected, &declarations)
end
end
- # This allows access to running_example
- alias_method :old_instance_exec, :instance_exec
def instance_exec(*args, &block)
- instance_eval {
- self.running_example ||= eval("running_example", block.binding) rescue nil
- old_instance_exec(*args, &block)
- }
+ self.running_example ||= eval("running_example", block.binding) rescue nil
+ super(*args, &block)
end
#Used internally by objects returns by +should+ and +should_not+.

0 comments on commit 5cfdcd3

Please sign in to comment.