# Ruby 1.8.4 RC1 for Windows debugger problem?

**URL:** <https://www.ruby-forum.com/t/ruby-1-8-4-rc1-for-windows-debugger-problem/93567>\
**Category:** Ruby\
**Created:** [April 4, 2006, 8:37pm UTC](https://www.ruby-forum.com/t/ruby-1-8-4-rc1-for-windows-debugger-problem/93567 "2006-04-04T20:37:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![john\_peter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/94ad74/32.png) [@john\_peter](https://www.ruby-forum.com/u/john_peter)\
**Post date:** [April 4, 2006, 8:37pm UTC](https://www.ruby-forum.com/t/ruby-1-8-4-rc1-for-windows-debugger-problem/93567/1 "2006-04-04T20:37:00Z")

</div>

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 = block given to ‘two’ returns three  
With do/end, result = block 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 = one two {  
“three”  
}

result2 = one two do  
“three”  
end

puts “With braces, result = #{result1}”  
puts “With do/end, result = #{result2}”

---

<div class="post-metadata">

**Author:** ![john\_peter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/94ad74/32.png) [@john\_peter](https://www.ruby-forum.com/u/john_peter)\
**Post date:** [April 26, 2006, 10:57am UTC](https://www.ruby-forum.com/t/ruby-1-8-4-rc1-for-windows-debugger-problem/93567/2 "2006-04-26T10:57:35Z")

</div>

I’m having exactly the same problem (as the one below). When loading  
any file into the debugger on my WinXP laptop, it appears that it the  
debugger is trying to debug

> c:/ruby/lib/ruby/site\_ruby/1.8/ubygems.rb:4:require ‘rubygems’

and not the file loaded. Has anyone found a solution to this?

I’m using the Pragmatic Programmers’ Installer for Windows:  
ruby 1.8.4 (2005-12-24) [i386-mswin32]

Thanks in advance for any help.

Best,

Scott T.
