aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb
blob: 0f6e2e0af2f65715b6b64906130181be7a82157d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
class IO #:nodoc:
  class << self
    unless method_defined? :binread
      def binread(file, *args)
        raise ArgumentError, "wrong number of arguments (#{1 + args.size} for 1..3)" unless args.size < 3
        File.open(file, "rb") do |f|
          f.read(*args)
        end
      end
    end
  end
end