Stream nextLine changes
Reason for change
As of VA Smalltalk 9.1, a stream auto-detects the line delimiter when using the #nextLine method. Prior to this behavior, the stream would use the platform line delimiter which made it difficult to create multiline string content on one platform that could be seamlessly read on another with nextLine.
Action required
No action is needed if the auto-detected line delimiter suits your stream, which happens in the majority of applictions.
If the stream’s lines are separated using some other line delimiter than the outo-detected one, you can set the delimiter for the stream instance to any arbitrary string by sending the #lineDelimiter: message to that stream. A string representing the stream’s current line delimiter can be obtained by sending the #lineDelimiter message to a stream.
Customizing the line delimiter makes it possible to enforce a specific line delimiter, such as always writing out the Windows line delimiter default, CrLf, for certain streams, even for socket protocols, even though the application might be running on Linux. When a given line delimiter is specified by the user, then the stream does not auto-detect anymore and falls back to the pre-version 9.1 behavior that looks only for the specified line delimiter.
Last modified date: 11/26/2018