diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-30 16:21:44 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-30 16:21:44 +0000 |
commit | bed2ff29bac1a9b55c4091adf7d693c1b00087ae (patch) | |
tree | ea4b86df62e1e5813426082dbc9b1b48478368e4 | |
parent | 7f9630172c5785bf4edf25369b3a9d0c45bfea6b (diff) |
merge revision(s) 36852:
* 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/branches/ruby_1_9_3@36857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/uri/ftp.rb | 1 | ||||
-rw-r--r-- | test/uri/test_ftp.rb | 4 | ||||
-rw-r--r-- | version.h | 6 |
4 files changed, 13 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Thu Aug 30 09:24:43 2012 NARUSE, Yui <naruse@ruby-lang.org> + + * lib/uri/ftp.rb (URI::FTP#initialize): raise InvalidURIError if "//" + is not present [ruby-core:47344] [Bug #6945] + Tue Aug 28 00:40:14 2012 NAKAMURA Usaku <usa@ruby-lang.org> * test/webrick/test_cgi.rb (TestWEBrickCGI#start_cgi_server): there are 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 diff --git a/test/uri/test_ftp.rb b/test/uri/test_ftp.rb index 0d76c4497b..cc6843e60f 100644 --- a/test/uri/test_ftp.rb +++ b/test/uri/test_ftp.rb @@ -27,6 +27,10 @@ class TestFTP < Test::Unit::TestCase assert_equal('pass', url.password) end + def test_parse_invalid + assert_raise(InvalidURIError){URI.parse('ftp:example')} + end + def test_paths # If you think what's below is wrong, please read RubyForge bug 2055, # RFC 1738 section 3.2.2, and RFC 2396. @@ -1,10 +1,10 @@ #define RUBY_VERSION "1.9.3" -#define RUBY_PATCHLEVEL 264 +#define RUBY_PATCHLEVEL 265 -#define RUBY_RELEASE_DATE "2012-08-28" +#define RUBY_RELEASE_DATE "2012-08-30" #define RUBY_RELEASE_YEAR 2012 #define RUBY_RELEASE_MONTH 8 -#define RUBY_RELEASE_DAY 28 +#define RUBY_RELEASE_DAY 30 #include "ruby/version.h" |