Open bf4 opened 10 years ago
Issue by anapsix Thursday Aug 22, 2013 at 17:38 GMT Originally opened as https://github.com/paulasmuth/fnordmetric/pull/164
Avoid NoMethodError on tick.last by converting it to array
NoMethodError - undefined method `last' for #<Enumerator: 1377191030..1377191330:step(10)> /var/lib/gems/1.9.1/gems/fnordmetric-1.2.9/lib/fnordmetric/widgets/timeseries_widget.rb:35:in `data' /var/lib/gems/1.9.1/gems/fnordmetric-1.2.9/lib/fnordmetric/widget.rb:75:in `render'
anapsix included the following code: https://github.com/paulasmuth/fnordmetric/pull/164/commits
Comment by localhots Monday Sep 02, 2013 at 10:43 GMT
:+1:
Comment by elia Thursday Sep 05, 2013 at 09:52 GMT
Comment by elia Thursday Sep 05, 2013 at 09:55 GMT
For a quick fix add the following code on the top of your file:
module Enumerable def last to_a.last end end
Avoid NoMethodError on tick.last by converting it to array
anapsix included the following code: https://github.com/paulasmuth/fnordmetric/pull/164/commits