summaryrefslogtreecommitdiff
path: root/bench/bench.rb
diff options
context:
space:
mode:
Diffstat (limited to 'bench/bench.rb')
-rw-r--r--bench/bench.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/bench/bench.rb b/bench/bench.rb
index 533a893..efda06e 100644
--- a/bench/bench.rb
+++ b/bench/bench.rb
@@ -69,6 +69,7 @@ Benchmark.bm(20) do |bm|
if $dump_input
@size = CodeRay::Tokens.load(data).text_size
else
+ raise 'Example file is empty.' if data.empty?
unless @size.zero?
data += data until data.size >= @size
data = data[0, @size]