diff --git a/lib/dotenv.rb b/lib/dotenv.rb
index <HASH>..<HASH> 100644
--- a/lib/dotenv.rb
+++ b/lib/dotenv.rb
@@ -20,9 +20,10 @@ module Dotenv
   def self.with(*filenames, &block)
     filenames << '.env' if filenames.empty?
 
-    filenames.inject({}) do |hash, filename|
-      filename = File.expand_path filename
-      hash.merge(block.call(filename) || {})
+    {}.tap do |hash|
+      filenames.each do |filename|
+        hash.merge! block.call(File.expand_path(filename)) || {}
+      end
     end
   end
 end
Avoid using #inject

I did not use #each_with_object, as the Rogues recommend, for two reasons:

1. I find it just as confusing as #inject.
2. Dotenv still technically supports Ruby <I>