Use class instead of type - type is removed in Ruby 1.9
Merge branch 'hotfix/0.9.0.6'