Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In Ruby versions older than 3.2, objects that respond to `#to_hash` are always used to extract keyword arguments from when `**kwargs` is present in a method signature. It causes these objects to be passed in as a hash to the `raise` method instead of an object. Code like `raise CustomError, object_implementing_to_hash`, which relies on `object_implementing_to_hash` to be an object, no longer works. In this commit we ensure above code keeps working until keyword arguments are fixed in Ruby 3.2.
- Loading branch information