Permalink
Browse files

removes unused method Object#extend_with_included_modules_from

  • Loading branch information...
1 parent 7d312e5 commit ccec730d7f2ccf5e44d3ac2b4b05c7c57af1cfb4 @fxn fxn committed Jan 26, 2010
@@ -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
@@ -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

0 comments on commit ccec730

Please sign in to comment.