Breaking nil to fix bugs: experimental approach
Enrique Mogollan • November 13, 2024 • Chicago, IL • Talk
In Ruby, encountering `nil` is inevitable and often leads to frustrating bugs and NoMethodError exceptions. While `nil` is a crucial part of Ruby's design, it can be the source of elusive and hard-to-diagnose issues in your codebase. This talk explores an unconventional and experimental approach to debugging by "breaking" the nil object.
How will we debug bugs?
- extending the NilClass
- customizing method_missing
- creating methods dynamically with the previous options
This is probably the wrong solution. Don't try this in production. However, we'll find bugs and it will be fun!
Notes, code and more: https://github.com/mogox/talk_breaking_nil
RubyConf 2024