TIL

Aug
09
Ruby’s secret file

Ruby’s secret file

Ruby has a secret input stream hidden in every source file
1 min read
Jun
20
XOR Magic Trick

XOR Magic Trick

Swapping values with no intermediate variable
May
04
Method parameters and constructing defaults in Ruby

Method parameters and constructing defaults in Ruby

Under shoulda known but didn't
1 min read
Jan
19
TIL: Ruby string substitution with hashes

TIL: Ruby string substitution with hashes

gsub values from a hash
Dec
04
Catching and throwing in Ruby

Catching and throwing in Ruby

Nothing to do with exceptions, ruby's catch and throw
1 min read
Oct
01
Is it an Integer?

Is it an Integer?

Casting strings to integers without exceptions
1 min read
Aug
27
Parsing a Gemfile

Parsing a Gemfile

Parsing a Gemfile programmatically to find out what it contains
Jun
29
Open3

Open3

Ruby's has lots of ways of forking a process, the obsure one is the best
1 min read
Jun
14
Clean Monkey Patching in Ruby

Clean Monkey Patching in Ruby

I have a library and I want to change some of its behaviours. I could straighout monkey patch, or I could be a lot cleaner
1 min read
Apr
24
Ruby #itself

Ruby #itself

Ruby’s unusual Kernel#itself method
1 min read