[#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:01664] Re: Where do I find an interactive Ruby for WIN & Linux ?

From: OZAWA Sakuro <crouton@...>
Date: 2000-03-01 15:01:36 UTC
List: ruby-talk #1664
In article <20000301135806.63607.qmail@hotmail.com>,
    Dat Nguyen writes:

> Just get into Ruby and very curious to learn.
> Where to find an interactive Ruby?

Interactive one already exists in the official dists.  Just get any 
binary/(or get the source and make), then try the below:

$ ruby -r 'irb/main' -e IRB.start [ENTER]
irb(main):001:0> def fib(x)
irb(main):002:1>   x < 2 ? 1 : fib(x-1) + fib(x-2)
irb(main):003:1> end
nil
irb(main):004:0> fib(3)
3
irb(main):005:0> fib(5)
8
irb(main):006:0> exit
$
 

-- 
OZAWA -Crouton- Sakuro
<mailto:crouton@duelists.org>
<http://www.duelists.org/~crouton/>
PGP: C98F 74E0 AEEB 4578 1DFC  F650 3BE0 9627 11FC C9F5

In This Thread