# use strict;
-plan tests => 213;
+plan tests => 215;
my @comma = ("key", "value");
is( $#$ar, 2, 'scalar + hash assignment in list context' );
is( "@$ar", "0 1 5", '...gets the last values' );
}
+
+# test stringification of keys
+{
+ no warnings 'once';
+ my @types = qw( SCALAR ARRAY HASH CODE GLOB);
+ my @refs = ( \ do { my $x }, [], {}, sub {}, \ *x);
+ my(%h, %expect);
+ @h{@refs} = @types;
+ @expect{map "$_", @refs} = @types;
+ ok (eq_hash(\%h, \%expect), 'unblessed ref stringification');
+
+ bless $_ for @refs;
+ %h = (); %expect = ();
+ @h{@refs} = @types;
+ @expect{map "$_", @refs} = @types;
+ ok (eq_hash(\%h, \%expect), 'blessed ref stringification');
+}