diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-06-02 15:46:02 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-06-02 15:46:14 -0700 |
commit | 29a1b77c6b20984c620230afb7590fbfaf4823dd (patch) | |
tree | 1912222a519d5cdd84fb7bc72470f85949ced736 /activerecord/test/cases/serialization_test.rb | |
parent | c07d09559ec171e1904b55c7ad7e8c7d586ca51b (diff) | |
download | rails-29a1b77c6b20984c620230afb7590fbfaf4823dd.tar.gz rails-29a1b77c6b20984c620230afb7590fbfaf4823dd.tar.bz2 rails-29a1b77c6b20984c620230afb7590fbfaf4823dd.zip |
reduce AS::SafeBuffer allocations
html_escape_interpolated_argument is only used in mutation methods:
https://github.com/rails/rails/blob/c07d09559ec171e1904b55c7ad7e8c7d586ca51b/activesupport/lib/active_support/core_ext/string/output_safety.rb#L174
https://github.com/rails/rails/blob/c07d09559ec171e1904b55c7ad7e8c7d586ca51b/activesupport/lib/active_support/core_ext/string/output_safety.rb#L179
The return value doesn't need to be converted to an AS::SafeBuffer since
we know that the current object is an AS::SafeBuffer and will be
mutated, and the return value from html_escape_interpolated_argument
will be thrown away
Diffstat (limited to 'activerecord/test/cases/serialization_test.rb')
0 files changed, 0 insertions, 0 deletions