On Thu, 27 Nov 2003 08:06:05 +0900, Yukihiro Matsumoto wrote:

> Hi,
> 
> In message "Re: "wrong argument type nil (expected String)" from Dir.chdir"
>     on 03/11/27, Tim Kynerd <vxbrw58s02 / sneakemail.com> writes:
> 
> |More data about this problem. Namely: It doesn't appear when I run this
> |program in Ruby without the debugger, only when I use the debugger.
> 
> Might be a bug in debugger.  Can you upgrade to ruby-1.8.0 or
> 1.6-snapshot?
> 
>   ftp://ftp.ruby-lang.org/pub/ruby/1.6-snapshot.tar.gz

Installed 1.8.0 with the following result:

xxx@kynerd:~> cat chdir_test.rb
Dir.chdir("/")
nowdir = Dir.getwd
puts nowdir
xxx@kynerd:~> irb
irb(main):001:0> Dir.chdir("/")
=> 0
irb(main):002:0> nowdir = Dir.getwd
=> "/"
irb(main):003:0> puts nowdir
/
=> nil
irb(main):004:0> exit
xxx@kynerd:~> ruby chdir_test.rb
/
xxx@kynerd:~> ruby -r debug chdir_test.rb
Debug.rb
Emacs support available.

chdir_test.rb:1:Dir.chdir("/")
(rdb:1)
nil
chdir_test.rb:1:cannot convert nil into String
(rdb:1) q
Really quit? (y/n) y
xxx@kynerd:~> ruby -v
ruby 1.8.0 (2003-08-04) [i686-linux]
xxx@kynerd:~>

I.e.: No luck. :-(

-- 
Tim Kynerd  Sundbyberg (sméÔtan i storstan), Sweden  tkynerd / spamcop.net
Sunrise in Stockholm today:  8:10
Sunset in Stockholm today:  14:59
My rail transit photos at http://www.kynerd.nu