[#3006] mismatched quotation — "stevan apter" <apter@...>

ruby documentation uses a punctuation convention i've never seen

13 messages 2000/05/27

[ruby-talk:03055] Re: Problem with getc under UNIX with ruby 1.4.3

From: Aleksi Niemel<aleksi.niemela@...>
Date: 2000-05-31 08:06:27 UTC
List: ruby-talk #3055
>     on 00/05/30, "David Douthitt" <DDouthitt@cuna.com> writes:
> |By the way (matz) - what happens if you leave the "private" 
> code line out?

Matz:
> It makes `orig_getc' only callable from io itself.

I was thinking it does the other way round.

   class IO
     alias orig_getc getc
     private :orig_getc

Having private makes orig_getc only callable from io itself. On the other
hand, leaving the "price code line out"

   class IO
     alias orig_getc getc
#     private :orig_getc

would cause following code to execute instead of giving an error:

  c = file.orig_getc

	- Aleksi

In This Thread

Prev Next