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