class RuboCop::Cop::VariableForce::VariableTable
def find_variable(name)
def find_variable(name) name = name.to_sym scope_stack.reverse_each do |scope| variable = scope.variables[name] return variable if variable # Only block scope allows referencing outer scope variables. return nil unless scope.node.block_type? end nil end