summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-11 06:23:18 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-11 06:23:18 +0000
commiteda452e81b2e895a64d8580609c25542126bcae5 (patch)
treeba66f34df5ded8bed7f3ecf34a8667f7ac0027f2 /lib
parentab52f186dc314e5a37adea80c83f619bf4631c1c (diff)
merge revision(s) 15216:
* 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_6@17096 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 2b66ade..88b5078 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)