Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Requires Autoload to avoid errors when loading just "active_support/core_ext" #13605

Closed
wants to merge 1 commit into from

2 participants

alindeman Rafael Mendonça França
alindeman

Currently:

$ irb -Iactivesupport/lib
irb(main):001:0> require 'active_support/core_ext'
NameError: uninitialized constant ActiveSupport::Autoload
Rafael Mendonça França
Owner

See #6964 (comment) and the next comments from @josevalim and @fxn.

That said you should require active_support.rb before requiring any other file inside that framework. Doing this you will not need this require.

alindeman

OK, understood, I wasn't aware of the change until now.

alindeman alindeman closed this
alindeman alindeman referenced this pull request from a commit in rspec/rspec-rails
alindeman alindeman require "active_support" is always needed
Per <rails/rails#13605 (comment)>,
always load the base "active_support" file before loading specific parts
of active_support.
198d9b9
alindeman alindeman referenced this pull request from a commit in rspec/rspec-rails
alindeman alindeman require "active_support" is always needed
Per <rails/rails#13605 (comment)>,
always load the base "active_support" file before loading specific parts
of active_support.
3cc7692
alindeman alindeman referenced this pull request from a commit in rspec/rspec-rails
alindeman alindeman require "active_support" is always needed
Per <rails/rails#13605 (comment)>,
always load the base "active_support" file before loading specific parts
of active_support.
c0b2d53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  activesupport/lib/active_support/number_helper.rb
2  activesupport/lib/active_support/number_helper.rb
View
@@ -1,3 +1,5 @@
+require 'active_support/dependencies/autoload'
+
module ActiveSupport
module NumberHelper
extend ActiveSupport::Autoload
Something went wrong with that request. Please try again.