variable $INPUT_RECORD_SEPARATOR

$RS -> String | nil[permalink][rdoc][edit] [added by English]
$INPUT_RECORD_SEPARATOR -> String | nil [added by English]

$/ の別名

require "English"

$INPUT_RECORD_SEPARATOR = '|'
array = []
while line = DATA.gets
  array << line
end
p array #=> ["ugo|", "ego|", "fogo\n"]

__END__
ugo|ego|fogo