creating a StringIO object

V

Venkat Bagam

Hi all, can any body tell me how to create a StringIO object from an
existing string object.

my code str = StringIO.new results an error saying that
"uninitialized constant StringIO(NameError)"

What i sthe problem with the above code
 
L

lrlebron

Hi all, can any body tell me how to create a StringIO object from an
existing string object.

my code str = StringIO.new results an error saying that
"uninitialized constant StringIO(NameError)"

What i sthe problem with the above code

You have to require the stringio library
require 'stringio'
 

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

No members online now.

Forum statistics

Threads
474,147
Messages
2,570,833
Members
47,380
Latest member
AlinaBlevi

Latest Threads

Top