Copied some test cases from the latest version of ruby to improve coverage.  There are still a few functions that are left untested.