Class: Audition::Static::Checks::GlobalVariables

Inherits:
Base
  • Object
show all
Defined in:
lib/audition/static/checks/global_variables.rb

Overview

Non-main Ractors cannot touch global variables: reads and writes raise Ractor::IsolationError. The exceptions below are ractor-local or frame-local and verified safe on Ruby 4.0. Regexp capture globals ($1, $&, $`, $', $+) are separate Prism node types and never flagged.

Constant Summary collapse

SAFE_READS =
%w[
  $stdin $stdout $stderr $! $? $~ $_ $DEBUG $VERBOSE $/ $$
].freeze
SAFE_WRITES =
%w[$DEBUG $VERBOSE].freeze
LOAD_PATH_GLOBALS =
%w[$LOAD_PATH $: $LOADED_FEATURES $"].freeze

Constants inherited from Base

Base::EMPTY_CATALOG, Base::WRAPPER

Instance Attribute Summary

Attributes inherited from Base

#file, #findings

Method Summary

Methods inherited from Base

call, check_name, explain, explanations, handlers, #initialize, on

Constructor Details

This class inherits a constructor from Audition::Static::Checks::Base