diff --git a/lib/rouge/lexer.rb b/lib/rouge/lexer.rb index 7fd93db25b..28ae257be6 100644 --- a/lib/rouge/lexer.rb +++ b/lib/rouge/lexer.rb @@ -188,11 +188,11 @@ def enable_debug! end def disable_debug! - @debug_enabled = false + remove_instance_variable :@debug_enabled end def debug_enabled? - !!@debug_enabled + (defined? @debug_enabled) ? true : false end protected