Class: TCPSocket

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-debug/interface.rb

Instance Method Summary collapse

Instance Method Details

#non_blocking_getsObject

Workaround for JRuby issue jira.codehaus.org/browse/JRUBY-2063



4
5
6
7
8
9
10
# File 'lib/ruby-debug/interface.rb', line 4

def non_blocking_gets
  loop do
    result, _, _ = IO.select( [self], nil, nil, 0.2 )
    next unless result
    return result[0].gets
  end
end