Package org.jruby

Examples of org.jruby.RubyIO$Sysopen


        }
    }

    private RubyIO saveWriteIO(int i, ThreadContext context) {
        IRubyObject obj = writeArray.eltOk(i);
        RubyIO ioObj = RubyIO.convertToIO(context, obj);
        writeIOs[i] = ioObj.GetWriteIO();
        return ioObj;
    }
View Full Code Here


    }

    @JRubyMethod
    public IRubyObject socket(ThreadContext context) {
      SelectableChannel socket = postgresqlConnection.getSocket();
      RubyIO rubyIO = RubyIO.newIO(context.runtime, socket);
      return rubyIO.fileno(context);
    }
View Full Code Here

        RubyString stringData = null;
        if (invoke(context, data, "respond_to?",
                   ruby.newSymbol("to_io").to_sym()).isTrue()) {
            /* IO or other object that responds to :to_io */
            RubyIO io =
                (RubyIO) TypeConverter.convertToType(data,
                                                     ruby.getIO(),
                                                     "to_io");
            // use unclosedable input stream to fix #495
            source.setByteStream(new UncloseableInputStream(io.getInStream()));
        } else {
            if (invoke(context, data, "respond_to?",
                          ruby.newSymbol("string").to_sym()).isTrue()) {
                /* StringIO or other object that responds to :string */
                stringData = invoke(context, data, "string").convertToString();
View Full Code Here

TOP

Related Classes of org.jruby.RubyIO$Sysopen

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.