Skip to content

Commit

Permalink
Merge branch 'master' of github.com:infochimps-labs/style_guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip (flip) Kromer committed Apr 3, 2012
2 parents d71b482 + ca4370a commit 97bc68c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ruby-style-guide.md
Expand Up @@ -778,6 +778,8 @@ literal syntax.
* You should use the new lambda literal syntax *unless* 1.8-compatibility is
required. Omit parentheses if there are no arguments to the block.
Avoid situations where understanding the subtle differences between Procs and lambda is required, i.e. returning.
Prefer `->` over `lambda` over `Proc.new`.
```Ruby
# bad
Expand Down Expand Up @@ -850,7 +852,7 @@ literal syntax.
```
* Prefer `map` over `collect`, `find` over `detect`, `select` over
`find_all`, `reduce` over `inject` and `size` over `length`. This is
`find_all`, `inject` over `reduce`. No preference between `size` and `length`. This is
not a hard requirement; if the use of the alias enhances
readability, it's ok to use it. The rhyming methods are inherited from
Smalltalk and are not common in other programming languages. The
Expand Down

0 comments on commit 97bc68c

Please sign in to comment.