diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2017-07-21 09:23:24 -0400 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2017-07-21 09:23:24 -0400 |
commit | 7ca5c37f484edebd169e4136331500d4b5c31cbe (patch) | |
tree | 4d894128c2336a1611d0296ff42ee9184b10dda6 /test/support | |
parent | 53521a9e39b9d8af4165d7703c36dc905f1f8f67 (diff) | |
download | rails-7ca5c37f484edebd169e4136331500d4b5c31cbe.tar.gz rails-7ca5c37f484edebd169e4136331500d4b5c31cbe.tar.bz2 rails-7ca5c37f484edebd169e4136331500d4b5c31cbe.zip |
Ensure `ToSql` collector returns a UTF-8 string
Switching from `''.dup` to `String.new` had the side effect of changing
the encoding on Ruby 2.4 and later. Oddly, `String.new(encoding:
Encoding::UTF_8)` is significantly slower than `''.dup`. This seems like
a bug in Ruby, but not something we're going to address right now. A
test has been added to ensure this regression doesn't occur again.
Diffstat (limited to 'test/support')
0 files changed, 0 insertions, 0 deletions