Ask a Question related to Ruby, Design and Development.
-
Tim Kynerd #1
"wrong argument type nil (expected String)" from Dir.chdir
I'm running Ruby 1.6.8.
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?
WTF?
--
Tim Kynerd Sundbyberg (småstan i storstan), Sweden [email]tkynerd@spamcop.net[/email]
Sunrise in Stockholm today: 8:00
Sunset in Stockholm today: 15:06
My rail transit photos at [url]http://www.kynerd.nu[/url]
Tim Kynerd Guest
-
#39588 [NEW]: unpack("a*", "abc\0") does not work as expected
From: pprasse at actindo dot de Operating system: linux 2.6.10 PHP version: 4.4.4 PHP Bug Type: Scripting Engine problem Bug... -
#38820 [NEW]: chdir(".") and chdir("..") don't work with Apache 2.0+
From: ras at fyn dot dk Operating system: Win XP SP2 PHP version: 5.1.6 PHP Bug Type: Directory function related Bug... -
CFINPUT type="radio" w/ "value" requires "label"
On a Flash form, when you specify type='radio' and value='whatever', the value of the 'value' attribute will be displayed as a label if no 'label'... -
"Arguments are of the wrong type, out of acceptable range" error
I'm getting an "Arguments are of the wrong type, out of acceptable range, in conflicts with each other " error , pointing to the sql statement in... -
convert visual basic "string" data type to DB2 "blob"
Does anyone know if a visual basic string data type can be converted to DB2 blob datatype? I have all data in XML files and I use Visual Basic to... -
Yukihiro Matsumoto #2
Re: "wrong argument type nil (expected String)" from Dir.chdir
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.
Yukihiro Matsumoto Guest
-
Tim Kynerd #3
Re: "wrong argument type nil (expected String)" from Dir.chdir
On Mon, 24 Nov 2003 09:20:03 +0900, Yukihiro Matsumoto wrote:
Thanks Matz.> 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.
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 [email]tkynerd@spamcop.net[/email]
Sunrise in Stockholm today: 8:03
Sunset in Stockholm today: 15:04
My rail transit photos at [url]http://www.kynerd.nu[/url]
Tim Kynerd Guest
-
Tim Kynerd #4
Re: "wrong argument type nil (expected String)" from Dir.chdir
On Mon, 24 Nov 2003 07:24:18 +0100, Tim Kynerd wrote:
Sorry to be following up to myself, but here's a bit more info (that just> 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.
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.
--
Tim Kynerd Sundbyberg (småstan i storstan), Sweden [email]tkynerd@spamcop.net[/email]
Sunrise in Stockholm today: 8:03
Sunset in Stockholm today: 15:04
My rail transit photos at [url]http://www.kynerd.nu[/url]
Tim Kynerd Guest
-
Robert Klemme #5
Re: "wrong argument type nil (expected String)" from Dir.chdir
"Tim Kynerd" <vxbrw58s02@sneakemail.com> schrieb im Newsbeitrag
news:pan.2003.11.24.07.03.02.137518@kynerd.no-ip.com...just> Sorry to be following up to myself, but here's a bit more info (thatSounds strange indeed.> 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.
Is that the same as "uname -a" reports?> Also, a trip to /usr/src tells me I'm running kernel 2.4.20.
robert
Robert Klemme Guest



Reply With Quote

