R
Ralph Shnelvar
Consider this irb session
C:\InstantRails-2.0-win\rails_apps>irb
irb(main):001:0> class M
irb(main):002:1> @w = "ralph"
irb(main):003:1>
irb(main):004:1* def M.v
irb(main):005:2> @w
irb(main):006:2> end
irb(main):007:1>
irb(main):008:1* end
=> nil
irb(main):009:0>
irb(main):010:0* puts M.v
ralph
=> nil
irb(main):011:0> puts M::v
ralph
=> nil
I think I understand M.v but what does M::v mean? Is there a semantic and/or philosophical difference between the two?
C:\InstantRails-2.0-win\rails_apps>irb
irb(main):001:0> class M
irb(main):002:1> @w = "ralph"
irb(main):003:1>
irb(main):004:1* def M.v
irb(main):005:2> @w
irb(main):006:2> end
irb(main):007:1>
irb(main):008:1* end
=> nil
irb(main):009:0>
irb(main):010:0* puts M.v
ralph
=> nil
irb(main):011:0> puts M::v
ralph
=> nil
I think I understand M.v but what does M::v mean? Is there a semantic and/or philosophical difference between the two?