Skip to content

Commit

Permalink
Merge pull request rubocop#341 from yous/patch-avoid-non-nil-checks
Browse files Browse the repository at this point in the history
Avoid non nil checks in examples
  • Loading branch information
bbatsov committed Jul 24, 2014
2 parents b7479c4 + d89aa5a commit e9ccd48
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,8 @@ Translations of the guide are available in the following languages:
end
```

While several Ruby books suggest the first style, the second is much more prominent
in practice (and arguably a bit more readable).
While several Ruby books suggest the first style, the second is much more
prominent in practice (and arguably a bit more readable).

* <a name="no-trailing-backslash"></a>
Avoid line continuation `\` where not required. In practice, avoid using
Expand Down Expand Up @@ -1115,9 +1115,9 @@ Translations of the guide are available in the following languages:
names.select { |name| name.start_with?('S') }.map { |name| name.upcase }
```

Some will argue that multiline chaining would look OK with the use of {...}, but they should
ask themselves - is this code really readable and can the blocks' contents be extracted into
nifty methods?
Some will argue that multiline chaining would look OK with the use of {...},
but they should ask themselves - is this code really readable and can the
blocks' contents be extracted into nifty methods?

* <a name="block-argument"></a>
Consider using explicit block argument to avoid writing block literal that
Expand Down Expand Up @@ -2649,7 +2649,7 @@ Translations of the guide are available in the following languages:
rescue
# .. handle error
ensure
f.close unless f.nil?
f.close if f
end
```

Expand Down

0 comments on commit e9ccd48

Please sign in to comment.