summaryrefslogtreecommitdiff
path: root/lib/optparse/uri.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-07 00:47:41 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-07 00:47:41 +0000
commit0a85c658591d8b0763423a419dd96a9b957c3918 (patch)
treefe813b9a43dc4c5c141e7c3dd6b1108cece36414 /lib/optparse/uri.rb
parent30bc60cfe4fed09e714621d2564b7edc4fb6eafa (diff)
* lib/optparse/uri.rb: require standard uri module. thanks to
Minero Aoki. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/optparse/uri.rb')
-rw-r--r--lib/optparse/uri.rb15
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/optparse/uri.rb b/lib/optparse/uri.rb
index bba0db209d..b24de88b76 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}