Class: RSpec::Hermetic::Probe::RubyRuntime

Inherits:
Base
  • Object
show all
Defined in:
lib/rspec/hermetic/probe/ruby_runtime.rb

Constant Summary collapse

WARNING_CATEGORIES =
%i[deprecated experimental performance].freeze

Instance Method Summary collapse

Methods inherited from Base

#initialize, #name

Constructor Details

This class inherits a constructor from RSpec::Hermetic::Probe::Base

Instance Method Details

#capture(_context) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/rspec/hermetic/probe/ruby_runtime.rb', line 11

def capture(_context)
  {
    "$VERBOSE" => $VERBOSE,
    "$DEBUG" => $DEBUG,
    "Encoding.default_external" => Encoding.default_external&.name,
    "Encoding.default_internal" => Encoding.default_internal&.name,
    "Thread.abort_on_exception" => Thread.abort_on_exception,
    "Thread.report_on_exception" => Thread.report_on_exception,
    "GC.stress" => GC.stress
  }.merge(warning_settings)
end