diff --git a/lib/irt/extensions/method.rb b/lib/irt/extensions/method.rb
index <HASH>..<HASH> 100644
--- a/lib/irt/extensions/method.rb
+++ b/lib/irt/extensions/method.rb
@@ -12,7 +12,7 @@ class Method
         end
     arr = Array.new(n)
     set_trace_func proc{ |event, file, line, meth_name, binding, classname|
-      if event.eql?('call') && name.match(meth_name.to_s)
+      if event.eql?('call') && name.to_s.match(meth_name.to_s)
         f = file
         l = line
         set_trace_func nil
fix "Method#location raises TypeError with ruby <I>" bug