The example came from [ruby-talk:293497] and because I've not seen it in
 ruby-bug, I post it here


vgs% cat b.rb
module A
  @@num = 10

  def self.get_num
     @@num
  end

  def self.set_num(x)
    @@num = x
  end

end

B = A.dup

B.set_num("hello")
puts A.get_num
puts B.get_num

A.set_num("goodbye")
puts A.get_num
puts B.get_num
vgs% 

vgs% ./ruby -v b.rb
ruby 1.9.0 (2008-03-08 revision 15732) [i686-linux]
hello
hello
goodbye
goodbye
vgs% 

vgs% ./ruby -v b.rb
ruby 1.8.6 (2008-03-08 patchlevel 5000) [i686-linux]
hello
hello
goodbye
goodbye
vgs% 


 Same problem with constants.


Guy Decoux