summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--proc.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0522ef4971..82ed8d396f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Jul 21 08:12:16 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+
+ * proc.c (proc_to_s): use PRIsVALUE to preserve the result encoding.
+
Sun Jul 21 03:36:18 2013 NARUSE, Yui <naruse@ruby-lang.org>
* hash.c (rb_hash_flatten): use NUM2INT to raise TypeError on 32bit
diff --git a/proc.c b/proc.c
index bcdcb3607c..c50f173dab 100644
--- a/proc.c
+++ b/proc.c
@@ -883,9 +883,8 @@ proc_to_s(VALUE self)
if (iseq->line_info_table) {
first_lineno = rb_iseq_first_lineno(iseq);
}
- str = rb_sprintf("#<%s:%p@%s:%d%s>", cname, (void *)self,
- RSTRING_PTR(iseq->location.path),
- first_lineno, is_lambda);
+ str = rb_sprintf("#<%s:%p@%"PRIsVALUE":%d%s>", cname, (void *)self,
+ iseq->location.path, first_lineno, is_lambda);
}
else {
str = rb_sprintf("#<%s:%p%s>", cname, (void *)proc->block.iseq,