1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/pathname.rb (Pathname#binread): added. [ruby-dev:37952]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2009-02-21 19:32:39 +00:00
parent 47c6ecfa64
commit 3b39217fb4
2 changed files with 15 additions and 1 deletions

View file

@ -355,6 +355,10 @@ Sat Feb 14 19:20:15 2009 Tanaka Akira <akr@fsij.org>
* lib/pathname.rb: obsolete methods removed.
[ruby-core:21564]
Sat Feb 14 15:46:01 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/pathname.rb (Pathname#binread): added. [ruby-dev:37952]
Sat Feb 14 13:14:18 2009 TAKANO Mitsuhiro (takano32) <tak@no32.tk>
* iseq.c: remove nil parameter from Proc#parameters

View file

@ -804,10 +804,20 @@ class Pathname # * IO *
IO.foreach(@path, *args, &block)
end
# See <tt>IO.read</tt>. Returns all the bytes from the file, or the first +N+
# Pathname#foreachline is *obsoleted* at 1.8.1. Use #each_line.
def foreachline(*args, &block)
warn "Pathname#foreachline is obsoleted. Use Pathname#each_line."
each_line(*args, &block)
end
# See <tt>IO.read</tt>. Returns all data from the file, or the first +N+ bytes
# 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.
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