diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-08-07 00:47:41 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-08-07 00:47:41 +0000 |
| commit | 95f37c83fb9a11ab750ef59845414fedccee6cce (patch) | |
| tree | fe813b9a43dc4c5c141e7c3dd6b1108cece36414 | |
| parent | b619670058ed02ce63904b7ed9bf056fc3dbe2c7 (diff) | |
| download | ruby-95f37c83fb9a11ab750ef59845414fedccee6cce.tar.gz ruby-95f37c83fb9a11ab750ef59845414fedccee6cce.tar.xz ruby-95f37c83fb9a11ab750ef59845414fedccee6cce.zip | |
* lib/optparse/uri.rb: require standard uri module. thanks to
Minero Aoki.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | lib/optparse/uri.rb | 15 |
2 files changed, 8 insertions, 12 deletions
@@ -1,3 +1,8 @@ +Wed Aug 7 09:45:24 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net> + + * lib/optparse/uri.rb: require standard uri module. thanks to + Minero Aoki. + Wed Aug 7 08:44:32 2002 Minero Aoki <aamine@loveruby.net> * ext/racc/cparse/cparse.c: reduce goto. diff --git a/lib/optparse/uri.rb b/lib/optparse/uri.rb index bba0db209..b24de88b7 100644 --- a/lib/optparse/uri.rb +++ b/lib/optparse/uri.rb @@ -1,15 +1,6 @@ # -*- ruby -*- require 'optparse' -unless defined?(URI) - begin - require 'URI/uri' # Akira Yamada version. - rescue LoadError - require 'uri/uri' # Tomoyuki Kosimizu version. - end -end -if URI.respond_to?(:parse) - OptionParser.accept(URI) {|s| [URI.parse(s)] if s} -else - OptionParser.accept(URI) {|s| [URI.create(s)] if s} -end +require 'uri' + +OptionParser.accept(URI) {|s| [URI.parse(s)] if s} |
