From: Brian Candler Date: 2010-12-08T20:11:47+09:00 Subject: Re: Using something like 'load' on IO Stream ? Philippe Philos wrote in post #967004: > Tony Arcieri wrote in post #966933: >> eval > > I would prefer another solution. Have a look in the ruby C source for load() and eval(), and you'll see they're basically the same. They call rb_compile_file and rb_compile_string respectively, which in turn call yycompile. So if foo is a StringIO, then eval(foo.string) is exactly what you asked for. -- Posted via http://www.ruby-forum.com/.