Issue #7979 has been reported by ninjabus (Steve Kingston).

----------------------------------------
Bug #7979: File.foreach splits on 'r' in windows
https://bugs.ruby-lang.org/issues/7979

Author: ninjabus (Steve Kingston)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: 1.9.3


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
"""


-- 
http://bugs.ruby-lang.org/