diff options
Diffstat (limited to 'lib/evendoors')
-rw-r--r-- | lib/evendoors/board.rb | 7 | ||||
-rw-r--r-- | lib/evendoors/door.rb | 14 |
2 files changed, 9 insertions, 12 deletions
diff --git a/lib/evendoors/board.rb b/lib/evendoors/board.rb index 36ca332..ead1012 100644 --- a/lib/evendoors/board.rb +++ b/lib/evendoors/board.rb @@ -22,12 +22,7 @@ module EvenDoors end @saved = p receive_p p - if not @saved.nil? - puts "#{path} didn't give that particle back #{p}" if EvenDoors::Spin.debug_errors - puts "\t#{p.data EvenDoors::ERROR_FIELD}" if p.action==EvenDoors::ACT_ERROR - release_p @saved - @saved = nil - end + garbage if not @saved.nil? end # end diff --git a/lib/evendoors/door.rb b/lib/evendoors/door.rb index 0fe3867..7cff0b9 100644 --- a/lib/evendoors/door.rb +++ b/lib/evendoors/door.rb @@ -23,16 +23,18 @@ module EvenDoors EvenDoors::Spin.release_p p end # + def garbage + puts " * #{path} didn't give back #{p}" if EvenDoors::Spin.debug_errors + puts "\t#{@saved.data EvenDoors::ERROR_FIELD}" if @saved.action==EvenDoors::ACT_ERROR + release_p @saved + @saved = nil + end + # def process_p p @viewer.receive_p p if @viewer @saved = p receive_p p - if not @saved.nil? - puts "#{path} didn't give that particle back #{p}" if EvenDoors::Spin.debug_errors - puts "\t#{p.data EvenDoors::ERROR_FIELD}" if p.action==EvenDoors::ACT_ERROR - release_p @saved - @saved = nil - end + garbage if not @saved.nil? end # def process_sys_p p |