rails/activerecord/lib
Ryuta Kamizono 2b5dacb43d Change timestamp_attributes_for_{create,update} from symbol to string
`timestamp_attributes_for_{create,update}` is defined as symbol but
always used as string with `to_s`. This allocates extra strings. To
avoid extra allocation, change the definitions from symbol to string.

```ruby
pp ObjectSpace::AllocationTracer.trace {
  1_000.times { |i|
    Post.create!
  }
}
```

Before:

```
["~/rails/activerecord/lib/active_record/timestamp.rb", 121]=>[1002, 0, 750, 0, 1, 18528],
["~/rails/activerecord/lib/active_record/timestamp.rb", 105]=>[1002, 0, 750, 0, 1, 7720],
["~/rails/activerecord/lib/active_record/timestamp.rb", 101]=>[1002, 0, 750, 0, 1, 7720],
["~/rails/activerecord/lib/active_record/timestamp.rb", 109]=>[1002, 0, 750, 0, 1, 13896],
["~/rails/activerecord/lib/active_record/timestamp.rb", 61]=>[4008, 0, 3000, 0, 1, 30880],
```

After:

```
["~/rails/activerecord/lib/active_record/timestamp.rb", 120]=>[1000, 0, 756, 0, 1, 17184],
["~/rails/activerecord/lib/active_record/timestamp.rb", 104]=>[1000, 0, 756, 0, 1, 7160],
["~/rails/activerecord/lib/active_record/timestamp.rb", 100]=>[1000, 0, 756, 0, 1, 7160],
["~/rails/activerecord/lib/active_record/timestamp.rb", 108]=>[1000, 0, 756, 0, 1, 12888],
```
2017-01-01 07:07:45 +09:00
..
active_record Change timestamp_attributes_for_{create,update} from symbol to string 2017-01-01 07:07:45 +09:00
rails/generators No need :doc: for :nodoc: classes [ci skip] 2016-12-25 02:46:12 +09:00
active_record.rb Bump license years for 2017 2016-12-31 08:34:08 -05:00