From: RichardOnRails Date: 2011-02-04T22:30:23+09:00 Subject: Re: Strange "ruby -r debug t.rb" for PickAxe ver. 2's Fibonacci example On Feb 3, 8:05 pm, "Rocky B." wrote: > The Ruby program debug.rb which comes with Ruby 1.x is what you get when > you run "ruby -rdebug t.rb" or "ruby -r debug t.rb". (You have a typo in > the first example with the flag -t). > > ruby-debug, which installs a bin/rdebug to invoke the debugger from the > outset, is something totally different. In contrast to debug.rb, > ruby-debug is not part of the standard Ruby distribution. That is why > you install it as a gem as you list above. > > The pickaxe books talk about debug.rb, not the ruby-debug gem. I think > it safe to say that most folks who use any sort of debugger are nowadays > using ruby-debug. (Even the IDE's like the ones from Eclipse, JetBrains, > or Aptana use common code from  ruby-debug and none import any code from > debug.rb) > > ruby-debug commands are largely a superset of the debug.rb command > listed in the Pickaxe book. However more complete information on > ruby-debug can be found athttp://bashdb.sourceforge.net/ruby-debug.html > > I realize all of this is confusing. Unfortunately it is a bit too late > to change this in any significant way. > > In the next round of debuggers, the "trepanning" debuggers, (e.g.http://github.com/rocky/rb-trepanningandhttp://github.com/rbx-trepanning) I've tried to make the distinction > more clear. The command-line invocation is not "rdebug" which can be > confused with the command-line option -rdebug. And the prompt which had > been (rdb) is now different. > > -- > Posted viahttp://www.ruby-forum.com/. Wow, Rocky, That's a great explanation (that I've got to study) for the anomalies I encountered. There were other discrepancies I had noticed but didn't include. Your explanation and the links you supplied should let me get my brain around this issue! BTW, the "-t" typo was only in my introduction to my first example. The code correctly used "-r". That's why I like to post real code, rather than my human sloppiness :-) Thank you very, very much, Richard