franzejr / best-ruby

Ruby Tricks, Idiomatic Ruby, Refactoring and Best Practices
http://franzejr.github.io/best-ruby/
2.39k stars 219 forks source link

fix 2.3 #54

Closed nicolasmlv closed 8 years ago

franzejr commented 8 years ago

Thanks!

MarcosX commented 8 years ago

I believe that better than doing hash = {} before the inject would be hash = values.inject({}) ... because it can be misleading to have two variable with the same name.

Sorry to comment on a already merged issue.

franzejr commented 8 years ago

Could you fix it, Brizeno? On Jan 20, 2016 10:12 AM, "Marcos Brizeno" notifications@github.com wrote:

I believe that better than doing hash = {} before the inject would be hash = values.inject({}) ... because it can be misleading to have two variable with the same name.

Sorry to comment on a already merged issue.

— Reply to this email directly or view it on GitHub https://github.com/franzejr/best-ruby/pull/54#issuecomment-173198994.