Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure on Win32: expected #to_io to return an instance of IO #23

Closed
robertwahler opened this issue Jan 9, 2012 · 4 comments
Closed

Comments

@robertwahler
Copy link
Contributor

There is a failure of both the code and specs. I tested version 0.2.7 on Windows XP, SP3. Here is an example failure:

1) ChildProcess preserves Dir.pwd in the child
     Failure/Error: process.start
     TypeError:
       expected #to_io to return an instance of IO
     # ./spec/../lib/childprocess/windows/lib.rb:270:in `handle_for'
     # ./spec/../lib/childprocess/windows/process_builder.rb:135:in `std_stream_handle_for'
     # ./spec/../lib/childprocess/windows/process_builder.rb:105:in `setup_io'
     # ./spec/../lib/childprocess/windows/process_builder.rb:29:in `start'
     # ./spec/../lib/childprocess/windows/process.rb:62:in `launch_process'
     # ./spec/../lib/childprocess/abstract_process.rb:62:in `start'
     # ./spec/childprocess_spec.rb:125
     # ./spec/childprocess_spec.rb:121

I had a quick look, it seems that io is sometimes the IO class and sometimes the File class. Thanks for looking into this.

-robert wahler

@jarib
Copy link
Collaborator

jarib commented Jan 9, 2012

Thanks for reporting. Can you try 0.2.8?

@jarib jarib closed this as completed Jan 9, 2012
@robertwahler
Copy link
Contributor Author

Thanks for the quick fixes. There is one more failing test due to EOL differences.

robert@WHITE /c/dat/workspace/childprocess (master)
$ ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]

robert@WHITE /c/dat/workspace/childprocess (master)
$ rake
c:/opt/ruby-187-p302/bin/ruby.exe -I lib:spec -S rspec spec/abstract_io_spec.rb spec/childprocess_spec.rb spec/io_spec.rb spec/jruby_spec.rb spec/unix_spec.rb spec/windows_spec.rb
............*......F....

Pending:
  ChildProcess lets a detached child live on
    # how do we spec this?
    # ./spec/childprocess_spec.rb:116

Failures:

  1) ChildProcess works with pipes
     Failure/Error: stdout.read.should == "stdout\n"
       expected: "stdout\n"
            got: "stdout\r\n" (using ==)
       Diff:
     # ./spec/io_spec.rb:112

Finished in 2.39 seconds
24 examples, 1 failure, 1 pending

@jarib
Copy link
Collaborator

jarib commented Jan 9, 2012

I see. That didn't happen on Win 7 + 1.9.2. Can you try with the current master?

@robertwahler
Copy link
Contributor Author

Looks good. No failures on current master in XP SP3 and 1.8.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants