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

frozen_string_literal magic comment is inserted into Overview #1363

Closed
ybiquitous opened this issue Dec 23, 2020 · 1 comment
Closed

frozen_string_literal magic comment is inserted into Overview #1363

ybiquitous opened this issue Dec 23, 2020 · 1 comment

Comments

@ybiquitous
Copy link

While reading the JSON module documentation on https://www.rubydoc.info/gems/json/2.5.1/JSON, I noticed that the Overview section was incorrect. The section includes only the frozen_string_literal: false magic comment.

image

Here is the source code of lib/json.rb:
https://github.com/flori/json/blob/v2.5.1/lib/json.rb

#frozen_string_literal: false
require 'json/common'

##
# = JavaScript \Object Notation (\JSON)
#
# \JSON is a lightweight data-interchange format.
...

Steps to reproduce

This is the minimal reproduction for the issue. I've done my best to remove
all extraneous code and unique environment state on my machine before providing
these steps:

  1. Run git clone https://github.com/flori/json.git
  2. Run cd json
  3. Run git checkout v2.5.1
  4. Run yard
  5. Run open doc/JSON.html

Actual Output

image

Expected Output

image

NOTE: The screenshot above can be obtained when I removed all the frozen_string_literal comments.
(via sed -i '' -e '/frozen_string_literal/d' $(git ls-files lib))

Environment details:

  • OS: macOS Catalina version 10.15.7
  • Ruby version (ruby -v): ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin19]
  • YARD version (yard -v): yard 0.9.25
  • Relevant software dependency/versions:

I have read the Contributing Guide.

@ybiquitous
Copy link
Author

@lsegal Thank you for the quick fix! 😄

lsegal added a commit that referenced this issue Dec 27, 2020
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

No branches or pull requests

1 participant