Skip to content

Use regular object for exception data#504

Merged
mperham merged 1 commit intosidekiq:masterfrom
dbussink:master
Nov 5, 2012
Merged

Use regular object for exception data#504
mperham merged 1 commit intosidekiq:masterfrom
dbussink:master

Conversation

@dbussink
Copy link
Contributor

@dbussink dbussink commented Nov 5, 2012

This test doesn't assert anything about the test data itself. Therefore
using a regular object is fine.

This also fixes the build for Rubinius. The problem is that a minitest
mock object removes all kinds of methods that should be there. Since
exception_data is for example used in an array later on, it should
respond to methods like equal? and == in order to be able to behave
properly in an array.

In MRI you can get away with this, because once you go into C land, you
don't go back to Ruby until you're done. This means you can remove
methods that data structures normally depend on without MRI breaking.

This test doesn't assert anything about the test data itself. Therefore
using a regular object is fine.

This also fixes the build for Rubinius. The problem is that a minitest
mock object removes all kinds of methods that should be there. Since
exception_data is for example used in an array later on, it should
respond to methods like equal? and == in order to be able to behave
properly in an array.

In MRI you can get away with this, because once you go into C land, you
don't go back to Ruby until you're done. This means you can remove
methods that data structures normally depend on without MRI breaking.
mperham added a commit that referenced this pull request Nov 5, 2012
Use regular object for exception data
@mperham mperham merged commit f3c6c65 into sidekiq:master Nov 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants