summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index 90f8d69..3ac7d07 100644
--- a/eval.c
+++ b/eval.c
@@ -8511,13 +8511,13 @@ proc_to_s(self)
len += strlen(node->nd_file) + 2 + (SIZEOF_LONG*CHAR_BIT-NODE_LSHIFT)/3;
str = rb_str_new(0, len);
snprintf(RSTRING(str)->ptr, len+1,
- "#<%s:0x%lx@%s:%d>", cname, (VALUE)data->body,
+ "#<%s:0x%.*lx@%s:%d>", cname, w, (VALUE)data->body,
node->nd_file, nd_line(node));
}
else {
str = rb_str_new(0, len);
snprintf(RSTRING(str)->ptr, len+1,
- "#<%s:0x%lx>", cname, (VALUE)data->body);
+ "#<%s:0x%.*lx>", cname, w, (VALUE)data->body);
}
RSTRING(str)->len = strlen(RSTRING(str)->ptr);
if (OBJ_TAINTED(self)) OBJ_TAINT(str);