remove useless require #6435

Merged
merged 1 commit into from May 22, 2012

3 participants

@janx

No description provided.

@drogus drogus merged commit 0638e6b into rails:master May 22, 2012
@yahonda

Please revert this commit, it causes all activerecord unit test errors.

/home/yahonda/git/rails/activemodel/lib/active_model.rb:60:in `<top (required)>': undefined method `on_load' for ActiveSupport:Module (NoMethodError)
        from /home/yahonda/git/rails/activerecord/lib/active_record.rb:25:in `require'
        from /home/yahonda/git/rails/activerecord/lib/active_record.rb:25:in `<top (required)>'
        from /home/yahonda/git/rails/activerecord/test/cases/helper.rb:11:in `require'
        from /home/yahonda/git/rails/activerecord/test/cases/helper.rb:11:in `<top (required)>'
        from /home/yahonda/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/yahonda/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/yahonda/git/rails/activerecord/test/cases/adapter_test.rb:1:in `<top (required)>'
        from /home/yahonda/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/yahonda/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/yahonda/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:15:in `block in <main>'
        from /home/yahonda/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `select'
        from /home/yahonda/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `<main>'
Errors running test_mysql, test_mysql2, test_sqlite3, test_postgresql
@janx

@drogus @yahonda seems I cannot edit this pull request, I create a new one here: #6439

I don't suggest revert this: 'lazy_load_hooks' is not used in activesupport/lib/active_support/dependencies/autoload.rb, there's no reason load it there.

activesupport/lib/active_support/i18n.rb use and load it, but i18n.rb itself is conditionally loaded through autoload.

Since lazy_load_hooks.rb defines methods about ActiveSupport itself, I think it should be reasonable to load it in lib/active_support.rb.

@yahonda

#6439 works. Thanks!

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