From 1e32f3c2030fe2d4f4b51a1a0814919aaebc13ef Mon Sep 17 00:00:00 2001 From: Michael Camilleri Date: Wed, 13 May 2020 02:11:41 +0900 Subject: [PATCH] Fix RuboCop grouped expression warning in Python lexer (#1513) The use of a ternary in code added to the Python lexer as part of the #1508 pull request results in a RuboCop warning concerning parentheses and grouped expressions. This commit fixes that warning. --- lib/rouge/lexers/python.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rouge/lexers/python.rb b/lib/rouge/lexers/python.rb index 01b826b624..6ab0c31365 100644 --- a/lib/rouge/lexers/python.rb +++ b/lib/rouge/lexers/python.rb @@ -210,7 +210,7 @@ def current_string | [0-7]{1,3} ) )x do - token (current_string.type?("r") ? Str : Str::Escape) + current_string.type?("r") ? token(Str) : token(Str::Escape) pop! end