Package org.jruby

Examples of org.jruby.RubyRegexp


                receiver.cloneForInlining(ii), arg.cloneForInlining(ii));
    }

    @Override
    public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp) {
        RubyRegexp regexp = (RubyRegexp) receiver.retrieve(context, self, currScope, currDynScope, temp);
        IRubyObject argValue = (IRubyObject) arg.retrieve(context, self, currScope, currDynScope, temp);
        return regexp.op_match19(context, argValue);
    }
View Full Code Here


        return new MatchInstr((Variable) result.cloneForInlining(ii), receiver.cloneForInlining(ii));
    }

    @Override
    public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp) {
        RubyRegexp regexp = (RubyRegexp) receiver.retrieve(context, self, currScope, currDynScope, temp);
        return regexp.op_match2_19(context);
    }
View Full Code Here

    public Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp) {
        // FIXME (from RegexpNode.java): 1.9 should care about internal or external encoding and not kcode.
        // If we have a constant regexp string or if the regexp patterns asks for caching, cache the regexp
        if ((!regexp.hasKnownValue() && !options.isOnce()) || (rubyRegexp == null) || context.runtime.getKCode() != rubyRegexp.getKCode()) {
            RubyString pattern = (RubyString) regexp.retrieve(context, self, currScope, currDynScope, temp);
            RubyRegexp re = RubyRegexp.newRegexp(context.runtime, pattern.getByteList(), options);
            re.setLiteral();
            rubyRegexp = re;
        }

        return rubyRegexp;
    }
View Full Code Here

TOP

Related Classes of org.jruby.RubyRegexp

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.