pp suggestion: classes with variables

D

David Garamond

How about including the class name in the pp output for classes which
have variables (example: object A below)? Because otherwise it's not
always obvious that it's "A".

$ ruby -v
ruby 1.8.1 (2004-01-01) [i686-linux-gnu]

$ irb
irb(main):001:0> require 'pp'
irb(main):002:0> class A; @v1="1"; @v2="2"; end
irb(main):003:0> class B; end
irb(main):004:0> pp A
#<Class:0x4036ca74 @v1="1", @v2="2">
irb(main):005:0> pp B
B
irb(main):006:0> p A
A
irb(main):007:0> p B
B
 
T

Tanaka Akira

David Garamond said:
How about including the class name in the pp output for classes which
have variables (example: object A below)? Because otherwise it's not
always obvious that it's "A".

It's a bug. Thank you for the report.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,142
Messages
2,570,819
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top