File: tmp.rb

package info (click to toggle)
ruby-toml 0.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 308 kB
  • sloc: ruby: 666; sh: 5; makefile: 4
file content (22 lines) | stat: -rw-r--r-- 457 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'multi_json'
require 'toml'

doc = "
a = [true, false]
"

puts TOML.load(doc).inspect

# puts TOML.load("a = [[[[1]]]]")["a"].inspect
# puts "[[[[1]]]] <- expected"
# 
# puts TOML.load("a = [1]")["a"].inspect
# puts "[1] <- expected"
# 
# puts TOML.load("a = [1, 2, 3]")["a"].inspect
# puts "[1, 2, 3] <- expected"
# 
# puts TOML.load("a = [[[1], 2], 3]")["a"].inspect
# puts "[[[1], 2], 3] <- expected"
# 
# puts TOML.load("a = [[]]")["a"].inspect