[前][次][番号順一覧][スレッド一覧]

ruby-changes:24807

From: naruse <ko1@a...>
Date: Fri, 31 Aug 2012 01:21:58 +0900 (JST)
Subject: [ruby-changes:24807] naruse:r36857 (ruby_1_9_3): merge revision(s) 36852:

naruse	2012-08-31 01:21:44 +0900 (Fri, 31 Aug 2012)

  New Revision: 36857

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36857

  Log:
    merge revision(s) 36852:
    
    * lib/uri/ftp.rb (URI::FTP#initialize): raise InvalidURIError if "//"
      is not present [ruby-core:47344] [Bug #6945]

  Modified files:
    branches/ruby_1_9_3/ChangeLog
    branches/ruby_1_9_3/lib/uri/ftp.rb
    branches/ruby_1_9_3/test/uri/test_ftp.rb
    branches/ruby_1_9_3/version.h

Index: ruby_1_9_3/ChangeLog
===================================================================
--- ruby_1_9_3/ChangeLog	(revision 36856)
+++ ruby_1_9_3/ChangeLog	(revision 36857)
@@ -1,3 +1,8 @@
+Thu Aug 30 09:24:43 2012  NARUSE, Yui  <naruse@r...>
+
+	* 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@r...>
 
 	* test/webrick/test_cgi.rb (TestWEBrickCGI#start_cgi_server): there are
Index: ruby_1_9_3/lib/uri/ftp.rb
===================================================================
--- ruby_1_9_3/lib/uri/ftp.rb	(revision 36856)
+++ ruby_1_9_3/lib/uri/ftp.rb	(revision 36857)
@@ -135,6 +135,7 @@
     # +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
Index: ruby_1_9_3/version.h
===================================================================
--- ruby_1_9_3/version.h	(revision 36856)
+++ ruby_1_9_3/version.h	(revision 36857)
@@ -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"
 
Index: ruby_1_9_3/test/uri/test_ftp.rb
===================================================================
--- ruby_1_9_3/test/uri/test_ftp.rb	(revision 36856)
+++ ruby_1_9_3/test/uri/test_ftp.rb	(revision 36857)
@@ -27,6 +27,10 @@
     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.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]