The Ruby “core libraries” are the standard Ruby classes and modules that are always available without loading any extra code.
Tag: corelib
Episode #192: Filenames
Ruby provides a lot of tools for breaking filenames into their component parts, but they aren't always well documented. Today's episode combines goes over some basics as well as a …
Episode #190: Gsub
Today we look at the humble String#gsub method, and learn that it has some surprising tricks up its sleeve.
Episode #181: Schwartzian Transform
Today's episode demonstrates a technique for speeding up the process of sorting some collections.
Episode #171: puts
Even the most basic of Ruby methods sometimes have hidden depth. Today we'll take a look at some advanced uses of the puts method.
Episode #168: Enumerable Internals
In this very special episode, guest chef Pat Shaughnessy takes us on a whirlwind tour of the Ruby internals that make the Enumerable#all? method tick.
Episode #159: Array Set Operations
Sometimes we'd like to treat Ruby arrays like sets, in which each item is unique. Today's dish shows how!
Episode #149: Sum
Today's episode takes on a simple task--summing up a list of numbers--and uses it to demonstrate both the Enumerable#reduce method as well as Symbol#to_proc.
Episode #142: Infinity
In today's episode, we'll simplify our thread-safe queue code by employing a "benign value" to represent the default max queue size.
Episode #118: Even And Odd
A small dish today, about some numeric methods I often forget exist.