lib/sass/environment.rb in haml-edge-2.3.162 vs lib/sass/environment.rb in haml-edge-2.3.163

- old
+ new

@@ -41,14 +41,20 @@ # Note: when updating this, # update haml/yard/inherited_hash.rb as well. def inherited_hash(name) class_eval <<RUBY, __FILE__, __LINE__ + 1 def #{name}(name) - @#{name}s[name] || @parent && @parent.#{name}(name) + _#{name}(name.gsub('_', '-')) end + def _#{name}(name) + @#{name}s[name] || @parent && @parent._#{name}(name) + end + protected :_#{name} + def set_#{name}(name, value) + name = name.gsub('_', '-') @#{name}s[name] = value unless try_set_#{name}(name, value) end def try_set_#{name}(name, value) if @#{name}s.include?(name) @@ -61,10 +67,10 @@ end end protected :try_set_#{name} def set_local_#{name}(name, value) - @#{name}s[name] = value + @#{name}s[name.gsub('_', '-')] = value end RUBY end end