# Elseif v. elsif?

**URL:** <https://rubytalk.org/t/elseif-v-elsif/35946>\
**Category:** ruby-talk\
**Created:** [7 March 2007 08:56 UTC](https://rubytalk.org/t/elseif-v-elsif/35946 "2007-03-07T08:56:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![7stud1](https://avatars.discourse-cdn.com/v4/letter/7/59ef9b/32.png) [@7stud1](https://rubytalk.org/u/7stud1)\
**Post date:** [7 March 2007 08:56 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/1 "2007-03-07T08:56:56Z")

</div>

What the?? I just spent two days trying to figure out why I couldn't  
reproduce the example in "Ruby in 20 minutes" and get it to work. After  
examining my code line for line against the example code and not being  
able to detect any error, I was assembling several code examples into a  
text file to post here, when I happened to notice 'elsif'. Why  
didn't Ruby flag 'elseif' as an error?

Does Ruby try differentiate itself in ridiculous ways like that just for  
the sake of being different? And why isn't something like that  
explicitly pointed out in a beginning tutorial? So far, I have to give  
Ruby two thumbs down.

C++, Java, Javascript, php, Servlets+JSP programmer

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Chad\_Perrin1](https://avatars.discourse-cdn.com/v4/letter/c/977dab/32.png) [@Chad\_Perrin1](https://rubytalk.org/u/Chad_Perrin1)\
**Post date:** [7 March 2007 09:00 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/2 "2007-03-07T09:00:11Z")

</div>

Ruby isn't the only language that does that.

"Different" would be more like the way bash does it: "elif"

> **···**
>
> On Wed, Mar 07, 2007 at 05:56:56PM +0900, 7stud 7stud wrote:
> 
> > Does Ruby try differentiate itself in ridiculous ways like that just for  
> > the sake of being different? And why isn't something like that  
> > explicitly pointed out in a beginning tutorial? So far, I have to give  
> > Ruby two thumbs down.
> 
> --  
> CCD CopyWrite Chad Perrin [[http://ccd.apotheon.org](http://ccd.apotheon.org) ]  
> "There comes a time in the history of any project when it becomes necessary  
> to shoot the engineers and begin production." - MacUser, November 1990

---

<div class="post-metadata">

**Author:** ![Forum](https://avatars.discourse-cdn.com/v4/letter/f/43a26b/32.png) [@Forum](https://rubytalk.org/u/Forum)\
**Post date:** [7 March 2007 09:03 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/3 "2007-03-07T09:03:54Z")

</div>

> What the?? I just spent two days trying to figure out why I couldn't  
> reproduce the example in "Ruby in 20 minutes" and get it to work. After  
> examining my code line for line against the example code and not being  
> able to detect any error, I was assembling several code examples into a  
> text file to post here, when I happened to notice 'elsif'. Why  
> didn't Ruby flag 'elseif' as an error?

Because it nvere sees it ☹

Look at two examples

if true then  
&nbsp;&nbsp;&nbsp;whatever  
&nbsp;&nbsp;&nbsp;elseif  
end

now elsif is seen as an undefined method but

if false then  
&nbsp;&nbsp;whatever  
&nbsp;&nbsp;elseif  
end

whatever and elseif are not evaluated.

I strongly advice you to use a syntax highlighting ediotr like e.g.  
vim, emacs, Jedit, geany and tons of others.

Cheers  
Robert

> **···**
>
> On 3/7/07, 7stud 7stud \<dolgun@excite.com\> wrote:
> 
> > Does Ruby try differentiate itself in ridiculous ways like that just for  
> > the sake of being different? And why isn't something like that  
> > explicitly pointed out in a beginning tutorial? So far, I have to give  
> > Ruby two thumbs down.
> > 
> > C++, Java, Javascript, php, Servlets+JSP programmer
> > 
> > --  
> > Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).
> 
> --  
> We have not succeeded in answering all of our questions.  
> In fact, in some ways, we are more confused than ever.  
> But we feel we are confused on a higher level and about more important things.  
> -Anonymous

---

<div class="post-metadata">

**Author:** ![Hans\_Sjunnesson](https://avatars.discourse-cdn.com/v4/letter/h/6de8d8/32.png) [@Hans\_Sjunnesson](https://rubytalk.org/u/Hans_Sjunnesson)\
**Post date:** [7 March 2007 09:20 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/4 "2007-03-07T09:20:05Z")

</div>

Well, Ruby doesn't try to differentiate itself in ridiculous ways just  
for the sake of being different. It's not a person.  
However, it will spit out a "undefined method 'elseif' for main:Object  
(NoMethodError)" when you use 'elseif', so it's really not a problem  
is it?

> **···**
>
> On Mar 7, 9:56 am, 7stud 7stud \<dol...@excite.com\> wrote:
> 
> > What the?? I just spent two days trying to figure out why I couldn't  
> > reproduce the example in "Ruby in 20 minutes" and get it to work. After  
> > examining my code line for line against the example code and not being  
> > able to detect any error, I was assembling several code examples into a  
> > text file to post here, when I happened to notice 'elsif'. Why  
> > didn't Ruby flag 'elseif' as an error?
> > 
> > Does Ruby try differentiate itself in ridiculous ways like that just for  
> > the sake of being different? And why isn't something like that  
> > explicitly pointed out in a beginning tutorial? So far, I have to give  
> > Ruby two thumbs down.
> > 
> > C++, Java, Javascript, php, Servlets+JSP programmer
> > 
> > --  
> > Posted viahttp://www.ruby-forum.com/.
> 
> --  
> Hans

---

<div class="post-metadata">

**Author:** ![David\_A\_Black3](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@David\_A\_Black3](https://rubytalk.org/u/David_A_Black3)\
**Post date:** [7 March 2007 13:17 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/5 "2007-03-07T13:17:48Z")

</div>

Hi --

> **···**
>
> On 3/7/07, 7stud 7stud \<dolgun@excite.com\> wrote:
> 
> > Does Ruby try differentiate itself in ridiculous ways like that just for  
> > the sake of being different?
> 
> No -- literally never.
> 
> David
> 
> --  
> Q. What is THE Ruby book for Rails developers?  
> A. RUBY FOR RAILS by David A. Black ([http://www.manning.com/black\](http://www.manning.com/black%5C))  
> &nbsp;&nbsp;&nbsp;(See what readers are saying! [http://www.rubypal.com/r4rrevs.pdf\](http://www.rubypal.com/r4rrevs.pdf%5C))  
> Q. Where can I get Ruby/Rails on-site training, consulting, coaching?  
> A. Ruby Power and Light, LLC ([http://www.rubypal.com](http://www.rubypal.com))

---

<div class="post-metadata">

**Author:** ![Brian\_Adkins1](https://avatars.discourse-cdn.com/v4/letter/b/258eb7/32.png) [@Brian\_Adkins1](https://rubytalk.org/u/Brian_Adkins1)\
**Post date:** [7 March 2007 16:25 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/6 "2007-03-07T16:25:08Z")

</div>

7stud 7stud wrote:

> What the?? I just spent two days trying to figure out why I couldn't  
> reproduce the example in "Ruby in 20 minutes" and get it to work. After  
> examining my code line for line against the example code and not being  
> able to detect any error, I was assembling several code examples into a  
> text file to post here, when I happened to notice 'elsif'. Why  
> didn't Ruby flag 'elseif' as an error?
> 
> Does Ruby try differentiate itself in ridiculous ways like that just for  
> the sake of being different? And why isn't something like that  
> explicitly pointed out in a beginning tutorial? So far, I have to give  
> Ruby two thumbs down.
> 
> C++, Java, Javascript, php, Servlets+JSP programmer

I have a similar language background (minus php). When I first looked at Ruby, I spent a few minutes flipping through the Pickaxe, spotted what I felt were some "Perlisms", and made a knee jerk reaction to reject the language. I've since talked to a few folks who did the same, so mine was not an isolated incident.

It was about a year later that I came back to Ruby (because of Rails) and discovered that I like the language (a lot). I'm sharing this because learning from other people's experience can be helpful. I don't know if you'll end up enjoying the language as much as I have, but it may be worthwhile to invest some more time with it before deciding. I even realized that I actually like a few of the "Perlisms" - the horror! 🙂

---

<div class="post-metadata">

**Author:** ![Stefano\_Crocco](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Stefano\_Crocco](https://rubytalk.org/u/Stefano_Crocco)\
**Post date:** [7 March 2007 09:36 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/7 "2007-03-07T09:36:20Z")

</div>

Alle mercoledì 7 marzo 2007, Robert Dober ha scritto:

> if true then  
> whatever  
> elseif  
> end
> 
> now elsif is seen as an undefined method but

Not always. In Robert's first example,

> if true then  
> &nbsp;&nbsp;&nbsp;whatever  
> &nbsp;&nbsp;&nbsp;elseif  
> end

you'll get a NameError (undefined local variable or method `elseif' for  
main:Object (NameError))

In the following example, instead, you get a syntax error:

if x \< 0 then puts "x\<0"  
elseif x \< 3 then puts "0\<=x\<3"  
else puts "x\>=3"  
end

The error message is:

syntax error, unexpected kTHEN, expecting kEND  
elseif x \< 3 then puts "0\<=x\<3"  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^  
Here, ruby doesn't complain because elseif doesn't exist, but because it finds  
a 'then' where it shouldn't be (not following an if or elsif clause). By the  
way, being a syntax error (it when the interpreter is parsing the file, not  
when it executes it), this error is reported whatever the value of x is (and  
even if x doesn't exist).

All these error messages aren't very easy to understand for a novice. To make  
a comparison with other programming languages, I tried compiling a C program  
with a similar mistake (in this case writing 'elseif' instead of 'else if').  
The program was:

int main(){  
int a=3;  
int b=0;  
if( a==4){ b=1;}  
elseif(a==2){ b=2;} //should be else if  
else{ b=3;}}  
}

Compiling with gcc, the error message I got is:

test.c: In function 'main':  
test.c:5: error: expected ';' before '{' token

As you can see, the error message doesn't speak of invalid keywords, but just  
of a missing ;

Stefano

---

<div class="post-metadata">

**Author:** ![Forum](https://avatars.discourse-cdn.com/v4/letter/f/43a26b/32.png) [@Forum](https://rubytalk.org/u/Forum)\
**Post date:** [7 March 2007 09:37 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/8 "2007-03-07T09:37:04Z")

</div>

No of course it is not 🙂  
I think to understand the frustration of OP however.  
He is probably coming from a completely different world and it is not  
always easy to grasp new concepts.  
Therefore I preferred to ignore the aggressive nature of the post ;).  
He might even have a point when he says that this is maybe not really  
well documented, With this I do not mean the "elseif" of course but  
just the dynamic evaluation of the code.

Maybe a chapter for that kind of pitfalls could be added somewhere -  
well it probably is already, maybe somebody can indicate that.

This is however not a clearcut thing as it might seem at first view.

Robert

> **···**
>
> On 3/7/07, Hans Sjunnesson \<hans.sjunnesson@gmail.com\> wrote:
> 
> > On Mar 7, 9:56 am, 7stud 7stud \<dol...@excite.com\> wrote:  
> > \> What the?? I just spent two days trying to figure out why I couldn't  
> > \> reproduce the example in "Ruby in 20 minutes" and get it to work. After  
> > \> examining my code line for line against the example code and not being  
> > \> able to detect any error, I was assembling several code examples into a  
> > \> text file to post here, when I happened to notice 'elsif'. Why  
> > \> didn't Ruby flag 'elseif' as an error?  
> > \>  
> > \> Does Ruby try differentiate itself in ridiculous ways like that just for  
> > \> the sake of being different? And why isn't something like that  
> > \> explicitly pointed out in a beginning tutorial? So far, I have to give  
> > \> Ruby two thumbs down.  
> > \>  
> > \> C++, Java, Javascript, php, Servlets+JSP programmer  
> > \>  
> > \> --  
> > \> Posted viahttp://www.ruby-forum.com/.
> > 
> > Well, Ruby doesn't try to differentiate itself in ridiculous ways just  
> > for the sake of being different. It's not a person.  
> > However, it will spit out a "undefined method 'elseif' for main:Object  
> > (NoMethodError)" when you use 'elseif', so it's really not a problem  
> > is it?
> > 
> > --  
> > Hans
> 
> --  
> We have not succeeded in answering all of our questions.  
> In fact, in some ways, we are more confused than ever.  
> But we feel we are confused on a higher level and about more important things.  
> -Anonymous

---

<div class="post-metadata">

**Author:** ![Jenda\_Krynicky](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@Jenda\_Krynicky](https://rubytalk.org/u/Jenda_Krynicky)\
**Post date:** [7 March 2007 13:38 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/9 "2007-03-07T13:38:00Z")

</div>

David A. Black wrote:

> Hi --
> 
> > Does Ruby try differentiate itself in ridiculous ways like that just for  
> > the sake of being different?
> 
> No -- literally never.
> 
> David

Yeah. Like the use of "throw" and "catch"; ".inject"; "yieieild" that's  
not really the yield of coroutines, but just a way to call the unnamed  
closure (or the unnamed unnamed function) that was passed to the method  
as the last parameter; the fact that "and" and "or" have the same  
precedence, while && has bigger precedence than ||, etc. etc. etc.

The fact that I'm supposed to write

puts 1 + 2 +  
&nbsp;&nbsp;3

or

puts 1 + 2 \  
&nbsp;&nbsp;+ 3

(Visual Basic anyone?) it fairly ... wuby as well.

> **···**
>
> > On 3/7/07, 7stud 7stud \<dolgun@excite.com\> wrote:
> 
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Jenda\_Krynicky](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@Jenda\_Krynicky](https://rubytalk.org/u/Jenda_Krynicky)\
**Post date:** [7 March 2007 16:45 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/10 "2007-03-07T16:45:25Z")

</div>

Brian Adkins wrote:

> 7stud 7stud wrote:
> 
> > explicitly pointed out in a beginning tutorial? So far, I have to give  
> > Ruby two thumbs down.
> > 
> > C++, Java, Javascript, php, Servlets+JSP programmer
> 
> I have a similar language background (minus php). When I first looked at  
> Ruby, I spent a few minutes flipping through the Pickaxe, spotted what I  
> felt were some "Perlisms", and made a knee jerk reaction to reject the  
> language. I've since talked to a few folks who did the same, so mine was  
> not an isolated incident.
> 
> It was about a year later that I came back to Ruby (because of Rails)  
> and discovered that I like the language (a lot). I'm sharing this  
> because learning from other people's experience can be helpful. I don't  
> know if you'll end up enjoying the language as much as I have, but it  
> may be worthwhile to invest some more time with it before deciding. I  
> even realized that I actually like a few of the "Perlisms" - the horror!  
> 🙂

Don't worry. They'll go away. The Wuby moto is break what works, rename  
what's commonly known and add gotchas for fun.

Jenda

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Andrew\_Koenig](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Andrew\_Koenig](https://rubytalk.org/u/Andrew_Koenig)\
**Post date:** [7 March 2007 17:15 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/11 "2007-03-07T17:15:07Z")

</div>

"Chad Perrin" \<perrin@apotheon.com\> wrote in message  
news:20070307085933.GB25634@apotheon.com...

> "Different" would be more like the way bash does it: "elif"

Different?

Algol 68 spelled it that way in 1967, a spelling that the Bourne Shell  
adopted in Unix in 1977.

---

<div class="post-metadata">

**Author:** ![Chris7](https://avatars.discourse-cdn.com/v4/letter/c/439d5e/32.png) [@Chris7](https://rubytalk.org/u/Chris7)\
**Post date:** [7 March 2007 09:59 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/12 "2007-03-07T09:59:17Z")

</div>

> Maybe a chapter for that kind of pitfalls could be added somewhere -  
> well it probably is already, maybe somebody can indicate that.

Perhaps at the "Ruby from other languages" page :  
[http://www.ruby-lang.org/en/documentation/ruby-from-other-languages/](http://www.ruby-lang.org/en/documentation/ruby-from-other-languages/)

I find this page very helpful.

Regards,

Chris

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Forum](https://avatars.discourse-cdn.com/v4/letter/f/43a26b/32.png) [@Forum](https://rubytalk.org/u/Forum)\
**Post date:** [7 March 2007 10:29 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/13 "2007-03-07T10:29:48Z")

</div>

\<snip\>

Good points Stefano, conclusion \*always\* use "then" 🙂

> **···**
>
> On 3/7/07, Stefano Crocco \<[stefano.crocco@alice.it](mailto:stefano.crocco@alice.it)\> wrote:  
> --  
> We have not succeeded in answering all of our questions.  
> In fact, in some ways, we are more confused than ever.  
> But we feel we are confused on a higher level and about more important things.  
> -Anonymous

---

<div class="post-metadata">

**Author:** ![7stud1](https://avatars.discourse-cdn.com/v4/letter/7/59ef9b/32.png) [@7stud1](https://rubytalk.org/u/7stud1)\
**Post date:** [7 March 2007 18:50 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/14 "2007-03-07T18:50:17Z")

</div>

> Don't worry. They'll go away. The Wuby moto is break what works, rename  
> what's commonly known and add gotchas for fun.

I've seen it mentioned a couple of times--what the heck is wuby?

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Michael\_P\_Soulier](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@Michael\_P\_Soulier](https://rubytalk.org/u/Michael_P_Soulier)\
**Post date:** [8 March 2007 02:42 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/15 "2007-03-08T02:42:11Z")

</div>

Not to mention that Ruby builds on Perl, which uses elsif.

Mike

> **···**
>
> On 08/03/07 Andrew Koenig said:
> 
> > Different?
> > 
> > Algol 68 spelled it that way in 1967, a spelling that the Bourne Shell  
> > adopted in Unix in 1977.
> 
> --  
> Michael P. Soulier \<msoulier@digitaltorque.ca\>  
> "Any intelligent fool can make things bigger and more complex... It  
> takes a touch of genius - and a lot of courage to move in the opposite  
> direction." --Albert Einstein

---

<div class="post-metadata">

**Author:** ![James\_Britt](https://avatars.discourse-cdn.com/v4/letter/j/22d042/32.png) [@James\_Britt](https://rubytalk.org/u/James_Britt)\
**Post date:** [8 March 2007 03:30 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/16 "2007-03-08T03:30:41Z")

</div>

Remember in those days, heck even in the 80's languages and tools (programs) used the shortest names possible because computing power and memory were at a premium so even saving one character made a difference. Thus we get all these sick little names for Unix tools, love them or hate them.

> **···**
>
> On Mar 8, 2007, at 2:15 AM, Andrew Koenig wrote:
> 
> > "Chad Perrin" \<perrin@apotheon.com\> wrote in message  
> > news:20070307085933.GB25634@apotheon.com...
> > 
> > > "Different" would be more like the way bash does it: "elif"
> > 
> > Different?
> > 
> > Algol 68 spelled it that way in 1967, a spelling that the Bourne Shell  
> > adopted in Unix in 1977.

---

<div class="post-metadata">

**Author:** ![Chad\_Perrin1](https://avatars.discourse-cdn.com/v4/letter/c/977dab/32.png) [@Chad\_Perrin1](https://rubytalk.org/u/Chad_Perrin1)\
**Post date:** [8 March 2007 06:23 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/17 "2007-03-08T06:23:24Z")

</div>

I was being slightly facetious. I really don't see anything  
particularly wrong with any of these variations that have been discussed  
here.

> **···**
>
> On Thu, Mar 08, 2007 at 02:15:07AM +0900, Andrew Koenig wrote:
> 
> > "Chad Perrin" \<perrin@apotheon.com\> wrote in message  
> > news:20070307085933.GB25634@apotheon.com...
> > 
> > \> "Different" would be more like the way bash does it: "elif"
> > 
> > Different?
> > 
> > Algol 68 spelled it that way in 1967, a spelling that the Bourne Shell  
> > adopted in Unix in 1977.
> 
> --  
> CCD CopyWrite Chad Perrin [[http://ccd.apotheon.org](http://ccd.apotheon.org) ]  
> print substr("Just another Perl hacker", 0, -2);

---

<div class="post-metadata">

**Author:** ![7stud1](https://avatars.discourse-cdn.com/v4/letter/7/59ef9b/32.png) [@7stud1](https://rubytalk.org/u/7stud1)\
**Post date:** [7 March 2007 10:54 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/18 "2007-03-07T10:54:15Z")

</div>

Chris Lowis wrote:

> > Maybe a chapter for that kind of pitfalls could be added somewhere -  
> > well it probably is already, maybe somebody can indicate that.
> 
> Perhaps at the "Ruby from other languages" page :  
> [Ruby From Other Languages](http://www.ruby-lang.org/en/documentation/ruby-from-other-languages/)
> 
> I find this page very helpful.
> 
> Regards,
> 
> Chris

First, I'd like to say that the web site is really beautiful and eye  
catching. There are some minor problems, for instance, the code  
examples are in a small area width wise, so there is a horizontal scroll  
bar that you need to scroll to the right to see the latter portion of a  
line of code. However, the area with the code is very tall(more than  
one screen), and it is very inconvenient to page all the way down to the  
bottom in order to scroll to the right, and then go all the way back up  
in order to read the code. Also, no matter how wide I make my browser  
window(Safari 2.0.4), the area with the code does not expand  
horizontally. It should expand horizontally as the browser window gets  
wider, and the horizontal scroll bars should disappear.

If I run the following code, I don't get any errors:

class MegaGreeter  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attr\_accessor :names

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#constructor  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def initialize(names = "world")  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@names = names  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#functions:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def say\_hi  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if @names.nil?  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;puts "..."  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elseif @names.respond\_to?("each")  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@names.each do |name|  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;puts "Hello #{name}!"  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;puts "Hello #{@names}!"  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end  
end  
if \_\_FILE\_\_ == $0  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mg = MegaGreeter.new(["Sally", "Jane", "Bob"])  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mg.say\_hi  
end

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Austin\_Ziegler5](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/austin_ziegler5/32/1985_2.png) [@Austin\_Ziegler5](https://rubytalk.org/u/Austin_Ziegler5)\
**Post date:** [7 March 2007 18:52 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/19 "2007-03-07T18:52:40Z")

</div>

Jenda, at least this version of Jenda since others seem to recognise  
said person as a positive influence in the Perl world at one point, is  
a troll.

There's absolutely nothing of value in what Jenda says at this point.

-austin

> **···**
>
> On 3/7/07, 7stud 7stud \<dolgun@excite.com\> wrote:
> 
> > \> Don't worry. They'll go away. The Wuby moto is break what works, rename  
> > \> what's commonly known and add gotchas for fun.  
> > I've seen it mentioned a couple of times--what the heck is wuby?
> 
> --  
> Austin Ziegler \* halostatue@gmail.com \* [http://www.halostatue.ca/](http://www.halostatue.ca/)  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\* austin@halostatue.ca \* [You are in a maze of twisty little passages, all alike. // halo • statue](http://www.halostatue.ca/feed/)  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\* austin@zieglers.ca

---

<div class="post-metadata">

**Author:** ![Chad\_Perrin1](https://avatars.discourse-cdn.com/v4/letter/c/977dab/32.png) [@Chad\_Perrin1](https://rubytalk.org/u/Chad_Perrin1)\
**Post date:** [8 March 2007 06:14 UTC](https://rubytalk.org/t/elseif-v-elsif/35946/20 "2007-03-08T06:14:36Z")

</div>

It's a sarcastic, trollish way of saying "Ruby" if you're trying to  
convey a sense that it is childish. The only person I've ever seen use  
that spelling is "Jenda", and it's already getting old. If you're going  
to choose to avoid Ruby, please don't do so because of what a troll  
said.

> **···**
>
> On Thu, Mar 08, 2007 at 03:50:17AM +0900, 7stud 7stud wrote:
> 
> > \> Don't worry. They'll go away. The Wuby moto is break what works, rename  
> > \> what's commonly known and add gotchas for fun.
> > 
> > I've seen it mentioned a couple of times--what the heck is wuby?
> 
> --  
> CCD CopyWrite Chad Perrin [[http://ccd.apotheon.org](http://ccd.apotheon.org) ]  
> "There comes a time in the history of any project when it becomes necessary  
> to shoot the engineers and begin production." - MacUser, November 1990

[Next page](https://rubytalk.org/t/elseif-v-elsif/35946.md?page=2)
