while ((read = in.read(buf)) != -1) {
baos.write(buf, 0, read);
}
buf = baos.toByteArray();
JRubyClassLoader jcl = runtime.getJRubyClassLoader();
OneShotClassLoader oscl = new OneShotClassLoader(jcl);
ClassReader cr = new ClassReader(buf);
String className = cr.getClassName().replace('/', '.');
Class clazz = oscl.defineClass(className, buf);
// if it's a compiled JRuby script, instantiate and run it
if (Script.class.isAssignableFrom(clazz)) {
return (Script)clazz.newInstance();
} else {