[前][次][番号順一覧][スレッド一覧]

ruby-changes:5590

From: shyouhei <ko1@a...>
Date: Wed, 11 Jun 2008 15:23:30 +0900 (JST)
Subject: [ruby-changes:5590] Ruby:r17096 (ruby_1_8_6): merge revision(s) 15216:

shyouhei	2008-06-11 15:23:18 +0900 (Wed, 11 Jun 2008)

  New Revision: 17096

  Modified files:
    branches/ruby_1_8_6/ChangeLog
    branches/ruby_1_8_6/lib/uri/generic.rb
    branches/ruby_1_8_6/version.h

  Log:
    merge revision(s) 15216:
    * 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_6/ChangeLog?r1=17096&r2=17095&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/version.h?r1=17096&r2=17095&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/lib/uri/generic.rb?r1=17096&r2=17095&diff_format=u

Index: ruby_1_8_6/ChangeLog
===================================================================
--- ruby_1_8_6/ChangeLog	(revision 17095)
+++ ruby_1_8_6/ChangeLog	(revision 17096)
@@ -1,3 +1,8 @@
+Wed Jun 11 15:23:13 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/uri/generic.rb (URI::Generic::inspect): use Kernel#to_s instead
+	 object_id with printf.  [ruby-dev:33347]
+
 Wed Jun 11 15:00:55 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* configure.in: Remove wrong assumptions about Cygwin.  a patch from
Index: ruby_1_8_6/version.h
===================================================================
--- ruby_1_8_6/version.h	(revision 17095)
+++ ruby_1_8_6/version.h	(revision 17096)
@@ -2,7 +2,7 @@
 #define RUBY_RELEASE_DATE "2008-06-11"
 #define RUBY_VERSION_CODE 186
 #define RUBY_RELEASE_CODE 20080611
-#define RUBY_PATCHLEVEL 168
+#define RUBY_PATCHLEVEL 169
 
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 8
Index: ruby_1_8_6/lib/uri/generic.rb
===================================================================
--- ruby_1_8_6/lib/uri/generic.rb	(revision 17095)
+++ ruby_1_8_6/lib/uri/generic.rb	(revision 17096)
@@ -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/

[前][次][番号順一覧][スレッド一覧]