lib/ruby_less/processor.rb in rubyless-0.8.9 vs lib/ruby_less/processor.rb in rubyless-0.8.10
- old
+ new
@@ -413,10 +413,14 @@
def get_lit_class(lit)
unless lit_class = RubyLess::SafeClass.literal_class_for(lit.class)
raise RubyLess::SyntaxError.new("#{klass} literal not supported by RubyLess.")
end
- {:class => lit_class, :literal => lit}
+ if lit_class == Range
+ {:class => lit_class, :literal => lit, :raw => "(#{lit.inspect})"}
+ else
+ {:class => lit_class, :literal => lit}
+ end
end
def args_with_prepend(args, opts)
if prepend_args = opts[:prepend_args]
if prepend_args.kind_of?(Array)