Skip to content
  • eileencodes's avatar
    31dfc4f9
    Fix path encoding tests if Ruby version is 1.9.3 · 31dfc4f9
    eileencodes authored
    In Ruby 1.9.3 `#b` is not defined. The change I made to Rack (see
    rack/rack@b62cd8a) and Rails (see rails/rails#29062) won't work for Ruby
    1.9.3 because of this.
    
    For less than Ruby 2.0 we should skip the
    `test_normalize_path_maintains_string_encoding` test because it won't
    pass. `#b` will always be undefined for the Rack dependent change, and
    since the Rack change isn't present then Rails will see a bad request
    instead of a not found for the routing test.
    
    For the routing test we should handle it differently if it's Ruby 1.9.3
    (because then the behavior is clear). Ruby 1.9.3 will always return a
    bad request because we can't fix the problem in Rack. The routing test
    asserts the requests return a bad request in Ruby 1.9.3 or return the
    appropriate response in Ruby 2.0.0 and above.
    31dfc4f9
    Fix path encoding tests if Ruby version is 1.9.3
    eileencodes authored
    In Ruby 1.9.3 `#b` is not defined. The change I made to Rack (see
    rack/rack@b62cd8a) and Rails (see rails/rails#29062) won't work for Ruby
    1.9.3 because of this.
    
    For less than Ruby 2.0 we should skip the
    `test_normalize_path_maintains_string_encoding` test because it won't
    pass. `#b` will always be undefined for the Rack dependent change, and
    since the Rack change isn't present then Rails will see a bad request
    instead of a not found for the routing test.
    
    For the routing test we should handle it differently if it's Ruby 1.9.3
    (because then the behavior is clear). Ruby 1.9.3 will always return a
    bad request because we can't fix the problem in Rack. The routing test
    asserts the requests return a bad request in Ruby 1.9.3 or return the
    appropriate response in Ruby 2.0.0 and above.
Loading