Index: lib/pathname.rb =================================================================== --- lib/pathname.rb (リビジョン 22140) +++ lib/pathname.rb (作業コピー) @@ -167,6 +167,7 @@ # These methods are a facade for IO: # - #each_line(*args, &block) # - #read(*args) +# - #binread(*args) # - #readlines(*args) # - #sysopen(*args) # @@ -816,6 +817,10 @@ # if specified. def read(*args) IO.read(@path, *args) end + # See IO.binread. 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 IO.readlines. Returns all the lines from the file. def readlines(*args) IO.readlines(@path, *args) end