Skip to content

Commit

Permalink
Make Webrat::Core::Session#redirect? work in the face of rational maths.
Browse files Browse the repository at this point in the history
Such as when someone uses `ruby-units' and suddenly 302/100 becomes 151/50.
  • Loading branch information
pdcawley committed May 27, 2009
1 parent fd431f2 commit 58601c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/webrat/core/session.rb
Expand Up @@ -143,7 +143,7 @@ def success_code? #:nodoc:
end

def redirect? #:nodoc:
response_code / 100 == 3
(response_code / 100).to_i == 3
end

def internal_redirect?
Expand Down

0 comments on commit 58601c4

Please sign in to comment.