Sha256: 093e4c01e3ce6678638e281f3562345565cf474f1b7dd2bf7960da85a6a58f4e

Contents?: true

Size: 268 Bytes

Versions: 47

Compression:

Stored size: 268 Bytes

Contents

unless File.method_defined? :size
  class File
    def size
      stat.size
    end
  end
end

if RUBY_VERSION < '1.9'
  require 'backports/tools/path'

  Backports.convert_first_argument_to_path File, :size?
  Backports.convert_first_argument_to_path File, :size
end

Version data entries

47 entries across 47 versions & 4 rubygems

Version Path
backports-3.6.7 lib/backports/1.9.1/file/size.rb
backports-3.6.6 lib/backports/1.9.1/file/size.rb
backports-3.6.5 lib/backports/1.9.1/file/size.rb
backports-3.6.4 lib/backports/1.9.1/file/size.rb
backports-3.6.3 lib/backports/1.9.1/file/size.rb
backports-3.6.2 lib/backports/1.9.1/file/size.rb
backports-3.6.1 lib/backports/1.9.1/file/size.rb