[#11131] Re: SIGINT on windows — Daisuke Aoki <dai@...>

青木です。

36 messages 2000/10/04
[#11217] Re: SIGINT on windows — Daisuke Aoki <dai@...> 2000/10/14

青木です。

[#11250] Re: SIGINT on windows — Daisuke Aoki <dai@...> 2000/10/16

青木です。

[#11258] Re: SIGINT on windows — "Nobuyoshi.Nakada" <nobu.nakada@...> 2000/10/17

なかだです。

[#11298] Re: SIGINT on windows — "Nobuyoshi.Nakada" <nobu.nakada@...> 2000/10/27

なかだです。

[#11183] EPOC32 and Ruby 1.7 — WATANABE Hirofumi <eban@...>

わたなべです.

44 messages 2000/10/12
[#11188] Re: EPOC32 and Ruby 1.7 — matz@... (Yukihiro Matsumoto) 2000/10/12

まつもと ゆきひろです

[#11191] ruby-bugs-ja PR#20 — Kazuhiro NISHIYAMA <zn@...> 2000/10/12

On Fri, 13 Oct 2000 00:17:14 +0900

[#11205] Re: ruby-bugs-ja PR#20 — Kazuhiro NISHIYAMA <zn@...> 2000/10/13

同じ問題を短いスクリプトで再現できました。

[#11210] Re: Thread.new with irb (PR#20) — matz@... (Yukihiro Matsumoto) 2000/10/13

まつもと ゆきひろです

[#11211] Re: Thread.new with irb (PR#20) — Kazuhiro NISHIYAMA <zn@...> 2000/10/13

On Sat, 14 Oct 2000 03:41:18 +0900

[#11221] Re: Thread.new with irb (PR#20) — Kazuhiro NISHIYAMA <zn@...> 2000/10/14

[ruby-dev:11205]と同じスクリプトで-dをつけていると

[#11306] Ruby I18N — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

130 messages 2000/10/28
[#11307] Re: Ruby I18N — " たけ (tk)" <ggb03124@...> 2000/10/28

たけ(tk)です。

[#11310] Re: Ruby I18N — kenn@... 2000/10/29

長沢です。

[#11314] Re: Ruby I18N — matz@... (Yukihiro Matsumoto) 2000/10/29

まつもと ゆきひろです

[#11315] Re: Ruby I18N — Shugo Maeda <shugo@...> 2000/10/30

前田です。

[#11324] Re: Ruby I18N — TAKAHASHI Masayoshi <maki@...> 2000/10/30

高橋征義です。

[#11337] Re: Ruby I18N — Yasushi Shoji <yashi@...> 2000/10/30

At Mon, 30 Oct 2000 13:15:23 +0900,

[#11346] Re: Ruby I18N — TAKAHASHI Masayoshi <maki@...> 2000/10/31

某2ちゃんねるで自分の名前を見つけてびびった高橋征義です。

[#11347] Re: Ruby I18N — matz@... (Yukihiro Matsumoto) 2000/10/31

まつもと ゆきひろです

[#11370] Re: Ruby I18N — TAKAHASHI Masayoshi <maki@...> 2000/11/02

高橋征義です。

[#11372] Re: Ruby I18N — matz@... (Yukihiro Matsumoto) 2000/11/02

まつもと ゆきひろです

[#11375] Re: Ruby I18N — TAKAHASHI Masayoshi <maki@...> 2000/11/04

高橋征義です。

[#11378] Re: Ruby I18N — " たけ (tk)" <ggb03124@...> 2000/11/05

たけ(tk)です。

[#11379] Re: Ruby I18N — matz@... (Yukihiro Matsumoto) 2000/11/05

まつもと ゆきひろです

[#11380] Re: Ruby I18N — " たけ (tk)" <ggb03124@...> 2000/11/05

たけ(tk)です。

[#11382] Re: Ruby I18N — matz@... (Yukihiro Matsumoto) 2000/11/05

まつもと ゆきひろです

[#11393] Re: Ruby I18N — "たけ(tk)" <ggb03124@...> 2000/11/07

たけ(tk)です。 ・・ 長文ご注意。

[#11396] Re: Ruby I18N — matz@... (Yukihiro Matsumoto) 2000/11/07

まつもと ゆきひろです

[#11397] Re: Ruby I18N — Yasushi Shoji <yashi@...> 2000/11/07

At Tue, 7 Nov 2000 15:46:29 +0900,

[#11398] Re: Ruby I18N — matz@... (Yukihiro Matsumoto) 2000/11/07

まつもと ゆきひろです

[#11399] Re: Ruby I18N — Tanaka Akira <akr@...17n.org> 2000/11/07

In article <E13t3dt-0002Fp-00@ev.netlab.zetabits.co.jp>,

[#11401] Re: Ruby I18N — matz@... (Yukihiro Matsumoto) 2000/11/07

まつもと ゆきひろです

[#11404] Re: Ruby I18N — "たけ(tk)" <ggb03124@...> 2000/11/07

たけ(tk)です。

[#11406] Re: Ruby I18N — Yasushi Shoji <yashi@...> 2000/11/07

At Tue, 7 Nov 2000 19:06:27 +0900,

[#11407] Re: Ruby I18N — "たけ(tk)" <ggb03124@...> 2000/11/07

たけ(tk)です。

[#11409] Re: Ruby I18N — Minero Aoki <aamine@...> 2000/11/07

あおきです。

[#11423] Re: Ruby I18N — Tanaka Akira <akr@...17n.org> 2000/11/08

In article <E13t4Hq-0002GS-00@ev.netlab.zetabits.co.jp>,

[#11426] Re: Ruby I18N — matz@... (Yukihiro Matsumoto) 2000/11/08

まつもと ゆきひろです

[#11427] Re: Ruby I18N — Tanaka Akira <akr@...17n.org> 2000/11/08

In article <E13tMYW-0002te-00@ev.netlab.zetabits.co.jp>,

[#11428] Re: Ruby I18N — matz@... (Yukihiro Matsumoto) 2000/11/08

まつもと ゆきひろです

[#11430] Re: Ruby I18N — "たけ(tk)" <ggb03124@...> 2000/11/08

たけ(tk)です。

[#11433] Re: Ruby I18N — matz@... (Yukihiro Matsumoto) 2000/11/08

まつもと ゆきひろです

[#11446] 『文字列は文字の配列か』 — " たけ (tk)" <ggb03124@...> 2000/11/08

たけ(tk)です。

[#11470] Proposal of "Array of CharCode" — " たけ (tk)" <ggb03124@...> 2000/11/10

たけ(tk)です。

[#11471] Re: Proposal of "Array of CharCode" — matz@... (Yukihiro Matsumoto) 2000/11/10

まつもと ゆきひろです

[#11450] Re: Ruby I18N — Tanaka Akira <akr@...17n.org> 2000/11/09

In article <E13tNkT-00030l-00@ev.netlab.zetabits.co.jp>,

[ruby-dev:11207] [Patch] debug.rb -- catchpoint

From: "NAKAMURA, Hiroshi" <nakahiro@...>
Date: 2000-10-13 10:47:19 UTC
List: ruby-dev #11207
なひです.

[ruby-dev:11158]のpatchを取り込んで頂いてありがとうございました.
まだちょっと準備が整っていないのですが,もうしばらくしたら,
「何故Tracerの出力の出口を一本化すると『ものすごく嬉しい』のか」
がわかる成果物を公開できる予定です.

# rdebugって覚えてる人居るかしら.

それとは別に,debug.rbにcatchpoint対応を追加するPatchです.
  catch HogeError
で,HogeErrorがraiseされた時に停止します.
  catch off
とすると,例外発生時に止まらなくなります.
起動時(default)は
  catch StandardError
の状態になっています.

# 従来はなんでもかんでも止まってました.

「出口の一本化対応」も少し入ってます.

	/	/	/

--- debug.rb.dist	Fri Sep  1 00:16:48 2000
+++ debug.rb	Fri Oct 13 19:33:37 2000
@@ -6,7 +6,7 @@ if $SAFE > 0
   exit 1
 end
-SCRIPT_LINES__ = {} unless defined? SCRIPT_LINES__
 
 require 'tracer'
+
 class Tracer
   def Tracer.trace_func(*vars)
@@ -15,4 +15,5 @@ class Tracer
 end
 
+SCRIPT_LINES__ = {} unless defined? SCRIPT_LINES__
 
 class DEBUGGER__
@@ -90,4 +91,5 @@ class DEBUGGER__
       @finish_pos = 0
       @trace = false
+      @catch = "StandardError"
     end
 
@@ -131,14 +133,6 @@ class DEBUGGER__
     def var_list(ary, binding)
       ary.sort!
-      if false # ary.size < 0
-	f = open("|less", "w")
-	for v in ary
-	  f.printf "  %s => %s\n", v, eval(v, binding).inspect
-	end
-	f.close
-      else
-	for v in ary
-	  stdout.printf "  %s => %s\n", v, eval(v, binding).inspect
-	end
+      for v in ary
+	stdout.printf "  %s => %s\n", v, eval(v, binding).inspect
       end
     end
@@ -159,5 +153,5 @@ class DEBUGGER__
 	obj = debug_eval($', binding)
 	unless obj.kind_of? Module
-	  stdout.print "should be Class/Module: ", $', "\n"
+	  stdout.print "Should be Class/Module: ", $', "\n"
 	else
 	  var_list(obj.constants, obj.module_eval{binding()})
@@ -185,5 +179,5 @@ class DEBUGGER__
 	obj = debug_eval(input, binding)
 	unless obj.kind_of? Module
-	  stdout.print "should be Class/Module: ", input, "\n"
+	  stdout.print "Should be Class/Module: ", input, "\n"
 	else
 	  len = 0
@@ -236,10 +230,10 @@ class DEBUGGER__
 	  case input
 	  when /^\s*tr(?:ace)?(?:\s+(on|off))?$/
-	    if !defined?( $1 )
-	      @trace = !@trace
-	    elsif $1 == 'on'
-	      @trace = true
-	    else
-	      @trace = false
+	    if defined?( $1 )
+	      if $1 == 'on'
+		@trace = true
+	      else
+		@trace = false
+	      end
 	    end
 	    if @trace
@@ -272,5 +266,5 @@ class DEBUGGER__
 	    if break_points.find{|b| b[1] == 0}
 	      n = 1
-	      stdout.print "breakpoints:\n"
+	      stdout.print "Breakpoints:\n"
 	      for b in break_points
 		if b[0] and b[1] == 0
@@ -283,5 +277,5 @@ class DEBUGGER__
 	      n = 1
 	      stdout.print "\n"
-	      stdout.print "watchpoints:\n"
+	      stdout.print "Watchpoints:\n"
 	      for b in break_points
 		if b[0] and b[1] == 1
@@ -292,5 +286,5 @@ class DEBUGGER__
 	    end
 	    if break_points.size == 0
-	      stdout.print "no breakpoints\n"
+	      stdout.print "No breakpoints\n"
 	    else
 	      stdout.print "\n"
@@ -300,5 +294,5 @@ class DEBUGGER__
 	    pos = $1
 	    unless pos
-	      input = readline("clear all breakpoints? (y/n) ", false)
+	      input = readline("Clear all breakpoints? (y/n) ", false)
 	      if input == "y"
 		for b in break_points
@@ -327,5 +321,5 @@ class DEBUGGER__
 	    pos = $1
 	    unless pos
-	      input = readline("clear all expressions? (y/n) ", false)
+	      input = readline("Clear all expressions? (y/n) ", false)
 	      if input == "y"
 		for d in display
@@ -338,5 +332,5 @@ class DEBUGGER__
 		display[pos-1][0] = false
 	      else
-		stdout.printf "display expression %d is not defined\n", pos
+		stdout.printf "Display expression %d is not defined\n", pos
 	      end
 	    end
@@ -398,5 +392,5 @@ class DEBUGGER__
 	    if frame_pos >= @frames.size
 	      frame_pos = @frames.size - 1
-	      stdout.print "at toplevel\n"
+	      stdout.print "At toplevel\n"
 	    end
 	    binding, binding_file, binding_line = @frames[frame_pos]
@@ -413,5 +407,5 @@ class DEBUGGER__
 	    if frame_pos < 0
 	      frame_pos = 0
-	      stdout.print "at stack bottom\n"
+	      stdout.print "At stack bottom\n"
 	    end
 	    binding, binding_file, binding_line = @frames[frame_pos]
@@ -423,9 +417,27 @@ class DEBUGGER__
 	    else
 	      @finish_pos = @frames.size - frame_pos
-	      p @finish_pos
 	      frame_pos = 0
+	      MUTEX.unlock
 	      return
 	    end
 
+	  when /^\s*cat(?:ch)?(?:\s+(.+))?$/
+	    if $1
+	      excn = $1
+	      if excn == 'off'
+		@catch = nil
+		stdout.print "Clear catchpoint.\n"
+	      else
+		@catch = excn
+		stdout.printf "Set catchpoint %s.\n", @catch
+	      end
+	    else
+	      if @catch
+		stdout.printf "Catchpoint %s.\n", @catch
+	      else
+		stdout.print "No catchpoint.\n"
+	      end
+	    end
+
 	  when /^\s*q(?:uit)?$/
 	    input = readline("really quit? (y/n) ", false)
@@ -445,12 +457,12 @@ class DEBUGGER__
 
 	  when /^\s*p\s+/
-	    p debug_eval($', binding)
+	    stdout.printf "%s\n", debug_eval($', binding)
 
-	  when /^\s*h(?:elp)?/
+	  when /^\s*h(?:elp)?$/
 	    debug_print_help()
 
 	  else
 	    v = debug_eval(input, binding)
-	    p v unless (v == nil)
+	    stdout.printf "%s\n", v unless (v == nil)
 	  end
 	end
@@ -459,5 +471,5 @@ class DEBUGGER__
 
     def debug_print_help
-      print <<EOHELP
+      stdout.print <<EOHELP
 Debugger help v.-0.002b
 Commands
@@ -465,5 +477,7 @@ Commands
 	                     set breakpoint to some position
   wat[ch] <expression>       set watchpoint to some expression
+  cat[ch] <an Exception>     set catchpoint to an exception
   b[reak]                    list breakpoints
+  cat[ch]                    show catchpoint
   del[ele][ nnn]             delete some or all breakpoints
   disp[lay] <expression>     add expression into display expression list
@@ -550,5 +564,5 @@ EOHELP
 	end
       else
-	stdout.printf "no sourcefile available for %s\n", file
+	stdout.printf "No sourcefile available for %s\n", file
       end
     end
@@ -581,9 +595,9 @@ EOHELP
 	if b[0]
 	  if b[1] == 0 and b[2] == file and b[3] == pos
-	    stdout.printf "breakpoint %d, %s at %s:%s\n", n, debug_funcname(id), file, pos
+	    stdout.printf "Breakpoint %d, %s at %s:%s\n", n, debug_funcname(id), file, pos
 	    return true
 	  elsif b[1] == 1
 	    if debug_silent_eval(b[2], binding)
-	      stdout.printf "watchpoint %d, %s at %s:%s\n", n, debug_funcname(id), file, pos
+	      stdout.printf "Watchpoint %d, %s at %s:%s\n", n, debug_funcname(id), file, pos
 	      return true
 	    end
@@ -597,14 +611,13 @@ EOHELP
 
     def excn_handle(file, line, id, binding)
-      p $!
+      stdout.printf "Exception `%s': %s\n", $!.type, $!
       if $!.type <= SystemExit
 	set_trace_func nil
 	exit
       end
+
       MUTEX.lock
       fs = @frames.size
       tb = caller(0)[-fs..-1]
-
-      stdout.printf "%s\n", $!
       if tb
 	for i in tb
@@ -612,5 +625,9 @@ EOHELP
 	end
       end
-      debug_command(file, line, id, binding)
+      if @catch and ($!.type.ancestors.find { |e| e.to_s == @catch })
+	debug_command(file, line, id, binding)
+      else
+	MUTEX.unlock
+      end
     end
 
@@ -782,6 +799,6 @@ EOHELP
   end
 
-  @stdout.printf "Debug.rb\n"
-  @stdout.printf "Emacs support available.\n\n"
+  stdout.printf "Debug.rb\n"
+  stdout.printf "Emacs support available.\n\n"
   set_trace_func proc{|event, file, line, id, binding,klass,*rest|
     DEBUGGER__.context.trace_func event, file, line, id, binding,klass

In This Thread