--0-1557245214-11441757448230
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

i'm trying out my first ruby debugging session from a DOS prompt, but am running into a weird problem as shown below. anyone knows what's happening?
i can't list my program (ptest.rb) from inside the debug session; also, i don't
know why i'm getting the rubygem thingy since my program consists of
plain ruby code:

C:\rubyquizzes>ruby -r debug ptest.rb
Debug.rb
Emacs support available.

c:/ruby/lib/ruby/site_ruby/1.8/ubygems.rb:4:require 'rubygems'
(rdb:1) list 1-7
[1, 7] 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
   3
4  require 'rubygems'
(rdb:1) list 1-12
[1, 12] 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
   3
4  require 'rubygems'
(rdb:1) c
With braces, result  lock given to 'two' returns three
With do/end, result  lock given to 'one' returns three

----- ptest.rb  -----
def one(arg)
  if block_given?
    "block given to 'one' returns #{yield}"
  else
    arg
  end
end

def two
  if block_given?
    "block given to 'two' returns #{yield}"
  end
end

result1  ne two {
  "three"
}  

result2  ne two do
  "three"
end

puts "With braces, result  {result1}"
puts "With do/end, result  {result2}"

		
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.
--0-1557245214-11441757448230--