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

We cannot dup on nil. #2503

Merged
merged 1 commit into from Aug 12, 2011
Merged

We cannot dup on nil. #2503

merged 1 commit into from Aug 12, 2011

Conversation

arunagw
Copy link
Member

@arunagw arunagw commented Aug 12, 2011

Added in previous commit.

We cannot dup on nil. First we will check then do the dup

fixed failing test

  1) Error:
test_ensure_url_for_works_as_expected_when_called_with_no_options_if_default_url_options_is_not_set(EmptyUrlOptionsTest):
TypeError: can't dup NilClass
    /Users/arun/checkouts/rails/actionpack/lib/action_dispatch/routing/url_for.rb:143:in `dup'
    /Users/arun/checkouts/rails/actionpack/lib/action_dispatch/routing/url_for.rb:143:in `url_for'
    /Users/arun/checkouts/rails/actionpack/test/controller/base_test.rb:289:in `test_ensure_url_for_works_as_expected_when_called_with_no_options_if_default_url_options_is_not_set'
    /Users/arun/checkouts/rails/bundle/ruby/1.9.1/gems/mocha-0.9.12/lib/mocha/integration/mini_test/version_142_to_172.rb:27:in `run'
    /Users/arun/checkouts/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:35:in `block in run'
    /Users/arun/checkouts/rails/activesupport/lib/active_support/callbacks.rb:426:in `_run_setup_callbacks'
    /Users/arun/checkouts/rails/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
    /Users/arun/checkouts/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:34:in `run'

@arunagw
Copy link
Member Author

arunagw commented Aug 12, 2011

I think we can just don't need to call reverse_merge! here. Test passed!!!

tenderlove added a commit that referenced this pull request Aug 12, 2011
@tenderlove tenderlove merged commit c420ebf into rails:master Aug 12, 2011
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