Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix a bug where NameError#receiver raises an ArgumentError after #to_s is called #3832
error = (1.foo rescue $!) error.receiver # => 1 error.to_s # => NameError: ... <= This call replaces the internal `message` object error.receiver # => ArgumentError: no receiver is available
This commit changes the initializer to retrieve the receiver object so that the behavior of the method will be consistent.