Hello folks,
I’m playing around with dynamic monkey-patching of methods. However, I
run into syntax errors of my generated code:
ruby monkey.rb
Two: unpatched
Patched test_two called
Two: patched
monkey.rb:12:in catch_method': (eval):4:in
catch_method’: compile
error (SyntaxError)
(eval):3: syntax error, unexpected ‘,’, expecting ‘=’
old_test_attribute=(*args,&block)
^
from monkey.rb:33
Do you know a way for dynamic monkey-patching of getter / setter
methods?
(source at: http://pastie.org/1132204)
Thanks,
Keep smiling
yanosz