Skip to content
Browse files

removes Object#extended_by

  • Loading branch information...
1 parent ccec730 commit c25ac0deeefe55837ba8fd2b2dc860924a507e63 @fxn fxn committed Jan 26, 2010
View
4 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
View
7 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

0 comments on commit c25ac0d

Please sign in to comment.
Something went wrong with that request. Please try again.