[#38919] Ruby 1.8.1 preview4 — matz@... (Yukihiro Matsumoto)

Hi,

44 messages 2003/12/22
[#38921] Re: Ruby 1.8.1 preview4 — "NAKAMURA, Hiroshi" <nakahiro@...> 2003/12/22

Hi, all,

[ruby-list:39014] lib/debug.rb: incomplete regexp?

From: "Shirai,Kaoru" <shirai@...>
Date: 2003-12-31 12:03:36 UTC
List: ruby-list #39014
白井です。

lib/debug.rb の 1.46 -> 1.47 の変更が、

revision 1.47
date: 2003/08/11 13:41:18;  author: nahi;  state: Exp;  lines: +6 -6
* lib/debug.rb(debug_command): inspection command should inspect resulting
  value even if it's nil.  [ruby-dev:21180] by OMAE, jun <jun66j5@ybb.ne.jp>.

* lib/debug.rb(debug_command): incomplete regexp.

となっており、以下のように var, method, thread, pp, p の正規表現が変更
されていますが、このため

(rdb:1) p expression

という入力にマッチしません。変更前の方が正しいのではないでしょうか。

@@ -507,9 +507,9 @@
 
-	when /^\s*v(?:ar)?\s+/
+	when /^\s*v(?:ar)?\s+$/
 	  debug_variable_info($', binding)
 
-	when /^\s*m(?:ethod)?\s+/
+	when /^\s*m(?:ethod)?\s+$/
 	  debug_method_info($', binding)
 
-	when /^\s*th(?:read)?\s+/
+	when /^\s*th(?:read)?\s+$/
 	  if DEBUGGER__.debug_thread_info($', binding) == :cont
@@ -518,6 +518,6 @@
 
-	when /^\s*pp\s+/
+	when /^\s*pp\s+$/
 	  PP.pp(debug_eval($', binding), stdout)
 
-	when /^\s*p\s+/
+	when /^\s*p\s+$/
 	  stdout.printf "%s\n", debug_eval($', binding).inspect

-- 
Shirai,Kaoru <shirai@korinkan.co.jp>
Korinkan Ltd. - http://www.korinkan.co.jp/

In This Thread

Prev Next