From: Laurent Julliard Date: 2002-02-01T19:02:18+09:00 Subject: Frame glitches in Ruby debugger? There is something I do not understand in the way the ruby debugger navigate through the frames (stack level) and display the frame counter. Here is my problem: Take this simple factorial computation program: def fact(n) if n <= 0 1 else n * fact(n-1) end end p fact(5) Now run the debugger, step (s) 6 times and ask how the frame looks like (w or f): (rdb:1) w --> #1 /tmp/fact.rb:2:in `fact' #2 /tmp/fact.rb:5:in `fact' #3 /tmp/fact.rb:5:in `fact' #4 /tmp/fact.rb:9 So far, so good. Now ask the debugger to change context and point to the frame two levels up (rdb:1) up 2 #2 /tmp/fact.rb:5 (rdb:1) w #1 /tmp/fact.rb:2:in `fact' #2 /tmp/fact.rb:5:in `fact' --> #3 /tmp/fact.rb:5:in `fact' #4 /tmp/fact.rb:9 The where command rightly report that we are now in the context of frame #3 (#1 + 2 up = #3) but why does the output of the "up 2" command just above said "#2 /tmp/fact.rb:5" ?? Why doesn't it say "#3 /tmp/fact.rb:5" ? Is this a (small) bug or am I missing something here? Laurent