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

Fix #10932. Treat "" and "::" as invalid on constantize #10943

Merged
merged 1 commit into from Jun 14, 2013

Conversation

Projects
None yet
3 participants
@killthekitten
Contributor

killthekitten commented Jun 14, 2013

No description provided.

@fxn

This comment has been minimized.

Member

fxn commented Jun 14, 2013

Awesome, thanks for working on this.

fxn added a commit that referenced this pull request Jun 14, 2013

Merge pull request #10943 from killthekitten/10932_constantize_empty
Fix #10932. Treat "" and "::" as invalid on constantize

@fxn fxn merged commit 85bb7d9 into rails:master Jun 14, 2013

@fxn

This comment has been minimized.

Member

fxn commented Jun 14, 2013

For the archives, see #10932 for the rationale.

@arunagw

This comment has been minimized.

Member

arunagw commented Jun 14, 2013

It blows up on ruby2.0.0

@killthekitten

This comment has been minimized.

Contributor

killthekitten commented Jun 14, 2013

Fun, that I switched to 1.9.3 from 2.0.0 to test it. I'll try to fix it
ASAP

@killthekitten

This comment has been minimized.

Contributor

killthekitten commented Jun 14, 2013

Currently I'm experiencing troubles with 'debugger' gem under ruby 2.0.0 cldwalker/debugger#47

@arunagw did you complete your bundle install without issues?

@arunagw

This comment has been minimized.

Member

arunagw commented Jun 14, 2013

Yes, It's a clean install for me. Try bundle update or removing Gemfile.lock

@killthekitten

This comment has been minimized.

Contributor

killthekitten commented Jun 14, 2013

Thanks, removing Gemfile.lock helped me.

But tests are OK on ruby-2.0.0-p195. Can you show us an example of failure?

Finished in 45.127928s, 93.4011 runs/s, 390.5564 assertions/s.

4215 runs, 17625 assertions, 0 failures, 0 errors, 0 skips
Run options: --seed 59230

# Running:

............................................................................

Finished in 3.161238s, 24.0412 runs/s, 31.9495 assertions/s.

76 runs, 101 assertions, 0 failures, 0 errors, 0 skips
@arunagw

This comment has been minimized.

Member

arunagw commented Jun 14, 2013

  1) Error:
InflectorTest#test_safe_constantize:
NameError: wrong constant name ::
    /Users/arunagw/checkouts/rails/activesupport/lib/active_support/inflector/methods.rb:224:in `const_get'
    /Users/arunagw/checkouts/rails/activesupport/lib/active_support/inflector/methods.rb:224:in `constantize'
    /Users/arunagw/checkouts/rails/activesupport/lib/active_support/inflector/methods.rb:274:in `safe_constantize'
    /Users/arunagw/checkouts/rails/activesupport/test/inflector_test.rb:304:in `block in test_safe_constantize'
    /Users/arunagw/checkouts/rails/activesupport/test/constantize_test_cases.rb:62:in `run_safe_constantize_tests_on'
    /Users/arunagw/checkouts/rails/activesupport/test/inflector_test.rb:303:in `test_safe_constantize'


  2) Error:
StringInflectionsTest#test_safe_constantize:
NameError: wrong constant name ::
    /Users/arunagw/checkouts/rails/activesupport/lib/active_support/inflector/methods.rb:224:in `const_get'
    /Users/arunagw/checkouts/rails/activesupport/lib/active_support/inflector/methods.rb:224:in `constantize'
    /Users/arunagw/checkouts/rails/activesupport/lib/active_support/inflector/methods.rb:274:in `safe_constantize'
    /Users/arunagw/checkouts/rails/activesupport/lib/active_support/core_ext/string/inflections.rb:77:in `safe_constantize'
    /Users/arunagw/checkouts/rails/activesupport/test/core_ext/string_ext_test.rb:289:in `block in test_safe_constantize'
    /Users/arunagw/checkouts/rails/activesupport/test/constantize_test_cases.rb:62:in `run_safe_constantize_tests_on'
    /Users/arunagw/checkouts/rails/activesupport/test/core_ext/string_ext_test.rb:288:in `test_safe_constantize'

2932 runs, 9793 assertions, 0 failures, 2 errors, 0 skips

Did you run the complete rails/activesupport tests?

@killthekitten

This comment has been minimized.

Contributor

killthekitten commented Jun 14, 2013

Wow, seems that I ran actionpack test suite instead of activesupport. Sorry for that. Now I see these errors.

@arunagw

This comment has been minimized.

Member

arunagw commented Jun 14, 2013

I think i got the problem. Trying to get this fixed.

@arunagw

This comment has been minimized.

Member

arunagw commented Jun 14, 2013

See #10946

@killthekitten killthekitten deleted the killthekitten:10932_constantize_empty branch Jan 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment