diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-02-09 10:18:22 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-02-09 10:28:54 -0700 |
commit | a2c80a894578ef0eee0da6a97ae2660aea69d12f (patch) | |
tree | f79a8fe321550d225320f39fb0df8759f007c489 /activerecord/lib/active_record/locking | |
parent | 20649697ce6b03d06892f8ae7dda96781fb56d2c (diff) | |
download | rails-a2c80a894578ef0eee0da6a97ae2660aea69d12f.tar.gz rails-a2c80a894578ef0eee0da6a97ae2660aea69d12f.tar.bz2 rails-a2c80a894578ef0eee0da6a97ae2660aea69d12f.zip |
Change `LockingType` to use `DelegateClass`
Significantly faster than `SimpleDelegator`.
Diffstat (limited to 'activerecord/lib/active_record/locking')
-rw-r--r-- | activerecord/lib/active_record/locking/optimistic.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/locking/optimistic.rb b/activerecord/lib/active_record/locking/optimistic.rb index 008cda46cd..c5b10fcddf 100644 --- a/activerecord/lib/active_record/locking/optimistic.rb +++ b/activerecord/lib/active_record/locking/optimistic.rb @@ -184,7 +184,7 @@ module ActiveRecord end end - class LockingType < SimpleDelegator # :nodoc: + class LockingType < DelegateClass(Type::Value) # :nodoc: def type_cast_from_database(value) # `nil` *should* be changed to 0 super.to_i |