Use Var#special_var? to check if var is special

This commit is contained in:
Vitalii Elenhaupt 2018-05-04 16:25:44 +03:00
parent 6475c2bb25
commit cc71511080
No known key found for this signature in database
GPG key ID: 7558EF3A4056C706

View file

@ -29,7 +29,7 @@ module Ameba::AST
# Returns true if it is a special variable, i.e `$?`. # Returns true if it is a special variable, i.e `$?`.
def special? def special?
name =~ /^\$/ @node.special_var?
end end
# Assigns the variable (creates a new assignment). # Assigns the variable (creates a new assignment).