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

Fix enable docs for builtin constants #14571

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/compiler/crystal/program.cr
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ module Crystal
else
build_commit_const = define_crystal_nil_constant "BUILD_COMMIT"
end
build_commit_const.doc = <<-MD if wants_doc?
build_commit_const.doc = <<-MD
The build commit identifier of the Crystal compiler.
MD

Expand Down Expand Up @@ -341,9 +341,8 @@ module Crystal
private def define_crystal_constant(name, value, doc = nil) : Const
crystal.types[name] = const = Const.new self, crystal, name, value
const.no_init_flag = true
if doc && wants_doc?
const.doc = doc
end
const.doc = doc

predefined_constants << const
const
end
Expand Down
Loading