summaryrefslogtreecommitdiff
path: root/lib/pp.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-01-31 04:24:04 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-01-31 04:24:04 +0000
commitcaa76f71fb8e5d260ee29cfb8c8458a2be909713 (patch)
tree08378b9ea4c32e384e63b0c8c5225ea99d6d2a48 /lib/pp.rb
parent33158860f4650d7221e80ff0ae7eb376f31b2394 (diff)
downloadruby-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.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/pp.rb b/lib/pp.rb
index 995d0df710..82470ce909 100644
--- a/lib/pp.rb
+++ b/lib/pp.rb
@@ -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 ','