Project

General

Profile

Actions

Bug #7979

closed

File.foreach splits on 'r' in windows

Added by ninjabus (Steve Kingston) about 11 years ago. Updated about 11 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
1.9.3
Backport:
[ruby-core:53005]

Description

=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

Actions

Also available in: Atom PDF

Like0
Like0