Do not chomp trailing line separator IO#each with nil separator and chomp
Do not chomp trailing line separator IO#each with nil separator and chomp

nil separator means no sepator, so chomp should not remove a line
separator.

Partially Fixes [Bug #18770]

ruby/spec,ruby/spec,ruby/spec