The Ruby “core libraries” are the standard Ruby classes and modules that are always available without loading any extra code.
Tag: corelib
Episode #113: p
We all use 'puts' for debugging at some point. This episode shows why 'p' is a better choice.
Episode #107: String Subscript Assignment
In today's episode, we learn a wonderfully convenient way to substitute text.
Episode #104: Parsing Time
It would be great if time were always represented in readable, un-ambiguous ISO8601 formats. But when importing legacy data we don't often have that luxury. In this episode, we look …
Episode #059: Enumerator
In previous episodes we've touched on Enumerator in passing. This time it'll take center stage, as we explore just what an Enumerator is and what it's good for.
Episode #045: Hash Default Value
This cautionary episode demonstrates and explains a Hash gotcha that often comes as a surprise.
Episode #044: #one?
Somtetimes you need to know if exactly one element in a collection has a given property. For that situation, we have the #one? predicate method.
Episode #037: Proc and Threequals
Today's dish combines the great flavor of Ruby's 'case' statement with a little Proc seasoning and a threequals demiglace!
Episode #034: Struct from Hash
For such similar and broadly useful data structures, Struct and Hash are surprisingly incompatible. In this episode we look at some ways to smooth over their differences, and answer a …
Episode #032: Hash Default Blocks
Following on to the episodes about #fetch, today's episode answers the question: what do we do when we want the same defaulting behavior everwhere a Hash is used?