Skip to content

Commit

Permalink
removes Object#extended_by
Browse files Browse the repository at this point in the history
  • Loading branch information
fxn committed Jan 26, 2010
1 parent ccec730 commit c25ac0d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
4 changes: 0 additions & 4 deletions activesupport/lib/active_support/core_ext/object/extending.rb
Original file line number Diff line number Diff line change
@@ -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
7 changes: 0 additions & 7 deletions activesupport/test/core_ext/object_and_class_ext_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c25ac0d

Please sign in to comment.