Branch Coverage

lib/Ruby/Collections/Hash.pm
Criterion Covered Total %
branch 186 282 65.9


line true false branch
39 0 2 unless ref $self eq 'Ruby::Collections::Hash'
41 1 1 if (defined $block)
43 1 0 unless &$block($key, $val)
61 0 3 unless ref $self eq 'Ruby::Collections::Hash'
63 1 2 if (defined $block) { }
65 0 2 if &$block($key, $val)
70 1 1 $self->size > 0 ? :
84 0 2 unless ref $self eq 'Ruby::Collections::Hash'
86 1 1 if ($$self{$obj}) { }
107 0 1 unless ref $self eq 'Ruby::Collections::Hash'
116 1 4 if (p_obj($key) eq p_obj($prev)) { }
120 3 1 if ($i != 0)
131 1 0 if ($chunk->has_any)
146 0 1 unless ref $self eq 'Ruby::Collections::Hash'
165 0 3 unless ref $self eq 'Ruby::Collections::Hash'
167 1 2 if (defined $block) { }
190 0 2 unless ref $self eq 'Ruby::Collections::Hash'
193 1 1 if (defined $ary_or_block) { }
194 1 0 if (ref $ary_or_block eq 'CODE') { }
0 0 elsif (reftype $ary_or_block eq 'ARRAY') { }
196 1 2 if (&$ary_or_block($key, $val))
203 0 0 if (p_obj(@{$ary_or_block;}[0]) eq p_obj($key) and p_obj(@{$ary_or_block;}[1]) eq p_obj($val))
231 0 2 unless ref $self eq 'Ruby::Collections::Hash'
233 0 2 if (@_ == 1) { }
1 1 elsif (@_ == 2) { }
269 0 3 unless ref $self eq 'Ruby::Collections::Hash'
272 2 2 if (&$block($key, $val))
289 0 2 unless ref $self eq 'Ruby::Collections::Hash'
291 1 1 if $n < 0
296 2 1 if ($n <= $index)
318 0 1 unless ref $self eq 'Ruby::Collections::Hash'
323 3 1 if (&$block($key, $val) or $cut_point)
346 0 6 unless ref $self eq 'Ruby::Collections::Hash'
371 0 2 unless ref $self eq 'Ruby::Collections::Hash'
386 0 2 unless ref $self eq 'Ruby::Collections::Hash'
402 0 1 unless ref $self eq 'Ruby::Collections::Hash'
422 0 1 unless ref $self eq 'Ruby::Collections::Hash'
444 0 1 unless ref $self eq 'Ruby::Collections::Hash'
446 1 0 if (defined $block)
472 0 1 unless ref $self eq 'Ruby::Collections::Hash'
474 1 0 if (defined $block)
492 0 3 unless ref $self eq 'Ruby::Collections::Hash'
494 1 2 scalar CORE::keys %$self == 0 ? :
505 0 2 unless ref $self eq 'Ruby::Collections::Hash'
520 0 25 unless ref $self eq 'Ruby::Collections::Hash'
522 25 0 if (reftype $other eq 'HASH') { }
524 1 43 if (p_obj($val) ne p_obj($$other{$key}))
538 0 0 unless ref $self eq 'Ruby::Collections::Hash'
540 0 0 $self->eql($other) == 0 ? :
556 0 4 unless ref $self eq 'Ruby::Collections::Hash'
559 1 3 if (defined $val) { }
563 2 1 if (defined $default_or_block) { }
564 1 1 if (ref $default_or_block eq 'CODE') { }
598 0 3 unless ref $self eq 'Ruby::Collections::Hash'
600 1 2 if (@_ == 1) { }
1 1 elsif (@_ == 2) { }
603 1 1 if (&$block($key, $val))
611 0 2 if (&$block($key, $val))
643 0 1 unless ref $self eq 'Ruby::Collections::Hash'
647 1 3 if (&$block($key, $val))
666 0 3 unless ref $self eq 'Ruby::Collections::Hash'
668 2 1 if (reftype $ary_or_block eq 'ARRAY') { }
1 0 elsif (ref $ary_or_block eq 'CODE') { }
671 1 3 if (p_obj(@{$ary_or_block;}[0]) eq p_obj($key) and p_obj(@{$ary_or_block;}[1]) eq p_obj($val))
682 1 1 if (&$ary_or_block($key, $val))
701 0 3 unless ref $self eq 'Ruby::Collections::Hash'
703 2 1 if (defined $n) { }
704 1 1 if $n < 0
708 0 2 if ($n <= 0)
739 0 2 unless ref $self eq 'Ruby::Collections::Hash'
759 0 2 unless ref $self eq 'Ruby::Collections::Hash'
766 1 1 if (defined $n and $n >= 2)
788 0 2 unless ref $self eq 'Ruby::Collections::Hash'
804 0 1 unless ref $self eq 'Ruby::Collections::Hash'
809 1 2 if (defined $$new_hash{$group}) { }
833 0 4 unless ref $self eq 'Ruby::Collections::Hash'
865 0 2 unless ref $self eq 'Ruby::Collections::Hash'
881 0 1 unless ref $self eq 'Ruby::Collections::Hash'
896 0 1 unless ref $self eq 'Ruby::Collections::Hash'
915 0 1 unless ref $self eq 'Ruby::Collections::Hash'
918 1 2 unless (&$block($key, $val))
935 0 2 unless ref $self eq 'Ruby::Collections::Hash'
938 1 2 if (p_obj($value) eq p_obj($val))
954 0 1 unless ref $self eq 'Ruby::Collections::Hash'
969 0 13 unless ref $self eq 'Ruby::Collections::Hash'
991 0 4 unless ref $self eq 'Ruby::Collections::Hash'
1013 0 2 unless ref $self eq 'Ruby::Collections::Hash'
1027 0 1 unless ref $self eq 'Ruby::Collections::Hash'
1041 0 1 unless ref $self eq 'Ruby::Collections::Hash'
1045 0 2 if (defined $block and $$self{$key} and $$other_hash{$key}) { }
1067 0 1 unless ref $self eq 'Ruby::Collections::Hash'
1070 0 2 if (defined $block and $$self{$key} and $$other_hash{$key}) { }
1097 0 2 unless ref $self eq 'Ruby::Collections::Hash'
1111 0 1 unless ref $self eq 'Ruby::Collections::Hash'
1129 0 2 unless ref $self eq 'Ruby::Collections::Hash'
1144 0 1 unless ref $self eq 'Ruby::Collections::Hash'
1164 0 3 unless ref $self eq 'Ruby::Collections::Hash'
1166 1 2 if (defined $block) { }
1168 0 1 if &$block($key, $val)
1195 0 3 unless ref $self eq 'Ruby::Collections::Hash'
1198 1 2 if (defined $block) { }
1200 1 1 if (&$block($key, $val))
1202 0 1 if $count > 1
1209 0 1 if $count > 1
1213 2 1 $count == 1 ? :
1227 0 1 unless ref $self eq 'Ruby::Collections::Hash'
1233 2 2 if (&$block($key, $val)) { }
1255 0 2 unless ref $self eq 'Ruby::Collections::Hash'
1258 1 2 if ($obj eq $val)
1279 0 1 unless ref $self eq 'Ruby::Collections::Hash'
1283 2 0 if (&$block($key, $val))
1309 0 2 unless ref $self eq 'Ruby::Collections::Hash'
1314 1 1 if ($self->size == $before_len) { }
1334 0 1 unless ref $self eq 'Ruby::Collections::Hash'
1337 1 0 if (defined $block)
1354 0 1 unless ref $self eq 'Ruby::Collections::Hash'
1377 0 1 unless ref $self eq 'Ruby::Collections::Hash'
1381 2 2 if (&$block($key, $val))
1412 0 2 unless ref $self eq 'Ruby::Collections::Hash'
1416 6 2 if (&$block($key, $val))
1421 1 1 if ($new_hash->size == $self->size) { }
1439 0 2 unless ref $self eq 'Ruby::Collections::Hash'
1465 0 2 unless ref $self eq 'Ruby::Collections::Hash'
1469 1 1 if (ref @_[0] eq 'CODE') { }
1473 1 3 if (not defined $group) { }
2 1 elsif (&$block($key, $val)) { }
1491 1 3 if (not defined $group) { }
3 0 elsif (ra($key, $val)->to_s =~ /$pattern/) { }
1505 2 0 if (defined $group and $group->has_any)
1520 0 1 unless ref $self eq 'Ruby::Collections::Hash'
1535 0 2 unless ref $self eq 'Ruby::Collections::Hash'
1537 2 0 if (defined $n) { }
1538 1 1 if $n < 0
1542 1 2 if ($n <= 0)
1568 0 1 unless ref $self eq 'Ruby::Collections::Hash'
1572 2 1 if (&$block($key, $val)) { }
1591 0 22 unless ref $self eq 'Ruby::Collections::Hash'
1608 0 1 unless ref $self eq 'Ruby::Collections::Hash'
1624 0 2 unless ref $self eq 'Ruby::Collections::Hash'
1637 0 1 unless ref $self eq 'Ruby::Collections::Hash'
1656 0 1 unless ref $self eq 'Ruby::Collections::Hash'