This project is archived and is in readonly mode.
Changeset [64d109e3539ad600f58536d3ecabd2f87b67fd1c] by wycats
Revision 64d109e3539ad600f58536d3ecabd2f87b67fd1c,
committed by wycats
· May 16th, 2010 @ 07:44 PM
Significantly improved internal encoding heuristics and support.
- Default Encoding.default_internal to UTF-8
- Eliminated the use of file-wide magic comments to coerce code evaluated inside the file
- Read templates as BINARY, use default_external or template-wide
magic comments inside the Template to set the initial encoding
- This means that template handlers in Ruby 1.9 will receive Strings encoded in default_internal (UTF-8 by default)
- Create a better Exception for encoding issues, and use it when the template source has bytes that are not compatible with the specified encoding
- Allow template handlers to opt-into handling BINARY. If they do so, they need to do some of their own manual encoding work
- Added a "Configuration Gotchas" section to the intro Rails Guide instructing users to use UTF-8 for everything
- Use config.encoding= in Ruby 1.8, and raise if a value that is an invalid $KCODE value is used
Also:
* Fixed a few tests that were assert() rather than assert_equal()
and were caught by Minitest requiring a String for the message *
Fixed a test where an assert_select was misformed, also caught by
Minitest being more restrictive * Fixed a test where a Rack
response was returning a String rather than an Enumerable
http://github.com/rails/rails/commit/64d109e3539ad600f58536d3ecabd2...
19 changed files
-
A
actionpack/test/template/template_test.rb -
M
actionpack/lib/action_view.rb -
M
actionpack/lib/action_view/template.rb -
M
actionpack/lib/action_view/template/error.rb -
M
actionpack/lib/action_view/template/handlers/erb.rb -
M
actionpack/lib/action_view/template/resolver.rb -
M
actionpack/test/abstract_unit.rb -
M
actionpack/test/controller/assert_select_test.rb -
M
actionpack/test/controller/capture_test.rb -
M
actionpack/test/controller/render_test.rb -
M
actionpack/test/fixtures/test/content_for.erb -
M
actionpack/test/fixtures/test/content_for_concatenated.erb -
M
actionpack/test/fixtures/test/content_for_with_parameter.erb -
M
actionpack/test/fixtures/test/non_erb_block_content_for.builder -
M
actionpack/test/template/render_test.rb -
M
railties/guides/source/getting_started.textile -
M
railties/lib/rails.rb -
M
railties/lib/rails/application/configuration.rb -
M
railties/test/application/configuration_test.rb