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 /lib/optparse/uri.rb | |
| 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
Diffstat (limited to 'lib/optparse/uri.rb')
| -rw-r--r-- | lib/optparse/uri.rb | 15 |
1 files changed, 3 insertions, 12 deletions
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} |
