Examples of eltInternal()


Examples of org.jruby.RubyArray.eltInternal()

                case 1:
                    return callAdapter.call(context, self, receiver, nodes.eltInternal(0), block);
                case 2:
                    return callAdapter.call(context, self, receiver, nodes.eltInternal(0), nodes.eltInternal(1), block);
                case 3:
                    return callAdapter.call(context, self, receiver, nodes.eltInternal(0), nodes.eltInternal(1), nodes.eltInternal(2), block);
                default:
                    return callAdapter.call(context, self, receiver, nodes.toJavaArrayMaybeUnsafe(), block);
            }
        }
View Full Code Here

Examples of org.jruby.RubyArray.eltInternal()

                case 1:
                    return callAdapter.call(context, self, receiver, nodes.eltInternal(0), block);
                case 2:
                    return callAdapter.call(context, self, receiver, nodes.eltInternal(0), nodes.eltInternal(1), block);
                case 3:
                    return callAdapter.call(context, self, receiver, nodes.eltInternal(0), nodes.eltInternal(1), nodes.eltInternal(2), block);
                default:
                    return callAdapter.call(context, self, receiver, nodes.toJavaArrayMaybeUnsafe(), block);
            }
        }
View Full Code Here

Examples of org.jruby.RubyArray.eltInternal()

                case 1:
                    return callAdapter.call(context, self, receiver, nodes.eltInternal(0), block);
                case 2:
                    return callAdapter.call(context, self, receiver, nodes.eltInternal(0), nodes.eltInternal(1), block);
                case 3:
                    return callAdapter.call(context, self, receiver, nodes.eltInternal(0), nodes.eltInternal(1), nodes.eltInternal(2), block);
                default:
                    return callAdapter.call(context, self, receiver, nodes.toJavaArrayMaybeUnsafe(), block);
            }
        }
View Full Code Here

Examples of org.jruby.RubyArray.eltInternal()

    @Override
    public IRubyObject when(WhenNode whenNode, IRubyObject value, ThreadContext context, Ruby runtime, IRubyObject self, Block aBlock) {
        RubyArray expressions = RuntimeHelpers.splatValue(expressionNodes.interpret(runtime, context, self, aBlock));

        for (int j = 0,k = expressions.getLength(); j < k; j++) {
            IRubyObject test = expressions.eltInternal(j);

            if ((value != null && eqq.call(context, self, test, value).isTrue())
                    || (value == null && test.isTrue())) {
                return whenNode.interpret(runtime, context, self, aBlock);
            }
View Full Code Here

Examples of org.jruby.RubyArray.eltInternal()

        assertEquals("second element should be \"bar\"",val2,outp3[1]);
    }

    public void testSetsValuesToNullOnClearWhenNotShared() throws Exception {
        final RubyArray arr = (RubyArray)runtime.evalScriptlet("$h = ['foo','bar']");
        assertNotSame("first element nil", runtime.getNil(), arr.eltInternal(0));
        assertNotSame("second element nil", runtime.getNil(), arr.eltInternal(1));
        arr.rb_clear();
        assertSame("first element not nil", runtime.getNil(), arr.eltInternal(0));
        assertSame("second element not nil", runtime.getNil(), arr.eltInternal(1));
    }
View Full Code Here

Examples of org.jruby.RubyArray.eltInternal()

    }

    public void testSetsValuesToNullOnClearWhenNotShared() throws Exception {
        final RubyArray arr = (RubyArray)runtime.evalScriptlet("$h = ['foo','bar']");
        assertNotSame("first element nil", runtime.getNil(), arr.eltInternal(0));
        assertNotSame("second element nil", runtime.getNil(), arr.eltInternal(1));
        arr.rb_clear();
        assertSame("first element not nil", runtime.getNil(), arr.eltInternal(0));
        assertSame("second element not nil", runtime.getNil(), arr.eltInternal(1));
    }
View Full Code Here

Examples of org.jruby.RubyArray.eltInternal()

    public void testSetsValuesToNullOnClearWhenNotShared() throws Exception {
        final RubyArray arr = (RubyArray)runtime.evalScriptlet("$h = ['foo','bar']");
        assertNotSame("first element nil", runtime.getNil(), arr.eltInternal(0));
        assertNotSame("second element nil", runtime.getNil(), arr.eltInternal(1));
        arr.rb_clear();
        assertSame("first element not nil", runtime.getNil(), arr.eltInternal(0));
        assertSame("second element not nil", runtime.getNil(), arr.eltInternal(1));
    }

    public void testSetsLeftoverValuesToNullWhenRejectingElements() throws Exception {
        final RubyArray arr = (RubyArray)runtime.evalScriptlet("$h = ['foo','bar']");
View Full Code Here

Examples of org.jruby.RubyArray.eltInternal()

        final RubyArray arr = (RubyArray)runtime.evalScriptlet("$h = ['foo','bar']");
        assertNotSame("first element nil", runtime.getNil(), arr.eltInternal(0));
        assertNotSame("second element nil", runtime.getNil(), arr.eltInternal(1));
        arr.rb_clear();
        assertSame("first element not nil", runtime.getNil(), arr.eltInternal(0));
        assertSame("second element not nil", runtime.getNil(), arr.eltInternal(1));
    }

    public void testSetsLeftoverValuesToNullWhenRejectingElements() throws Exception {
        final RubyArray arr = (RubyArray)runtime.evalScriptlet("$h = ['foo','bar']");
        assertNotSame("first element nil", runtime.getNil(), arr.eltInternal(0));
View Full Code Here

Examples of org.jruby.RubyArray.eltInternal()

        assertSame("second element not nil", runtime.getNil(), arr.eltInternal(1));
    }

    public void testSetsLeftoverValuesToNullWhenRejectingElements() throws Exception {
        final RubyArray arr = (RubyArray)runtime.evalScriptlet("$h = ['foo','bar']");
        assertNotSame("first element nil", runtime.getNil(), arr.eltInternal(0));
        assertNotSame("second element nil", runtime.getNil(), arr.eltInternal(1));
        runtime.evalScriptlet("$h.reject! { |e| e == 'bar' }");
        assertNotSame("first element nil", runtime.getNil(), arr.eltInternal(0));
        assertSame("second element not nil", runtime.getNil(), arr.eltInternal(1));
    }
View Full Code Here

Examples of org.jruby.RubyArray.eltInternal()

    }

    public void testSetsLeftoverValuesToNullWhenRejectingElements() throws Exception {
        final RubyArray arr = (RubyArray)runtime.evalScriptlet("$h = ['foo','bar']");
        assertNotSame("first element nil", runtime.getNil(), arr.eltInternal(0));
        assertNotSame("second element nil", runtime.getNil(), arr.eltInternal(1));
        runtime.evalScriptlet("$h.reject! { |e| e == 'bar' }");
        assertNotSame("first element nil", runtime.getNil(), arr.eltInternal(0));
        assertSame("second element not nil", runtime.getNil(), arr.eltInternal(1));
    }
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.