Added lots of explicit .ord methods to make it work

(presumably because of Ruby 1.9.3)