Daniel Johnston
unread,Jul 20, 2010, 10:12:25 AM7/20/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruleby
Greetings,
I'm running into problems with non accessible bound variables within
an OR conditional element. Here are my symptoms:
On the left hand side:
Bind a variable in implicit AND conditional element.
Use bound variable for comparison within the OR conditional element
of the same rule.
The rule never fires, so I'm assuming the variable is nil within the
OR element. If I remove the OR element, and only use one of the
conditions as an implicit AND, the rule fires as it should.
I'll whip up a working example and post shortly. I just wanted to
see if this has been addressed before, or if I'm missing a clutch
concept!
rule :please_fix_me,
[MyObject, {m.method => :that}],
OR([OtherObject, m.this == b(:that), m.method == "foo"],
[OtherObject, m.this == b(:that), m.method == "bar"]) do |v|
Cheers,
Daniel