[#407] New feature for Ruby? — Clemens.Hintze@...

Hi all,

27 messages 1999/07/01
[#413] Re: New feature for Ruby? — matz@... (Yukihiro Matsumoto) 1999/07/01

Hi Clemens,

[#416] Re: New feature for Ruby? — Clemens Hintze <c.hintze@...> 1999/07/01

On Thu, 01 Jul 1999, Yukihiro Matsumoto wrote:

[#418] Re: New feature for Ruby? — gotoken@... (GOTO Kentaro) 1999/07/01

Hi

[#426] Re: New feature for Ruby? — gotoken@... (GOTO Kentaro) 1999/07/02

Hi,

[#440] Now another totally different ;-) — Clemens Hintze <c.hintze@...>

Hi,

21 messages 1999/07/09
[#441] Re: Now another totally different ;-) — matz@... (Yukihiro Matsumoto) 1999/07/09

Hi,

[#442] Re: Now another totally different ;-) — Clemens Hintze <c.hintze@...> 1999/07/09

On Fri, 09 Jul 1999, you wrote:

[#443] — Michael Hohn <hohn@...>

Hello,

26 messages 1999/07/09
[#444] interactive ruby, debugger — gotoken@... (GOTO Kentaro) 1999/07/09

Hi Michael,

[ruby-talk:00444] interactive ruby, debugger

From: gotoken@... (GOTO Kentaro)
Date: 1999-07-09 18:20:23 UTC
List: ruby-talk #444
Hi Michael,

In message "[ruby-talk:00443]"
    on 99/07/09, Michael Hohn <hohn@math.utah.edu> writes:

>o   What is the "standard" way to use ruby interactively, like a shell?   

A ruby program `irb' (interactive ruby) is known. 
irb is very easy to setup.  I asume you use ruby 1.3.x. 

0. get the latest tarball of irb from 
	ftp://ftp.netlab.co.jp/pub/lang/ruby/contrib/
1. extract archive
2. put the `irb/' directory into $: or your environment $RUBYLIB, which is 
   /usr/local/lib/ruby/1.3/site_ruby/ in default. 
3. make symbolic link of $RUBYLIB/irb/irb.rb in one of your $PATH
4. do `chmod' to be executable $RUBYLIB/irb/irb.rb
5. do `rehash' to tell your login shell about irb is appended
6. now, you can use `irb'

If `readline' extension module works with your interpreter, it powers
irb to be very helpful. 

>o   Why is the -debug flag special?  When writing/running a dynamically
>    typed interactive program (like a gui), I *expect* errors, and
>    getting a full, traversible stack trace with source file and line
>    number information is *critical* (to me, at least).  

Well, a user can obtain trace stack by the global variable $@. 

>                                                         Shouldn't
>    the debugger be part of the ruby core?

I think it is partially right. The debugger, indeed, is not part of a
ruby interpreter.  So, there exists degug.rb which is a gdb-like
debugger. 

% ruby -r debug yourcode.rb

In debug.rb prompt, The following is available command list. 

  b(reak)
  i(nfo)
  del(ete)
  c(ont)
  s(tep)
  n(ext)
  up
  down
  fin(ish)
  q(uit)
  where
  l(ist)
  p 

Please guess the meaning of each of them...

-- gotoken

In This Thread