From: Matthew Kerwin Date: 2016-03-18T07:22:39+10:00 Subject: [ruby-core:74441] Re: [Ruby trunk Feature#12125] Proposal: Shorthand operator for Object#method --===============1910481250== Content-Type: multipart/alternative; boundary=001a113ee4fcf243f6052e453a48 --001a113ee4fcf243f6052e453a48 Content-Type: text/plain; charset=UTF-8 On 18/03/2016 6:54 AM, wrote: > > Issue #12125 has been updated by RP C. > > Another thought: Dir["/.c"].map(File.&basename) > Can someone please tell me what's wrong with ~~~ruby Dir["/.c"].map{|f| File.basename f } ~~~ ? There's being concise, and there's syntax sugar, but this is getting silly. --001a113ee4fcf243f6052e453a48 Content-Type: text/html; charset=UTF-8


On 18/03/2016 6:54 AM, <rpc@bewitching.me> wrote:
>
> Issue #12125 has been updated by RP C.
>
> Another thought: Dir["/.c"].map(File.&basename)
>

Can someone please tell me what's wrong with

~~~ruby
Dir["/.c"].map{|f| File.basename f }
~~~

?

There's being concise, and there's syntax sugar, but this is getting silly.

--001a113ee4fcf243f6052e453a48-- --===============1910481250== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline Unsubscribe: --===============1910481250==--