Skip to content

Commit e9ccd48

Browse files
committed
Merge pull request #341 from yous/patch-avoid-non-nil-checks
Avoid non nil checks in examples
2 parents b7479c4 + d89aa5a commit e9ccd48

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,8 @@ Translations of the guide are available in the following languages:
420420
end
421421
```
422422

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

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

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

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

0 commit comments

Comments
 (0)