[Change detection of read-only IO streams to work on rubinius make ruby-ole] cannot work right on windows #11

Closed
comme opened this Issue Nov 9, 2012 · 4 comments

Projects

None yet

2 participants

@comme
comme commented Nov 9, 2012

ruby-ole / lib / ole / storage / base.rb#line 62

# works on mri 1.9 & rubinius
@io.write_nonblock('') if @io.respond_to?(:write_nonblock)

method Io#write_nonblock not support on window

detail: On some platforms such as Windows, #write_nonblock is not supported according to the kind of the IO object. In such cases, #write_nonblock raises Errno::EBADF.

@aquasync
Owner
aquasync commented Nov 9, 2012

Ah OK, I knew there must have been a reason I wasn't using it already. I no longer develop on a windows box so didn't pick this up. Guess I'll have to make it conditional on platform.

@aquasync
Owner

I've added a fix where it'll just catch EBADF and fallback to the previous syswrite test. Looks fine - can you verify this works?

@comme
comme commented Dec 7, 2012

it works! thx~~

@aquasync
Owner

Released as v1.2.11.6.

@aquasync aquasync closed this Dec 12, 2012
@scottwillson scottwillson pushed a commit to scottwillson/ruby-ole that referenced this issue Jul 28, 2015
@aquasync Change detection of read-only IO streams to work on rubinius (issue #11
…).
662f4ec
@scottwillson scottwillson pushed a commit to scottwillson/ruby-ole that referenced this issue Jul 28, 2015
@aquasync Remove some unused code that didn't work on rubinius (issue #11). cb0de79
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment