I'd have expected respondsTo to know about those runtime-added methods too. It's not even clear to me how to test for their presence in an object otherwise.
I can't be bothered to file another separate report right now but tryPerform has a similar problem.
Environment
Steps to reproduce
Expected vs. actual behavior
I'd have expected
respondsTo
to know about those runtime-added methods too. It's not even clear to me how to test for their presence in an object otherwise.I can't be bothered to file another separate report right now but
tryPerform
has a similar problem.So
tryPerform
also doesn't work foraddUniqueMethod
-s, and it is perhaps a more serious bug.Actually
tryPerform
is implemented in terms ofrespondsTo
:So, filing a single bug report for both turned out the right choice since fixing
respondsTo
will fixtryPerform
as well, in this regard.Alas respondsTo is a native method wrapper for
_ObjectRespondsTo
, so that will take more than a script kiddie to fix.