aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/open-uri.rb3
-rw-r--r--test/open-uri/test_open-uri.rb4
3 files changed, 7 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 79584684e9..14881a0a4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Aug 8 17:19:57 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
+
+ * lib/open-uri.rb: remove needless condition for old ruby version.
+ * test/open-uri/test_open-uri.rb: ditto.
+
Fri Aug 8 16:40:59 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* lib/irb/init.rb: removed unreachable code.
diff --git a/lib/open-uri.rb b/lib/open-uri.rb
index f9822a9847..b793828063 100644
--- a/lib/open-uri.rb
+++ b/lib/open-uri.rb
@@ -256,8 +256,7 @@ module OpenURI
raise "Non-HTTP proxy URI: #{proxy_uri}" if proxy_uri.class != URI::HTTP
end
- if target.userinfo && "1.9.0" <= RUBY_VERSION
- # don't raise for 1.8 because compatibility.
+ if target.userinfo
raise ArgumentError, "userinfo not supported. [RFC3986]"
end
diff --git a/test/open-uri/test_open-uri.rb b/test/open-uri/test_open-uri.rb
index ff7fc3376e..4073754bd7 100644
--- a/test/open-uri/test_open-uri.rb
+++ b/test/open-uri/test_open-uri.rb
@@ -401,9 +401,7 @@ class TestOpenURI < Test::Unit::TestCase
end
def test_userinfo
- if "1.9.0" <= RUBY_VERSION
- assert_raise(ArgumentError) { open("http://user:pass@127.0.0.1/") {} }
- end
+ assert_raise(ArgumentError) { open("http://user:pass@127.0.0.1/") {} }
end
def test_progress