D
Daniel Berger
Hi all,
Ruby 1.8.2
Windows XP Pro
This should work out of the box, shouldn't it?
irb(main):001:0> File.stat("test.rb")
=> #<File::Stat dev=0x2, ino=0, mode=0100644, nlink=1, uid=0, gid=0,
rdev=0x2, size=719, blksize=nil, blocks=nil, atime=Fri Feb 04 19:33:07
Mountain Standard Time 2005, mtime=Fri Feb 04 19:21:03 Mountain
Standard Time 2005, ctime=Fri Feb 0419:33:07 Mountain Standard Time
2005>
irb(main):002:0> require "pp"
=> true
irb(main):003:0> pp File.stat("test.rb")
#<File::StatNoMethodError: undefined method `name' for nil:NilClass
from c:/ruby/lib/ruby/1.8/pp.rb:410:in `pretty_print'
from c:/ruby/lib/ruby/1.8/pp.rb:407:in `group'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:223:in `nest'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:223:in `group'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:222:in `group_sub'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:222:in `group'
from c:/ruby/lib/ruby/1.8/pp.rb:407:in `pretty_print'
from c:/ruby/lib/ruby/1.8/pp.rb:382:in `group'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:223:in `nest'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:223:in `group'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:222:in `group_sub'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:222:in `group'
from c:/ruby/lib/ruby/1.8/pp.rb:218:in `object_group'
from c:/ruby/lib/ruby/1.8/pp.rb:382:in `pretty_print'
from c:/ruby/lib/ruby/1.8/pp.rb:211:in `pp'
from c:/ruby/lib/ruby/1.8/pp.rb:211:in `group'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:223:in `nest'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:223:in `group'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:222:in `group_sub'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:222:in `group'
from c:/ruby/lib/ruby/1.8/pp.rb:211:in `pp'
from c:/ruby/lib/ruby/1.8/pp.rb:165:in `pp'
from c:/ruby/lib/ruby/1.8/pp.rb:165:in `guard_inspect_key'
from c:/ruby/lib/ruby/1.8/pp.rb:165:in `pp'
from c:/ruby/lib/ruby/1.8/pp.rb:155:in `pp'
from c:/ruby/lib/ruby/1.8/pp.rb:154:in `each'
from c:/ruby/lib/ruby/1.8/pp.rb:154:in `pp'
This isn't an irb issue, because it does the same thing if run as a
standalone script.
I thought "pp" worked for just about everything. Why is this failing?
Regards,
Dan
Ruby 1.8.2
Windows XP Pro
This should work out of the box, shouldn't it?
irb(main):001:0> File.stat("test.rb")
=> #<File::Stat dev=0x2, ino=0, mode=0100644, nlink=1, uid=0, gid=0,
rdev=0x2, size=719, blksize=nil, blocks=nil, atime=Fri Feb 04 19:33:07
Mountain Standard Time 2005, mtime=Fri Feb 04 19:21:03 Mountain
Standard Time 2005, ctime=Fri Feb 0419:33:07 Mountain Standard Time
2005>
irb(main):002:0> require "pp"
=> true
irb(main):003:0> pp File.stat("test.rb")
#<File::StatNoMethodError: undefined method `name' for nil:NilClass
from c:/ruby/lib/ruby/1.8/pp.rb:410:in `pretty_print'
from c:/ruby/lib/ruby/1.8/pp.rb:407:in `group'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:223:in `nest'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:223:in `group'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:222:in `group_sub'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:222:in `group'
from c:/ruby/lib/ruby/1.8/pp.rb:407:in `pretty_print'
from c:/ruby/lib/ruby/1.8/pp.rb:382:in `group'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:223:in `nest'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:223:in `group'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:222:in `group_sub'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:222:in `group'
from c:/ruby/lib/ruby/1.8/pp.rb:218:in `object_group'
from c:/ruby/lib/ruby/1.8/pp.rb:382:in `pretty_print'
from c:/ruby/lib/ruby/1.8/pp.rb:211:in `pp'
from c:/ruby/lib/ruby/1.8/pp.rb:211:in `group'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:223:in `nest'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:223:in `group'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:222:in `group_sub'
from c:/ruby/lib/ruby/1.8/prettyprint.rb:222:in `group'
from c:/ruby/lib/ruby/1.8/pp.rb:211:in `pp'
from c:/ruby/lib/ruby/1.8/pp.rb:165:in `pp'
from c:/ruby/lib/ruby/1.8/pp.rb:165:in `guard_inspect_key'
from c:/ruby/lib/ruby/1.8/pp.rb:165:in `pp'
from c:/ruby/lib/ruby/1.8/pp.rb:155:in `pp'
from c:/ruby/lib/ruby/1.8/pp.rb:154:in `each'
from c:/ruby/lib/ruby/1.8/pp.rb:154:in `pp'
This isn't an irb issue, because it does the same thing if run as a
standalone script.
I thought "pp" worked for just about everything. Why is this failing?
Regards,
Dan