Actions
Bug #10815
closedDir.foreach in block form does not allow encoding
Bug #10815:
Dir.foreach in block form does not allow encoding
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.0p0 (2014-12-25 revision 49005) [i386-mswin32_120]
Description
It doesn't appear that Dir.foreach{} allows an encoding:
Updated by djberg96 (Daniel Berger) over 11 years ago
Updated by nobu (Nobuyoshi Nakada) over 11 years ago
- Status changed from Open to Rejected
Updated by djberg96 (Daniel Berger) over 11 years ago
Ok, but that seems a strange way to declare the function prototype. Compare that with Dir.entries, which does give you an error if you pass the wrong number of arguments.
Updated by nobu (Nobuyoshi Nakada) over 11 years ago
Dir.entries doesn't return an enumerator.
Updated by djberg96 (Daniel Berger) over 11 years ago
I guess I'm not sure at what point or why the return type started governing function prototypes, but ok.
Actions