lib/signal.rb in signal-0.2.0 vs lib/signal.rb in signal-0.2.1
- old
+ new
@@ -36,12 +36,9 @@
private
def emit_signal(type, event, *args)
listeners.each do |listener|
method_name = "#{type}_#{event}"
-
- if listener.respond_to?(method_name)
- listener.public_send(method_name, *args)
- end
+ listener.send(method_name, *args) if listener.respond_to?(method_name)
end
end
end