Remove redundant begin
This commit is contained in:
parent
c7b36df879
commit
1f0f08c30d
@ -115,20 +115,18 @@ class Sandbox
|
|||||||
end
|
end
|
||||||
|
|
||||||
write_to_pty = proc do
|
write_to_pty = proc do
|
||||||
begin
|
# Update the window size whenever the parent terminal's window size changes.
|
||||||
# Update the window size whenever the parent terminal's window size changes.
|
old_winch = trap(:WINCH, &winch)
|
||||||
old_winch = trap(:WINCH, &winch)
|
winch.call(nil)
|
||||||
winch.call(nil)
|
|
||||||
|
|
||||||
stdin_thread = Thread.new { IO.copy_stream($stdin, w) }
|
stdin_thread = Thread.new { IO.copy_stream($stdin, w) }
|
||||||
|
|
||||||
r.each_char { |c| print(c) }
|
r.each_char { |c| print(c) }
|
||||||
|
|
||||||
Process.wait(pid)
|
Process.wait(pid)
|
||||||
ensure
|
ensure
|
||||||
stdin_thread&.kill
|
stdin_thread&.kill
|
||||||
trap(:WINCH, old_winch)
|
trap(:WINCH, old_winch)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if $stdin.tty?
|
if $stdin.tty?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user