summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-01-29 10:01:41 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-01-29 10:01:41 +0000
commit46d98fe87b33796f4299985f962ae615bd363bbd (patch)
treea3a89541bead812f4fe2bdb51c7ec2d8f8b0ce13 /lib
parent94acb9c6bc5927b118510d0d4f0c8700748c0abf (diff)
* lib/pp.rb: don't print a mode File::Stat as decimal number.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/pp.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pp.rb b/lib/pp.rb
index 7178c5c78a..995d0df710 100644
--- a/lib/pp.rb
+++ b/lib/pp.rb
@@ -361,10 +361,10 @@ class File
pp.breakable
pp.group {
m = self.mode
- pp.text "mode="; pp.pp m
+ pp.text "mode="; pp.text sprintf("0%o", m)
pp.breakable
- pp.text sprintf("(0%o %s %c%c%c%c%c%c%c%c%c)",
- m, self.ftype,
+ pp.text sprintf("(%s %c%c%c%c%c%c%c%c%c)",
+ self.ftype,
(m & 0400 == 0 ? ?- : ?r),
(m & 0200 == 0 ? ?- : ?w),
(m & 0100 == 0 ? (m & 04000 == 0 ? ?- : ?S) :