Actions
Bug #11233
closedModule#include, Module#prepend can accept no arguments
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
Description
# Module#include, Module#prepend can accept no arguments Module.new.include Module.new.prepend
Updated by jeremyevans0 (Jeremy Evans) almost 9 years ago
This isn't a bug, it a consequence of the fact that they take an arbitrary number of arguments:
Module.new.include(Module.new, Module.new, ...)
Changing it would break code like:
extensions = []
extensions << Module.new if something
extensions << Module.new if something_else
Module.new.include(*extensions)
Updated by Anonymous almost 9 years ago
Jeremy Evans, you are right.
Updated by jeremyevans0 (Jeremy Evans) almost 5 years ago
- Status changed from Open to Closed
Actions
Like0
Like0Like0Like0