Skip to content

argv_parser: Ensure that YAML is loaded before use #963

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

Merged
merged 1 commit into from
May 14, 2021

Conversation

olleolleolle
Copy link
Collaborator

@olleolleolle olleolleolle commented May 14, 2021

Fixes #962

How I attempted to fix this:

  • First, run the tool with the option frontmatter, with some JSON
  • Observe that the have it be parser correctly into a Hash, which then didn't have the to_yaml method on it.

The issue has been there some time.

/Users/olle/.rvm/gems/ruby-2.7.1/gems/github_changelog_generator-1.16.0/lib/github_changelog_generator/parser.rb:92:in block (2 levels) in setup_parser': undefined method to_yaml' for {"hello"=>"world"}:Hash (NoMethodError)

This PR makes sure that the YAML code is loaded before trying to use it.

@olleolleolle olleolleolle merged commit e400e25 into master May 14, 2021
@olleolleolle olleolleolle deleted the avoid-to_yaml-missing branch May 14, 2021 11:21
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.

--front-matter raises a NoMethodError for #to_yaml
1 participant