Closed
Conversation
st0012
reviewed
Feb 12, 2024
| finish_transaction(transaction, 200) | ||
| rescue Exception => exception | ||
| klass = payload['class'].constantize | ||
| klass = payload['class'].to_s.constantize |
Contributor
There was a problem hiding this comment.
If the class attribute is already a class, then we don't want to re-constantize it.
Suggested change
| klass = payload['class'].to_s.constantize | |
| klass = payload['class'] | |
| if klass.is_a(String) | |
| klass = klass.constantize | |
| end |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2243 +/- ##
==========================================
+ Coverage 97.41% 97.43% +0.02%
==========================================
Files 102 102
Lines 3823 3825 +2
==========================================
+ Hits 3724 3727 +3
+ Misses 99 98 -1
|
Contributor
|
Thanks for the PR. Is it possible to write a test case for this fix? |
dentarg
added a commit
to dentarg/raven-ruby
that referenced
this pull request
Feb 17, 2024
Tests and fixes getsentry#2243
Contributor
There are already tests covering this but they are not catching this due to |
dentarg
added a commit
to dentarg/raven-ruby
that referenced
this pull request
Feb 17, 2024
Tests and fixes getsentry#2243
st0012
pushed a commit
that referenced
this pull request
Feb 20, 2024
* Allow custom Redis instance for tests
You probably don't want the tests to use the same Redis you use for any
app development.
Maybe you want to use Docker with custom port:
docker run --rm -it -p 16379:6379 redis:6
* Run sentry-resque specs without Rails
Tests and fixes #2243
* Run with latest `psych`
I think ruby/psych#655 was resolved long ago
* Note `constantize` sentry-resque fix in CHANGELOG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for your Pull Request 🎉
Please keep these instructions in mind so we can review it more efficiently:
Other Notes
Description
Describe your changes:
Fixed
constantizeissuegot #<NoMethodError: undefined methodconstantize' for MyWorker:Class`