by ddfreyne · 15y ago · 0 comments
crit1 = Criteria.new.where(:name => 'Jeff')
crit2 = crit1.where(:age => 19)
would result in two different criteria, which is not the case. “crit2 is the original criteria where age is 19” makes sense, but I would not expect that to update crit1.I don’t mind mutability per se, but it needs to be clear what data is mutable and when it is mutated.
No comments yet.