fixes issue #407
adapting test case for issue #407 to work with ruby 1.8.7