What I am doing is:
class Foo
alias_method :__bar__,:bar
def bar(*arg)
#do something
__bar__(*arg)
end
end
Is it the proper way to do it?
Or it is better to figure out how many required,optional,block arguments the original method has, and write exactly the same amount of arguments?
The use of a slurpy arg is the right approach, but you should also handle any block arguments: