From: Paul Lutus Date: 2006-12-10T02:55:13+09:00 Subject: Re: File.yaml?(fname) Trans wrote: > what's the best way to determine if a file is yaml? Process the file using a parser meant to process YAML. If the parse fails, it means: 1. The file isn't YAML. 2. The chosen parser is not robust enough to process this specific, valid YAML file. 3. The YAML file, although more or less valid YAML, has syntax errors not consistent with the formal YAML specification. 4. The YAML specification contains ambiguities that allow a valid parser to fail on valid YAML syntax. 5. Other. In other words, you cannot really say, absolutely and unambiguously, that a particular file is a YAML file. -- Paul Lutus http://www.arachnoid.com