diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-07-28 16:01:30 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-07-28 16:01:30 +0900 |
commit | 8a3560ed1ec669bc9d46f767858dee85cd192c87 (patch) | |
tree | 833b857dcdb265829ddc1496910a745831bfd7e2 /activerecord/examples/simple.rb | |
parent | 4211a29902eac95e67e9fed2b9dfce7a1f1d2799 (diff) | |
download | rails-8a3560ed1ec669bc9d46f767858dee85cd192c87.tar.gz rails-8a3560ed1ec669bc9d46f767858dee85cd192c87.tar.bz2 rails-8a3560ed1ec669bc9d46f767858dee85cd192c87.zip |
`@quoted_{column,table}_names` should cache a frozen string
Caching a mutable string causes the following issue.
```
Loading development environment (Rails 5.1.0.alpha)
irb(main):001:0> ActiveRecord::Base.connection.quote_table_name('foo') << '!!'
=> "`foo`!!"
irb(main):002:0> ActiveRecord::Base.connection.quote_table_name('foo') << '!!'
=> "`foo`!!!!"
irb(main):003:0> ActiveRecord::Base.connection.quote_table_name('foo') << '!!'
=> "`foo`!!!!!!"
```
Diffstat (limited to 'activerecord/examples/simple.rb')
0 files changed, 0 insertions, 0 deletions