summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-24 10:36:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-24 10:36:24 +0000
commit488db7997d32e8cd5a9da01ccc40cc133c030205 (patch)
treecc7b6a75d8fc95ff0a8341edc75968d17ca8f357 /lib
parent94eed2b622b36881fdae73142b41bc23738e90b2 (diff)
* lib/uri/generic.rb (URI::Generic::inspect): use Kernel#to_s instead
object_id with printf. [ruby-dev:33347] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/uri/generic.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/uri/generic.rb b/lib/uri/generic.rb
index 2b66adeb93..88b5078466 100644
--- a/lib/uri/generic.rb
+++ b/lib/uri/generic.rb
@@ -1103,8 +1103,9 @@ module URI
end
end
+ @@to_s = Kernel.instance_method(:to_s)
def inspect
- sprintf("#<%s:%#0x URL:%s>", self.class.to_s, self.object_id, self.to_s)
+ @@to_s.bind(self).call.sub!(/>\z/) {" URL:#{self}>"}
end
def coerce(oth)