Cédric Boutillier dijo: > Hi! > > I've imported an upstream fix to the division by zero errors with > Ruby1.9 in ruby-gruff, causing RC bug #676206. > (...) Hi, I have just reviewed and uploaded Cédric's changes, fixing the RC bug he mentions. I am attaching the full diff between the package currently in testing and this version. Please allow version 0.3.6-6 to enter testing. Thanks,
diff --git a/debian/changelog b/debian/changelog index be7960f..5e7cb0b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +ruby-gruff (0.3.6-6) unstable; urgency=low + + * Team upload + * Add fix_division_by_0 patch, applied upstream to prevent 'division by zero' + errors with Ruby1.9 if @marker_count is not set explicitly, which is the + case in the test suite (Closes:#676206) + + -- Cédric Boutillier <cedric.boutillier@gmail.com> Fri, 06 Jul 2012 06:03:30 +0200 + ruby-gruff (0.3.6-5) unstable; urgency=low * Added missing dependency and build-dependency on ruby-rmagick 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@gmail.com> +Origin: https://github.com/prikha/gruff/commit/f5098443aba86fc59b02eace6ecad7530d72694b +Reviewed-by: Cédric Boutillier <cedric.boutillier@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
Attachment:
signature.asc
Description: Digital signature