Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix handling negative indexes in @indent.

  • Loading branch information...
commit 99576e153a8d252d9f483b90b3a9743264ab75d5 1 parent ab3071b
@bacek bacek authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/YAML/Tiny.pm
View
2  lib/YAML/Tiny.pm
@@ -280,7 +280,7 @@ method _read_array(@array, @indent, @lines) {
pir::die("YAML::Tiny failed to classify line '{ @lines[0] }'");
}
}
- elsif pir::defined(@indent[-2]) && @indent[-1] == @indent[-2] {
+ elsif (@indent > 1) && (@indent[-1] == @indent[-2]) {
# This is probably a structure like the following...
# ---
# foo:
Please sign in to comment.
Something went wrong with that request. Please try again.