[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:02111] Re: ARGF or $<

From: Hugh Sasse Staff Elec Eng <hgs@...>
Date: 2000-03-23 15:49:39 UTC
List: ruby-talk #2111
On Fri, 24 Mar 2000, ARIMA Yasuhiro wrote:

> Hi,
> 
> Hugh Sasse Staff Elec Eng <hgs@dmu.ac.uk> wrote
> 
> | 	Ah, so it is an Array of lines of the concatenated input files.
> | 	Effectively, anyway.   This was not clear from the description:
> | 	
> | >> The virtual concatenation file of the files given by command line
> | >> arguments, or stdin (in case no
> | >> argument file supplied). $<.file returns the current
> | >> filename. (Mnemonic: $< is a shell input source.)
> 
> If you write the paragraph, how do ?

Having seen the different answers, I can see that it is more than
just a list of lines.  The problem I had with this paragraph is that
it says "the virtual concatenation file" but it is not of class File.

I would say something like:


The concatenation of all the files given as command line arguments, or
stdin (in the case where there are no arguments), but the object is
not of class file.  It is an Object with the following methods:

each		gives you each line of the concatenated file
each_line	is the same as each
each_byte	gives you each byte of the concatenated file
file		gives you the name of the file being processed
fileno		...
...		...


That way you can see what can be done with the object.  Does that
suggestion seem useful?  It make the documentation bigger, though!
> 
> --
>   ARIMA Yasuhiro <fit0298@fitec.co.jp>
> 
	Thank you all,
	Hugh
	hgs@dmu.ac.uk

In This Thread