raise ArgumentError when IO.new/IO.open last argument is not a hash or nil
Merge pull request #768 from josedonizetti/io_new_wrong_last_argument

raise ArgumentError when IO.new/IO.open last argument is not a hash or nil