diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-11 06:23:18 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-11 06:23:18 +0000 |
commit | eda452e81b2e895a64d8580609c25542126bcae5 (patch) | |
tree | ba66f34df5ded8bed7f3ecf34a8667f7ac0027f2 /lib/uri | |
parent | ab52f186dc314e5a37adea80c83f619bf4631c1c (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/uri')
-rw-r--r-- | lib/uri/generic.rb | 3 |
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) |