From 0068baf3cb45e7fba5661db6ecebf5dcf4a9c266 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Re=CC=81mi=20Pre=CC=81vost?= Date: Wed, 26 Oct 2011 05:21:07 -0400 Subject: [PATCH] Fix issue with index variable hoisting --- lib/teamocil/layout.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/teamocil/layout.rb b/lib/teamocil/layout.rb index 0096e4c..aab73c6 100644 --- a/lib/teamocil/layout.rb +++ b/lib/teamocil/layout.rb @@ -13,7 +13,7 @@ module Teamocil # @param attrs [Hash] the session data from the layout file def initialize(options, attrs={}) # {{{ @name = attrs["name"] - @windows = attrs["windows"].each_with_index.map { |window, index| Window.new(self, index, window) } + @windows = attrs["windows"].each_with_index.map { |window, window_index| Window.new(self, window_index, window) } @options = options end # }}} @@ -45,7 +45,7 @@ module Teamocil @options = attrs["options"] || {} @splits = attrs["splits"] || [] - @splits = @splits.each_with_index.map { |split, index| Split.new(self, index, split) } + @splits = @splits.each_with_index.map { |split, split_index| Split.new(self, split_index, split) } @filters = attrs["filters"] || {} @filters["before"] ||= []