-
Handling keyword arguments in method_missing in Ruby
If you implement a method_missing method to receive methods that receive keyword arguments and you only receive and forward (to send) the method name, *args, and &block, you will receive ArgumentError: wrong number of arguments (given 3, expected 2) when the arguments are forwarded. This is because the keyword arguments will revert to the backward-compatible…
-
Ruby object creation and method call debugging without mangling your gems directory
Using alias, class_eval, and other metaprogramming techniques to improve your debugging efficiency.