operating on strings using IO interface

T

Thomas Hafner

Hello,

is there a means that a piece of software can use just the IO
interface transparently without needing to know, whether the data to
read (resp. to write) is coming from (resp. going to) a file or a
string? Something comparable to stringstream in C++?

Regards
Thomas
 
X

Xavier Noria

is there a means that a piece of software can use just the IO
interface transparently without needing to know, whether the data to
read (resp. to write) is coming from (resp. going to) a file or a
string? Something comparable to stringstream in C++?

ri StringIO

-- fxn
 
C

ChrisKaelin

ri StringIO

-- fxn

lol, funny, on my kubuntu-box, ri runned until yesterday, and now:
ri StringIO
/usr/lib/ruby/1.8/rdoc/ri/ri_descriptions.rb:99:in `concat': can't
convert nil into Array (TypeError)
from /usr/lib/ruby/1.8/rdoc/ri/ri_descriptions.rb:99:in
`merge_in'
from /usr/lib/ruby/1.8/rdoc/ri/ri_reader.rb:56:in `get_class'
from /usr/lib/ruby/1.8/rdoc/ri/ri_reader.rb:52:in `get_class'
from /usr/lib/ruby/1.8/rdoc/ri/ri_reader.rb:31:in
`find_class_by_name'
from /usr/lib/ruby/1.8/rdoc/ri/ri_display.rb:97:in
`display_class_info'
from /usr/lib/ruby/1.8/rdoc/ri/ri_display.rb:96:in
`display_class_info'
from /usr/lib/ruby/1.8/rdoc/ri/ri_display.rb:199:in `page'
from /usr/lib/ruby/1.8/rdoc/ri/ri_display.rb:77:in
`display_class_info'
from /usr/lib/ruby/1.8/rdoc/ri/ri_driver.rb:71:in
`report_class_stuff'
from /usr/lib/ruby/1.8/rdoc/ri/ri_driver.rb:106:in
`get_info_for'
from /usr/lib/ruby/1.8/rdoc/ri/ri_driver.rb:135:in
`process_args'
from /usr/lib/ruby/1.8/rdoc/ri/ri_driver.rb:134:in
`process_args'
from /usr/bin/ri:48


Sometimes I hate those automatic updates....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,240
Messages
2,571,208
Members
47,845
Latest member
vojosay

Latest Threads

Top