fix unit test fails on Ruby 1.8 and JRuby (#2190)
Authored by: tmaruyama 2012-06-17
Parent: [r9849]
Child: [r9851]