Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #5433: mathn_rational.patch

File mathn_rational.patch, 1.0 kB (added by cliffmoon, 3 years ago)

Patch for redirect? failure when mathn and rational are used.

  • actionpack/test/controller/integration_test.rb

    old new  
    11require File.dirname(__FILE__) + '/../abstract_unit' 
     2require 'mathn' 
     3require 'rational' 
    24 
    35$:.unshift File.dirname(__FILE__) + '/../../../railties/lib' 
    46require 'action_controller/integration' 
  • actionpack/lib/action_controller/integration.rb

    old new  
    137137 
    138138      # Returns +true+ if the last response was a redirect. 
    139139      def redirect? 
    140         status/100 == 3 
     140        (300..399).include? status 
    141141      end 
    142142 
    143143      # Performs a GET request with the given parameters. The parameters may