unicode_plot.rb
unicode_plot.rb copied to clipboard
Might be useful to do basic data checks and throw some neat ArgumentError
Because if I for some reason pass an empty array to histogram
the error is cryptic:
gems/2.4.0/gems/unicode_plot-0.0.5/lib/unicode_plot/histogram.rb:12:in `histogram': undefined method `-' for nil:NilClass (NoMethodError)
from main.rb:85:in `block in <main>'
from main.rb:84:in `zip'
from main.rb:84:in `<main>'