everything related to duct tape audio suite (dtas)
 help / color / mirror / code / Atom feed
blob 2cf086cb9ab10198165aca9b071f16773fec9271 592 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 
# Copyright (C) 2015-2020 all contributors <dtas-all@nongnu.org>
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>

class DTAS::Nonblock < IO # :nodoc:
  if RUBY_VERSION.to_f <= 2.0
    EX = {}.freeze
    def read_nonblock(len, buf = nil, opts = EX)
      super(len, buf)
    rescue IO::WaitReadable
      raise if opts[:exception]
      :wait_readable
    rescue EOFError
      raise if opts[:exception]
      nil
    end

    def write_nonblock(buf, opts = EX)
      super(buf)
    rescue IO::WaitWritable
      raise if opts[:exception]
      :wait_writable
    end
  end
end

debug log:

solving 2cf086c ...
found 2cf086c in https://80x24.org/dtas.git/

Code repositories for project(s) associated with this public inbox

	https://80x24.org/dtas.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).