Bugs: Browse | Submit New | Admin
In Ruby 1.8.4, 1.8.5, and as of 1.9.0 (2006-04-15): class A < String attr_accessor :x end a = A.new 'hello' a.x = 5 s = Set[a] puts a.x # => 5 puts s.to_a[0].x # => nil I would expect the second puts to return 5, not nil. In fact, I'd expect s.to_a[0] to return the same object as a.
Add A Comment:
Date: 2007-08-11 19:14 Sender: Shyouhei Urabe Assigning to matz; see [ruby-core:9716]