lib/require_pattern.rb in require_pattern-1.1 vs lib/require_pattern.rb in require_pattern-1.1.1
- old
+ new
@@ -19,12 +19,13 @@
if require_map.empty?
break loaded
elsif remaining.nil?
STDERR.puts ReqPat::Coloring.red("\nSome files failed:")
- require_map.each { |file, e| STDERR.puts
- ReqPat::Coloring.red(" #{file}: ") +
- ReqPat::Coloring.yellow("#{e.backtrace[0]} #{e}")
+ require_map.each { |file, e|
+ msg = ReqPat::Coloring.red(" #{file}: ") +
+ ReqPat::Coloring.yellow("#{e.backtrace[0]} #{e}")
+ STDERR.puts msg
}
STDERR.puts
raise LoadError, "One or more files failed to load. See STDERR output for details."
end
end