Skip to content

Commit

Permalink
removes unused method Object#extend_with_included_modules_from
Browse files Browse the repository at this point in the history
  • Loading branch information
fxn committed Jan 26, 2010
1 parent 7d312e5 commit ccec730
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
4 changes: 0 additions & 4 deletions activesupport/lib/active_support/core_ext/object/extending.rb
Expand Up @@ -5,8 +5,4 @@ def extended_by #:nodoc:
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
15 changes: 0 additions & 15 deletions activesupport/test/core_ext/object_and_class_ext_test.rb
Expand Up @@ -47,21 +47,6 @@ def test_extended_by
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
Expand Down

0 comments on commit ccec730

Please sign in to comment.