Project

General

Profile

Feature #1133 » pathname-binread.diff

sakuro (Sakuro OZAWA), 02/09/2009 01:17 AM

View differences:

lib/pathname.rb (作業コピー)
# These methods are a facade for IO:
# - #each_line(*args, &block)
# - #read(*args)
# - #binread(*args)
# - #readlines(*args)
# - #sysopen(*args)
#
......
# if specified.
def read(*args) IO.read(@path, *args) end
# See <tt>IO.binread</tt>. Returns all the bytes from the file, or the first +N+
# if specified. The open mode would be "rb:ASCII-8BIT".
def binread(*args) IO.binread(@path, *args) end
# See <tt>IO.readlines</tt>. Returns all the lines from the file.
def readlines(*args) IO.readlines(@path, *args) end
    (1-1/1)