Package org.jruby.runtime.builtin

Examples of org.jruby.runtime.builtin.InstanceVariables.fastGetInstanceVariable()


    static void updateInstanceVar(RubyObject receiver, BiVariableMap vars) {
        InstanceVariables ivars = receiver.getInstanceVariables();
        List<String> keys = ivars.getInstanceVariableNameList();
        for (String key : keys) {
            IRubyObject value = ivars.fastGetInstanceVariable(key);
            BiVariable var = vars.getVariable(receiver, key);
            if (var != null) {
                var.setRubyObject(value);
            } else {
                var = new InstanceVariable(receiver, key, value);
View Full Code Here


        // if the specified key doesn't exist, this method is called before the
        // evaluation. Don't update value in this case.
        if (!ivars.getInstanceVariableNameList().contains(key)) return;

        // the specified key is found, so let's update
        IRubyObject value = ivars.fastGetInstanceVariable(key);
        BiVariable var = vars.getVariable(receiver, key);
        if (var != null) {
            var.setRubyObject(value);
        } else {
            var = new InstanceVariable(receiver, key, value);
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.