Permalink
Browse files

* ext/psych/lib/psych.rb (load_file): make sure opened yaml files are

  also closed. [ruby-core:41088]
  • Loading branch information...
1 parent 9952d8f commit 312965d9bc36bcff748745b6d19a57d6cf4d0ecc @tenderlove tenderlove committed Nov 17, 2011
Showing with 6 additions and 1 deletion.
  1. +5 −0 CHANGELOG.rdoc
  2. +1 −1 lib/psych.rb
View
@@ -1,3 +1,8 @@
+Thu Nov 17 10:36:46 2011 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych.rb (load_file): make sure opened yaml files are
+ also closed. [ruby-core:41088]
+
Wed Nov 9 04:52:16 2011 Aaron Patterson <aaron@tenderlovemaking.com>
* ext/psych/lib/psych/tree_builder.rb: dump complex numbers,
View
@@ -229,7 +229,7 @@ def self.load_stream yaml
# 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:

0 comments on commit 312965d

Please sign in to comment.