From 287810940070b1c7b0cc915e6728da2f0aaac5e2 Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 30 Apr 1998 07:41:23 +0000 Subject: new exception model git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/debug.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/debug.rb') diff --git a/lib/debug.rb b/lib/debug.rb index 432c7b4d19..2e3a29aa9e 100644 --- a/lib/debug.rb +++ b/lib/debug.rb @@ -11,6 +11,8 @@ class DEBUGGER__ @scripts = {} end + DEBUG_LAST_CMD = [] + def interrupt @stop_next = 1 end @@ -40,6 +42,11 @@ class DEBUGGER__ STDOUT.flush while input = STDIN.gets input.chop! + if input == "" + input = DEBUG_LAST_CMD[0] + else + DEBUG_LAST_CMD[0] = input + end case input when /^b(reak)?\s+(([^:\n]+:)?.+)/ pos = $2 -- cgit v1.2.3