rails/activesupport
Jean Boussier 11e05defec Fix constantize edge case involving prepend, autoloading and name conflicts
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.
2016-12-14 14:25:43 +01:00
..
bin update bin/test scripts to prevent double runs. 2016-11-21 17:25:12 +01:00
lib Fix constantize edge case involving prepend, autoloading and name conflicts 2016-12-14 14:25:43 +01:00
test Fix constantize edge case involving prepend, autoloading and name conflicts 2016-12-14 14:25:43 +01:00
activesupport.gemspec applies new string literal convention in the gemspecs 2016-08-06 19:27:12 +02:00
CHANGELOG.md change return value of duplicable? with Ruby 2.4+ 2016-12-13 07:35:36 +09:00
MIT-LICENSE Update copyright notices to 2016 [ci skip] 2015-12-31 18:27:19 +02:00
Rakefile fixes remaining RuboCop issues [Vipul A M, Xavier Noria] 2016-09-01 23:41:49 +02:00
README.rdoc [ci skip] Add a dollar sign to each command in the READMEs 2015-12-06 19:18:52 +01:00

= Active Support -- Utility classes and Ruby extensions from Rails

Active Support is a collection of utility classes and standard library
extensions that were found useful for the Rails framework. These additions
reside in this package so they can be loaded as needed in Ruby projects
outside of Rails.


== Download and installation

The latest version of Active Support can be installed with RubyGems:

  $ gem install activesupport

Source code can be downloaded as part of the Rails project on GitHub:

* https://github.com/rails/rails/tree/master/activesupport


== License

Active Support is released under the MIT license:

* http://www.opensource.org/licenses/MIT


== Support

API documentation is at:

* http://api.rubyonrails.org

Bug reports can be filed for the Ruby on Rails project here:

* https://github.com/rails/rails/issues

Feature requests should be discussed on the rails-core mailing list here:

* https://groups.google.com/forum/?fromgroups#!forum/rubyonrails-core