[DRE-commits] [SCM] ruby-gruff.git branch, master, updated. debian/0.3.6-5-8-g4c80fa4

Cédric Boutillier cedric.boutillier at gmail.com
Wed Jul 4 15:16:22 UTC 2012


The following commit has been merged in the master branch:
commit a09a286ecf5a785d815b6c4f7acc170360c18580
Author: Cédric Boutillier <cedric.boutillier at gmail.com>
Date:   Wed Jul 4 16:26:26 2012 +0200

    add fix_division_by_0 patch. Closes #676206

diff --git a/debian/patches/fix_division_by_0 b/debian/patches/fix_division_by_0
new file mode 100644
index 0000000..ad17546
--- /dev/null
+++ b/debian/patches/fix_division_by_0
@@ -0,0 +1,25 @@
+Description: Fix division by zero errors with Ruby1.9
+Author: Serge Prikha <prikha at gmail.com>
+Origin: https://github.com/prikha/gruff/commit/f5098443aba86fc59b02eace6ecad7530d72694b
+Reviewed-by: Cédric Boutillier <cedric.boutillier at gmail.com>
+Applied-Upstream: yes
+Bug: https://github.com/topfunky/gruff/issues/21
+Bug-Debian: http://bugs.debian.org/676206
+Last-Update: 2012-06-06
+
+
+---
+ lib/gruff/base.rb |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/lib/gruff/base.rb
++++ b/lib/gruff/base.rb
+@@ -1062,7 +1062,7 @@
+     # Return a formatted string representing a number value that should be
+     # printed as a label.
+     def label(value)
+-      label = if (@spread.to_f % @marker_count.to_f == 0) || !@y_axis_increment.nil?
++      label = if (@spread.to_f % (@marker_count.to_f==0 ? 1 : @marker_count.to_f) == 0) || !@y_axis_increment.nil?
+         value.to_i.to_s
+       elsif @spread > 10.0
+         sprintf("%0i", value)
diff --git a/debian/patches/series b/debian/patches/series
index 76b56c0..005f581 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 drop_require_rubygems
 remove_obsolete_call_from_test_line
 sort_needed_for_test_scene
+fix_division_by_0

-- 
ruby-gruff.git



More information about the Pkg-ruby-extras-commits mailing list