FW: [Rake-devel] the origin of the strange bug on win2k

B

Berger, Daniel

Hi all,

I've forwarded this from the Rake dev mailing list in the hopes that
someone can help out. There appears to be a shell problem, and we're
not sure what the proper way is to handle this on Win32.

Any ideas?

Thanks,

Dan

-----Original Message-----
From: (e-mail address removed)
[mailto:[email protected]] On Behalf Of Lionel Thiry
Sent: Wednesday, May 04, 2005 8:15 PM
To: Rake Development and Discussion
Subject: [Rake-devel] the origin of the strange bug on win2k


Hello!

By strange bug, I mean:
----8<----
-e:1:in `exit': no implicit conversion from nil to integer (TypeError)
from -e:1
----8<----
that appeared /while/ unittests of rake were running.

I think it is because comspec (the win2k shell) doesn't substitute
variables the
same way as unix shell does.

----8<----
C:\usr\ruby\lib\ruby\gems\1.8\gems\rake-0.5.4.1>set RAKE_TEST_RUBY=123

C:\usr\ruby\lib\ruby\gems\1.8\gems\rake-0.5.4.1>echo $RAKE_TEST_RUBY
$RAKE_TEST_RUBY

C:\usr\ruby\lib\ruby\gems\1.8\gems\rake-0.5.4.1>echo %RAKE_TEST_RUBY%
123

C:\usr\ruby\lib\ruby\gems\1.8\gems\rake-0.5.4.1>ruby -e "exit
$RAKE_TEST_RUBY" -e:1:in `exit': no implicit conversion from nil to
integer (TypeError)
from -e:1

C:\usr\ruby\lib\ruby\gems\1.8\gems\rake-0.5.4.1>ruby -e "puts
%RAKE_TEST_RUBY%" 123
----8<----

Concerning the tests, the problem lies in test/testfileutils.rb at line
99:
----8<----
ruby %{-e "exit $RAKE_TEST_RUBY"} do |ok, status|
assert(!ok)
assert_equal 123, status.exitstatus
block_run = true
end
----8<----

Unfortunatly, replacing $RAKE_TEST_RUBY with %RAKE_TEST_RUBY% doesn't
work. I've
conducted some tests to see what could work, see the attachment. ... But
I don't
find any solution yet.
 
F

Florian Groß

Concerning the tests, the problem lies in test/testfileutils.rb at line
99:
----8<----
ruby %{-e "exit $RAKE_TEST_RUBY"} do |ok, status|
assert(!ok)
assert_equal 123, status.exitstatus
block_run = true
end
----8<----

Unfortunatly, replacing $RAKE_TEST_RUBY with %RAKE_TEST_RUBY% doesn't
work. I've
conducted some tests to see what could work, see the attachment. ... But
I don't
find any solution yet.

Can't you just do "exit ENV['RAKE_TEST_RUBY']"?
 
J

Jim Weirich

On Thursday 05 May 2005 11:06 am, Florian Groß wrote:

ENV['RAKE_TEST_RUBY'] = "123"
ruby %{-e "exit $RAKE_TEST_RUBY"} do |ok, status|
assert(!ok)
assert_equal 123, status.exitstatus
block_run = true
end
[...]
Can't you just do "exit ENV['RAKE_TEST_RUBY']"?

You can ... but that won't test the expansion of environment variables in a
rake process.

I'm thinking that if I want rake to be able to support environment variable
expansion across all platforms, I will have to expand the variables myself.
There is just too much difference between systems.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,175
Messages
2,570,942
Members
47,476
Latest member
blackwatermelon

Latest Threads

Top