[Ironruby-core] running tests on server 2008
Peter Bacon Darwin
bacondarwin at googlemail.com
Sun May 11 09:17:46 EDT 2008
The chdir_spec warnings are to do with block-less calls to chdir within a
block attached to another call to chdir.
The following code does not raise a warning...
irb(main):001:0> Dir.chdir("c:\\Windows") do
irb(main):002:1* puts Dir.pwd
irb(main):003:1> Dir.chdir("System32") do
irb(main):004:2* puts Dir.pwd
irb(main):005:2> end
irb(main):006:1> puts Dir.pwd
irb(main):007:1> end
c:/Windows
c:/Windows/System32
c:/Windows
=> nil
But this code does...
irb(main):008:0> Dir.chdir("c:\\Windows") do
irb(main):009:1* puts Dir.pwd
irb(main):010:1> Dir.chdir("System32")
irb(main):011:1> puts Dir.pwd
irb(main):012:1> end
c:/Windows
(irb):10: warning: conflicting chdir during another chdir block
c:/Windows/System32
=> nil
It appears that the spec_runner is setting up a chdir block and that the
chdir_spec is changing the directory explicitly (as you would expect) and
Ruby gives a warning since, once the block exits, this new directory will be
changed back to the one before the block began.
Nothing to worry about, I think.
Pete
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>
John Lam wrote:
> Yes - that's what it's supposed to do. This is how we detect failure in
our automated test
> suites. I was more worried about the chdir_spec warnings that you showed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080511/96b68ed5/attachment.html>
More information about the Ironruby-core
mailing list