Commit f0931fb
String#insert: レビュー指摘を反映して説明を整理
PR #2925 への対応。znz のレビュー指摘を反映:
- 最初の段落は要約のみとし、pos が正/負の場合の説明を後段に分けた
- 正の場合は self[pos, 0] = other と同じ操作である旨を明記
- 削除されていた @see [[m:String#[]=]] を復活
- 例を PR 説明のとおり充実させ、正/負それぞれで insert と []= の
異同が分かるようにした(出力は Ruby 3.4 で確認済み)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ea28370 commit f0931fb
1 file changed
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1815 | 1815 | | |
1816 | 1816 | | |
1817 | 1817 | | |
1818 | | - | |
1819 | 1818 | | |
1820 | | - | |
1821 | | - | |
1822 | | - | |
| 1819 | + | |
| 1820 | + | |
1823 | 1821 | | |
1824 | 1822 | | |
1825 | | - | |
1826 | | - | |
1827 | 1823 | | |
1828 | 1824 | | |
1829 | 1825 | | |
1830 | 1826 | | |
1831 | 1827 | | |
1832 | | - | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
1833 | 1835 | | |
1834 | 1836 | | |
| 1837 | + | |
| 1838 | + | |
1835 | 1839 | | |
1836 | 1840 | | |
1837 | 1841 | | |
| |||
0 commit comments