Added tests for both and also a test for the exception raised in Ruby 1.8.