lib/ruby_less/processor.rb in rubyless-0.8.10 vs lib/ruby_less/processor.rb in rubyless-0.8.11
- old
+ new
@@ -294,11 +294,11 @@
res = proc.call(*([receiver] + args.list.map(&:literal)))
else
res = @helper.send(proc, *args.list.map(&:literal))
end
- return res.kind_of?(TypedString) ? res : t(res.inspect, :class => String, :literal => res)
+ return res.kind_of?(TypedString) ? res : t(res.inspect, :class => opts[:class], :literal => res)
end
if opts[:accept_nil]
method_call_accepting_nil(method, args, opts)
else
@@ -348,14 +348,14 @@
if res
if res.kind_of?(TypedString)
# This can happen if we use native methods on TypedString (like gsub) that return a new
# typedstring without calling initialize....
if res.opts.nil?
- res.instance_variable_set(:@opts, :class => String, :literal => res)
+ res.instance_variable_set(:@opts, :class => opts[:class], :literal => res)
end
return res
else
- return t(res.inspect, :class => String, :literal => res)
+ return t(res.inspect, :class => opts[:class], :literal => res)
end
end
end
if method == '/'