Sha256: 0b9ef25f1795b8608857f6f50a527f1bfaaa3fb9a49c3617bd7b048d8f983381

Contents?: true

Size: 225 Bytes

Versions: 25

Compression:

Stored size: 225 Bytes

Contents

unless IO.respond_to? :binread
  require 'backports/tools'

  def IO.binread(file, length = nil, offset = 0)
    File.open(Backports.convert_path(file),"rb") do |f|
      f.seek(offset)
      f.read(length)
    end
  end
end

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
backports-3.3.2 lib/backports/1.9.1/io/binread.rb
backports-3.3.1 lib/backports/1.9.1/io/binread.rb
backports-3.3.0 lib/backports/1.9.1/io/binread.rb
backports-3.2.0 lib/backports/1.9.1/io/binread.rb
backports-3.1.1 lib/backports/1.9.1/io/binread.rb