Skip to content

Commit

Permalink
Fix enable docs for builtin constants (#14571)
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota authored May 9, 2024
1 parent 4a4952c commit 440a795
Showing 1 changed file with 3 additions and 4 deletions.
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

0 comments on commit 440a795

Please sign in to comment.