1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

[Sass] Performance enhancement: A new environment is not needed for every iteration of the for node.

This commit is contained in:
Chris Eppstein 2009-04-14 02:13:24 -07:00
parent 30a183601e
commit 12a53b0eea

View file

@ -18,8 +18,8 @@ module Sass::Tree
range = Range.new(from, to, @exclusive)
children = []
environment = Sass::Environment.new(environment)
range.each do |i|
environment = Sass::Environment.new(environment)
environment.set_local_var(@var, Sass::Script::Number.new(i))
children += perform_children(environment)
end