Looking at the test suite for 1.9.3 I see you need to explicitly
enable textmode with either:

    open(filename, 'rt')
    open(filename, 'r', textmode: true)

That enables universal newline convention by default, though you can
disable it by passing universal_newline: false.