Skip to content
Browse files

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

  • Loading branch information...
1 parent 25800bb commit b8a9aaa69874bb3c2f548a8dd8f8984840520e56 @tadzik tadzik committed Aug 24, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Benchmark.pm6
View
2 lib/Benchmark.pm6
@@ -10,7 +10,7 @@ my sub time_it (Int $count where { $_ > 0 }, Code $code) {
}
multi sub timethis (Int $count, Str $code) is export {
- my $routine = eval "sub \{ $code \}";
+ my $routine = { eval $code };
return time_it($count, $routine);
}

0 comments on commit b8a9aaa

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