From: Kouhei Yanagita Date: 2009-11-16T13:34:40+09:00 Subject: [ruby-dev:39704] [Bug #2374] URI.regexp('http') が 'http://' にマッチする Bug #2374: URI.regexp('http') が 'http://' にマッチする http://redmine.ruby-lang.org/issues/show/2374 起票者: Kouhei Yanagita ステータス: Open, 優先度: Normal カテゴリ: lib ruby -v: ruby 1.9.2dev (2009-11-16 trunk 25792) [i686-linux] URI.regexp('http') が 'http://' にマッチしますが、'http://' は有効な URI ではありません。 % ~/local/ruby-trunk/bin/ruby -v -ruri -e 'URI.regexp =~ "http://"; p $&' ruby 1.9.2dev (2009-11-16 trunk 25792) [i686-linux] "http://" http://www.ietf.org/rfc/rfc3986 [Page 20] If the URI scheme defines a default for host, then that default applies when the host subcomponent is undefined or when the registered name is empty (zero length). For example, the "file" URI scheme is defined so that no authority, an empty host, and "localhost" all mean the end-user's machine, whereas the "http" scheme considers a missing authority or empty host invalid. ---------------------------------------- http://redmine.ruby-lang.org