topazproject/topaz — pull request #407 by judofyr (2013-02-18 19:29:41+00:00)
Title: Clean up array.rb

This is an attempt at cleaning up array.rb. Most of the changes are style-related, but I also slightly tweaked `uniq!`.

I don't expect this to be merged at once, but I think this would be a good example to base the style guide on.

My choices:

* No parens on method calls/definitions with no arguments.
* Always parens when there *are* arguments.
* No explicit self in method calls.
* … except for `foo = bar`. (Maybe extend this to all method calls with no arguments?)
* Use `result` for the return value. Use `item` for the iterator value. Use `other` for an Array passed in as an argument.
* Use postfix `if` for single lines
* Use proper variable names.
* Add TODOs for check_frozen and convert_type.