summaryrefslogtreecommitdiff
path: root/lib/psych.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/psych.rb')
-rw-r--r--lib/psych.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/psych.rb b/lib/psych.rb
index d1dc0f0..497f595 100644
--- a/lib/psych.rb
+++ b/lib/psych.rb
@@ -229,7 +229,7 @@ module Psych
# Load the document contained in +filename+. Returns the yaml contained in
# +filename+ as a ruby object
def self.load_file filename
- self.load File.open(filename)
+ File.open(filename) { |f| self.load f }
end
# :stopdoc: