aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/core.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2016-08-28 15:40:12 +0900
committerRyuta Kamizono <kamipo@gmail.com>2016-08-28 15:40:12 +0900
commit73b8823a9373c2631c2cf310d036e846c37204d0 (patch)
treebdc4f2f49fe4dd06cace02473815728db1cf318a /activerecord/lib/active_record/core.rb
parentcec60d39891650c96f008aadcb49c249626da3f5 (diff)
downloadrails-73b8823a9373c2631c2cf310d036e846c37204d0.tar.gz
rails-73b8823a9373c2631c2cf310d036e846c37204d0.tar.bz2
rails-73b8823a9373c2631c2cf310d036e846c37204d0.zip
Remove "Under Ruby 1.9" [ci skip]
Rails dropped Ruby 1.9 support, but this comment still true.
Diffstat (limited to 'activerecord/lib/active_record/core.rb')
-rw-r--r--activerecord/lib/active_record/core.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb
index cb11cdefd9..aef4761be4 100644
--- a/activerecord/lib/active_record/core.rb
+++ b/activerecord/lib/active_record/core.rb
@@ -541,15 +541,15 @@ module ActiveRecord
private
- # Under Ruby 1.9, Array#flatten will call #to_ary (recursively) on each of the elements
- # of the array, and then rescues from the possible NoMethodError. If those elements are
- # ActiveRecord::Base's, then this triggers the various method_missing's that we have,
- # which significantly impacts upon performance.
- #
- # So we can avoid the method_missing hit by explicitly defining #to_ary as nil here.
- #
- # See also http://tenderlovemaking.com/2011/06/28/til-its-ok-to-return-nil-from-to_ary.html
- def to_ary # :nodoc:
+ # +Array#flatten+ will call +#to_ary+ (recursively) on each of the elements of
+ # the array, and then rescues from the possible +NoMethodError+. If those elements are
+ # +ActiveRecord::Base+'s, then this triggers the various +method_missing+'s that we have,
+ # which significantly impacts upon performance.
+ #
+ # So we can avoid the +method_missing+ hit by explicitly defining +#to_ary+ as +nil+ here.
+ #
+ # See also http://tenderlovemaking.com/2011/06/28/til-its-ok-to-return-nil-from-to_ary.html
+ def to_ary
nil
end