The Pickaxe implies this, but I thought it would be wise to make
sure…
Suppose I use Struct to generate a class and then create an instance
of the class like this:
F = Struct.new(‘F’, :x, :y, :z)
f1 = F.new(1,2,3)
Can I be sure that f1.to_a returns [1,2,3] and never [3,2,1] or
[2,3,1]? That is, does F#to_a guarantee that the values in the array
are in the same order that the instance variables were specified to
Struct.new?
Same for F#members. Will the strings in the array be in the same order
that the symbols were specified to Struct.new?