ObjectSpace::WeakMap: ドキュメント追加が遅かった 12 メソッドに since を明示 - #3280
Merged
Conversation
key?/include?/member?/each/each_pair/each_key/each_value/keys/values/
size/length は Ruby 2.1 で、inspect は 2.0.0 で導入されたが、
ドキュメントの追加が 3.0 世代だったため、凍結 DB(2.7.0 以前)には
エントリが無く、since バッジが「Ruby 3.0 から」と誤表示されていた
(tools/method-versions/mismatch-report.md の db-late 分類)。
凍結 DB は再生成されないため、明示 {: since=} で補正する(rurema#3256 と
同方式)。値は実測(tools/method-versions/matrix.tsv)による。
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.
[c:ObjectSpace::WeakMap] のメソッド 12 件は Ruby 2.1(inspect のみ 2.0.0)で導入されましたが、ドキュメントの追加が 3.0 世代だったため凍結 DB(2.7.0 以前)にエントリが無く、since バッジが「Ruby 3.0 から」と誤表示されています(例: https://docs.ruby-lang.org/ja/3.4/method/ObjectSpace=3a=3aWeakMap/i/keys.html )。
#3269 を受けて行った全数調査(#3274 の
tools/method-versions/、mismatch-report.mdの db-late 分類)のうち、1 クラスにまとまっていて即修正できる分です。凍結 DB は再生成されないため、#3256 と同じく明示{: since=}属性で補正します。変更内容
manual/api/_builtin/ObjectSpace__WeakMap.mdの署名行直後に属性を追加:{: since="2.1.0"}× 11 — key? / include? / member? / each / each_pair / each_key / each_value / keys / values / size / length{: since="2.0.0"}× 1 — inspect値はいずれも実測(
tools/method-versions/matrix.tsv)によります。[]/[]=はクラス導入時(2.0.0)からあり、deleteは既に#@since 3.3でゲートされているため対象外です。備考
open 中の #3276 と同じファイルを触りますが、変更箇所は重ならずクリーンにマージできることを
git merge-treeで確認済みです(順不同でマージ可)。確認
rake check_blank_lines/check_indent_in_samplecode通過🤖 Generated with Claude Code