Notes posted by mkopel
RSS feed![Default_avatar_30](https://www.gravatar.com/avatar/6ad6fdf4e7ccc06d3002d41158002a07?size=30&default=http://apidock.com/images/default_avatar_30.png)
7 thanks
Very bad documentation
This is terrible documentation. It makes it very hard to understand what the arguments mean.
The signature is
alias_method(p1, p2)
So what do p1 and p2 mean? The description doesn’t refer to them at all, but to new_name and old_name. How are we supposed to know which is which?
And then it gets even worse in the code sample:
alias_method :orig_exit, :exit
From the naming it sounds like the first argument is the original method name.
Documentation is supposed to resolve this kind of confusion, not create it.