Sha256: 851bd7391197d3a7d399f66efec85f9d45d216d4ca1b3a903c69752c792257ad

Contents?: true

Size: 523 Bytes

Versions: 5

Compression:

Stored size: 523 Bytes

Contents

#
# Ruby Extensions
#

# Is this needed any more?
class << File #:nodoc: all

  unless respond_to?(:read)   # Ruby 1.6 and less

    def read(fname)
      open(fname){ |f| return f.read }
    end

  end

  # for corrupted Window's stat(2)
  def dir?(path)
    directory?((path[-1,1] == '/') ? path : path + '/')
  end

end

unless Errno.const_defined?(:ENOTEMPTY)   # Windows?

  module Errno  #:nodoc:
    class ENOTEMPTY  #:nodoc:
      # We do not raise this exception, implementation is not needed.
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
setup-5.2.0 lib/setup/core_ext.rb
setup-5.1.0 lib/setup/core_ext.rb
setup-5.0.1 lib/setup/core_ext.rb
setup-5.0.0 lib/setup/core_ext.rb
setup-4.2.0 lib/setup/rubyver.rb