summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-01 06:03:03 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-01 06:03:03 +0000
commit9f0d9bd7111ecfbc087cc4dfe6b4d46e8b98800f (patch)
treeec2aadfdc8488f26e27777b91b415c2f2eb0521f /file.c
parent3d51761abd3bbda185410dd980e2e064b848ad02 (diff)
downloadbundler-9f0d9bd7111ecfbc087cc4dfe6b4d46e8b98800f.tar.gz
* file.c (rb_stat_inspect): print dev, rdev in hexadecimal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/file.c b/file.c
index 13cca0fa47..ddd282c6c9 100644
--- a/file.c
+++ b/file.c
@@ -332,6 +332,12 @@ rb_stat_inspect(self)
sprintf(buf, "0%o", NUM2INT(v));
rb_str_buf_cat2(str, buf);
}
+ else if (i == 0 || i == 6) { /* dev/rdev */
+ char buf[32];
+
+ sprintf(buf, "0x%x", NUM2ULONG(v));
+ rb_str_buf_cat2(str, buf);
+ }
else {
rb_str_append(str, rb_inspect(v));
}