Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #9836 from Intrepidd/tidy-require

Tidying up some require and removing overhead caused by sorting
  • Loading branch information...
commit 34d9aed32ed785148bcb97b027b9a90ee2850603 2 parents b1b9de3 + 9c025ab
@carlosantoniodasilva carlosantoniodasilva authored
View
5 activemodel/lib/active_model/validations.rb
@@ -376,7 +376,4 @@ def run_validations! #:nodoc:
end
end
-Dir[File.dirname(__FILE__) + "/validations/*.rb"].sort.each do |path|
- filename = File.basename(path)
- require "active_model/validations/#{filename}"
-end
+Dir[File.dirname(__FILE__) + "/validations/*.rb"].each { |file| require file }
View
4 activesupport/lib/active_support/core_ext.rb
@@ -1,4 +1,4 @@
-Dir["#{File.dirname(__FILE__)}/core_ext/*.rb"].sort.each do |path|
+Dir["#{File.dirname(__FILE__)}/core_ext/*.rb"].each do |path|
next if File.basename(path, '.rb') == 'logger'
- require "active_support/core_ext/#{File.basename(path, '.rb')}"
+ require path
end

0 comments on commit 34d9aed

Please sign in to comment.
Something went wrong with that request. Please try again.