ruby-gettext / gettext

Gettext gem is a pure Ruby Localization(L10n) library and tool which is modeled after the GNU gettext package.
https://ruby-gettext.github.io/
69 stars 28 forks source link

Fix the ruby-parser: `NoMethodError: undefined method `<<' for nil:NilClass` #68

Closed ellcs closed 4 years ago

ellcs commented 4 years ago

Hello again! :)

I receive following Error NoMethodError: undefined method '<<' for nil:NilClass within the glade parser:

NoMethodError: undefined method `<<' for nil:NilClass
/home/mantel/repos/gettext/lib/gettext/tools/parser/ruby.rb:148:in `process_on_tstring_content'
/home/mantel/repos/gettext/lib/gettext/tools/parser/ruby.rb:234:in `block in on_default'
/home/mantel/repos/gettext/lib/gettext/tools/parser/ruby.rb:249:in `trace'
/home/mantel/repos/gettext/lib/gettext/tools/parser/ruby.rb:231:in `on_default'

This is the following line:

https://github.com/ruby-gettext/gettext/blob/4e7702d83dc9711b5a17a4cf1e7a5d7ef1b3a703/lib/gettext/tools/parser/ruby.rb#L148

Here are some investigation notes:

I will add a regression test.

kou commented 4 years ago

Thanks. This will be fixed by #67.