Can this work for constants as well? I have a several constants within a 
long class name and I was wondering whether I can use this approach, but 
it doesn't seem to be working for me:

irb(main):001:0> class A
irb(main):002:1> B = 1
irb(main):003:1> end
=> 1
irb(main):004:0> A::B
=> 1
irb(main):005:0> A.new.instance_eval do
irb(main):006:1* puts B
irb(main):007:1> end
NameError: uninitialized constant B
        from (irb):6:in `block in irb_binding'
        from (irb):5:in `instance_eval'
        from (irb):5
        from C:/Ruby193/bin/irb:12:in `<main>'

-- 
Posted via http://www.ruby-forum.com/.