Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't leak a global variable #249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/coderay/scanners/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def scan_tokens encoder, options
end
unless unicode
# check for unicode
$DEBUG_BEFORE, $DEBUG = $DEBUG, false
debug_before, $DEBUG = $DEBUG, false
begin
if check(/./mu).size > 1
# seems like we should try again with unicode
Expand All @@ -266,7 +266,7 @@ def scan_tokens encoder, options
rescue
# bad unicode char; use getch
ensure
$DEBUG = $DEBUG_BEFORE
$DEBUG = debug_before
end
next if unicode
end
Expand Down