Permalink
Browse files

Merge mem_leak branch with master

  • Loading branch information...
2 parents e8126c0 + 0b3e559 commit ad6cc97bd8197942fc9f87db70051eca751f85b6 @jkutner jkutner committed Nov 22, 2009
Showing with 11 additions and 11 deletions.
  1. +1 −0 Rakefile
  2. +10 −11 lib/core/nodes.rb
View
1 Rakefile
@@ -36,6 +36,7 @@ the forward chaining Rete algorithm. Ruleby provides an internal Domain Specific
Release Notes for Version 0.6-SNAPSHOT
* Added support for AND and OR functions in the LHS of a rule
* Added the ability to self-reference in the LHS without binding
+* Fixed bug in retract_resolve on JoinNode that was causing inconsistent behavior of :not patterns.
EOF
#s.extra_rdoc_files = [ 'README.txt' ]
View
21 lib/core/nodes.rb
@@ -517,11 +517,10 @@ def propagate_retract(fact)
out_node.retract_left(fact)
end
end
-
- # this might move into ParentNode
+
def retract_resolve(match)
- @out_nodes.each do |out_node|
- out_node.retract_resolve(match)
+ @out_nodes.each do |o|
+ o.retract_resolve(match)
end
end
end
@@ -539,11 +538,11 @@ def propagate_retract(fact)
@out_nodes.each do |out_node|
out_node.retract_right(fact)
end
- end
-
+ end
+
def retract_resolve(match)
- @out_nodes.each do |out_node|
- out_node.retract_resolve(match)
+ @out_nodes.each do |o|
+ o.retract_resolve(match)
end
end
end
@@ -604,9 +603,9 @@ def retract_resolve(match)
# with the match given. It would probably be better to check if it
# resolves with a list of facts. But the system is not set up for
# that yet.
- # @left_memory.each do |fact_id,contexts|
- # contexts.delete_if do |left_context|
- # resolve(left_context.match, match)
+ # @left_memory.each do |fact_id,contexts|
+ # contexts.delete_if do |left_context|
+ # resolve(left_context.match, match)
# end
# end
propagate_retract_resolve(match)

0 comments on commit ad6cc97

Please sign in to comment.