Skip to content

Commit

Permalink
Making parse_config accepts a String like Ruby MRI
Browse files Browse the repository at this point in the history
  • Loading branch information
Edipo Federle authored and Edipo Federle committed May 20, 2024
1 parent c201ae3 commit 9319b74
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/openssl/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ def parse(string)
# Raises a ConfigError on invalid configuration data.
def parse_config(io)
begin
parse_config_lines(io)
if(io.instance_of?(String))
parse(io)
else
parse_config_lines(io)
end
rescue => error
raise ConfigError, "error in line #{io.lineno}: " + error.message
end
Expand Down

0 comments on commit 9319b74

Please sign in to comment.