Actions
Bug #10815
closedDir.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:
enc = Encoding::UTF_16LE
# Without a block, works ok
p Dir.foreach(Dir.pwd) # => Enumerator
p Dir.foreach(Dir.pwd, enc) # => Enumerator
# With a block, fails if more than 1 argument is passed
p Dir.foreach(Dir.pwd){ } # => nil
p Dir.foreach(Dir.pwd, enc){ } # => ArgumentError
Actions
Like0
Like0Like0Like0Like0Like0