lib/system_metrics/instrument/base.rb in system-metrics-0.1.0 vs lib/system_metrics/instrument/base.rb in system-metrics-0.2.0
- old
+ new
@@ -39,10 +39,10 @@
#
# Please Note: Even if the instrument would ultimately like to
# ignore the event, it should still return true if it generally
# handles events like the one passed.
def handles?(event)
- event.name =~ pattern
+ (event.name =~ pattern) != nil
end
# Indicates whether the given event should be completely ingored
# and not collected. This is called only if #handles?(event)
# returns `true`