~/talk

'method_missing' Should be Missing

Talkat RubyConf India 2012 · 2012-05-14..05-20· [ruby, software-architecture]
links:none on file
slides:none on file

Claims that method_missing is overused and hides bugs, recommending define_method for roughly 80% of cases; shows a REST-proxy example where regex-based method_missing masks NoMethodError and causes edge cases. Warns that monkey patching (overriding core methods like freeze) breaks upgrades and suggests mixing modules or Ruby 2.0 refinements instead. Demonstrates eval abuses — dynamic constant/variable tricks and even a tested system rm -rf case — and replaces eval with const_get/const_set and instance_variable_get/set for safety.

AI-written summary · about

  1. 0:00Intro
  2. 0:37Who am I
  3. 2:51Outline
  4. 3:51Metaprogramming
  5. 5:30Edge Cases
  6. 6:36MethodMissing
  7. 10:29Monkey patching
  8. 11:30Problems with monkey patching
  9. 13:18Why monkey patching
  10. 14:09Evil eval
  11. 17:20module function
  12. 18:56class variable
  13. 20:58eval
  14. 22:57stay within bounds
  15. 24:12QA
~/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.