Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#296 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
ruby

調査の方向性

lib/puppet/functions/to_yaml.rb と lib/puppet/functions/to_json.rb から始め、Puppet Strings 2.9.0 を使って Ruby 2.5 と 2.7 でリファレンス生成を再現します。require 文がドキュメントコメントに先行する場合に、ドキュメントコメントがどのように抽出されるかを追跡します; 完了条件は、報告された Ruby バージョン全体で両方の関数が一貫してドキュメントを生成することです。

索引モデルが issue の本文から書いたものです。

説明

bug

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.

主要言語
Ruby
スター
90
フォーク
91
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

puppetlabs/puppet-strings のほかの issue

puppetlabs/puppet-strings の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。