Skip to content

Commit

Permalink
drop changes in crystal-lang#12007
Browse files Browse the repository at this point in the history
  • Loading branch information
HertzDevil committed Apr 18, 2022
1 parent dd6bedc commit a1c4574
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
4 changes: 0 additions & 4 deletions spec/std/json/serialization_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,6 @@ describe "JSON serialization" do
typeof(tuple).should eq(NamedTuple(a: FooPrivate))
end

it "does for empty named tuple" do
typeof(NamedTuple.new).from_json(%({})).should eq(NamedTuple.new)
end

it "does for BigInt" do
big = BigInt.from_json("123456789123456789123456789123456789123456789")
big.should be_a(BigInt)
Expand Down
4 changes: 0 additions & 4 deletions spec/std/yaml/serialization_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,6 @@ describe "YAML serialization" do
typeof(tuple).should eq(NamedTuple(a: FooPrivate))
end

it "does for empty named tuple" do
typeof(NamedTuple.new).from_yaml(%({})).should eq(NamedTuple.new)
end

it "does for BigInt" do
big = BigInt.from_yaml("123456789123456789123456789123456789123456789")
big.should be_a(BigInt)
Expand Down
4 changes: 2 additions & 2 deletions src/json/from_json.cr
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,11 @@ def NamedTuple.new(pull : JSON::PullParser)
{% end %}
{% end %}

NamedTuple.new(
{
{% for key in T.keys %}
{{ key.id.stringify }}: %var{key.id},
{% end %}
)
}
{% end %}
end

Expand Down
4 changes: 2 additions & 2 deletions src/yaml/from_yaml.cr
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,11 @@ def NamedTuple.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
{% end %}
{% end %}

NamedTuple.new(
{
{% for key in T.keys %}
{{ key.id.stringify }}: %var{key.id},
{% end %}
)
}
{% end %}
end

Expand Down

0 comments on commit a1c4574

Please sign in to comment.