RubyConf 2024 Breaking nil to fix bugs: experimental approach by Enrique Mogollan
Channel:
Subscribers:
42,400
Published on ● Video Link: https://www.youtube.com/watch?v=FW_UpbqlPa4
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!