~/talk

All I'd Wanted to Know about Ruby's Object Model Starting Out...and Mooar!!!

Talkat RedDotRubyConf 2017 · 2017-06-22..06-23· [ruby]
github:tjjjwxzq
slides:none on file

Work-through of the CRuby source shows how Ruby represents every object as pointers to structs (RBasic, RObject, RClass), what lives in those fields—flags, the C-level klass pointer, method table and super—and how bootstrap code (init_vm, rb_define_class_id, make_metaclass) actually builds classes. The surprising detail: defining one class spawns multiple meta- and method-classes (about five in the example) and include inserts special include classes into the inheritance chain, producing the tangled singleton/meta class chain that Ruby's class/super methods then selectively hide.

AI-written summary · about

  1. 0:00Introduction to Ruby
  2. 1:06The Ruby creation myth
  3. 2:53The object hierarchy
  4. 3:55Introspection and self-discovery
  5. 6:08Singleton methods and classes
  6. 6:58Class methods and meta-classes
  7. 8:47C Ruby internal representation
  8. 10:39Method dispatch mechanics
  9. 12:17Bootstrapping and class creation
  10. 14:15Metaclass creation details
  11. 15:53The metaclass inheritance chain
  12. 18:31Singleton class implementation
  13. 21:25Modules and include classes
  14. 24:44Q&A and conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.