Skip to content

Commit 8813276

Browse files
committed
Don't leak a global variable
1 parent ac45fe7 commit 8813276

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/coderay/scanners/ruby.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def scan_tokens encoder, options
257257
end
258258
unless unicode
259259
# check for unicode
260-
$DEBUG_BEFORE, $DEBUG = $DEBUG, false
260+
debug_before, $DEBUG = $DEBUG, false
261261
begin
262262
if check(/./mu).size > 1
263263
# seems like we should try again with unicode
@@ -266,7 +266,7 @@ def scan_tokens encoder, options
266266
rescue
267267
# bad unicode char; use getch
268268
ensure
269-
$DEBUG = $DEBUG_BEFORE
269+
$DEBUG = debug_before
270270
end
271271
next if unicode
272272
end

0 commit comments

Comments
 (0)