Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix constantize edge case involving prepend, autoloading and name conflicts | Jean Boussier | 2016-12-14 | 1 | -0/+5 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In the following situation: ```ruby class Bar end module Baz end class Foo prepend Baz end class Foo::Bar end ``` Running `Inflector.constantize('Foo::Bar')` would blow up with a NameError. What is happening is that `constatize` was written before the introduction of prepend, and wrongly assume that `klass.ancestors.first == klass`. So it uses `klass.ancestors.inject` without arguments, as a result a prepended module is used in place of the actual class. | ||||
* | applies new string literal convention in activesupport/test | Xavier Noria | 2016-08-06 | 1 | -5/+5 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | Merge pull request #21250 from ronakjangir47/safe_const | Yves Senn | 2015-09-07 | 1 | -0/+4 |
|\ | | | | | | | safe_constantize - Added Object scoped missing test cases | ||||
| * | safe_constantize - Added Object scoped missing test cases | Ronak Jangir | 2015-09-06 | 1 | -0/+2 |
|/ | |||||
* | Use `safe_constantize`. | Guo Xiang Tan | 2014-09-02 | 1 | -0/+30 |
| | | | | Fixes https://github.com/rails/rails/issues/9933. | ||||
* | Add Missing Test Cases for the constantize | Aditya Kapoor | 2014-06-07 | 1 | -0/+11 |
| | |||||
* | Fix #10932. Treat "" and "::" as invalid on constantize | Nikolay Shebanov | 2013-06-14 | 1 | -4/+4 |
| | |||||
* | cleaning up constantize tests | Aaron Patterson | 2012-11-07 | 1 | -44/+44 |
| | |||||
* | Handle case where ancestor is not the end of the chain | Andrew White | 2012-05-19 | 1 | -0/+2 |
| | |||||
* | Fix constantize so top level constants are looked up properly. | Marc-Andre Lafortune | 2012-05-19 | 1 | -0/+18 |
| | |||||
* | Make constantize look down the ancestor chain (excluding Object) | Marc-Andre Lafortune | 2012-05-19 | 1 | -0/+17 |
| | |||||
* | safe_constantize should handle wrong constant name NameErrors Fixes #4710 | Alex Tambellini | 2012-01-26 | 1 | -2/+3 |
| | |||||
* | Ensure that constantize just rescues NameError that applies to the constant ↵ | José Valim | 2011-09-23 | 1 | -0/+6 |
| | | | | being currently loaded. | ||||
* | Added ActiveSupport::Inflector.safe_constantize and String#safe_constantize; ↵ | Ryan Oblak | 2011-09-23 | 1 | -0/+31 |
refactored common constantize tests into ConstantizeTestCases |