-
-
Save maiha/ff5be260ca7555d0a01e54745f62acc7 to your computer and use it in GitHub Desktop.
practical migrating guide to crystal-0.20.4
- def info(section : String = nil)
+ def info(section : String? = nil)
--- a/src/jq/mapping.cr
+++ b/src/jq/mapping.cr
@@ -75,12 +75,12 @@ class Jq
{% end %}
end
- def to_json(io : IO)
- io.json_object do |json|
+ def to_json(json : JSON::Builder)
+ json.object do
{% for key, tuple in properties %}
_{{key.id}} = @{{key.id}}
json.field({{key.id.stringify}}) do
- _{{key.id}}.to_json(io)
+ _{{key.id}}.to_json(json)
end
{% end %}
end
- old:
OptionParser#parse(Array(String)) : Array(String)
- new:
OptionParser#parse(Array(String)) : Nil
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment