ruby-changes:3727
From: ko1@a...
Date: Thu, 24 Jan 2008 19:36:47 +0900 (JST)
Subject: [ruby-changes:3727] nobu - Ruby:r15216 (ruby_1_8, trunk): * lib/uri/generic.rb (URI::Generic::inspect): use Kernel#to_s instead
nobu 2008-01-24 19:36:24 +0900 (Thu, 24 Jan 2008) New Revision: 15216 Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/lib/uri/generic.rb branches/ruby_1_8/version.h trunk/ChangeLog trunk/lib/uri/generic.rb Log: * lib/uri/generic.rb (URI::Generic::inspect): use Kernel#to_s instead object_id with printf. [ruby-dev:33347] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/lib/uri/generic.rb?r1=15216&r2=15215&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=15216&r2=15215&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15216&r2=15215&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/uri/generic.rb?r1=15216&r2=15215&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/version.h?r1=15216&r2=15215&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 15215) +++ ChangeLog (revision 15216) @@ -1,3 +1,8 @@ +Thu Jan 24 19:36:22 2008 Nobuyoshi Nakada <nobu@r...> + + * lib/uri/generic.rb (URI::Generic::inspect): use Kernel#to_s instead + object_id with printf. [ruby-dev:33347] + Thu Jan 24 19:29:20 2008 Nobuyoshi Nakada <nobu@r...> * sprintf.c (remove_sign_bits): returns pointer to the first char to Index: lib/uri/generic.rb =================================================================== --- lib/uri/generic.rb (revision 15215) +++ lib/uri/generic.rb (revision 15216) @@ -1103,8 +1103,9 @@ 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) Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 15215) +++ ruby_1_8/ChangeLog (revision 15216) @@ -1,3 +1,8 @@ +Thu Jan 24 19:36:22 2008 Nobuyoshi Nakada <nobu@r...> + + * lib/uri/generic.rb (URI::Generic::inspect): use Kernel#to_s instead + object_id with printf. [ruby-dev:33347] + Tue Jan 22 11:22:47 2008 NAKAMURA Usaku <usa@r...> * win32/setup.mak ($(ARCH)): if a macro is appended by $(APPEND), Index: ruby_1_8/version.h =================================================================== --- ruby_1_8/version.h (revision 15215) +++ ruby_1_8/version.h (revision 15216) @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.8.6" -#define RUBY_RELEASE_DATE "2008-01-22" +#define RUBY_RELEASE_DATE "2008-01-24" #define RUBY_VERSION_CODE 186 -#define RUBY_RELEASE_CODE 20080122 +#define RUBY_RELEASE_CODE 20080124 #define RUBY_PATCHLEVEL 5000 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 6 #define RUBY_RELEASE_YEAR 2008 #define RUBY_RELEASE_MONTH 1 -#define RUBY_RELEASE_DAY 22 +#define RUBY_RELEASE_DAY 24 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; Index: ruby_1_8/lib/uri/generic.rb =================================================================== --- ruby_1_8/lib/uri/generic.rb (revision 15215) +++ ruby_1_8/lib/uri/generic.rb (revision 15216) @@ -1103,8 +1103,9 @@ 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/