From: Tim Kynerd Date: 2003-11-28T17:12:08+09:00 Subject: Re: "wrong argument type nil (expected String)" from Dir.chdir On Fri, 28 Nov 2003 09:19:23 +0900, Yukihiro Matsumoto wrote: > 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. No, 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. That I'm not sure what to do with. I don't see that it applies at all to my initial post. -- Tim Kynerd Sundbyberg (sm�stan i storstan), Sweden tkynerd@spamcop.net Sunrise in Stockholm today: 8:11 Sunset in Stockholm today: 14:58 My rail transit photos at http://www.kynerd.nu