Skip to content

Commit

Permalink
Test failure fixes.
Browse files Browse the repository at this point in the history
The fix for eager_autoload! exposed an issue with autoloading optional
dependencies eagerly. Travis caught these errors when testing against
Ruby installations that did not have these optional dependencies
present.

See #833
  • Loading branch information
trevorrowe committed Jun 12, 2015
1 parent 465695a commit 878272d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions aws-sdk-core/lib/aws-sdk-core/eager_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ def load(klass_or_module)
@loaded << klass_or_module
klass_or_module.constants.each do |const_name|
path = klass_or_module.autoload?(const_name)
require(path) if path
const = klass_or_module.const_get(const_name)
if const.is_a?(Module)
unless @loaded.include?(const)
load(const)
end
begin
require(path) if path
const = klass_or_module.const_get(const_name)
self.load(const) if Module === const && !@loaded.include?(const)
rescue LoadError
end
end
self
Expand Down

0 comments on commit 878272d

Please sign in to comment.