diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-01-31 04:24:04 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-01-31 04:24:04 +0000 |
commit | caa76f71fb8e5d260ee29cfb8c8458a2be909713 (patch) | |
tree | 08378b9ea4c32e384e63b0c8c5225ea99d6d2a48 /lib/pp.rb | |
parent | 33158860f4650d7221e80ff0ae7eb376f31b2394 (diff) | |
download | ruby-caa76f71fb8e5d260ee29cfb8c8458a2be909713.tar.gz |
* lib/pp.rb (File::Stat#pretty_print): print rdev_major and rdev_minor.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/pp.rb')
-rw-r--r-- | lib/pp.rb | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -361,7 +361,7 @@ class File pp.breakable pp.group { m = self.mode - pp.text "mode="; pp.text sprintf("0%o", m) + pp.text sprintf("mode=0%o", m) pp.breakable pp.text sprintf("(%s %c%c%c%c%c%c%c%c%c)", self.ftype, @@ -400,7 +400,13 @@ class File end pp.text ',' } - pp.breakable; pp.text "rdev="; pp.pp self.rdev; pp.text ',' + pp.breakable + pp.group { + pp.text sprintf("rdev=0x%x", self.rdev) + pp.breakable + pp.text sprintf('(%d, %d)', self.rdev_major, self.rdev_minor) + pp.text ',' + } pp.breakable; pp.text "size="; pp.pp self.size; pp.text ',' pp.breakable; pp.text "blksize="; pp.pp self.blksize; pp.text ',' pp.breakable; pp.text "blocks="; pp.pp self.blocks; pp.text ',' |