> A question: what is the advantage of this over YAML?

1) It's faster (see below). Probably because it uses the highly
   optimized parser/lexer/whatever of the Ruby interpreter
   itself. (You can turn off the suspicious mode if the data
   can be trusted, which makes it faster then YAML. If the
   suspicious is enabled, it's as fast as YAML.)

2) Memory (suspicious mode turned off) (see below).

3) It's small, whereas YAML is relatively huge. (Is being small
   an advantage? Not necessarily, but I mention it anyway...)

4) You can store not only raw data, but code as well. (I know,
   this is really DANGEROUS, like macros in Word. That's why I
   introduced Kernel#suspicious.)

5) I my real situation, I raise an exception if the line, read
   from the journal, doesn't end with \r, \n or both. This is
   an indication for a corrupted journal. Half a line in the
   journal could be valid Ruby code and, as such, appear to be
   valid data. That's why I check for the "commit". (Maybe YAML
   does this too. I don't know.)

In my case, where the data is only accessible via a dedicated
daemon on a server, I can turn off the suspicious mode. That's
the big win.

gegroet,
Erik V. - http://www.erikveen.dds.nl/

----------------------------------------------------------------

 $ wc test.rbo test.yaml        # SAME DATA!
    3077   26739  681698 test.rbo
   29816   62709  697071 test.yaml

 $ ruby test.rb 10              # 10 times
        CPU    ELAPSED      COUNT CPU/INSTANCE   LABEL
   3.770000   4.016498          1   3.770000   :yaml
   3.630000   3.862287          1   3.630000   :rbo
   1.140000   1.140604          1   1.140000   :rbo_fast

 $ ruby testmem.rb rbo          # Disable GC, load testset once.
 VmSize:    21988 kB

 $ ruby testmem.rb rbo_fast     # Disable GC, load testset once.
 VmSize:    10904 kB

 $ ruby testmem.rb yaml         # Disable GC, load testset once.
 VmSize:    18004 kB

----------------------------------------------------------------