Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix handling of 'inline nested hashes'

  • Loading branch information...
commit 3ce229f48e2b19fc0a4935309be6178980ea0534 1 parent 911eeaa
@bacek bacek authored
Showing with 14 additions and 14 deletions.
  1. +1 −1  lib/YAML/Tiny.pm
  2. +13 −13 t/02_basic.t
View
2  lib/YAML/Tiny.pm
@@ -242,7 +242,7 @@ method _read_array(@array, @indent, @lines) {
# Inline nested hash
debug("Inline nested hash", $m);
my $indent2 := length($m[0]);
- subst(@lines[0], /'-'/, ' ');
+ @lines[0] := subst(@lines[0], /'-'/, ' ');
@array.push(hash());
self._read_hash( @array[-1], [ @indent, $indent2 ], @lines );
}
View
26 t/02_basic.t
@@ -218,19 +218,19 @@ yaml_ok(
);
# Inline nested hash
-###yaml_ok(
-### q{
-###---
-###- ~
-###- foo: bar
-### this: that
-###- baz
-###},
-### [ [ undef, hash( foo => 'bar', this => 'that' ), 'baz' ] ],
-### 'inline_nested_hash',
-### noyamlperl => 1,
-### todo => 1,
-###);
+yaml_ok(
+ q{
+---
+- ~
+- foo: bar
+ this: that
+- baz
+},
+ [ [ undef, hash( foo => 'bar', this => 'that' ), 'baz' ] ],
+ 'inline_nested_hash',
+ noyamlperl => 1,
+ todo => 1,
+);
# Empty comments
yaml_ok(
Please sign in to comment.
Something went wrong with that request. Please try again.