lib/statsd/graphite.rb use of round #2

Open
rberger opened this Issue Jun 26, 2011 · 0 comments

1 participant

@rberger

Looks like lib/statsd/graphite.rb has a dependency on 1.9.2 that isn't particularly necessary at line 86:

puts "complete. (#{time.round(3)}s)"

Causes the problem:

Uncaught exception wrong number of arguments (1 for 0)
/usr/lib/ruby/gems/1.8/gems/statsd-0.5.4/lib/statsd/graphite.rb:86:in `round'

Due to passing an argument to round which it seems that 1.8.7 version doesn't have.

I see that noahhl forked and changed that to

      puts "complete. (#{(time*100).round()/100.0}s)"

Thanks!

@adamgibbins adamgibbins added a commit to adamgibbins/statsd that referenced this issue May 21, 2012
@adamgibbins adamgibbins Fixes #2, alters usage of round() to support Ruby 1.8. 49d1225
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment