results in the error “wrong argument type nil (expected String)” when
running in the debugger (ruby -r debug), but not when running in irb?
WTF?
···
–
Tim Kynerd Sundbyberg (småstan i storstan), Sweden tkynerd@spamcop.net
Sunrise in Stockholm today: 8:00
Sunset in Stockholm today: 15:06
My rail transit photos at http://www.kynerd.nu
Sorry, should have posted a bit more information to start with. I’m
running under SuSE Linux 8.2, kernel 2.4 (can’t find the full version
number). ruby -v reports:
ruby 1.6.8 (2002-12-24) [i686-linux]
After having problems with a similar statement as the first statement in a
program, I tried creating a new program with just the one line I posted
above. That shorter program also returns the “wrong argument type nil
(expected String)” error. However, typing the same line into irb works
fine and returns 0 (and after doing so, typing Dir.getwd into irb returns
the expected “/”).
Grateful for any help you can provide.
···
On Mon, 24 Nov 2003 09:20:03 +0900, Yukihiro Matsumoto wrote:
Hi,
In message ““wrong argument type nil (expected String)” from Dir.chdir” > on 03/11/24, Tim Kynerd vxbrw58s02@sneakemail.com writes:
Can anybody tell me why this line:
Dir.chdir("/")
results in the error “wrong argument type nil (expected String)” when
running in the debugger (ruby -r debug), but not when running in irb?
Can’t reproduce. Could you give me more information? Your platform,
and exact version of ruby interpreter (shown by ruby -v).
matz.
–
Tim Kynerd Sundbyberg (småstan i storstan), Sweden tkynerd@spamcop.net
Sunrise in Stockholm today: 8:03
Sunset in Stockholm today: 15:04
My rail transit photos at http://www.kynerd.nu
Sorry to be following up to myself, but here’s a bit more info (that just
came to me in the shower ).
The following program:
newdir = "/"
Dir.chdir(newdir)
throws the same error in the debugger, but on the first line with the
string assignment. This gives me the strong feeling that something very
non-obvious is going on.
Also, a trip to /usr/src tells me I’m running kernel 2.4.20.
···
On Mon, 24 Nov 2003 07:24:18 +0100, Tim Kynerd wrote:
On Mon, 24 Nov 2003 09:20:03 +0900, Yukihiro Matsumoto wrote:
Hi,
In message ““wrong argument type nil (expected String)” from Dir.chdir” >> on 03/11/24, Tim Kynerd vxbrw58s02@sneakemail.com writes:
Can anybody tell me why this line:
Dir.chdir("/")
results in the error “wrong argument type nil (expected String)” when
running in the debugger (ruby -r debug), but not when running in irb?
Can’t reproduce. Could you give me more information? Your platform,
and exact version of ruby interpreter (shown by ruby -v).
matz.
Thanks Matz.
Sorry, should have posted a bit more information to start with. I’m
running under SuSE Linux 8.2, kernel 2.4 (can’t find the full version
number). ruby -v reports:
ruby 1.6.8 (2002-12-24) [i686-linux]
After having problems with a similar statement as the first statement in
a program, I tried creating a new program with just the one line I
posted above. That shorter program also returns the “wrong argument type
nil (expected String)” error. However, typing the same line into irb
works fine and returns 0 (and after doing so, typing Dir.getwd into irb
returns the expected “/”).
Grateful for any help you can provide.
–
Tim Kynerd Sundbyberg (småstan i storstan), Sweden tkynerd@spamcop.net
Sunrise in Stockholm today: 8:03
Sunset in Stockholm today: 15:04
My rail transit photos at http://www.kynerd.nu
Sorry to be following up to myself, but here’s a bit more info (that
just
came to me in the shower ).
The following program:
newdir = "/"
Dir.chdir(newdir)
throws the same error in the debugger, but on the first line with the
string assignment. This gives me the strong feeling that something very
non-obvious is going on.
Sounds strange indeed.
Also, a trip to /usr/src tells me I’m running kernel 2.4.20.
Sorry to be following up to myself, but here’s a bit more info (that
just
came to me in the shower ).
The following program:
newdir = "/"
Dir.chdir(newdir)
throws the same error in the debugger, but on the first line with the
string assignment. This gives me the strong feeling that something very
non-obvious is going on.
Sounds strange indeed.
Also, a trip to /usr/src tells me I’m running kernel 2.4.20.
Is that the same as “uname -a” reports?
–
Tim Kynerd Sundbyberg (småstan i storstan), Sweden tkynerd@spamcop.net
Sunrise in Stockholm today: 8:03
Sunset in Stockholm today: 15:04
My rail transit photos at http://www.kynerd.nu
And finally, I run the same program with the debugger:
xxx@kynerd:~> ruby -r debug chdir_test.rb Debug.rb
Emacs support available.
chdir_test.rb:1:newdir = “/”
(rdb:1)
nil
(eval):1:wrong argument type nil (expected String)
from chdir_test.rb:1
(rdb:1) q
Really quit? (y/n) y
xxx@kynerd:~>
It would seem that there is simply something wrong with the debugging
library. I’m thinking of either re-installing or upgrading Ruby to fix
this. Any other ideas?
Again, ruby -v returns:
ruby 1.6.8 (2002-12-24) [i686-linux]
–
Tim Kynerd Sundbyberg (småstan i storstan), Sweden tkynerd@spamcop.net
Sunrise in Stockholm today: 8:07
Sunset in Stockholm today: 15:01
My rail transit photos at http://www.kynerd.nu
–
Tim Kynerd Sundbyberg (småstan 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
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.
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.
···
On Fri, 28 Nov 2003 09:19:23 +0900, Yukihiro Matsumoto wrote:
In message “Re: “wrong argument type nil (expected String)” from Dir.chdir” > on 03/11/28, Tim Kynerd vxbrw58s02@sneakemail.com writes:
–
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
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.
The problem has nothing related to Dir.chdir. Please give us
something like the steps quoted below at the first time, it would help
us a lot.
matz.
···
In message “Re: “wrong argument type nil (expected String)” from Dir.chdir” on 03/11/28, Tim Kynerd vxbrw58s02@sneakemail.com writes: