From: nobu.nakada@... Date: 2002-03-29T20:19:16+09:00 Subject: [ruby-dev:16682] Re: [OniGuruma] nested repeat operator なかだです。 At Fri, 29 Mar 2002 18:35:04 +0900, NAKAMURA, Hiroshi wrote: > > > なかださんpatchで1.7はいいとして、1.6どうしましょ。 > > ごめん、よくなかった。 > > なんかいろいろ考えてみたけど、結局今のコードになりそう。 > matz恐るべし。 あー、なるほど。こうかな? Index: debug.rb =================================================================== RCS file: /cvs/ruby/src/ruby/lib/debug.rb,v retrieving revision 1.30 diff -u -2 -p -r1.30 debug.rb --- debug.rb 2002/03/29 03:05:11 1.30 +++ debug.rb 2002/03/29 11:16:57 @@ -298,12 +298,7 @@ class Context end - when /^\s*b(?:reak)?\s+((?:.+:)?.+)$/ - pos = $1 - if pos.index(":") - pos = pos.split(":") - file = pos[0...-1].join(":") - pos = pos[-1] - end - file = File.basename(file) + when /^\s*b(?:reak)?\s+(?:(.+):)?(.+)$/ + pos = $2 + file = File.basename($1) if $1 if pos =~ /^\d+$/ pname = pos -- --- 僕の前にBugはない。 --- 僕の後ろにBugはできる。 中田 伸悦