Skip to content

Broken function documentation when using newer rubies and function contains any code before documentation #296

Description

@alexjfisher

I've noticed that when generating reference documentation for stdlib, the version of ruby used changes the output.
Specifically, the documentation for to_yaml and to_json doesn't get generated with Ruby 2.7 but does when using Ruby 2.5. (Puppet Strings 2.9.0 in both cases)

No other functions in stdlib are affected. There appears to be an issue with having any code before the documentation comments. In these functions, this is a require 'yaml' and require 'json' respectively. I could easily workaround the issue by moving this code into the function dispatches, but the change of behaviour between Ruby versions makes me think it's worth raising this as a bug here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions