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

Avoid calls to Proc#bind (deprecated in Rails 4.x) when instance_exec available #36

Merged
merged 1 commit into from Nov 4, 2013

Conversation

ryanfb
Copy link
Contributor

@ryanfb ryanfb commented Nov 4, 2013

Calls to Proc#bind in shoulda-context in a Rails 4.x project result in hundreds of instances of e.g.:

DEPRECATION WARNING: Proc#bind is deprecated and will be removed in future versions. (called from bind at /Users/ryan/.rbenv/versions/jruby-1.7.4/lib/ruby/gems/shared/gems/activesupport-4.0.1/lib/active_support/core_ext/proc.rb:6)
/Users/ryan/.rbenv/versions/jruby-1.7.4/lib/ruby/gems/shared/gems/activesupport-4.0.1/lib/active_support/core_ext/proc.rb:6:in `bind'
  /Users/ryan/.rbenv/versions/jruby-1.7.4/lib/ruby/gems/shared/gems/shoulda-context-1.1.5/lib/shoulda/context/context.rb:424:in `run_all_teardown_blocks'

In test runs with deprecation warnings/traces turned on.

travisjeffery added a commit that referenced this pull request Nov 4, 2013
Avoid calls to Proc#bind (deprecated in Rails 4.x) when instance_exec available

* ryanfb/master:
  Avoid calls to Proc#bind (deprecated in Rails 4.x) when instance_exec available
@travisjeffery travisjeffery merged commit e80456b into thoughtbot:master Nov 4, 2013
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

2 participants