aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorCristian Bica <cristian.bica@gmail.com>2014-12-29 23:04:54 +0200
committerCristian Bica <cristian.bica@gmail.com>2014-12-29 23:04:54 +0200
commit7217391fc70da16f309c71346310d2c08b52088f (patch)
treecd110f7f62e1ea2ec5af295f577758ff9631387e /activesupport/lib
parent4be29e5b5dcd385e75b1a7481b38ad131ee78729 (diff)
downloadrails-7217391fc70da16f309c71346310d2c08b52088f.tar.gz
rails-7217391fc70da16f309c71346310d2c08b52088f.tar.bz2
rails-7217391fc70da16f309c71346310d2c08b52088f.zip
Removed Object#itself as it's implemented in ruby 2.2
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/core_ext/object.rb1
-rw-r--r--activesupport/lib/active_support/core_ext/object/itself.rb15
2 files changed, 0 insertions, 16 deletions
diff --git a/activesupport/lib/active_support/core_ext/object.rb b/activesupport/lib/active_support/core_ext/object.rb
index f1106cca9b..f4f9152d6a 100644
--- a/activesupport/lib/active_support/core_ext/object.rb
+++ b/activesupport/lib/active_support/core_ext/object.rb
@@ -2,7 +2,6 @@ require 'active_support/core_ext/object/acts_like'
require 'active_support/core_ext/object/blank'
require 'active_support/core_ext/object/duplicable'
require 'active_support/core_ext/object/deep_dup'
-require 'active_support/core_ext/object/itself'
require 'active_support/core_ext/object/try'
require 'active_support/core_ext/object/inclusion'
diff --git a/activesupport/lib/active_support/core_ext/object/itself.rb b/activesupport/lib/active_support/core_ext/object/itself.rb
deleted file mode 100644
index d71cea6674..0000000000
--- a/activesupport/lib/active_support/core_ext/object/itself.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-class Object
- # TODO: Remove this file when we drop support for Ruby < 2.2
- unless respond_to?(:itself)
- # Returns the object itself.
- #
- # Useful for chaining methods, such as Active Record scopes:
- #
- # Event.public_send(state.presence_in([ :trashed, :drafted ]) || :itself).order(:created_at)
- #
- # @return Object
- def itself
- self
- end
- end
-end