Closed cinemast closed 6 years ago
It appears this occurs when building against parslet 1.7.1.
Parslet 1.7 changed the way rules are inserted to give higher priority to new rules. To fix the problem, exchange the two rules for Table and TableArray in lib/toml/transform.rb
--- a/lib/toml/transformer.rb
+++ b/lib/toml/transformer.rb
@@ -92,23 +92,23 @@
# Make key hashes (inside key_groups) just be strings
rule(:key => simple(:k)) { k }
- # Then objectify the key_groups
- rule(:table => simple(:kg)) {
- Table.new([kg.to_s])
- }
-
# Captures array-like key-groups
rule(:table => subtree(:kg)) {
Table.new(kg.map &:to_s)
}
- # Single name table-arrays
- rule(:table_array => simple(:name)) {
- TableArray.new([name.to_s])
+ # Then objectify the key_groups
+ rule(:table => simple(:kg)) {
+ Table.new([kg.to_s])
}
+
# Multi-part (a.b.c) table-arrays
rule(:table_array => subtree(:names)) {
TableArray.new(names.map &:to_s)
}
+ # Single name table-arrays
+ rule(:table_array => simple(:name)) {
+ TableArray.new([name.to_s])
+ }
end
end
Fixed with #49
Hi!
Can you probably make a sense out of the following build error?
NoMethodError: undefined method `map' for "strings"@50:Parslet::Slice
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818155
Thank you and Greetings Peter