Agreed. I understand exactly what you're saying, and I don't dispute the semantics.
I guess my only problem is that in this case "t.attr" isn't really equal to 5, therefore making
a = t.attr = 5
differ from t.attr = 5
a = t.attr
which to a novice would appear equivalent. 99.9% of the time you wouldn't expect assignment to have side-effects. But in my eyes Ruby gives you so much power to use responsibly, it appears out of character to disallow it in this instance. (Note: I had to forgo a little trick with ActiveRecord that would've reduced duplication because of this.)In the grand scheme of things, it's not a big deal. But it was very interesting to me. :)