-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
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:
$ gem list | grep toml
toml (0.2.0)
$ ruby -v
ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin17]
mkarklinsScout and marzdrel
Metadata
Metadata
Assignees
Labels
No labels