-
-
Notifications
You must be signed in to change notification settings - Fork 102
Expose wether exception cause is supported #240
Conversation
@samphippen care to give this a once over? |
@@ -55,6 +55,18 @@ def caller_locations_supported? | |||
respond_to?(:caller_locations, true) | |||
end | |||
|
|||
begin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about doing a respond_to?
check here? I think that'd be a lot cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I preferred not instantiating an exception...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, right, Exception.instance_methods.include?(:cause)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exception.method_defined?(:cause)
No need for a linear include?
operation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
9d42426
to
c1c5381
Compare
Hmm randomly this is failing on windows but it's for an unrelated encoding spec.. |
c1c5381
to
867a144
Compare
Expose wether exception cause is supported
LGTM. Merged. |
No changelog because this is an internal feature