lib/scissor.rb in scissor-0.0.24 vs lib/scissor.rb in scissor-0.0.25

- old
+ new

@@ -51,5 +51,21 @@ Scissor(filename) end end end + +# for ruby 1.9 +if IO.instance_methods.include? :getbyte + class << Riff::Reader::Chunk + alias :read_bytes_to_int_original :read_bytes_to_int + def read_bytes_to_int file, bytes + require 'delegate' + file_delegate = SimpleDelegator.new(file) + def file_delegate.getc + getbyte + end + read_bytes_to_int_original file_delegate, bytes + end + end +end +