diff options
author | Tamir Duberstein <tamird@gmail.com> | 2015-05-15 09:38:26 -0400 |
---|---|---|
committer | Tamir Duberstein <tamird@gmail.com> | 2016-01-04 12:09:37 -0500 |
commit | 0aa5150f9fb81fc6cf9d7b7915c8d7b015e452a2 (patch) | |
tree | 4b9be4d0a945f6f606006bcaedfc19fa37e287f1 /activerecord/lib/active_record/relation/from_clause.rb | |
parent | a08dc46a0e90963fead04ab7285693def0397e42 (diff) | |
download | rails-0aa5150f9fb81fc6cf9d7b7915c8d7b015e452a2.tar.gz rails-0aa5150f9fb81fc6cf9d7b7915c8d7b015e452a2.tar.bz2 rails-0aa5150f9fb81fc6cf9d7b7915c8d7b015e452a2.zip |
activerecord: reuse immutable objects
Diffstat (limited to 'activerecord/lib/active_record/relation/from_clause.rb')
-rw-r--r-- | activerecord/lib/active_record/relation/from_clause.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/from_clause.rb b/activerecord/lib/active_record/relation/from_clause.rb index 92340216ed..8945cb0cc5 100644 --- a/activerecord/lib/active_record/relation/from_clause.rb +++ b/activerecord/lib/active_record/relation/from_clause.rb @@ -25,7 +25,7 @@ module ActiveRecord end def self.empty - new(nil, nil) + @empty ||= new(nil, nil) end end end |