From 3da69540ac0dae8caeb4b6e8c48c96f2e8b56856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 9 May 2012 11:47:38 +0200 Subject: Particle: #split_dst! clear all if next_dst empty or nil --- lib/evendoors/particle.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/evendoors/particle.rb b/lib/evendoors/particle.rb index c81b16a..ee4a8a8 100644 --- a/lib/evendoors/particle.rb +++ b/lib/evendoors/particle.rb @@ -57,8 +57,10 @@ module EvenDoors end # def split_dst! - @dst = nil - p, @action = next_dst.split EvenDoors::ACT_SEP + @dst = @room = @door = @action = nil + n = next_dst + return if n.nil? or n.empty? + p, @action = n.split EvenDoors::ACT_SEP i = p.rindex EvenDoors::PATH_SEP if i.nil? @room = nil -- cgit v1.1-2-g2b99