Closed jmarrec closed 2 months ago
Missing RUBY_DESCRIPTION constant in ruby 3.2.2.
Caught while testing openstudio-ee-gem, with a VERY cryptic message:
NameError: uninitialized constant Git::Lib::RUBY_DESCRIPTION
This is because git 1.12.0 (which is quite old too, 1.19.1 is out, and there's a 2.0.0-pre too, probably should update @DavidGoldwasser ) uses it https://github.com/ruby-git/ruby-git/blob/ea79dadf07e65896a08487af011e60336e86d3e3/lib/git/lib.rb#L1209-L1213
The same would happen with this
module Test class Lib def f puts NON_DEFINED_CONSTANT end end end Test::Lib.new.f()
openstudio test.rb Error: uninitialized constant Test::Lib::NON_DEFINED_CONSTANT
It fails
It should be there
1. 2. 3. 4.
https://github.com/NREL/OpenStudio/blob/ca6043ee1660ddab352b1b39329706e026382203/ruby/engine/InitRubyEngine.cpp#L280
Init_ruby_description is needed. Note that it doesn't take void param anymore but a pointer to a typedefed struct...
Init_ruby_description
Some additional details about your environment for this issue (if relevant):
testing on openstudio-ee-gem
Issue overview
Missing RUBY_DESCRIPTION constant in ruby 3.2.2.
Caught while testing openstudio-ee-gem, with a VERY cryptic message:
This is because git 1.12.0 (which is quite old too, 1.19.1 is out, and there's a 2.0.0-pre too, probably should update @DavidGoldwasser ) uses it https://github.com/ruby-git/ruby-git/blob/ea79dadf07e65896a08487af011e60336e86d3e3/lib/git/lib.rb#L1209-L1213
The same would happen with this
Current Behavior
It fails
Expected Behavior
It should be there
Steps to Reproduce
1. 2. 3. 4.
Possible Solution
https://github.com/NREL/OpenStudio/blob/ca6043ee1660ddab352b1b39329706e026382203/ruby/engine/InitRubyEngine.cpp#L280
Init_ruby_description
is needed. Note that it doesn't take void param anymore but a pointer to a typedefed struct...Details
Environment
Some additional details about your environment for this issue (if relevant):
Context
testing on openstudio-ee-gem