...and more

$ ruby -v
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.11.1]

$ rdebug -v
ruby-debug 0.10.3


-----------
require 'rubygems'
require 'ruby-debug'

class A
  def initialize
  end

  def sayhi  #line 8
    puts "hello"
  end

  def A.show
    puts "A"
  end
end

a = A.new
A.show
a.sayhi
-----------------


$ rdebug r2test.rb
/Users/me/2testing/dir1/r2test.rb:1
require 'rubygems'

(rdb:1) break A.show
*** Unknown class A.

(rdb:1) break 8
Breakpoint 1 file /Users/me/2testing/dir1/r2test.rb, line 8

(rdb:1) continue
Breakpoint 1 at r2test.rb:8
/Users/me/2testing/dir1/r2test.rb:8
def sayhi

(rdb:1) break A.show
Breakpoint 2 at A::show

(rdb:1) continue
A
hello
$
-- 
Posted via http://www.ruby-forum.com/.