Skip to content
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

Marshal monkey-patch deprecation #621

Merged
merged 1 commit into from Mar 8, 2014

Conversation

xaviershay
Copy link
Member

For #620

unless ::RSpec::Mocks.configuration.marshal_patched?
RSpec.warn_deprecation(<<-EOS.gsub(/^\s+\|/, ''))
|Using Marshal.dump on stubbed objects relies on a monkey-patch
|that is being made opt-in in RSpec 3. To enable it:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"To enable it" should perhaps be "To enable it (and silence this warning)"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or 'To silence this warning please explicitly enable it:'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even better.

@myronmarston
Copy link
Member

LGTM. If we change the API in #620 to be an attribute like I suggested, it'll need to change here as well, of course, but otherwise merge away.

@xaviershay
Copy link
Member Author

comments addressed.

@myronmarston
Copy link
Member

LGTM. If you do decide to add a reader to 3.0, it'd be good to use the same name here (rather than the shortened marshal_patched? -- but as I said in the other PR, not a merge blocker; merge away.

xaviershay added a commit that referenced this pull request Mar 8, 2014
@xaviershay xaviershay merged commit 678ba90 into 2-99-maintenance Mar 8, 2014
@JonRowe JonRowe deleted the issue-614-deprecation branch March 10, 2014 04:46
yujinakayama pushed a commit to yujinakayama/rspec-monorepo that referenced this pull request Oct 6, 2021
…-deprecation

Marshal monkey-patch deprecation

---
This commit was imported from rspec/rspec-mocks@678ba90.
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.

None yet

3 participants