diff options
Diffstat (limited to 'lib/evendoors/particle.rb')
-rw-r--r-- | lib/evendoors/particle.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/evendoors/particle.rb b/lib/evendoors/particle.rb index bb93729..c81b16a 100644 --- a/lib/evendoors/particle.rb +++ b/lib/evendoors/particle.rb @@ -49,10 +49,11 @@ module EvenDoors end end # - def set_dst! a, d=nil + def set_dst! a, d='' @dst = @room = @door = @action = nil clear_dsts! - @dsts << ( d ? d.sub(/^\/+/,'').sub(/\/+$/,'').gsub(/\/{2,}/,'/') : '' )+EvenDoors::ACT_SEP+a.to_str + return if ( (a.nil? or a.empty?) and d.empty? ) + @dsts << ( d.empty? ? '' : d.sub(/^\/+/,'').sub(/\/+$/,'').gsub(/\/{2,}/,'/') )+EvenDoors::ACT_SEP+a.to_str end # def split_dst! |