Created
May 4, 2015 13:54
-
-
Save mbillard/eeab2268b8e4bfd2ad3b to your computer and use it in GitHub Desktop.
WTF, Ruby (and Rails)?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- `0` is `true` | |
- Everything is an object, even `nil` | |
- `===` | |
- different behavior depending on classes, only use/define for `case...when` blocks | |
- private class methods (http://domon.cc/2013/12/25/private-class-methods-in-ruby/) | |
- `and` and `or` vs `&&` and `||` | |
- constants are not constants unless you freeze them | |
- `5 / 2 # => 2` transform your integers to floats before doing operations | |
More: | |
- http://stackoverflow.com/questions/372652/what-are-the-ruby-gotchas-a-newbie-should-be-warned-about | |
- http://www.elpassion.com/blog/ruby-gotchas/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment