This gem is breaking for me when I try to parse a multi-line string. For example:
irb(main):020:0> text = <<EOT
irb(main):021:0" [foo]
irb(main):022:0"
irb(main):023:0" bar = '''
irb(main):024:0" baz
irb(main):025:0" '''
irb(main):026:0" EOT
=> "[foo]\n\n bar = '''\nbaz\n'''\n"
irb(main):027:0> TOML.load(text)
NoMethodError: undefined method `ascii_tree' for nil:NilClass
from /Library/Ruby/Gems/2.3.0/gems/toml-0.2.0/lib/toml/parser.rb:12:in
`rescue in initialize'
from /Library/Ruby/Gems/2.3.0/gems/toml-0.2.0/lib/toml/parser.rb:9:in `initialize'
from /Library/Ruby/Gems/2.3.0/gems/toml-0.2.0/lib/toml.rb:19:in `new'
from /Library/Ruby/Gems/2.3.0/gems/toml-0.2.0/lib/toml.rb:19:in `load'
from (irb):27
from /usr/bin/irb:11:in `<main>'
The problem occurs with either ''' or """ strings and with both load and load_file.
Here is some environment info:
This gem is breaking for me when I try to parse a multi-line string. For example:
The problem occurs with either ''' or """ strings and with both
load
andload_file
. Here is some environment info: