Long story short, Ruby 1.8.7 has some problems with .type