Sha256: dc32e28eb488e27c8ed79b1d666f82c07a14ceafe465e4ea8ad7b4c94c2f1314
Contents?: true
Size: 621 Bytes
Versions: 26
Compression:
Stored size: 621 Bytes
Contents
unless IO.method_defined? :advise require 'backports/tools' class IO def advise(advice, offset=0, len=0) raise RangeError if Backports.coerce_to_int(offset) >= 1<<31 raise RangeError if Backports.coerce_to_int(len) >= 1<<31 raise IOError if closed? case advice when :normal, :sequential, :random, :willneed, :dontneed, :noreuse return nil when Symbol raise NotImplementedError, "Unsupported advice #{advice}" else raise TypeError, "advice must be a Symbol" end end end end
Version data entries
26 entries across 26 versions & 2 rubygems