Permalink
Browse files

Update including a few improvements from Pistos

  • Loading branch information...
1 parent 9057d68 commit dfc5be3c1b55c1c746cfeef07436714969d99a2c @chneukirchen chneukirchen committed Dec 29, 2008
Showing with 8 additions and 4 deletions.
  1. +8 −4 RUBY-STYLE
View
12 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

0 comments on commit dfc5be3

Please sign in to comment.