Venturing into the Spooky Science of Ruby
summary
Explains concrete internals: how method lookup walks class → included modules → object/kernel/basic_object, how const_set/const_get and class_new create classes at runtime, how define_method via send adds behavior, and how singleton (eigen) classes hold per-object and per-class methods. Notes prepend (Ruby 2.0) puts modules before the class so the vaccine module wins, remove_method deletes only from the named class while undef_method blocks any lookup, and the dynamic zombie/vaccine demo actually works.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:42Overview
- 8:56Method Lookup
- 13:15Zombies
- 19:03Singleton class
- 19:38Play method
- 20:25Singleton classes
- 26:13Katie
- 27:11Zombie vaccine
- 28:45Remove method
- 31:21Summary
related talks
29mModule Magic
29mAll I'd Wanted to Know about Ruby's Object Model Starting Out...and Mooar!!!
29mAll I'd Wanted to Know about Ruby's Object Model Starting Out...and Mooar!!!
33mThe Case Of The Missing Method - A Ruby Mystery Story
28mDeep Ruby
29mMessenger: The (Complete) Story of Method Lookup
34mThe Case of the Missing Method — A Ruby Mystery Story
29mThe Case of the Missing Method: A Ruby Mystery Story
