Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedded ruby 3.2.2 in CLI is missing "RUBY_DESCRIPTION" global constant #5178

Closed
jmarrec opened this issue May 2, 2024 · 0 comments · Fixed by #5179
Closed

Embedded ruby 3.2.2 in CLI is missing "RUBY_DESCRIPTION" global constant #5178

jmarrec opened this issue May 2, 2024 · 0 comments · Fixed by #5179

Comments

@jmarrec
Copy link
Collaborator

jmarrec commented May 2, 2024

Issue overview

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

Current Behavior

It fails

Expected Behavior

It should be there

Steps to Reproduce

Possible Solution

Init_ruby_description();

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):

  • Platform (Operating system, version): All
  • Version of OpenStudio (if using an intermediate build, include SHA): 3.8.0-rc1

Context

testing on openstudio-ee-gem

jmarrec added a commit that referenced this issue May 2, 2024
@jmarrec jmarrec self-assigned this May 2, 2024
jmarrec added a commit that referenced this issue May 2, 2024
jmarrec added a commit that referenced this issue May 2, 2024
Fix #5178 - Init the RUBY_DESCRIPTION properly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant