diff options
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/extending.rb | 4 | ||||
-rw-r--r-- | activesupport/test/core_ext/object_and_class_ext_test.rb | 7 |
2 files changed, 0 insertions, 11 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/extending.rb b/activesupport/lib/active_support/core_ext/object/extending.rb index 357ac4a18d..ab446e399d 100644 --- a/activesupport/lib/active_support/core_ext/object/extending.rb +++ b/activesupport/lib/active_support/core_ext/object/extending.rb @@ -1,8 +1,4 @@ require 'active_support/core_ext/object/blank' class Object - def extended_by #:nodoc: - ancestors = class << self; ancestors end - ancestors.select { |mod| mod.class == Module } - [ Object, Kernel ] - end end diff --git a/activesupport/test/core_ext/object_and_class_ext_test.rb b/activesupport/test/core_ext/object_and_class_ext_test.rb index 7046d0e3f4..0b2a9c418e 100644 --- a/activesupport/test/core_ext/object_and_class_ext_test.rb +++ b/activesupport/test/core_ext/object_and_class_ext_test.rb @@ -40,13 +40,6 @@ class Foo end class ObjectTests < Test::Unit::TestCase - def test_extended_by - foo = Foo.new - assert foo.extended_by.include?(Bar) - foo.extend(Baz) - assert(([Bar, Baz] - foo.extended_by).empty?, "Expected Bar, Baz in #{foo.extended_by.inspect}") - end - class DuckTime def acts_like_time? true |