From 89dc612e12a02bf67a7688babbf9b70e88e9327d Mon Sep 17 00:00:00 2001 From: ChaYoung You Date: Fri, 25 Jul 2014 06:48:25 +0900 Subject: [PATCH 1/2] Keep line length to 80 --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9f8c01c5e..898183340 100644 --- a/README.md +++ b/README.md @@ -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). * Avoid line continuation `\` where not required. In practice, avoid using @@ -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? * Consider using explicit block argument to avoid writing block literal that From d89aa5ac795fa2603a058a53247f58ae24ee764e Mon Sep 17 00:00:00 2001 From: ChaYoung You Date: Fri, 25 Jul 2014 06:48:42 +0900 Subject: [PATCH 2/2] Avoid non-`nil` checks in examples --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 898183340..ffd8e93f3 100644 --- a/README.md +++ b/README.md @@ -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 ```