Dreaming of a Ruby Christmas

This Week’s Ruby Quiz is to create something creative XMas related in Ruby. Glen F. Pankow came with the following solution:

You can check out / download the code from here – which btw prints the following poem:

On the first day of Matzmas my true love gave to me:
   A new version of Ruby!

On the second day of Matzmas my true love gave to me:
   Two string gsubs
   And a new version of Ruby!

On the third day of Matzmas my true love gave to me:
   Three forked threads
   Two string gsubs
   And a new version of Ruby!

On the fourth day of Matzmas my true love gave to me:
   Four calling procs
   Three forked threads
   Two string gsubs
   And a new version of Ruby!

On the fifth day of Matzmas my true love gave to me:
   Five Ruby gems!
   Four calling procs
   Three forked threads
   Two string gsubs
   And a new version of Ruby!

On the sixth day of Matzmas my true love gave to me:
   Six marshals dumping
   Five Ruby gems!
   Four calling procs
   Three forked threads
   Two string gsubs
   And a new version of Ruby!

On the seventh day of Matzmas my true love gave to me:
   Seven ducks a-typing
   Six marshals dumping
   Five Ruby gems!
   Four calling procs
   Three forked threads
   Two string gsubs
   And a new version of Ruby!

On the eighth day of Matzmas my true love gave to me:
   Eight dirs a-globbing
   Seven ducks a-typing
   Six marshals dumping
   Five Ruby gems!
   Four calling procs
   Three forked threads
   Two string gsubs
   And a new version of Ruby!

On the ninth day of Matzmas my true love gave to me:
   Nine ranges stepping
   Eight dirs a-globbing
   Seven ducks a-typing
   Six marshals dumping
   Five Ruby gems!
   Four calling procs
   Three forked threads
   Two string gsubs
   And a new version of Ruby!

On the tenth day of Matzmas my true love gave to me:
   Ten trys a-catching
   Nine ranges stepping
   Eight dirs a-globbing
   Seven ducks a-typing
   Six marshals dumping
   Five Ruby gems!
   Four calling procs
   Three forked threads
   Two string gsubs
   And a new version of Ruby!

On the eleventh day of Matzmas my true love gave to me:
   Eleven ios piping
   Ten trys a-catching
   Nine ranges stepping
   Eight dirs a-globbing
   Seven ducks a-typing
   Six marshals dumping
   Five Ruby gems!
   Four calling procs
   Three forked threads
   Two string gsubs
   And a new version of Ruby!

On the twelveth day of Matzmas my true love gave to me:
   Twelve monkeys patching
   Eleven ios piping
   Ten trys a-catching
   Nine ranges stepping
   Eight dirs a-globbing
   Seven ducks a-typing
   Six marshals dumping
   Five Ruby gems!
   Four calling procs
   Three forked threads
   Two string gsubs
   And a new version of Ruby!

Hats down before this solution, I really bow down to Glen’s creativity and technique – the only problem is that I find the bar too high (and the time is too little) to submit a solution this time :-) .

Anyway, happy XMas time everyone!

One thought on “Dreaming of a Ruby Christmas

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>