lib/openwfe/participants/participantmap.rb in openwferu-0.9.2 vs lib/openwfe/participants/participantmap.rb in openwferu-0.9.3
- old
+ new
@@ -39,10 +39,11 @@
# John Mettraux at openwfe.org
#
require 'openwfe/workitem'
require 'openwfe/service'
+require 'openwfe/participants/participants'
include OpenWFE
module OpenWFE
@@ -74,12 +75,13 @@
if not block
participant = BlockParticipant.new(block)
end
- regex = Regexp.new(regex) if not regex.kind_of? Regexp
+ regex = Regexp.new(regex.to_s) unless regex.kind_of? Regexp
- participant.application_context = @application_context
+ participant.application_context = @application_context \
+ if participant.respond_to? :application_context=
@participants << [ regex, participant ]
end
#