Sha256: e1a5d3f3c03702f96a57efef6a3ec850787a539ae400057ab143bf96fafa6939

Contents?: true

Size: 644 Bytes

Versions: 25

Compression:

Stored size: 644 Bytes

Contents

class TCPSocket
  
  # Workaround for JRuby issue http://jira.codehaus.org/browse/JRUBY-2063
  def non_blocking_gets
    loop do
      result, _, _ = IO.select( [self], nil, nil, 0.2 )
      next unless result
      return result[0].gets
    end
  end
  
end

module Debugger  

  class RemoteInterface # :nodoc:

    def initialize(socket)
      @socket = socket
    end
    
    def read_command
      result = @socket.non_blocking_gets
      raise IOError unless result
      result.chomp
    end

    def print(*args)
      @socket.printf(*args)
    end
    
    def close
      @socket.close
    rescue Exception
    end
    
  end
  
end

Version data entries

25 entries across 25 versions & 3 rubygems

Version Path
debugger-ide-0.0.2 lib/ruby-debug/interface.rb
ruby-debug-ide-0.4.16 lib/ruby-debug/interface.rb
ruby-debug-ide-0.4.11 lib/ruby-debug/interface.rb
ruby-debug-ide-0.4.10 lib/ruby-debug/interface.rb
ruby-debug-ide19-0.4.12 lib/ruby-debug/interface.rb
ruby-debug-ide19-0.4.11 lib/ruby-debug/interface.rb
ruby-debug-ide19-0.4.10 lib/ruby-debug/interface.rb
ruby-debug-ide-0.4.9 lib/ruby-debug/interface.rb
ruby-debug-ide-0.4.8 lib/ruby-debug/interface.rb
ruby-debug-ide-0.4.7 lib/ruby-debug/interface.rb
ruby-debug-ide-0.1.10 lib/ruby-debug/interface.rb
ruby-debug-ide-0.4.4 lib/ruby-debug/interface.rb
ruby-debug-ide-0.3.4 lib/ruby-debug/interface.rb
ruby-debug-ide-0.3.0 lib/ruby-debug/interface.rb
ruby-debug-ide-0.3.1 lib/ruby-debug/interface.rb
ruby-debug-ide-0.4.1 lib/ruby-debug/interface.rb
ruby-debug-ide-0.4.2 lib/ruby-debug/interface.rb
ruby-debug-ide-0.2.0 lib/ruby-debug/interface.rb
ruby-debug-ide-0.2.1 lib/ruby-debug/interface.rb
ruby-debug-ide-0.3.3 lib/ruby-debug/interface.rb