I am starting chapter 13 or Programming Ruby trying to debug the
following factorial program (in file t.rb) on page 163:
if n <= 0
n * fact(n -1)
When I run the command:
ruby -r debug t.rb
Instead of the debugger loading t.rb program, it loads something else
and displays the following output:
C:\RubyPrograms\PickAxeBook>ruby -r debug t.rb
Emacs support available.
I am not sure what is happening here. Please note that I am on Windows
XP machine. When I try to list by typing list 1-9, the following output
is displayed. I may have messed up the ruby path loader since I was
messing with it. Why did it persist across the sessions though?
(rdb:1) list 1-9
[1, 9] in c:/ruby/lib/ruby/site_ruby/1.8/ubygems.rb
1 # This file allows for the running of rubygems with a nice
2 # command line look-and-feel: ruby -rubygems foo.rb
4 # Copyright 2006 by Chad F., Rich Kilmer, Jim W. and
5 # All rights reserved.
6 # See LICENSE.txt for permissions.
This totally perplexes me. Help!!!