ruby-changes:14399
From: naruse <ko1@a...>
Date: Sat, 2 Jan 2010 01:03:44 +0900 (JST)
Subject: [ruby-changes:14399] Ruby:r26229 (trunk): * lib/uri/common.rb (initialize_regexp): allow leading
naruse 2010-01-02 01:00:46 +0900 (Sat, 02 Jan 2010) New Revision: 26229 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26229 Log: * lib/uri/common.rb (initialize_regexp): allow leading and trailing white space, and forbid extra characters on another lines. [ruby-core:26223] RFC 3986 Appendix C. Delimiting a URI in Context draft-duerst-iri-bis-07 7.2. Web Address processing Modified files: trunk/ChangeLog trunk/lib/uri/common.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 26228) +++ ChangeLog (revision 26229) @@ -1,3 +1,11 @@ +Sat Jan 2 00:43:22 2010 NARUSE, Yui <naruse@r...> + + * lib/uri/common.rb (initialize_regexp): allow leading + and trailing white space, and forbid extra characters + on another lines. [ruby-core:26223] + RFC 3986 Appendix C. Delimiting a URI in Context + draft-duerst-iri-bis-07 7.2. Web Address processing + Fri Jan 1 23:17:49 2010 NARUSE, Yui <naruse@r...> * lib/uri/generic.rb (URI#normalize!): normalize case of Index: lib/uri/common.rb =================================================================== --- lib/uri/common.rb (revision 26228) +++ lib/uri/common.rb (revision 26229) @@ -397,8 +397,8 @@ ret = {} # for URI::split - ret[:ABS_URI] = Regexp.new('^' + pattern[:X_ABS_URI] + '$', Regexp::EXTENDED) - ret[:REL_URI] = Regexp.new('^' + pattern[:X_REL_URI] + '$', Regexp::EXTENDED) + ret[:ABS_URI] = Regexp.new('\A\s*' + pattern[:X_ABS_URI] + '\s*\z', Regexp::EXTENDED) + ret[:REL_URI] = Regexp.new('\A\s*' + pattern[:X_REL_URI] + '\s*\z', Regexp::EXTENDED) # for URI::extract ret[:URI_REF] = Regexp.new(pattern[:URI_REF]) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/