[ruby-core:74441] Re: [Ruby trunk Feature#12125] Proposal: Shorthand operator for Object#method

From: Matthew Kerwin <matthew@...>
Date: 2016-03-17 21:22:39 UTC
List: ruby-core #74441
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.

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next