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: rake-devel-bounces@rubyforge.org
[mailto:rake-devel-bounces@rubyforge.org] 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.
--
Lionel Thiry
Personal website: http://users.skynet.be/lthiry/