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 {