Skip to content

Commit

Permalink
supporting regular expressions and stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Sep 8, 2008
1 parent 6bf89e3 commit d954e01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/www/mechanize/page.rb
Expand Up @@ -63,7 +63,7 @@ def content_type
def #{type}_with(criteria)
criteria = {:name => criteria} if String === criteria
f = #{type}s.find do |thing|
criteria.all? { |k,v| thing.send(k) == v }
criteria.all? { |k,v| v === thing.send(k) }
end
yield f if block_given?
f
Expand Down

0 comments on commit d954e01

Please sign in to comment.