Skip to content

Commit

Permalink
allow it to work on windows [did it ever work on linux?] and also all…
Browse files Browse the repository at this point in the history
…ow it to work if outside a process that has already run IRB.
  • Loading branch information
rdp authored and Pete Elmore committed Jul 9, 2009
1 parent 3ae0eb7 commit e4768da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/live_console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ def IRB.start_with_io(io, bind, &block)
@inited = true
end

bind ||= IRB::Frame.top(1)
ws = IRB::WorkSpace.new(bind)
irb = Irb.new(ws, io, io)
bind ||= IRB::Frame.top(1) rescue TOPLEVEL_BINDING

@CONF[:IRB_RC].call(irb.context) if @CONF[:IRB_RC]
@CONF[:MAIN_CONTEXT] = irb.context
Expand Down
2 changes: 1 addition & 1 deletion lib/live_console/io_methods/socket_io.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def start
@server ||= TCPServer.new host, port

begin
self.raw_input = self.raw_output = server.accept_nonblock
self.raw_input = self.raw_output = server.accept
return true
rescue Errno::EAGAIN, Errno::ECONNABORTED, Errno::EPROTO,
Errno::EINTR => e
Expand Down

0 comments on commit e4768da

Please sign in to comment.