{: since=""} を「明示的に不明」= バッジ非表示として解禁する#274
Merged
Merged
Conversation
bitclust#132 P4 の追補。メソッド自体は昔からあるのにリファレンスへの記載が 後から追加されたために、バージョンラダーからの自動算出が記載時期を初出と して誤った版を表示するケースがある(例: Array#collect は Ruby 1.8 以前から 存在するが、記載は 2.5.0 のドキュメント凍結後に追加されたため 「Ruby 2.5.0 から」と表示されていた)。 決定済みの意味論では floor(はしご最古以前から存在)は「バッジ非表示」が 正しい表示なので、それを著者が明示する手段として空値を解禁する: - パーサ: since=""/until="" を受理し、空文字を記録する。空文字は MethodEntry#since_of が non-nil を返すため、methodsince(P2)の fill_since は無変更で上書きしない(既存の優先順位機構がそのまま効く) - 表示: VersionBadges#badge_span が空文字をバッジ非表示として扱う - MARKUP_SPEC §4 に用途(自動算出の抑止)と別名グループでの書き方を追記 refs rurema#132 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
znz
commented
Jul 21, 2026
| メソッド自体は昔からあるのにリファレンスへの記載が後から追加されたために、 | ||
| 自動算出(`bitclust methodsince`)が記載時期を初出として誤った版を | ||
| 表示してしまう場合の抑止に使う(例: `Array#collect` は Ruby 1.8 以前から | ||
| 存在するが、記載は 2.5.0 のドキュメント凍結後に追加された)。 |
Member
Author
There was a problem hiding this comment.
「Ruby 2.5.0 から」と出るのは 2.4.0 のドキュメント凍結後に追加ではないでしょうか?
Member
Author
There was a problem hiding this comment.
ご指摘のとおりです。db-2.5.0 が初出なので「2.4.0 のドキュメント凍結後(2.5.0 の凍結まで)に記載が追加された」が正しく、修正しました(271b2f5)。
🤖 Generated with Claude Code
「Ruby 2.5.0 から」と算出されるのは db-2.5.0 が初出、つまり 2.4.0 の ドキュメント凍結後(2.5.0 凍結まで)に記載が追加されたため。誤って 「2.5.0 の凍結後」と書いていた(それなら初出は db-2.6.0 になる)。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
znz
added a commit
to znz/doctree
that referenced
this pull request
Jul 21, 2026
{: since=""}(明示的に不明=バッジ非表示)と {: since="X"} を原稿で使う
ための更新。rurema/bitclust#274 マージ後の master を指す。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
znz
added a commit
to znz/doctree
that referenced
this pull request
Jul 21, 2026
rurema/bitclust#274 で解禁された {: since=""}(明示的に不明=バッジ非表示) を属性表に追加し、値の説明にも空値の意味を補う。メソッド自体は昔から あるのに記載が後から追加され、自動算出が記載時期を初出として誤表示する 場合の抑止用(例: Array#collect は 2.4.0 のドキュメント凍結後に記載が 追加されたため「Ruby 2.5.0 から」と誤算出されていた)。 refs rurema/bitclust#132 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
#132 P4 の追補:
{: since=""}/{: until=""}(空値)を**「明示的に不明」= バッジ非表示**の指定として解禁します。Array#collect/mapは ruby v1_8_7 の array.c(3803/3805 行)で定義済みですが、doctree の記載は 2.4.0 のドキュメント凍結後に追加されたため db-2.5.0 が初出となり「Ruby 2.5.0 から」と誤って表示されていました。決定済みの意味論では floor(はしご最古以前から存在)は「バッジ非表示」が正しい表示で、それを著者が明示する手段がありませんでしたMethodEntry#since_ofが non-nil を返すため、methodsince(P2)は無変更で上書きしません(「著者の明示 > 算出値」の既存機構がそのまま効きます)VersionBadges#badge_spanが空文字をバッジ非表示として扱います検証
#@sinceゲート付きソースで算出値に上書きされないこと・表示抑止の uniform / mixed)。TDD で実装前の red を確認してから green 化rbs validate・steep checkエラーなしdoctree 側の適用(
Array#collect/mapへの{: since=""}と、同種の「後から記載された古参メソッド」のスイープ結果一式+lock 更新)は別 PR で行います。refs #132
🤖 Generated with Claude Code