[rt-users] Fix: ruby rt_client breaks when RT sub version number has two digits

Ruslan Zakirov ruz at bestpractical.com
Mon Aug 15 12:34:05 EDT 2011

On Mon, Aug 15, 2011 at 1:41 AM, Thierry Thelliez
<thierry.thelliez.tech at gmail.com> wrote:
> Upgrading from RT 3.8.7 to 3.8.10 revealed a bug in the Ruby rt-client library.
> In several places, the following regular expression is used in client.rb:
> resp.gsub!(/RT\/\d\.\d\.\d\s\d{3}\s.*\n\n/,"") # toss the HTTP response
> but that does not catch 3.8.10.   It could/should be:
> resp.gsub!(/RT\/\d\.\d\.\d+\s\d{3}\s.*\n\n/,"") # toss the HTTP response

It should be closer to \d+\.\d+\.\d+((a|alpha|b|beta|pre|rc)\d*)?

Cced Tom (author of the client). Cc authors all the time you start
thread about extensions.

> I tested this simple fix and it works here.
> Thanks,
> Thierry Thelliez

Best regards, Ruslan.

More information about the rt-users mailing list