From: "nobu (Nobuyoshi Nakada)" Date: 2013-03-03T00:44:59+09:00 Subject: [ruby-core:53110] [ruby-trunk - Bug #7979][Rejected] File.foreach splits on 'r' in windows Issue #7979 has been updated by nobu (Nobuyoshi Nakada). Description updated Status changed from Open to Rejected The second argument is a line separator to split the input. ---------------------------------------- Bug #7979: File.foreach splits on 'r' in windows https://bugs.ruby-lang.org/issues/7979#change-37258 Author: ninjabus (Steve Kingston) Status: Rejected Priority: Normal Assignee: Category: Target version: ruby -v: 1.9.3 =begin Calling (({File.foreach('somefile.txt', "r")})) on a windows platform adds newline characters after each lower case (({'r'})), splitting the read lines after each instance. Reading the following file This contains r characters Wreck it Ralph outputs This contains r character s Wr eck it Ralph =end -- http://bugs.ruby-lang.org/