Add type for json param in def to_json(json); end;
Motivation and Context
When .to_json is used on Union types, especially IO Types || ::JSON::Builder, type can be casted incorrectly. By specifying ::JSON::Builder, this issue can be avoided.
This issue occurs when clear is integrated with spider-gazelle
How Has This Been Tested?
All specs pass
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Manual of usage of the new feature.
Checklist:
[x] My code follows the code style of this project. bin/ameba ran without alert.
[ ] My change requires a change to the documentation.
Description
json
param indef to_json(json); end;
Motivation and Context
.to_json
is used on Union types, especially IO Types || ::JSON::Builder, type can be casted incorrectly. By specifying ::JSON::Builder, this issue can be avoided.clear
is integrated withspider-gazelle
How Has This Been Tested?
Types of changes
Checklist:
bin/ameba
ran without alert.