Browse files

Use sprintf instead of round for 187 compatibility

Float#round with arguments is not supported in 1.8.7 but sprintf can be
used to get the same result.
  • Loading branch information...
1 parent db68a33 commit 54bcd0804750c994db6c798255aa3d97944cca86 @bittersweet bittersweet committed Dec 15, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/bugspots/scanner.rb
View
2 lib/bugspots/scanner.rb
@@ -25,7 +25,7 @@ def self.scan(repo, depth = 500)
end
spots = hotspots.sort_by {|k,v| v}.reverse.collect do |spot|
- Spot.new(spot.first, spot.last.round(4))
+ Spot.new(spot.first, sprintf('%.4f', spot.last))
end
return fixes, spots

0 comments on commit 54bcd08

Please sign in to comment.