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

ruby-changes:30008

From: ktsj <ko1@a...>
Date: Fri, 19 Jul 2013 14:21:47 +0900 (JST)
Subject: [ruby-changes:30008] ktsj:r42060 (trunk): * ext/pathname/pathname.c (path_inspect): use PRIsVALUE to preserve

ktsj	2013-07-19 14:21:38 +0900 (Fri, 19 Jul 2013)

  New Revision: 42060

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42060

  Log:
    * ext/pathname/pathname.c (path_inspect): use PRIsVALUE to preserve
      the result encoding.

  Modified files:
    trunk/ChangeLog
    trunk/ext/pathname/pathname.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42059)
+++ ChangeLog	(revision 42060)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Jul 19 14:19:48 2013  Kazuki Tsujimoto  <kazuki@c...>
+
+	* ext/pathname/pathname.c (path_inspect): use PRIsVALUE to preserve
+	  the result encoding.
+
 Fri Jul 19 12:35:41 2013  Tanaka Akira  <akr@f...>
 
 	* test/socket/test_tcp.rb (test_initialize_failure): Use EADDRNOTAVAIL
Index: ext/pathname/pathname.c
===================================================================
--- ext/pathname/pathname.c	(revision 42059)
+++ ext/pathname/pathname.c	(revision 42060)
@@ -183,7 +183,7 @@ path_inspect(VALUE self) https://github.com/ruby/ruby/blob/trunk/ext/pathname/pathname.c#L183
 {
     const char *c = rb_obj_classname(self);
     VALUE str = get_strpath(self);
-    return rb_sprintf("#<%s:%s>", c, RSTRING_PTR(str));
+    return rb_sprintf("#<%s:%"PRIsVALUE">", c, str);
 }
 
 /*

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

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