Examples of swallow()


Examples of org.jruby.util.io.OpenFile.swallow()

                if (rslen == 0) {
                    rsptrBytes = PARAGRAPH_SEPARATOR.unsafeBytes();
                    rsptr = PARAGRAPH_SEPARATOR.getBegin();
                    rslen = 2;
                    rspara = true;
                    fptr.swallow(context, '\n');
                    rs = null;
                    if (!enc.isAsciiCompatible()) {
                        rs = RubyString.newUsAsciiStringShared(runtime, rsptrBytes, rsptr, rslen);
                        rs = EncodingUtils.rbStrEncode(context, rs, runtime.getEncodingService().convertEncodingToRubyEncoding(enc), 0, context.nil);
                        rs.setFrozen(true);
View Full Code Here

Examples of org.jruby.util.io.OpenFile.swallow()

                    }
                }

                if (rspara && c != OpenFile.EOF) {
                    // FIXME: This may block more often than it should, to clean up extraneous newlines
                    fptr.swallow(context, '\n');
                }
                if (!str.isNil()) {
                    str = EncodingUtils.ioEncStr(runtime, str, fptr);
                }
            } finally {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.