From: WATANABE Hirofumi Date: 2000-07-18T13:21:24+09:00 Subject: [ruby-dev:10341] list and quit command in debug.rb わたなべです. 1.5.4 の debug.rb が使い辛いというかバグってる気がします. % ruby -r debug -r ping -e 0 Debug.rb Emacs support available. /usr/local/lib/ruby/1.5/ping.rb:40: (rdb:1) l [35, 44] in /usr/local/lib/ruby/1.5/ping.rb no sourcefile available for /usr/local/lib/ruby/1.5/ping.rb (rdb:1) q really quit? (y/n) y /usr/local/lib/ruby/1.5/debug.rb:423:in `exit': SystemExit from /usr/local/lib/ruby/1.5/debug.rb:423:in `debug_command' from /usr/local/lib/ruby/1.5/debug.rb:219:in `catch' from /usr/local/lib/ruby/1.5/debug.rb:219:in `debug_command' from /usr/local/lib/ruby/1.5/debug.rb:617:in `trace_func' from /usr/local/lib/ruby/1.5/debug.rb:768 from /usr/local/lib/ruby/1.5/debug.rb:769 from /usr/local/lib/ruby/1.5/ping.rb:40 場所までわかってるんだから表示してよとか, なぜ SystemExit に なっちゃうのとか. いまはこうしてます. -- わたなべひろふみ --- debug.rb.orig Thu Jun 29 13:01:30 2000 +++ debug.rb Tue Jul 18 13:17:49 2000 @@ -422,3 +422,3 @@ input = readline("really quit? (y/n) ", false) - exit if input == "y" + exit! if input == "y" @@ -524,3 +524,3 @@ stdout.printf "[%d, %d] in %s\n", b, e, file - if lines = SCRIPT_LINES__[file] and lines != true + if lines = SCRIPT_LINES__[file] ||= open(file).readlines n = 0 @@ -541,3 +541,3 @@ def line_at(file, line) - lines = SCRIPT_LINES__[file] + lines = SCRIPT_LINES__[file] ||= open(file).readlines if lines