lib/peekaboo.rb in peekaboo-0.2.0 vs lib/peekaboo.rb in peekaboo-0.2.1
- old
+ new
@@ -113,10 +113,11 @@
include Peekaboo unless @_hooked_by_peekaboo
method_names.each do |method_name|
unless peek_list.include? method_name
peek_list << method_name
- Peekaboo.wrap_method self, method_name if self.instance_methods(false).include? method_name.to_s
+ method_list = self.instance_methods(false).map(&:to_sym)
+ Peekaboo.wrap_method self, method_name if method_list.include? method_name
else
raise "Already tracing `#{method_name}'"
end
end
end