use strict;
use Tie::RefHash;
use Data::Dumper;
-my $numtests = 37;
+my $numtests = 39;
my $currtest = 1;
print "1..$numtests\n";
test((keys %{$h{$ref}}) == 1);
test((keys %{$h{$ref}})[0] eq $ref1);
+{
+ # Tests that delete returns the deleted element [perl #32193]
+ my $ref = \(my $var = "oink");
+ tie my %oink, 'Tie::RefHash';
+ $oink{$ref} = "ding";
+ test($oink{$ref} eq "ding");
+ test(delete($oink{$ref}) eq "ding");
+}
die "expected to run $numtests tests, but ran ", $currtest - 1
if $currtest - 1 != $numtests;
return @r;
}
-