Permalink
Browse files

propagate default_encoding to Tilt

  • Loading branch information...
1 parent dacf079 commit f59aad23dda71cbd99c276b582d8b4ae6851d98f @rkh rkh committed Dec 25, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/sinatra/base.rb
View
3 lib/sinatra/base.rb
@@ -455,7 +455,8 @@ def render_xml(engine, template, options={}, locals={}, &block)
def render(engine, data, options={}, locals={}, &block)
# merge app-level options
options = settings.send(engine).merge(options) if settings.respond_to?(engine)
- options[:outvar] ||= '@_out_buf'
+ options[:outvar] ||= '@_out_buf'
+ options[:default_encoding] ||= settings.default_encoding
# extract generic options
locals = options.delete(:locals) || locals || {}

0 comments on commit f59aad2

Please sign in to comment.