clean up test suite to work with recent versions of ruby

the test suite fails with versions of ruby more recent than 1.8.  these two changes are necessary to get it working again.