~/talk

MRI Magic Tricks

Talkat RubyConf AU 2014 · 2014-02-19..02-21· [ruby]
links:none on file
slides:none on file

Finds the hidden Ruby VM frozen core by scanning nearby object IDs, provides a gem exposing its instance, and uses it to call internal methods like core_set_variable_alias and core_hash_defined_method to alias globals, reorder hash literals, and backport Ruby 2.1’s method-definition-returning-symbol behavior. Shows how module_initialized_copy lets code rewrite a class’s ancestry and implements superclass= (worked on Ruby 1.9.3 in testing). Demonstrates putting objects in $LOADED_FEATURES whose to_s runs during the segfault handler so a raised segfault can be caught — fragile and unsafe.

AI-written summary · about

  1. 0:00Start
  2. 1:02Mri Bugs
  3. 1:36Disclaimer
  4. 2:04The Frozen Four
  5. 2:51Instruction Sequence Dump
  6. 10:42The Hash from Array Method
  7. 11:22Corset Method Alias
  8. 12:40Duplicating a Class
  9. 18:35Rescue from Segmentation Faults
~/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.