From: matz@... (Yukihiro Matsumoto) Date: 2003-11-28T09:19:23+09:00 Subject: Re: "wrong argument type nil (expected String)" from Dir.chdir Hi, In message "Re: "wrong argument type nil (expected String)" from Dir.chdir" on 03/11/28, Tim Kynerd writes: |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. :-( Finally, I get it. It's a bug in debug.rb. I fixed it. Thank you. By the way, it's a lot easier for us to fix, if full step to reproduce the error was disclosed like this at the first time, without guessing the (wrong) cause by yourself, folks. matz.