Slide 30
Slide 30 text
Having Class/Module Definitions
Per namespace
• Open class in NS can modify built-in classes/modules
• For monkey patches in namespace: class Object; def blank?; …
• In other NSs: Object without #blank?
• Class/Module de
fi
nition: classext (struct: rb_classext_t)
• super, method table, constant table, instance variables, subclasses, …
• Switching classext realizes a class with di
ff
erent de
fi
nitions! 🤪
(Thanks to @_ko1 and @mametter)