Hi,

in some cases breakpoints are ignored. Namely in the case like this:

   $ cat test.rb
   require 'test2.rb'
   Test2.new.print12
   puts 'three'
   $ cat test2.rb
   class Test2
     def print12
       puts 'one'
       puts 'two'
     end
   end
   $ ruby -rdebug test.rb
   Debug.rb
   Emacs support available.

   test.rb:1:require 'test2.rb'
   (rdb:1) b test2.rb:4
   Set breakpoint 1 at test.rb:4
   (rdb:1) c
   one
   two
   three
   $

Did not stop on test2:4. If I would use "b ./test2.rb:4" it would stop.
But it is not that clear.

I've found similar problem (seems unanswered):

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/69527 
[69528, 69530]

It seems to be due to File.basename()-related changes in:

http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/debug.rb?r1=3532&r2=3543
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/debug.rb?r1=4151&r2=4180

But probably it is intentional? Is there any kind of 'specification' how
exactly it is supposed to set a breakpoint. In help there is just:

   'b[reak] [file:|class:]<line|method>'

by which test2.rb:4 seems ok to me in the above case.

For now I've patched debug.rb to use File.basename similar to as it was
few years ago (those SVN links) and which seems to work for me. Below is
supposed patch. But it might have some drawbacks I do not see?

Thanks for clarification,

   m.

Patch again ruby_1_8 branch (the same for trunk)

Index: lib/debug.rb
===================================================================
--- lib/debug.rb        (revision 11707)
+++ lib/debug.rb        (working copy)
@@ -307,7 +307,7 @@
           pos = $2
            if $1
              klass = debug_silent_eval($1, binding)
-            file = $1
+            file = File.basename($1)
            end
           if pos =~ /^\d+$/
             pname = pos
@@ -665,6 +665,7 @@

    def check_break_points(file, klass, pos, binding, id)
      return false if break_points.empty?
+    file = File.basename(file)
      n = 1
      for b in break_points
        if b[0]          # valid