diff options
Diffstat (limited to 'activesupport')
-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 | 15 |
2 files changed, 0 insertions, 19 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/extending.rb b/activesupport/lib/active_support/core_ext/object/extending.rb index c3331ab478..357ac4a18d 100644 --- a/activesupport/lib/active_support/core_ext/object/extending.rb +++ b/activesupport/lib/active_support/core_ext/object/extending.rb @@ -5,8 +5,4 @@ class Object ancestors = class << self; ancestors end ancestors.select { |mod| mod.class == Module } - [ Object, Kernel ] end - - def extend_with_included_modules_from(object) #:nodoc: - object.extended_by.each { |mod| extend mod } - 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 33a321db36..7046d0e3f4 100644 --- a/activesupport/test/core_ext/object_and_class_ext_test.rb +++ b/activesupport/test/core_ext/object_and_class_ext_test.rb @@ -47,21 +47,6 @@ class ObjectTests < Test::Unit::TestCase assert(([Bar, Baz] - foo.extended_by).empty?, "Expected Bar, Baz in #{foo.extended_by.inspect}") end - def test_extend_with_included_modules_from - foo, object = Foo.new, Object.new - assert !object.respond_to?(:bar) - assert !object.respond_to?(:baz) - - object.extend_with_included_modules_from(foo) - assert object.respond_to?(:bar) - assert !object.respond_to?(:baz) - - foo.extend(Baz) - object.extend_with_included_modules_from(foo) - assert object.respond_to?(:bar) - assert object.respond_to?(:baz) - end - class DuckTime def acts_like_time? true |