Permalink
Browse files

fix stupid thinko

now all tests pass at least as good as on rakudo 2011.07
  • Loading branch information...
1 parent fb102c3 commit 87dbbaab9738219be3abcb04fa8b28162e659f42 @moritz committed Dec 21, 2011
Showing with 7 additions and 7 deletions.
  1. +6 −6 lib/JSON/Tiny.pm
  2. +1 −1 t/04-roundtrip.t
View
@@ -32,13 +32,13 @@ multi to-json(Str:D $d) {
# .subst(/<-[\ ..~]>/, { ord(~$_).fmt('\u%04x') }, :g)
# ~ '"'
state %esc =
- '"' => '\"',
+ '"' => '\"',
'\\' => '\\\\',
- '\b' => '\b',
- '\f' => '\f',
- '\n' => '\n',
- '\r' => '\r',
- '\t' => '\t',
+ "\b" => '\b',
+ "\f" => '\f',
+ "\n" => '\n',
+ "\r" => '\r',
+ "\t" => '\t',
;
'"'
View
@@ -35,7 +35,7 @@ plan +@s;
for @s.kv -> $k, $v {
#warn "The json is <{ to-json( .value ) }>";
my $r = from-json( to-json( $v.value ) );
- todo('known type mismatches') if $k == any(5, 9);
+ todo('known type mismatches') if $k == 9;
is_deeply $r, $v.value, $v.key
or say "# Got: {$r.perl}\n# Expected: $v.value.perl()";
}

0 comments on commit 87dbbaa

Please sign in to comment.