# The power of ruby

**URL:** <https://rubytalk.org/t/the-power-of-ruby/1296>\
**Category:** ruby-talk\
**Created:** [20 August 2002 20:30 UTC](https://rubytalk.org/t/the-power-of-ruby/1296 "2002-08-20T20:30:53Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![AW11](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@AW11](https://rubytalk.org/u/AW11)\
**Post date:** [20 August 2002 20:30 UTC](https://rubytalk.org/t/the-power-of-ruby/1296/1 "2002-08-20T20:30:53Z")

</div>

Hi,  
As i get better writing ruby scripts (im pretty new), I often wonder  
if im not exploiting the power of the language or that i’m casting  
precedural language ideas onto my ruby scripts. I have here a little C  
program that would like some of you to Rubi-tize if possible, so that  
i can see how some of you that really know the language use it.

[code]============================================

#include \<stdio.h\>  
#include \<stdlib.h\>  
int I;  
/_-----------------------------_/  
void dodot(int x){  
while(x\>0){  
printf(" “);  
x–;  
}  
printf(”_\n");  
sleep(10);  
}  
/_-----------------------------\*/  
int main(int argc, char \*argv[])  
{  
while(1){  
while(I\<75){  
dodot(I);  
I++;  
}  
while(I\>0){  
dodot(I);  
I–;  
}  
}  
return 0;  
}  
[/code]=============================================

Here is my unimaginitive attempt.

`==============================================
WIDTH=78;
def do_dot(i)
       i.times{print " "}
       puts "*";
end
loop{
       0.upto(WIDTH-1){|i|
               do_dot(i);
       }
       WIDTH.downto(1){|i|
               do_dot(i);
       }       
}
`=============================================

Thanks.

---

<div class="post-metadata">

**Author:** ![why\_the\_lucky\_stiff1](https://avatars.discourse-cdn.com/v4/letter/w/898d66/32.png) [@why\_the\_lucky\_stiff1](https://rubytalk.org/u/why_the_lucky_stiff1)\
**Post date:** [20 August 2002 21:11 UTC](https://rubytalk.org/t/the-power-of-ruby/1296/2 "2002-08-20T21:11:13Z")

</div>

Yours is rather succinct, but I find that you can often capitalize  
on return values of methods to shorten. Shorten, right? You’re  
looking for shorter?

Here’s one:

WIDTH = 78  
def do\_dot( i )  
puts( ( " " \* i ) + “\*” )  
end  
loop {  
WIDTH.times { |i| do\_dot(i) }.downto(0) { |i| do\_dot(i) }  
}

Check ya later.

\_why

> **···**
>
> AW ([sturmpanzer@metacrawler.com](mailto:sturmpanzer@metacrawler.com)) wrote:
> 
> > Here is my unimaginitive attempt.
> > 
> > `==============================================
> > WIDTH=78;
> > def do_dot(i)
> > i.times{print " "}
> > puts "*";
> > end
> > loop{
> > 0.upto(WIDTH-1){|i|
> > do_dot(i);
> > }
> > WIDTH.downto(1){|i|
> > do_dot(i);
> > }       
> > }
> > `=============================================

---

<div class="post-metadata">

**Author:** ![Gavin\_Sinclair](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Gavin\_Sinclair](https://rubytalk.org/u/Gavin_Sinclair)\
**Post date:** [21 August 2002 01:47 UTC](https://rubytalk.org/t/the-power-of-ruby/1296/3 "2002-08-21T01:47:34Z")

</div>

My “imaginative” attempt is below.

> Hi,  
> As i get better writing ruby scripts (im pretty new), I often wonder if  
> im not exploiting the power of the language or that i’m casting  
> precedural language ideas onto my ruby scripts. I have here a little C  
> program that would like some of you to Rubi-tize if possible, so that i  
> can see how some of you that really know the language use it.
> 
> [snip C code]
> 
> Here is my unimaginitive attempt.
> 
> `==============================================
> WIDTH=78;
> def do_dot(i)
> i.times{print " "}
> puts "*";
> end
> loop{
> 0.upto(WIDTH-1){|i|
> do_dot(i);
> }
> WIDTH.downto(1){|i|
> do_dot(i);
> }
> }
> `=============================================
> 
> Thanks.

=begin  
starfield.rb, by Gavin Sinclair

This is a verbose, almost obfuscated implementation of a simple  
program in Ruby. It is intended to demonstrate the following just  
for the sake of it:  
- class  
- attr\_reader  
- Comparable mixin  
- Range, esp. of user-defined type  
- for x in y syntax  
- array manipulation  
=end

WIDTH = 78

class Star  
include Comparable # Import comparison operations \<, ==, …

attr\_reader :n # Attribute ‘:n’ can be read through auto-defined  
# method ‘n’.

def initialize(n) # Called when a new Star object is created.  
@n = n  
end

def \<=\>(other) # Compare to another Star.  
@n \<=\> other.n  
end

def succ # Next element in sequence, needed for Range.  
Star.new(@n+1)  
end

def to\_s # The value that is returned when the object is  
" " \* @n + “\*” # coerced into a String.  
end  
end

# We can create a Range of Stars.

starfield = Star.new(0) .. Star.new(WIDTH)

loop do

# Print them in turn.

for star in starfield  
puts star  
end

# To print them going back, we have to get dirty. Note that we

# ignore the rightmost star, to get the effect you want.

for star in starfield.to\_a.reverse[1..-1]  
puts star  
end  
end

(END OF CODE)

Cheers,  
Gavin

---

<div class="post-metadata">

**Author:** ![Paul\_Brannan](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@Paul\_Brannan](https://rubytalk.org/u/Paul_Brannan)\
**Post date:** [21 August 2002 13:38 UTC](https://rubytalk.org/t/the-power-of-ruby/1296/4 "2002-08-21T13:38:34Z")

</div>

I thought it might be interesting to write an iterator:

WIDTH=78

def do\_dot(i)  
puts “#{’ ’ \* i}\*”  
sleep 0.01  
end

def up\_and\_down(low, high)  
low.upto(high-1) do |i|  
yield i  
end  
high.downto(low+1) do |i|  
yield i  
end  
end

loop do  
up\_and\_down(0, WIDTH) do |i|  
do\_dot(i)  
end  
end

The idea here is to separate what happens on each iteration from the  
iterating itself, and perhaps to be able to re-use the iterator  
somewhere else.

I also added a sleep, because otherwise the stars jump around a bit too  
much in my terminal (Eterm).

Paul

> **···**
>
> On Wed, Aug 21, 2002 at 05:30:53AM +0900, AW wrote:
> 
> > As i get better writing ruby scripts (im pretty new), I often wonder  
> > if im not exploiting the power of the language or that i’m casting  
> > precedural language ideas onto my ruby scripts. I have here a little C  
> > program that would like some of you to Rubi-tize if possible, so that  
> > i can see how some of you that really know the language use it.

---

<div class="post-metadata">

**Author:** ![Robert\_McGovern](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@Robert\_McGovern](https://rubytalk.org/u/Robert_McGovern)\
**Post date:** [21 August 2002 16:32 UTC](https://rubytalk.org/t/the-power-of-ruby/1296/5 "2002-08-21T16:32:33Z")

</div>

AW wrote:

> Hi,  
> As i get better writing ruby scripts (im pretty new), I often wonder  
> if im not exploiting the power of the language or that i’m casting  
> precedural language ideas onto my ruby scripts. I have here a little C  
> program that would like some of you to Rubi-tize if possible, so that  
> i can see how some of you that really know the language use it.

I’m very new, only started looking at Ruby Saturday / Sunday time. I  
like it though 🙂

Without looking at anyones attempts other than the C code, this is my  
stab at it.

/-- code --/

# example to print stars to screen

def printStar(location)  
(1…location).each { |x| print " " }  
print “\*\n”  
end

screenWidth = 78;

if ARGV.size == 1  
# use argument unless its not a int (to\_i returns 0 if item not an integer)  
screenWidth = ARGV[0].to\_i unless ARGV[0].to\_i == 0  
end

# forward

1.upto(screenWidth) {|n| printStar(n)}

# back

screenWidth.downto(1) {|n| printStar(n)}

---

<div class="post-metadata">

**Author:** ![AW11](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@AW11](https://rubytalk.org/u/AW11)\
**Post date:** [21 August 2002 00:11 UTC](https://rubytalk.org/t/the-power-of-ruby/1296/6 "2002-08-21T00:11:16Z")

</div>

Wow, Doing it that way had never accured to me.  
How does that work that you can use dot notation from a bracket ‘}’ ?  
I keep looking at the last line and I cant seem to grasp its  
relationship, I mean, If the first set of ‘{}’ are containing the loop  
from the ‘.times’ method, how do the second set relate?  
Now i’m really confused. Thank you! 😉

> Yours is rather succinct, but I find that you can often capitalize  
> on return values of methods to shorten. Shorten, right? You’re  
> looking for shorter?

Im looking for exactly what you gave. different ways to express the  
same output in Ruby. Shorter, longer, obsfucated, clear.  
I just hope others will chime in and give some examples of their own  
style.

> **···**
>
> > Here’s one:
> > 
> > WIDTH = 78  
> > def do\_dot( i )  
> > puts( ( " " \* i ) + “\*” )  
> > end  
> > loop {  
> > WIDTH.times { |i| do\_dot(i) }.downto(0) { |i| do\_dot(i) }  
> > }
> > 
> > Check ya later.
> > 
> > \_why
> > 
> > AW ([sturmpanzer@metacrawler.com](mailto:sturmpanzer@metacrawler.com)) wrote:
> > 
> > > Here is my unimaginitive attempt.
> > > 
> > > `==============================================
> > > WIDTH=78;
> > > def do_dot(i)
> > > i.times{print " "}
> > > puts "*";
> > > end
> > > loop{
> > > 0.upto(WIDTH-1){|i|
> > > do_dot(i);
> > > }
> > > WIDTH.downto(1){|i|
> > > do_dot(i);
> > > }       
> > > }
> > > `=============================================

---

<div class="post-metadata">

**Author:** ![AW11](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@AW11](https://rubytalk.org/u/AW11)\
**Post date:** [21 August 2002 19:33 UTC](https://rubytalk.org/t/the-power-of-ruby/1296/7 "2002-08-21T19:33:22Z")

</div>

puts “#{’ ’ \* i}\*” ← That’s a very nice way of doing it.  
I think sometimes i forget the “_Everything_ is an object” concept. 😉

> **···**
>
> > I thought it might be interesting to write an iterator:
> > 
> > WIDTH=78
> > 
> > def do\_dot(i)  
> > puts “#{’ ’ \* i}\*”  
> > sleep 0.01  
> > end
> > 
> > def up\_and\_down(low, high)  
> > low.upto(high-1) do |i|  
> > yield i  
> > end  
> > high.downto(low+1) do |i|  
> > yield i  
> > end  
> > end
> > 
> > loop do  
> > up\_and\_down(0, WIDTH) do |i|  
> > do\_dot(i)  
> > end  
> > end
> > 
> > The idea here is to separate what happens on each iteration from the  
> > iterating itself, and perhaps to be able to re-use the iterator  
> > somewhere else.
> > 
> > I also added a sleep, because otherwise the stars jump around a bit too  
> > much in my terminal (Eterm).
> > 
> > Paul

---

<div class="post-metadata">

**Author:** ![AW11](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@AW11](https://rubytalk.org/u/AW11)\
**Post date:** [21 August 2002 19:33 UTC](https://rubytalk.org/t/the-power-of-ruby/1296/8 "2002-08-21T19:33:26Z")

</div>

Great example!  
Thats a lot to chew on.

> **···**
>
> > My “imaginative” attempt is below.
> > 
> > =begin  
> > starfield.rb, by Gavin Sinclair
> > 
> > This is a verbose, almost obfuscated implementation of a simple  
> > program in Ruby. It is intended to demonstrate the following just  
> > for the sake of it:
> > 
> > - class
> > - attr\_reader
> > - Comparable mixin
> > - Range, esp. of user-defined type
> > - for x in y syntax
> > - array manipulation  
> > =end
> > 
> > WIDTH = 78
> > 
> > class Star  
> > include Comparable # Import comparison operations \<, ==, …
> > 
> > attr\_reader :n # Attribute ‘:n’ can be read through auto-defined  
> > # method ‘n’.
> > 
> > def initialize(n) # Called when a new Star object is created.  
> > @n = n  
> > end
> > 
> > def \<=\>(other) # Compare to another Star.  
> > @n \<=\> other.n  
> > end
> > 
> > def succ # Next element in sequence, needed for Range.  
> > Star.new(@n+1)  
> > end
> > 
> > def to\_s # The value that is returned when the object is  
> > " " \* @n + “\*” # coerced into a String.  
> > end  
> > end
> > 
> > # We can create a Range of Stars.
> > 
> > starfield = Star.new(0) … Star.new(WIDTH)
> > 
> > loop do
> > 
> > # Print them in turn.
> > 
> > for star in starfield  
> > puts star  
> > end
> > 
> > # To print them going back, we have to get dirty. Note that we
> > 
> > # ignore the rightmost star, to get the effect you want.
> > 
> > for star in starfield.to\_a.reverse[1…-1]  
> > puts star  
> > end  
> > end
> > 
> > (END OF CODE)
> > 
> > Cheers,  
> > Gavin

---

<div class="post-metadata">

**Author:** ![why\_the\_lucky\_stiff1](https://avatars.discourse-cdn.com/v4/letter/w/898d66/32.png) [@why\_the\_lucky\_stiff1](https://rubytalk.org/u/why_the_lucky_stiff1)\
**Post date:** [21 August 2002 00:46 UTC](https://rubytalk.org/t/the-power-of-ruby/1296/9 "2002-08-21T00:46:58Z")

</div>

> Wow, Doing it that way had never accured to me.  
> How does that work that you can use dot notation from a bracket ‘}’ ?  
> I keep looking at the last line and I cant seem to grasp its  
> relationship, I mean, If the first set of ‘{}’ are containing the loop  
> from the ‘.times’ method, how do the second set relate?  
> Now i’m really confused. Thank you! 😉

The bracketed code is a Proc object and I’m just manipulating its  
return value directly. I could do this:

n = 78.times { |i|  
do\_dot( i )  
}  
n.downto( 0 ) { |i|  
do\_dot( i )  
}

See, the Integer#times method returns the original Integer. So does  
Integer#downto. Try these in IRb:

5.times {}  
==\>5  
5.downto( 0 ) {}  
==\>5

So I can manipulate the return value by calling methods from the block.  
The above code can be rewritten:

78.times do |i|  
do\_dot( i )  
end.  
downto( 0 ) do |i|  
do\_dot( i )  
end

I have thought there might be a way to loop up and down through a Range  
or Integer in Ruby in a single call, but I could think of how to do it  
without adding a method to Integer or Range and wasting more chars than  
the above.

> Im looking for exactly what you gave. different ways to express the  
> same output in Ruby. Shorter, longer, obsfucated, clear.  
> I just hope others will chime in and give some examples of their own  
> style.

Well, in that case, I’ll include one that overrides Fixnum for ya:

def do\_dot( i )  
puts “#{’ ’ \* i}\*”  
end  
class Fixnum  
def up\_and\_down( &p )  
times( &p ); downto( 0, &p )  
end  
end  
while 78.up\_and\_down { |i| do\_dot( i ) }; end

Good luck.

\_why

> **···**
>
> AW ([sturmpanzer@metacrawler.com](mailto:sturmpanzer@metacrawler.com)) wrote:

---

<div class="post-metadata">

**Author:** ![Shashank\_Date](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@Shashank\_Date](https://rubytalk.org/u/Shashank_Date)\
**Post date:** [21 August 2002 01:11 UTC](https://rubytalk.org/t/the-power-of-ruby/1296/10 "2002-08-21T01:11:15Z")

</div>

> I keep looking at the last line and I cant seem to grasp its  
> relationship, I mean, If the first set of ‘{}’ are containing the loop  
> from the ‘.times’ method, how do the second set relate?

The .times method returns an int, try this :

C:\> ruby -e “puts 5.times{}”  
5  
C:\>

The block in curly brace: { |i| do\_dot(i) } is only a parameter to .times.  
Imagine it thus:

WIDTH.times( block\_in\_curly\_brace)

Since the return value of this function is an int you can cascade it to get

WIDTH.times( block\_in\_curly\_brace).downto(0) { |i| do\_dot(i) }

> Now i’m really confused. Thank you! 😉

Hope I have not confused you more 😉

– Shanko

> **···**
>
> > > Yours is rather succinct, but I find that you can often capitalize  
> > > on return values of methods to shorten. Shorten, right? You’re  
> > > looking for shorter?
> > 
> > Im looking for exactly what you gave. different ways to express the  
> > same output in Ruby. Shorter, longer, obsfucated, clear.  
> > I just hope others will chime in and give some examples of their own  
> > style.
> > 
> > > Here’s one:
> > > 
> > > WIDTH = 78  
> > > def do\_dot( i )  
> > > puts( ( " " \* i ) + “\*” )  
> > > end  
> > > loop {  
> > > WIDTH.times { |i| do\_dot(i) }.downto(0) { |i| do\_dot(i) }  
> > > }
> > > 
> > > Check ya later.
> > > 
> > > \_why
> > > 
> > > AW ([sturmpanzer@metacrawler.com](mailto:sturmpanzer@metacrawler.com)) wrote:
> > > 
> > > > Here is my unimaginitive attempt.
> > > > 
> > > > `==============================================
> > > > WIDTH=78;
> > > > def do_dot(i)
> > > > i.times{print " "}
> > > > puts "*";
> > > > end
> > > > loop{
> > > > 0.upto(WIDTH-1){|i|
> > > > do_dot(i);
> > > > }
> > > > WIDTH.downto(1){|i|
> > > > do_dot(i);
> > > > }
> > > > }
> > > > `=============================================

---

<div class="post-metadata">

**Author:** ![Gavin\_Sinclair](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Gavin\_Sinclair](https://rubytalk.org/u/Gavin_Sinclair)\
**Post date:** [22 August 2002 16:16 UTC](https://rubytalk.org/t/the-power-of-ruby/1296/11 "2002-08-22T16:16:35Z")

</div>

I understand you’re fairly new to Ruby, AW, but I must give you some guidance  
here. As cool as \<\<puts “#{’ ’ \* i}\*”\>\> is, the main point of Paul’s program  
was the iterator. The fact that his method “up\_and\_down” simply counts up and  
down, and is completely independent of what is being done with that count.  
That is good design, and highlights Ruby as a good language.

I think you should thank Paul for imparting that lesson 😉

Cheers,  
Gavin

> **···**
>
> ----- Original Message -----  
> From: “AW” [sturmpanzer@metacrawler.com](mailto:sturmpanzer@metacrawler.com)  
> Newsgroups: comp.lang.ruby  
> To: “ruby-talk ML” [ruby-talk@ruby-lang.org](mailto:ruby-talk@ruby-lang.org)  
> Sent: Thursday, August 22, 2002 5:33 AM  
> Subject: Re: the power of ruby
> 
> > puts “#{’ ’ \* i}\*” ← That’s a very nice way of doing it.  
> > I think sometimes i forget the “_Everything_ is an object” concept. 😉
> > 
> > > I thought it might be interesting to write an iterator:
> > > 
> > > WIDTH=78
> > > 
> > > def do\_dot(i)  
> > > puts “#{’ ’ \* i}\*”  
> > > sleep 0.01  
> > > end
> > > 
> > > def up\_and\_down(low, high)  
> > > low.upto(high-1) do |i|  
> > > yield i  
> > > end  
> > > high.downto(low+1) do |i|  
> > > yield i  
> > > end  
> > > end
> > > 
> > > loop do  
> > > up\_and\_down(0, WIDTH) do |i|  
> > > do\_dot(i)  
> > > end  
> > > end
> > > 
> > > The idea here is to separate what happens on each iteration from the  
> > > iterating itself, and perhaps to be able to re-use the iterator  
> > > somewhere else.
> > > 
> > > I also added a sleep, because otherwise the stars jump around a bit too  
> > > much in my terminal (Eterm).
> > > 
> > > Paul

---

<div class="post-metadata">

**Author:** ![AW11](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@AW11](https://rubytalk.org/u/AW11)\
**Post date:** [21 August 2002 19:53 UTC](https://rubytalk.org/t/the-power-of-ruby/1296/12 "2002-08-21T19:53:29Z")

</div>

Your version runs about 10X faster than mine. but i see why now.  
I had far to many writes to IO.  
The precedence is a bit confusing at first. I wasnt aware that the  
times{} must complete for going to downto{}.  
this is a wonderfull example. I think I may be a bit too timid about  
truely exploiting Ruby’s power.

> **···**
>
> > > I keep looking at the last line and I cant seem to grasp its  
> > > relationship, I mean, If the first set of ‘{}’ are containing the loop  
> > > from the ‘.times’ method, how do the second set relate?
> > 
> > The .times method returns an int, try this :
> > 
> > C:\> ruby -e “puts 5.times{}”  
> > 5  
> > C:\>
> > 
> > The block in curly brace: { |i| do\_dot(i) } is only a parameter to .times.  
> > Imagine it thus:
> > 
> > WIDTH.times( block\_in\_curly\_brace)
> > 
> > Since the return value of this function is an int you can cascade it to get
> > 
> > WIDTH.times( block\_in\_curly\_brace).downto(0) { |i| do\_dot(i) }
> > 
> > > Now i’m really confused. Thank you! 😉
> > 
> > Hope I have not confused you more 😉
> > 
> > – Shanko
> > 
> > > > Yours is rather succinct, but I find that you can often capitalize  
> > > > on return values of methods to shorten. Shorten, right? You’re  
> > > > looking for shorter?
> > > 
> > > Im looking for exactly what you gave. different ways to express the  
> > > same output in Ruby. Shorter, longer, obsfucated, clear.  
> > > I just hope others will chime in and give some examples of their own  
> > > style.
> > > 
> > > > Here’s one:
> > > > 
> > > > WIDTH = 78  
> > > > def do\_dot( i )  
> > > > puts( ( " " \* i ) + “\*” )  
> > > > end  
> > > > loop {  
> > > > WIDTH.times { |i| do\_dot(i) }.downto(0) { |i| do\_dot(i) }  
> > > > }
> > > > 
> > > > Check ya later.
> > > > 
> > > > \_why
> > > > 
> > > > AW ([sturmpanzer@metacrawler.com](mailto:sturmpanzer@metacrawler.com)) wrote:
> > > > 
> > > > > Here is my unimaginitive attempt.
> > > > > 
> > > > > `==============================================
> > > > > WIDTH=78;
> > > > > def do_dot(i)
> > > > > i.times{print " "}
> > > > > puts "*";
> > > > > end
> > > > > loop{
> > > > > 0.upto(WIDTH-1){|i|
> > > > > do_dot(i);
> > > > > }
> > > > > WIDTH.downto(1){|i|
> > > > > do_dot(i);
> > > > > }
> > > > > }
> > > > > `=============================================

---

<div class="post-metadata">

**Author:** ![AW11](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@AW11](https://rubytalk.org/u/AW11)\
**Post date:** [22 August 2002 19:36 UTC](https://rubytalk.org/t/the-power-of-ruby/1296/13 "2002-08-22T19:36:28Z")

</div>

> I understand you’re fairly new to Ruby, AW, but I must give you some guidance  
> here. As cool as \<\<puts “#{’ ’ \* i}\*”\>\> is, the main point of Paul’s program  
> was the iterator. The fact that his method “up\_and\_down” simply counts up and  
> down, and is completely independent of what is being done with that count.  
> That is good design, and highlights Ruby as a good language.
> 
> I think you should thank Paul for imparting that lesson 😉
> 
> Cheers,  
> Gavin

Of course!.  
I want to thank _everybody_ who responded.  
Everybody’s code examples have given me a lot to think about.  
Being able to see the way other people use ruby to express the same  
result helps me learn to do things the ruby way and not write like im  
using Pascal with a diff syntax. I dont want to get get stuck treating  
ruby just another scriptig language with lots of handy polymophic  
methods built in, Its more than that.

Aaron.
