[#1026] Is this a bug? — Dave Thomas <Dave@...>

18 messages 2000/01/03

[#1084] Infinite loop — Dave Thomas <Dave@...>

17 messages 2000/01/11

[#1104] The value of while... — Dave Thomas <Dave@...>

24 messages 2000/01/11

[ruby-talk:01052] Re: Upper case method names

From: gotoken@... (GOTO Kentaro)
Date: 2000-01-04 19:20:11 UTC
List: ruby-talk #1052
Hi,

In message "[ruby-talk:01050] Upper case method names"
    on 00/01/04, Dave Thomas <Dave@thomases.com> writes:

>In the FAQ 5.8 is says that if you have a method name starting with an
>uppercase letter, you need to put parentheses around any parameters to
>calls to that method. 

Maybe, that statement should be: 

  Yes, you can. But the parentheses need to be put if the number 
  of arguments is zero, e.g., FOO().

For example,

  % ruby -e 'A'
  /tmp/rbi11607:1: uninitialized constant A (NameError)
  % ruby -e 'A()'
  /tmp/rbD22645:1: undefined method `A' for #<Object:0xabecc> (NameError)
  %

-- gotoken

In This Thread

Prev Next