Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Psych.loadの引数filenameの追従 #2870

Merged
merged 4 commits into from
May 9, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions refm/api/src/psych.rd
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,16 @@ libyaml のバージョンを返します。
@see [[m:Psych::LIBYAML_VERSION]]

#@since 2.5.0
#@since 2.6.0
#@since 3.1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このあたりの分岐についてはより良い方法がありましたらご教示ください

Copy link

@shugo shugo Feb 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こんな感じですかね

#@if("2.6.0" <= version)
--- load(yaml, filename: nil, fallback: false, symbolize_names: false) -> object
#@end
#@if("2.5.0" <= version and version < "3.1")
--- load(yaml, filename = nil, fallback: false, symbolize_names: false) -> object
#@end
#@if(version < "2.5.0")
--- load(yaml, filename = nil, fallback = false) -> object
#@end

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ご提示ありがとうございました. 7f8b1c9 として積ませていただきました.

--- load(yaml, filename: nil, fallback: false, symbolize_names: false) -> object
#@else
--- load(yaml, filename = nil, fallback: false, symbolize_names: false) -> object
--- load(yaml, filename: nil, fallback: false, symbolize_names: false) -> object
#@end
#@else
--- load(yaml, filename = nil, fallback: false, symbolize_names: false) -> object
#@end
#@else
--- load(yaml, filename = nil, fallback = false) -> object
#@end
Expand Down