From: Rodrigo Rosenfeld Rosas Date: 2011-01-21T21:05:08+09:00 Subject: [ruby-core:34726] Re: [Ruby 1.9-Feature#4288][Open] Allow invoking arbitrary method names with foo."something" syntax Em 21-01-2011 07:37, Charles Oliver Nutter escreveu: > On Fri, Jan 21, 2011 at 2:50 AM, Stephen Sykes wrote: >> Yes, agree, if you want interpolation you can use send. >> >> But using double quotes leads to an expectation of interpolation does it not? >> So would not single quotes be a better proposal in that case? > Yes, you are correct :) > > foo.'something'() Actually, I think this is easy discoverable by the interpreter. For instance, the interpreter can convert foo.'something' or foo."something" or foo."#{'some'}thing" to foo.something, but foo."#{something}" would be converted to "foo.send :something". So, I would vote for the interpolation to be allowed... Additionally, I think that differently from "send", foo."#{something}" should not be allowed if "something" is a private method. Rodrigo.