4 ms·
The alternative is making a = t.attr = 5 different from t.attr = 5 a = 5 which is most often what someone means when they write a chained assignment.
by chc 14y ago
The alternative is making
a = t.attr = 5
different from
t.attr = 5
a = 5
which is most often what someone means when they write a chained assignment. It's all part of the "principle of least surprise" that Rubyists used to tout so much — but unfortunately, different people find different things surprising.