Language features, syntax, and gotchas.
Category: Language
Episode #018: Subclassing Array
Sooner or later you'll want to subclass Array. This episode looks at why that's a bad idea, and presents an alternative.
Episode #016: super in Modules
How to find out if there is a super method to be called, and other tricks for using super within a module.
Episode #007: Constructors
A look into how Ruby's object construction works, and how we can customize constructors for special scenarios.
Episode #005: Array Literals
Using strings to build up command lines for execution is error-prone and potentially insecure. Check out why Ruby's %W array-literal syntax is the perfect tool for writing, composing, and executing …
Episode #003: Character Literals
Much like a vestigial tail, Ruby has a character literal syntax which is funny-looking and largely useless. In the interests of completeness, let's see if we can find an excuse …