Andrew McDonough

Ruby Magic

June 08, 2015

On 8th June 2015 I gave a talk to the London Ruby Users Group entitled Ruby Magic. For this talk, I recreated several popular magic tricks in Ruby, including cups and balls, turning water into wine, and sawing a person in half.


I then told the audience how the tricks were done, by including a gem I wrote in my .irbrc file. This magic_set gem monkey patches core Ruby classes like String and Array. The purpose of this talk was to demonstrate some of the unexpected behaviour you can get if you extend classes Ruby’s core classes, something I strongly advise against.

Andrew McDonough

Andrew McDonough is a consultant CTO and software developer, currently based between Berlin and London.

Follow Andrew on Twitter or Connect on LinkedIn