Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Use less eval() in timethis(), fixes tests on nom

  • Loading branch information...
commit b8a9aaa69874bb3c2f548a8dd8f8984840520e56 1 parent 25800bb
Tadeusz Sośnierz tadzik authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  lib/Benchmark.pm6
2  lib/Benchmark.pm6
@@ -10,7 +10,7 @@ my sub time_it (Int $count where { $_ > 0 }, Code $code) {
10 10 }
11 11
12 12 multi sub timethis (Int $count, Str $code) is export {
13   - my $routine = eval "sub \{ $code \}";
  13 + my $routine = { eval $code };
14 14 return time_it($count, $routine);
15 15 }
16 16

0 comments on commit b8a9aaa

Please sign in to comment.
Something went wrong with that request. Please try again.