3 ms·
Please also note that t.send(:attr=, 5) returns 10. When you do t.attr = x Ruby sends :attr= with x as the argument to t and then ignores the return value of t
by grn 14y ago
Please also note that t.send(:attr=, 5) returns 10.
When you do t.attr = x Ruby sends :attr= with x as the argument to t and then ignores the return value of the message and returns x instead.