Remove #(at)since 1.8.x
because they are always true
#1989
Merged
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.
るりまではRuby 1.8以前のドキュメントは既に生成していないので、
#@since 1.8.x
の条件文を全て削除します。#1981 の続きです。
条件文の削除は次のコードを使っています。
https://gist.github.com/pocke/49249b217f89f1d275c9316af7b34c4a
デバッグコードとかもそのままで分かりづらくてすみません🙏
次のようなステップで変換しています。
#@since 1.8.x
を探し出して削除したASTを返す次のように実行するとこの変換が実行できます
$ ruby rurema-converter.rb $(git grep -F --name-only '#@since 1.8')
この変換の結果、出力に変化がないことを
rake generate statichtml
した後に、それぞれのディレクトリをdiffコマンドで比べることによって確認しています。ただし、bitclustに問題があって差分が出てしまっていたので、その問題を直したものを取り込んだ上で確認をしています。。
詳しくは rurema/bitclust#66 に書いています。
note
ちなみに、diffが +2 になっていて増えている行があるのは、末尾に空白がある
#@end
があったものの空白を消したためです。基本的に空白も含めて元のコードを維持するように変換プログラムを書きましたが、ここだけ面倒でサボっていたので差分が出ています🙏