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

Making parse_config accepts a String like Ruby MRI #303

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

edipofederle
Copy link

With Ruby MRI, we can do:

OpenSSL::Config.parse_config("") # also accepts a String

but not with JRuby:

NoMethodError: undefined method `lineno' for "":String
   Did you mean?  lines

@edipofederle
Copy link
Author

@kares maybe we can take a quick look into this one? thanks

lib/openssl/config.rb Outdated Show resolved Hide resolved
@headius
Copy link
Member

headius commented Jun 17, 2024

Seems like this is ready to go?

@kares
Copy link
Member

kares commented Jun 18, 2024

did look into this but did not figure out a path fwd. the logic isn't matching what MRI is doing (in native C)...

  • parse isn't calling parse_config (we're a bit convoluted here parse -> parse_config -> parse)
  • check is done on having an IO-like (gets ugly with JRuby) and everything else is considered io.to_str

@headius but if it looks good to you, feel free to merge.
I usually "Squash and merge" small change-sets (easier to dig out history) but if you have a different preference it's fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants