[DRE-maint] Bug#557023: [toredarell at gmail.com: Re: Barby::Code128: private method split called for nil]

Gunnar Wolf gwolf at gwolf.org
Thu Nov 26 22:30:33 UTC 2009


tags 557023 + pending
thanks

I'm forwarding upstream's reply on this bug - I'll package and update
it as soon as possible.

----- Forwarded message from Tore Darell <toredarell at gmail.com> -----

From: Tore Darell <toredarell at gmail.com>
Reply-To: ruby-barby at googlegroups.com
To: Barby <ruby-barby at googlegroups.com>
Date: Thu, 26 Nov 2009 13:39:17 -0800 (PST)
Subject: Re: Barby::Code128: private method split called for nil
Message-ID: <d450f143-e4bd-45cd-aca2-94d16b204387 at b2g2000yqi.googlegroups.com>
References: <913e7079-e615-4331-af38-d93d3adf72fd at 37g2000yqm.googlegroups.com> 
	<d0dcb850-3984-4861-aefb-7662e28e0519 at w19g2000yqk.googlegroups.com>
X-Spam-Level: 
X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,SPF_PASS,X_IP
	autolearn=no version=3.2.5

Hi Again,

I've made some changes to Code128 that should fix the reported bugs:

The first example was due to . in the regex not including newlines. I
think the code used regexes originally to avoid assuming that change
codes were 1 byte string. Of course, the likelyhood of the 128
standard being altered to introduce mylti-byte change codes is next to
zero, so I think it's safe to let go of this bit of flexibility :)
Thus, I've applied the suggested patch.

The second is not really a bug, as you've pointed out in the Debian
bug report, but rather a question of how to handle something that may
or may not be an error. I'm not entirely sure if a 128 code without
any data is invalid, but that's what I've decided to go with. With
this decision made, I've added to the validity checking that empty
strings are not valid. The example code will now explicitly raise an
ArgumentError like other invalid data instead of the rather arbitrary
error which was raised before.

I've pushed all these changes to GitHub and released a new version of
the gem, 0.3.2, containing these and some other small fixes. Note that
this version contains the Pdf417 class which relies on JRuby to be
used, which could complicate distribution a bit. Everything else will
work just fine without it, it's just when you actually require and try
to use the Pdf417 functionality that it will fail if you don't have
JRuby. I also read from the bug report that the Debian package relies
on rails; Barby by itself doesn't actually require rails, in case that
was why it was added as a dependency.

Changelog: http://github.com/toretore/barby/blob/master/CHANGELOG

The gem has been pushed to Gemcutter, http://gemcutter.org

Tore

-- 
Gunnar Wolf • gwolf at gwolf.org • (+52-55)5623-0154 / 1451-2244






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