Skip to content

Instantly share code, notes, and snippets.

Created August 19, 2015 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/f45037d1d61ceb16adbf to your computer and use it in GitHub Desktop.
Save anonymous/f45037d1d61ceb16adbf to your computer and use it in GitHub Desktop.
$ git diff
diff --git a/lib/JSON/Tiny/Actions.pm b/lib/JSON/Tiny/Actions.pm
index 39b713a..5253251 100644
--- a/lib/JSON/Tiny/Actions.pm
+++ b/lib/JSON/Tiny/Actions.pm
@@ -20,7 +20,7 @@ method array($/) {
}
method arraylist($/) {
- make [$<value>>>.made];
+ make [$<value>.map(*.made)];
}
method string($/) {
diff --git a/t/02-structure.t b/t/02-structure.t
index 984adf7..efa8bfe 100644
--- a/t/02-structure.t
+++ b/t/02-structure.t
@@ -12,7 +12,7 @@ my @t =
'["\t\n"]' => ["\t\n"],
'["\""]' => ['"'],
'[{ "foo" : { "bar" : 3 } }, 78]' => [{ foo => { bar => 3 }}, 78],
- '[{ "a" : 3, "b" : 4 }]' => [{ a => 3, b => 4}],
+ '[{ "a" : 3, "b" : 4 }]' => [{ a => 3, b => 4},],
Q<<{
"glossary": {
"title": "example glossary",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment