M
Morris Brodersen
hi,
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.
example:
handle = File.open "test.in"
$/ = / \n\t/
str = handle.gets
if there's any other efficient way (other than using IO#getc and read
the file char by char) to achieve the same thing, i'd be happy to know
about it.
-- morris
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.
example:
handle = File.open "test.in"
$/ = / \n\t/
str = handle.gets
if there's any other efficient way (other than using IO#getc and read
the file char by char) to achieve the same thing, i'd be happy to know
about it.
-- morris