On Tue, Aug 23, 2011 at 04:19:40PM -0400, David Kavanagh wrote:
> for reference, here's how the regex matches the trailing comment;
> http://rubular.com/r/vJUtBWpB6J
> 

Yes, rubular shows all fields but the last field is in fact nil and not an
empty string. Try to replace

  str += " # #{hash[:comment]}" if hash[:comment] != :absent

with

  str += " # #{hash[:comment]}" unless hash[:comment].nil?

Does this work?

-Stefan

Attachment: pgprmXlf1wiyo.pgp
Description: PGP signature

Reply via email to