Raise errors using new to avoid keyword argument error on ruby-head.