Marcus Poller
02/26/2026, 11:13 AMA capitalized variable likeyou explanation helped. ❤️ This feature is exceeding my expectations:makes a constant which gets "enclosing scope" which is kind of like global to the class or module it's declared in.CONFIG
#scope.rb
module Scope
CONFIG = { 'module' => 'default' }
def dbg
CONFIG.each do |k, v| puts "#{k}=#{v.inspect}"; end
end
end
include Scope
#use_scope.rb
require_relative 'scope'
CONFIG['foo']='bar'
dbg
$ ruby use_scope.rb
module="default"
foo="bar"