Skip to content

Commit

Permalink
Create a new collection and reject the hooks we don't want
Browse files Browse the repository at this point in the history
- necessary due to changes in Ruby 1.9.3 (in dev)
- see http://redmine.ruby-lang.org/issues/show/4136
  • Loading branch information
sorah authored and dchelimsky committed Dec 23, 2010
1 parent 37a31cf commit 84bb15d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/rspec/core/hooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ def call(wrapped_example)

class HookCollection < Array
def find_hooks_for(group)
dup.reject {|hook| !hook.options_apply?(group)}
a = dup
a.reject! {|hook| !hook.options_apply?(group)}
a
end
end

Expand Down

0 comments on commit 84bb15d

Please sign in to comment.