fix issue with frozen strings

In some cases, calls to MethodInfo::full_name would fail, complaining
about the class name being a frozen string.

Fix this issue by moving the method to pure ruby.