FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Making parse_config accepts a String like Ruby MRI by edipofederle · Pull Request #303 · jruby/jruby-openssl · GitHub

Making parse_config accepts a String like Ruby MRI - #303

Open
edipofederle wants to merge 4 commits into
jruby:masterfrom
edipofederle:parse-config-as-string
Open

Making parse_config accepts a String like Ruby MRI#303
edipofederle wants to merge 4 commits into
jruby:masterfrom
edipofederle:parse-config-as-string

Conversation

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Author

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

Comment thread lib/openssl/config.rb Outdated

headius commented Jun 17, 2024

Copy link
Copy Markdown
Member

Seems like this is ready to go?

kares commented Jun 18, 2024

Copy link
Copy Markdown
Member

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

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL