yast/y2r

Missing initialize method in include files

Closed this issue · 3 comments

This problem happens in several modules like wagon or runlevel, here is the problem in wagon:

The initializing method in wagon_helpers.rb include file is missing, resulting in this error in testsuite:

Module /home/lslezak/.local/share/ycp-killer/result/wagon/src/modules/Wagon
load failed:undefined method `initialize_wagon_wagon_helpers' for
#<Yast::WagonClass:0x0000000144a740 @my_textdomain="wagon">
at /usr/lib64/ruby/vendor_ruby/1.9.1/yast/yast.rb:79:in `include'

The method is called by ruby-bindings: https://github.com/yast/yast-ruby-bindings/blob/master/src/ruby/yast/yast.rb#L77

On the other hand common_func.rb include, placed in the same directory, is converted correctly, it's initialize method is present there.

@jreidinger Could you add a check for the method presence (e.g. using respond_to?) in Ruby bindings before you call it? It seems a cleaner solution to me than polluting the include code with an empty initialization method.

@dmajda - yes, no problem

Fixed by the following commits in Ruby bindings: