summary refs log tree commit diff
diff options
context:
space:
mode:
-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