in ruby 1.8.7, IO#gets takes a seperator string as argument. i suggest
adding support for a regular expression to match any seperator. this
way, one could check for different seperators like \n\t\0 etc. this is
mainly useful for File IO.
in ruby 1.8.7, IO#gets takes a seperator string as argument. i suggest
adding support for a regular expression to match any seperator.
That’d be problematic as its not always possible to accurately apply a
regex
to a file (or whatever the IO comes from) without reading the whole file
(not
without restrictions on the regex anyway), which would kind of defeat
the
purpose of using gets instead of read.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.