Skip to content
This repository

remove useless require #6435

Merged
merged 1 commit into from almost 2 years ago

3 participants

Jan Yasuo Honda Piotr Sarnacki
Jan
janx commented

No description provided.

Piotr Sarnacki drogus merged commit 0638e6b into from
Piotr Sarnacki drogus closed this
Yasuo Honda
yahonda commented

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
Jan
janx commented

@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.

Yasuo Honda
yahonda commented

#6439 works. Thanks!

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

Showing 1 unique commit by 1 author.

May 22, 2012
Jan remove useless require 3ed92c8
This page is out of date. Refresh to see the latest.
1  activesupport/lib/active_support/dependencies/autoload.rb
... ...
@@ -1,5 +1,4 @@
1 1
 require "active_support/inflector/methods"
2  
-require "active_support/lazy_load_hooks"
3 2
 
4 3
 module ActiveSupport
5 4
   module Autoload
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.