-
-
Notifications
You must be signed in to change notification settings - Fork 763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't extend exception #1106
Don't extend exception #1106
Conversation
We now write directly to execution_result. Previously we'd overload the actual exception object with this flag. Apart from reducing complexity, this fixes a bug with frozen error objects that failed to extend for obvious reasons. Fixes #1103
Haven't yet been able to reproduce the jruby-19mode failure locally, running |
Restarted JRuby travis build (cause it's most likely a Heisenbug) |
Yep, Heisenbug. |
Seems good to me. |
LGTM to me as well. It needs a changelog entry, and this needs to be cherry-picked over to 2-99-maintenance and master as well (this is targetting 2-14-maintenance). |
Don't extend exception Conflicts: Changelog.md lib/rspec/core/pending.rb
Thanks @lgierth, I added a changelog entry, and I've picked this across to 2-99 and master. |
Don't extend exception Conflicts: Changelog.md lib/rspec/core/pending.rb
Thanks for the feedback and getting this pulled in so quickly! |
In https://github.com/tpope/fivemat/blob/v1.2.1/lib/fivemat/rspec.rb#L43-L49, Fivemat has two ways to check for pending example fixed: - example.execution_result[:exception].pending_fixed? (but we removed this in #1106 because it broke when dealing with frozen exceptions) - RSpec::Core::PendingExampleFixedError === exception (but this const was renamed in b5d10cc). The `RSpec::Core::PendingExampleFixedError` line in Fivemat was never hit in recent releases because `example.execution_result[:exception]` responded to `pending_fixed?` -- until 2.14.6.
In https://github.com/tpope/fivemat/blob/v1.2.1/lib/fivemat/rspec.rb#L43-L49, Fivemat has two ways to check for pending example fixed: - example.execution_result[:exception].pending_fixed? (but we removed this in #1106 because it broke when dealing with frozen exceptions) - RSpec::Core::PendingExampleFixedError === exception (but this const was renamed in b5d10cc). The `RSpec::Core::PendingExampleFixedError` line in Fivemat was never hit in recent releases because `example.execution_result[:exception]` responded to `pending_fixed?` -- until 2.14.6.
…end-exception Don't extend exception Conflicts: Changelog.md lib/rspec/core/pending.rb --- This commit was imported from rspec/rspec-core@e5b18b7.
In https://github.com/tpope/fivemat/blob/v1.2.1/lib/fivemat/rspec.rb#L43-L49, Fivemat has two ways to check for pending example fixed: - example.execution_result[:exception].pending_fixed? (but we removed this in rspec/rspec-core#1106 because it broke when dealing with frozen exceptions) - RSpec::Core::PendingExampleFixedError === exception (but this const was renamed in b5d10ccbe3a590adc67d807acb565be3657e51bf). The `RSpec::Core::PendingExampleFixedError` line in Fivemat was never hit in recent releases because `example.execution_result[:exception]` responded to `pending_fixed?` -- until 2.14.6. --- This commit was imported from rspec/rspec-core@35850da.
…end-exception Don't extend exception --- This commit was imported from rspec/rspec-core@a0bf23a.
In https://github.com/tpope/fivemat/blob/v1.2.1/lib/fivemat/rspec.rb#L43-L49, Fivemat has two ways to check for pending example fixed: - example.execution_result[:exception].pending_fixed? (but we removed this in rspec/rspec-core#1106 because it broke when dealing with frozen exceptions) - RSpec::Core::PendingExampleFixedError === exception (but this const was renamed in b5d10ccbe3a590adc67d807acb565be3657e51bf). The `RSpec::Core::PendingExampleFixedError` line in Fivemat was never hit in recent releases because `example.execution_result[:exception]` responded to `pending_fixed?` -- until 2.14.6. --- This commit was imported from rspec/rspec-core@e2bae1c.
We now write directly to execution_result. Previously we'd
overload the actual exception object with this flag.
Apart from reducing complexity, this fixes a bug with
frozen error objects that failed to extend for obvious
reasons.
Fixes #1103