-
Notifications
You must be signed in to change notification settings - Fork 222
Add JSON #279
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
Add JSON #279
Conversation
spec.add_development_dependency "rubocop" | ||
spec.add_development_dependency "rubocop-rubycw" | ||
spec.add_development_dependency "minitest-reporters", "~> 1.3.6" | ||
spec.add_development_dependency "json", "~> 2.3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, JSON is a gem... I think the best way is to put RBS in JSON gem, but I think it's okay to have the signatures here for now.
type real = Integer | Float | Rational | ||
|
||
type string = String | _ToStr | ||
type encoding = Encoding | string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
stdlib/json/json.rbs
Outdated
|
||
alias self.fast_unparse self.fast_generate | ||
|
||
def self.generate: (_ToJson obj, ?json_options opts) -> String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you rewrite these module functions using def self?.generate: ...
syntax?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review! I updated the signature to use the def self?.
syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
Could you rebase so that I can merge your PR?
@soutaro Done ✌️ |
No description provided.