summaryrefslogtreecommitdiff
path: root/lib/debug.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/debug.rb')
-rw-r--r--lib/debug.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/debug.rb b/lib/debug.rb
index ada7170..e5c305d 100644
--- a/lib/debug.rb
+++ b/lib/debug.rb
@@ -130,6 +130,9 @@ class DEBUGGER__
else
lev = 1
end
+ unless @frame_pos
+ @frame_pos = @frames.size - 1
+ end
if lev >= @frames.size or @frame_pos and @frame_pos+lev >= @frames.size
STDOUT.print "at stack bottom\n"
@frame_pos = nil