We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34204bc commit 4606a5cCopy full SHA for 4606a5c
1 file changed
test/helper/with_term.rb
@@ -14,13 +14,15 @@ def sio.tty?; true; end if tty
14
15
def with_term(tty=true)
16
with_sio(tty: tty) do |sio|
17
- orig_stdout, $stdout = $stdout, sio
18
- orig_env = ENV.to_h.dup
19
- ENV['TERM'] = 'xterm-256color'
20
- yield
21
- ensure
22
- $stdout = orig_stdout
23
- ENV.replace(orig_env) if orig_env
+ begin
+ orig_stdout, $stdout = $stdout, sio
+ orig_env = ENV.to_h.dup
+ ENV['TERM'] = 'xterm-256color'
+ yield
+ ensure
+ $stdout = orig_stdout
24
+ ENV.replace(orig_env) if orig_env
25
+ end
26
end
27
28
0 commit comments