Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Restore Ruby 1.9.1 compatibility

URI.decode_www_form_component and URI.encode_www_form_component were not
added until Ruby 1.9.2.
  • Loading branch information...
commit f043f32ce99c060d5bfac6e974cc050d1c327161 1 parent 5851aac
@sferik sferik authored
Showing with 3 additions and 4 deletions.
  1. +3 −3 lib/rack/utils.rb
  2. +0 −1  test/spec_utils.rb
View
6 lib/rack/utils.rb
@@ -1,12 +1,12 @@
# -*- encoding: binary -*-
-
require 'fileutils'
require 'set'
require 'tempfile'
-
require 'rack/multipart'
-if RUBY_VERSION[/^\d+\.\d+/] == '1.8'
+major, minor, patch = RUBY_VERSION.split('.')
+
+if (major == 1 && minor < 9) || (major == 1 && minor == 9 && patch < 2)
# pull in backports
require 'rack/backports/uri/common'
else
View
1  test/spec_utils.rb
@@ -1,5 +1,4 @@
# -*- encoding: utf-8 -*-
-
require 'rack/utils'
require 'rack/mock'
Please sign in to comment.
Something went wrong with that request. Please try again.