fix boolean conversions in ruby 1.8