# File debug-1.4.0/lib/debug/config.rb, line 72 def [](key) config[key] end
# File debug-1.4.0/lib/debug/config.rb, line 76 def []=(key, val) set_config(key => val) end
# File debug-1.4.0/lib/debug/config.rb, line 93 def append_config key, val conf = config.dup if CONFIG_SET[key] if CONFIG_SET[key][2] == :path conf[key] = [*conf[key], *parse_config_value(key, val)]; else raise "not an Array type: #{key}" end else raise "Unknown configuration: #{key}" end update conf end
# File debug-1.4.0/lib/debug/config.rb, line 68 def inspect config.inspect end
# File debug-1.4.0/lib/debug/config.rb, line 80 def set_config(**kw) conf = config.dup kw.each{|k, v| if CONFIG_MAP[k] conf[k] = parse_config_value(k, v) # TODO: ractor support else raise "Unknown configuration: #{k}" end } update conf end
# File debug-1.4.0/lib/debug/config.rb, line 109 def update conf old_conf = self.class.instance_variable_get(:@config) || {} # TODO: Use Ractor.make_shareable(conf) self.class.instance_variable_set(:@config, conf.freeze) # Post process if_updated old_conf, conf, :keep_alloc_site do |_, new| if new require 'objspace' ObjectSpace.trace_object_allocations_start else ObjectSpace.trace_object_allocations_stop end end if_updated old_conf, conf, :postmortem do |_, new_p| if defined?(SESSION) SESSION.postmortem = new_p end end if_updated old_conf, conf, :sigdump_sig do |old_sig, new_sig| setup_sigdump old_sig, new_sig end end