Class: Audition::Static::Checks::UnsafeCalls

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

Overview

Knowledge base of APIs that are hostile (or noteworthy) under Ractors, expressed as catalog entries plus call-site matching rules. Severities reflect behavior verified on Ruby 4.0; several 3.x-era errors (ENV, trap, ObjectSpace.each_object) now work and are only informational.

Constant Summary collapse

RULES =
Ractor.make_shareable([
  {key: :ractor_yield_removed, receiver: "Ractor",
   methods: %i[yield take]},
  {key: :rails_class_state_macro, receiver: nil,
   methods: %i[class_attribute cattr_accessor cattr_reader
     cattr_writer mattr_accessor mattr_reader
     mattr_writer thread_mattr_accessor]},
  {key: :objectspace_id2ref, receiver: "ObjectSpace",
   methods: %i[_id2ref]},
  {key: :at_exit, receiver: nil, methods: %i[at_exit]},
  {key: :signal_trap, receiver: "Signal",
   methods: %i[trap]},
  {key: :signal_trap, receiver: nil, methods: %i[trap]},
  {key: :env_write, receiver: "ENV",
   methods: %i[[]= store delete update clear replace]},
  {key: :fork, receiver: nil, methods: %i[fork]},
  {key: :fork, receiver: "Process",
   methods: %i[fork daemon]}
])

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