cvs -q diff -u
Index: classes/orderedhash.pmc
===================================================================
RCS file: /cvs/public/parrot/classes/orderedhash.pmc,v
retrieving revision 1.17
diff -u -u -r1.17 orderedhash.pmc
--- classes/orderedhash.pmc	25 Feb 2004 09:13:15 -0000	1.17
+++ classes/orderedhash.pmc	30 Mar 2004 20:55:04 -0000
@@ -39,6 +39,21 @@
 #include "parrot/parrot.h"
 #include "pmc_perlhash.h"
 
+/*
+
+=item C<static PMC *undef(struct Parrot_Interp *interpreter)>
+
+Returns the C<PerlUndef> PMC.
+
+=cut
+
+*/
+
+static PMC* undef(struct Parrot_Interp* interpreter)
+{
+    return pmc_new(interpreter, enum_class_PerlUndef);
+}
+
 pmclass OrderedHash extends PerlArray need_ext does array does hash {
 
 /*
@@ -355,9 +370,15 @@
             SUPER(key);
         }
         else {
+            /* fetch index into the PerlArray 
+               and delete the key in the PerlHash afterward */
             INTVAL n = PerlHash.SELF.get_integer_keyed(key);
             PerlHash.SUPER(key);
-            DYNSELF.delete_keyed_int(n);
+            /* remove the value from the PerlArray,
+               but don't splice the PerlArray. We don't want to mess up
+               the mapping from the PerlHash to the PerlArray */
+            PMC *new_undef = undef(INTERP);
+            DYNSELF.set_pmc_keyed_int(n,new_undef);
         }
     }
 
Index: docs/.cvsignore
===================================================================
RCS file: /cvs/public/parrot/docs/.cvsignore,v
retrieving revision 1.7
diff -u -u -r1.7 .cvsignore
--- docs/.cvsignore	16 Mar 2004 15:24:28 -0000	1.7
+++ docs/.cvsignore	30 Mar 2004 20:55:05 -0000
@@ -1,3 +1,4 @@
+html
 Makefile
 packfile-c.pod
 packfile-perl.pod
Index: languages/tcl/.cvsignore
===================================================================
RCS file: /cvs/public/parrot/languages/tcl/.cvsignore,v
retrieving revision 1.4
diff -u -u -r1.4 .cvsignore
--- languages/tcl/.cvsignore	16 Mar 2004 10:30:41 -0000	1.4
+++ languages/tcl/.cvsignore	30 Mar 2004 20:55:18 -0000
@@ -1,2 +1,3 @@
+tcl.bpc
 tcl.imc
 Makefile
Index: t/pmc/orderedhash.t
===================================================================
RCS file: /cvs/public/parrot/t/pmc/orderedhash.t,v
retrieving revision 1.5
diff -u -u -r1.5 orderedhash.t
--- t/pmc/orderedhash.t	25 Feb 2004 09:13:19 -0000	1.5
+++ t/pmc/orderedhash.t	30 Mar 2004 20:55:21 -0000
@@ -16,7 +16,7 @@
 
 =cut
 
-use Parrot::Test tests => 17;
+use Parrot::Test tests => 18;
 use Test::More;
 
 output_is(<<'CODE', <<OUT, "init");
@@ -479,3 +479,28 @@
 3
 OUTPUT
 
+
+output_is(<<'CODE', <<'OUTPUT', "delete and access remaining");
+    new P0, .OrderedHash
+    new P1, .PerlString
+    set P1, "A"
+    set P0["a"], P1
+    new P1, .PerlString
+    set P1, "B"
+    set P0["b"], P1
+
+    set P3, P0["b"]
+    print 'P0["b"]: '
+    print P3
+    print "\n"
+    delete P0["a"]
+    set P4, P0["b"]
+    print 'P0["b"]: '
+    print P4
+    print "\n"
+
+    end
+CODE
+P0["b"]: B
+P0["b"]: B
+OUTPUT
