summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-30 00:22:11 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-30 00:22:11 +0000
commit37cc18d54bf008cf4ab8e0c39829f96efdfe037e (patch)
tree128e41745a56411144f4622c5fb76a003c76c480 /lib
parented491f2c8620a8edd860be8a9161198b8d9a0dce (diff)
* lib/uri/ftp.rb (URI::FTP#initialize): raise InvalidURIError if "//"
is not present [ruby-core:47344] [Bug #6945] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/uri/ftp.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/uri/ftp.rb b/lib/uri/ftp.rb
index 26e4bb8326..971684a545 100644
--- a/lib/uri/ftp.rb
+++ b/lib/uri/ftp.rb
@@ -135,6 +135,7 @@ module URI
# +opaque+, +query+ and +fragment+, in that order.
#
def initialize(*arg)
+ raise InvalidURIError unless arg[5]
arg[5] = arg[5].sub(/^\//,'').sub(/^%2F/,'/')
super(*arg)
@typecode = nil