Skip to content

Commit cef474a

Browse files
committed
Ensure to restore $VERBOSE
1 parent 8a19800 commit cef474a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/irb/color.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ def scan(code, allow_last_error:)
192192
end
193193
end
194194
end
195+
ensure
195196
$VERBOSE = verbose
196197
end
197198

lib/irb/ruby-lex.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,9 @@ def ripper_lex_without_warning(code)
139139
tokens = lexer.parse
140140
end
141141
end
142-
$VERBOSE = verbose
143142
tokens
143+
ensure
144+
$VERBOSE = verbose
144145
end
145146

146147
def find_prev_spaces(line_index)

0 commit comments

Comments
 (0)