summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.c b/file.c
index 18e2735..cfa52e7 100644
--- a/file.c
+++ b/file.c
@@ -326,7 +326,7 @@ rb_stat_inspect(self)
if (i == 2) { /* mode */
char buf[32];
- sprintf(buf, "0%o", NUM2INT(v));
+ sprintf(buf, "0%lo", NUM2ULONG(v));
rb_str_buf_cat2(str, buf);
}
else if (i == 0 || i == 6) { /* dev/rdev */