diff --git a/S02-builtin_data_types/hash.t b/S02-builtin_data_types/hash.t index 52fc7ddf70..54400dfca0 100644 --- a/S02-builtin_data_types/hash.t +++ b/S02-builtin_data_types/hash.t @@ -2,7 +2,7 @@ use v6; use Test; -plan 74; +plan 76; # basic lvalue assignment # L @@ -250,6 +250,15 @@ lives_ok { Hash.new("a" => "b") }, 'Hash.new($pair) lives'; is %h{*}.join('|'), %h.values.join('|'), '{*} zen slice'; } +# RT #75868 +{ + my %h = (ab => 'x', 'a' => 'y'); + 'abc' ~~ /^(.)./; + is %h{$/}, 'x', 'can use $/ as hash key'; + is %h{$0}, 'y', 'can use $0 as hash key'; + +} + done_testing; # vim: ft=perl6