[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

why does debugger 'n' seem to run lines TWICE?

Sam Roberts

1/31/2005 2:38:00 AM


I see this often, but not always, and I don't understand.

Is it that it shows me the line once for the function call (==) and another
time for the conditional?

Here is example:

$ ruby18 -r debug mdns.rb _ftp _http
Debug.rb
Emacs support available.

mdns.rb:3:$: << File.dirname($0)
(rdb:1) b 66
Set breakpoint 1 at mdns.rb:66
(rdb:1) c
Breakpoint 1, toplevel at mdns.rb:66
mdns.rb:66: argv0 = Name.create(n)
(rdb:1) display argv0
1: argv0 =
(rdb:1) n
mdns.rb:68: unless argv0.absolute?
1: argv0 = _ftp
(rdb:1) n
mdns.rb:68: unless argv0.absolute?
1: argv0 = _ftp
(rdb:1)
n
mdns.rb:69: if argv0.to_s[0] == ?_
1: argv0 = _ftp
(rdb:1)
n
mdns.rb:69: if argv0.to_s[0] == ?_
1: argv0 = _ftp
(rdb:1)


$ ruby18 --version
ruby 1.8.2 (2005-01-29) [powerpc-darwin6.8]


Thanks,
Sam