lib/bencode/io.rb in bencode-0.5.1 vs lib/bencode/io.rb in bencode-0.6.0
- old
+ new
@@ -1,12 +1,12 @@
class IO
def self.bdecode(filename)
- open(filename, 'r').bdecode
+ open(filename, 'rb') {|io| io.bdecode}
end
def self.bencode(filename)
- open(filename, 'r').bencode
+ open(filename, 'rb') {|io| io.bencode}
end
def bdecode
read.chomp.bdecode
end