summaryrefslogtreecommitdiffstats
path: root/lib/evendoors/room.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-05-09 00:08:43 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-05-09 00:08:43 +0200
commitb312a413d63a25f6993350915177982fe9e92197 (patch)
tree360048bc9415cee8b4b6f11e30f4cfeb6d0d6617 /lib/evendoors/room.rb
parentff68d2a0b8cb5715e269f307228bd14c4215d584 (diff)
downloadedoors-ruby-b312a413d63a25f6993350915177982fe9e92197.zip
edoors-ruby-b312a413d63a25f6993350915177982fe9e92197.tar.gz
Room, do not bother initializing local vars if no links for p.src
Diffstat (limited to 'lib/evendoors/room.rb')
-rw-r--r--lib/evendoors/room.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/evendoors/room.rb b/lib/evendoors/room.rb
index be5325b..33a872e 100644
--- a/lib/evendoors/room.rb
+++ b/lib/evendoors/room.rb
@@ -43,10 +43,10 @@ module EvenDoors
#
def try_links p
puts " * try_links ..." if EvenDoors::Twirl.debug
- pending_link = nil
- apply_link = false
links = @links[p.src.name]
return false if links.nil?
+ pending_link = nil
+ apply_link = false
links.each do |link|
apply_link = link.cond_fields.nil? # unconditional link
p.set_link_fields link.cond_fields if not apply_link