cvsuser     04/12/04 00:47:02

  Modified:    src      key.c
               t/pmc    perlhash.t
  Log:
  fix hash iter
  
  Testcase courtesy of Sam Ruby <[EMAIL PROTECTED]>
  
  Revision  Changes    Path
  1.56      +2 -1      parrot/src/key.c
  
  Index: key.c
  ===================================================================
  RCS file: /cvs/public/parrot/src/key.c,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- key.c     22 Oct 2004 13:29:36 -0000      1.55
  +++ key.c     4 Dec 2004 08:46:59 -0000       1.56
  @@ -1,6 +1,6 @@
   /*
   Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -$Id: key.c,v 1.55 2004/10/22 13:29:36 leo Exp $
  +$Id: key.c,v 1.56 2004/12/04 08:46:59 leo Exp $
   
   =head1 NAME
   
  @@ -291,6 +291,7 @@
       PMC *reg;
   
       switch (PObj_get_FLAGS(key) & KEY_type_FLAGS) {
  +    case KEY_integer_FLAG|KEY_number_FLAG:
       case KEY_integer_FLAG:
           return PMC_int_val(key);
       case KEY_integer_FLAG | KEY_register_FLAG:
  
  
  
  1.49      +17 -2     parrot/t/pmc/perlhash.t
  
  Index: perlhash.t
  ===================================================================
  RCS file: /cvs/public/parrot/t/pmc/perlhash.t,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- perlhash.t        1 Oct 2004 21:16:52 -0000       1.48
  +++ perlhash.t        4 Dec 2004 08:47:02 -0000       1.49
  @@ -1,7 +1,7 @@
   #! perl
   
   # Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -# $Id: perlhash.t,v 1.48 2004/10/01 21:16:52 jrieks Exp $
  +# $Id: perlhash.t,v 1.49 2004/12/04 08:47:02 leo Exp $
   
   =head1 NAME
   
  @@ -19,7 +19,7 @@
   
   =cut
   
  -use Parrot::Test tests => 36;
  +use Parrot::Test tests => 37;
   use Test::More;
   
   output_is(<<CODE, <<OUTPUT, "Initial PerlHash tests");
  @@ -1215,4 +1215,19 @@
   0
   OUTPUT
   
  +output_is(<< 'CODE', << 'OUTPUT', "iter");
  +##PIR##
  +.sub __main__ @MAIN
  +    new P0, .PerlHash
  +    set P0['a'], 'x'
  +    iter P1, P0
  +    shift P2, P1
  +    print P2
  +    print "\n"
  +    end
  +.end
  +CODE
  +a
  +OUTPUT
  +
   1;
  
  
  

Reply via email to