1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/lib/active_support/rails.rb
Xavier Noria 447b6a4e67 removes usage of Object#in? from the code base (the method remains defined by Active Support)
Selecting which key extensions to include in active_support/rails
made apparent the systematic usage of Object#in? in the code base.
After some discussion in

    5ea6b0df9a

we decided to remove it and use plain Ruby, which seems enough
for this particular idiom.

In this commit the refactor has been made case by case. Sometimes
include? is the natural alternative, others a simple || is the
way you actually spell the condition in your head, others a case
statement seems more appropriate. I have chosen the one I liked
the most in each case.
2012-08-06 00:30:02 +02:00

27 lines
955 B
Ruby

# This is private interface.
#
# Rails components cherry pick from Active Support as needed, but there are a
# few features that are used for sure some way or another and it is not worth
# to put individual requires absolutely everywhere. Think blank? for example.
#
# This file is loaded by every Rails component except Active Support itself,
# but it does not belong to the Rails public interface. It is internal to
# Rails and can change anytime.
# Defines Object#blank? and Object#present?.
require 'active_support/core_ext/object/blank'
# Rails own autoload, eager_load, etc.
require 'active_support/dependencies/autoload'
# Support for ClassMethods and the included macro.
require 'active_support/concern'
# Defines Class#class_attribute.
require 'active_support/core_ext/class/attribute'
# Defines Module#delegate.
require 'active_support/core_ext/module/delegation'
# Defines ActiveSupport::Deprecation.
require 'active_support/deprecation'