rails/rails — pull request #11342 by spajus (2013-07-07 09:24:49+00:00)
Title: Make some activesupport core_ext collection operations more idiomatic

While analyzing activesupport I've discovered some parts that could be rewritten using `map(&:method)` instead of `map { |var| var.method }`. It is more idiomatic and seems to introduce a slight performance boost:

```
vars = Object.methods
Benchmark.realtime { 100000.times { vars.map { |var| var.to_s } } }
=> 2.04459
Benchmark.realtime { 100000.times { vars.map { |var| var.to_s } } }
=> 2.048889
Benchmark.realtime { 100000.times { vars.map(&:to_s) } }
=> 1.917303
Benchmark.realtime { 100000.times { vars.map(&:to_s) } }
=> 1.944543
```

Ran activesupport tests, all passed.