mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Merge branch 'stable'
This commit is contained in:
commit
0e9e26f188
1 changed files with 4 additions and 1 deletions
|
@ -102,7 +102,10 @@ END
|
|||
names = names.keys if Hash == names
|
||||
|
||||
names.map do |name|
|
||||
"#{name} = _haml_locals[#{name.to_sym.inspect}] || _haml_locals[#{name.to_s.inspect}]"
|
||||
# Can't use || because someone might explicitly pass in false with a symbol
|
||||
sym_local = "_haml_locals[#{name.to_sym.inspect}]"
|
||||
str_local = "_haml_locals[#{name.to_s.inspect}]"
|
||||
"#{name} = #{sym_local}.nil? ? #{str_local} : #{sym_local}"
|
||||
end.join(';') + ';'
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue