Sha256: 18ebb88f496de0cbcf52cc00532af442ee7b9ef04d81af8d788a9aab1904c4f6

Contents?: true

Size: 518 Bytes

Versions: 56

Compression:

Stored size: 518 Bytes

Contents

module ChildProcess
  module Windows
    class IO < AbstractIO
      private

      def check_type(io)
        return if has_fileno?(io)
        return if has_to_io?(io)

        raise ArgumentError, "#{io.inspect}:#{io.class} must have :fileno or :to_io"
      end

      def has_fileno?(io)
        io.respond_to?(:fileno) && io.fileno
      end

      def has_to_io?(io)
        io.respond_to?(:to_io) && io.to_io.kind_of?(::IO)
      end

    end # IO
  end # Windows
end # ChildProcess


Version data entries

56 entries across 42 versions & 5 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/childprocess-0.6.3/lib/childprocess/windows/io.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.7.0/gems/childprocess-0.6.3/lib/childprocess/windows/io.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.6.0/gems/childprocess-0.6.3/lib/childprocess/windows/io.rb
vagrant-unbundled-2.2.6.2 vendor/bundle/ruby/2.6.0/gems/childprocess-0.6.3/lib/childprocess/windows/io.rb
vagrant-unbundled-2.2.6.1 vendor/bundle/ruby/2.6.0/gems/childprocess-0.6.3/lib/childprocess/windows/io.rb
vagrant-unbundled-2.2.6.0 vendor/bundle/ruby/2.6.0/gems/childprocess-0.6.3/lib/childprocess/windows/io.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.6.0/gems/childprocess-0.6.3/lib/childprocess/windows/io.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/childprocess-0.6.3/lib/childprocess/windows/io.rb
tdiary-5.0.13 vendor/bundle/gems/childprocess-0.9.0/lib/childprocess/windows/io.rb
tdiary-5.0.12.1 vendor/bundle/gems/childprocess-0.9.0/lib/childprocess/windows/io.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.5.0/gems/childprocess-0.6.3/lib/childprocess/windows/io.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.6.0/gems/childprocess-0.6.3/lib/childprocess/windows/io.rb
childprocess-1.0.0 lib/childprocess/windows/io.rb
vagrant-unbundled-2.2.3.0 vendor/bundle/ruby/2.5.0/gems/childprocess-0.6.3/lib/childprocess/windows/io.rb
tdiary-5.0.11 vendor/bundle/gems/childprocess-0.9.0/lib/childprocess/windows/io.rb
vagrant-unbundled-2.2.2.0 vendor/bundle/ruby/2.5.0/gems/childprocess-0.6.3/lib/childprocess/windows/io.rb
vagrant-unbundled-2.2.0.0 vendor/bundle/ruby/2.5.0/gems/childprocess-0.6.3/lib/childprocess/windows/io.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/childprocess-0.9.0/lib/childprocess/windows/io.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/childprocess-0.9.0/lib/childprocess/windows/io.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/childprocess-0.9.0/lib/childprocess/windows/io.rb