summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2008-12-29 16:56:44 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2008-12-29 16:56:44 +0100
commitdfc5be3c1b55c1c746cfeef07436714969d99a2c (patch)
treec7105b83186754e6c795fcb62fcd2708821d4af6
parent9057d68f2234f164342b4fc23a48f5b3a31c8ffe (diff)
downloadstyleguide-dfc5be3c1b55c1c746cfeef07436714969d99a2c.tar.gz
styleguide-dfc5be3c1b55c1c746cfeef07436714969d99a2c.tar.xz
styleguide-dfc5be3c1b55c1c746cfeef07436714969d99a2c.zip
Update including a few improvements from Pistos
-rw-r--r--RUBY-STYLE12
1 files changed, 8 insertions, 4 deletions
diff --git a/RUBY-STYLE b/RUBY-STYLE
index 62a71c1..213909b 100644
--- a/RUBY-STYLE
+++ b/RUBY-STYLE
@@ -14,11 +14,16 @@ when you contribute to my code, please follow these rules:
 
 * Use Unix-style line endings.
 
-* Use spaces around operators, after commas, around { and before }.
+* Use spaces around operators, after commas, colons and semicolons,
+  around { and before }.
+
+* No spaces after (, [ and before ], ).
 
 * Use two spaces before statement modifiers (postfix
   if/unless/while/until/rescue).
 
+* Indent when as deep as case.
+
 * Use an empty line before the return value of a method (unless it
   only has one line), and an empty line between defs.
 
@@ -27,7 +32,7 @@ when you contribute to my code, please follow these rules:
 
 * Use empty lines to break up a long method into logical paragraphs.
 
-* Keep lines <80 chars.
+* Keep lines fewer than 80 characters.
 
 * Avoid trailing whitespace.
 
@@ -42,8 +47,6 @@ when you contribute to my code, please follow these rules:
 
 * Use when x; ... for one-line cases.
 
-* Indent when as deep as case.
-
 * Use &&/|| for boolean expressions, and/or for control flow.  (Rule
   of thumb: If you have to use outer parentheses, you are using the
   wrong operators.)
@@ -93,6 +96,7 @@ when you contribute to my code, please follow these rules:
     a,b,c: any object
     d: directory names
     e: elements of an Enumerable
+    ex: rescued exceptions
     f: files and file names
     i,j: indexes
     k: the key part of a hash entry