franzejr / best-ruby

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

Implicit return as idiomatic ruby #46

Closed MarcosX closed 8 years ago

MarcosX commented 8 years ago

In ruby we can omit the return keyword, so in this idiomatic code I wanted to show a few things about when return is merely aesthetic and when it actually matter.

franzejr commented 8 years ago

Awesome, @MarcosX! :+1:

filipebarcos commented 8 years ago

good! :+1:

rthbound commented 8 years ago

@MarcosX I caught some english/grammar inconsistencies in your commit (see comments)... would you mind fixing those before this gets merged?

MarcosX commented 8 years ago

Thanks for your comments @rthbound.

rthbound commented 8 years ago

Anytime @MarcosX... last thing (probably) -- could you squash your 3 commits into 1, then git push force to update your PR?

MarcosX commented 8 years ago

yep, good call.

franzejr commented 8 years ago

Thanks!