ruby 1.9.2 compatibility, fixes to tests

These changes fix running tests and ruby 1.9.2 compatibility without altering the visibility of methods.