We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9fa7f81 + f8eea84 commit 54e8d2eCopy full SHA for 54e8d2e
1 file changed
lib/bencode/decode.rb
@@ -31,6 +31,8 @@ def self.load(str, opts = {})
31
# @option (see .load)
32
# @return (see .load)
33
def self.load_file(path, opts = {})
34
- load(File.open(path, 'rb').read, opts)
+ File.open(path, 'rb') do |io|
35
+ load(io, opts)
36
+ end
37
end
38
0 commit comments