diff options
author | Volmer <git@radicaos.com> | 2016-07-01 15:16:28 -0400 |
---|---|---|
committer | Volmer <git@radicaos.com> | 2016-07-01 15:16:28 -0400 |
commit | fa10787447162c662e72b653f1d114834efddfb5 (patch) | |
tree | 2ed8077cbc7beb6fb25eabc0e7fb215dae95481e /activesupport | |
parent | 0d8d64e9d09cf37ae302fed17f5cd872b4053a4f (diff) | |
download | rails-fa10787447162c662e72b653f1d114834efddfb5.tar.gz rails-fa10787447162c662e72b653f1d114834efddfb5.tar.bz2 rails-fa10787447162c662e72b653f1d114834efddfb5.zip |
Fix request encoding in tests when string literals are frozen
When running tests with `--enable-frozen-string-literal` or
`# frozen_string_literal: true`, it's currently attempted to mutate the path
string in order to append the format, causing a `RuntimeError`.
```ruby
get '/posts', as: :json
```
```
RuntimeError:
can't modify frozen String
```
This commit fixes the problem by replacing the mutation with a concatenation,
returning a new string.
Diffstat (limited to 'activesupport')
0 files changed, 0 insertions, 0 deletions