Examples of makeShared()


Examples of org.jruby.util.ByteList.makeShared()

        ByteList salt = stringValue(other).getByteList();
        if (salt.realSize < 2) {
            throw context.getRuntime().newArgumentError("salt too short(need >=2 bytes)");
        }

        salt = salt.makeShared(0, 2);
        RubyString s = RubyString.newStringShared(context.getRuntime(), JavaCrypt.crypt(salt, this.getByteList()));
        s.infectBy(this);
        s.infectBy(other);
        return s;
    }
View Full Code Here

Examples of org.jruby.util.ByteList.makeShared()

                int first = sc.get(1);
                int last = sc.get(sc.realSize-1);
                if((first == '"' && last == '"') ||
                   (first == '\'' && last == '\'')) {

                    Scanner scn = new ScannerImpl(sc.makeShared(1, sc.realSize-1));
                    Constructor ctor = new JRubyConstructor(runtime, new ComposerImpl(new ParserImpl(scn,YAML.config().version("1.0")),new ResolverImpl()));
                    ctor.checkData();
                    return ((RubyString)ctor.getData()).intern();
                }
View Full Code Here

Examples of org.jruby.util.ByteList.makeShared()

        ByteList salt = otherStr.getByteList();
        if (salt.getRealSize() < 2) {
            throw context.getRuntime().newArgumentError("salt too short(need >=2 bytes)");
        }

        salt = salt.makeShared(0, 2);
        RubyString result = RubyString.newStringShared(context.getRuntime(), JavaCrypt.crypt(salt, this.getByteList()));
        result.infectBy(this);
        result.infectBy(otherStr);
        return result;
    }
View Full Code Here

Examples of org.jruby.util.ByteList.makeShared()

        ByteList salt = otherStr.getByteList();
        if (salt.getRealSize() < 2) {
            throw context.runtime.newArgumentError("salt too short(need >=2 bytes)");
        }

        salt = salt.makeShared(0, 2);
        RubyString result = RubyString.newStringShared(context.runtime, JavaCrypt.crypt(salt, this.getByteList()));
        result.infectBy(this);
        result.infectBy(otherStr);
        return result;
    }
View Full Code Here

Examples of org.jruby.util.ByteList.makeShared()

                        case '\r':
                            pend--;
                    }
                }
                if (str != null) {
                    str.append(lbuf.makeShared(p, pend - p));
                } else {
                    str = new ByteList(lbuf.makeShared(p, pend - p));
                }
               
                if (pend < lexer.lex_pend) str.append('\n');
View Full Code Here

Examples of org.jruby.util.ByteList.makeShared()

                    }
                }
                if (str != null) {
                    str.append(lbuf.makeShared(p, pend - p));
                } else {
                    str = new ByteList(lbuf.makeShared(p, pend - p));
                }
               
                if (pend < lexer.lex_pend) str.append('\n');
                lexer.lex_goto_eol();
                if (lexer.nextc() == -1) {
View Full Code Here

Examples of org.jruby.util.ByteList.makeShared()

        ByteList salt = otherStr.getByteList();
        if (salt.getRealSize() < 2) {
            throw context.runtime.newArgumentError("salt too short(need >=2 bytes)");
        }

        salt = salt.makeShared(0, 2);
        RubyString result = RubyString.newStringShared(context.runtime, JavaCrypt.crypt(salt, this.getByteList()));
        result.infectBy(this);
        result.infectBy(otherStr);
        return result;
    }
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.