From: "marcandre (Marc-Andre Lafortune)" Date: 2013-02-07T00:06:06+09:00 Subject: [ruby-core:51924] [ruby-trunk - Bug #7773][Open] Calling send("attribute=", value) returns nil instead of value Issue #7773 has been updated by marcandre (Marc-Andre Lafortune). Category set to core Status changed from Feedback to Open Target version set to 2.0.0 nobu (Nobuyoshi Nakada) wrote: > Why do you consider it a bug? I don't know about Chris, but here is why I consider it a bug: * returning nil is less useful than value * it is less intuitive too (to me) * it is a change of behavior (possibly breaking some existing code) * this change of behavior was never announced, discussed or approved AFAIK * the referred commit has no stated or implied intention to change this * the referred commit has no test to that effect What I wonder is: why do you consider it could possibly be a feature? ---------------------------------------- Bug #7773: Calling send("attribute=", value) returns nil instead of value https://bugs.ruby-lang.org/issues/7773#change-35923 Author: gaffneyc (Chris Gaffney) Status: Open Priority: Normal Assignee: Category: core Target version: 2.0.0 ruby -v: 2.0.0-rc1 When calling an attribute writer created using either attr_accessor or attr_writer via send nil is returned from the send call instead of the new value. I've attached a test case that is failing on current head (51794) and 2.0.0-rc1. I've done a git bisect and it looks like commit 37228 (db1e99cd) is the first offending commit. I've been able to reproduce on OS X 10.8 and Ubuntu 12.04. -- http://bugs.ruby-lang.org/