From: Richard Kilmer Date: 2003-01-16T23:26:48+09:00 Subject: Re: [ANN] YAML.rb 0.49.1 -- Perfecting the parser, new merge indicator, base60 I tried to run the test suite against this on the Ruby (1.6.7) that comes with OS X. It dies with a "stack level too deep" exception. Without this working, FreeRIDE does not work :-( The output looks like: --BEGIN [singlemalt:~/Desktop/yamlrb-0.49.1/yts] rich% ./test.sh --- %YAML:1.0 file: YtsAnchorAlias.yml test: Simple Alias Example success: (yes) round-trip: (yes) time: 0.009627 --- file: YtsAnchorAlias.yml test: Alias of a Mapping success: (yes) round-trip: (yes) time: 0.008456 --- file: YtsErrorTests.yml test: Missing value for hash item success: (no) round-trip: (no) reason: | No Ruby parse information available in the test document. --- file: YtsErrorTests.yml test: Not indenting enough success: (no) round-trip: (no) reason: | No Ruby parse information available in the test document. --- file: YtsRubyTests.yml test: Symbols success: (yes) round-trip: (yes) time: 0.027503 --- file: YtsRubyTests.yml test: Ranges success: (yes) round-trip: (yes) time: 0.017929 --- file: YtsRubyTests.yml test: Regexps success: (yes) round-trip: (yes) time: 0.070336 --- file: YtsRubyTests.yml test: Perl Regexps success: (yes) round-trip: (yes) time: 0.005660 --- file: YtsRubyTests.yml test: Struct class success: (yes) round-trip: (yes) time: 0.011653 src/emitter.rb:974:in `detect_implicit': stack level too deep (SystemStackError) from src/emitter.rb:974:in `detect' from src/emitter.rb:974:in `each' from src/emitter.rb:974:in `detect' from src/emitter.rb:974:in `detect_implicit' from src/emitter.rb:973:in `each' from src/emitter.rb:973:in `detect_implicit' from src/emitter.rb:1617:in `to_yaml' from src/emitter.rb:1605:in `call' ... 34 levels... from src/emitter.rb:797:in `load_documents' from yts.rb:47 from yts.rb:41:in `each' from yts.rb:41 ---END On Monday, January 13, 2003, at 01:50 AM, why the lucky stiff wrote: > YAML.rb 0.49.1 now out. [http://yaml4r.sf.net/] > > This version includes a few fixes to work better with Windows and > various versions of Ruby. We're parsing better than ever. And I've > even got a few new features for ya. > > - The merge indicator is now '<<'. If you're not familiar with > this indicator, that's because it was quietly introduced in > 0.49. A merge will mix mapping elements into another mapping: > > mapping: > name: Joe > job: Accountant > <<: > age: 38 > > The above document comes out as a Ruby Hash: > > { 'mapping' => > { 'name' => 'Joe', > 'job' => 'Accountant', > 'age' => 38 > } > } > > As you can see the deeper hash is merged into the hash containing > the merge key. This is very useful for inheritance: > > - &ACCOUNTANT > job: Accountant > hourly_rate: 150 > > - name: Joe > <<: *ACCOUNTANT > > - name: Mike > <<: *ACCOUNTANT > > You can mixin multiple mappings as well. See > http://yaml.org/type/merge for the full specification in the > YAML type repository. > > - Base60 added for time and degrees representation. > > the following are equal: > - 1:30 > - 90 > these two are equal as well: > - 190:20:30 > - 685230 # = 190 h 20 m 30 s > > This will show up at http://yaml.org/type/int in a few days. > > Nice little features long requested on yaml-core. Enjoy 0.49.1. > Please > contact me with your bug reports and assistance. I'd like 0.50 to be a > solid package, which is only possible with your kind help. > > _why > > >