diff --git a/src/ameba/ast/variabling/variable.cr b/src/ameba/ast/variabling/variable.cr index 3d3ce705..f7641b70 100644 --- a/src/ameba/ast/variabling/variable.cr +++ b/src/ameba/ast/variabling/variable.cr @@ -29,7 +29,7 @@ module Ameba::AST # Returns true if it is a special variable, i.e `$?`. def special? - name =~ /^\$/ + @node.special_var? end # Assigns the variable (creates a new assignment).