I'm trying to recreate a case_class (like from Scala) but in Ruby. so I've tried
def case_class name
Object.const_set name, Class.new {}
end
but I get: NameError: uninitialized constant ...
I have tried to find which method throws that error, but I couldn't find it.
for ex. redefining "const_missing" in Object
but I keep getting the same error