From: Dave Thomas Date: 2001-02-26T14:08:10+09:00 Subject: [ruby-talk:11567] A design/implementation question I'm looking for some inspiration. 'ri' displays information about Ruby methods etc. It holds these descriptions in a set of marshaled objects, one per class or module. These marshaled objects ae prepared as I ship ri, using a simplified form of the XML used to generate the online book. Now, my problem is that marshaled classes are dependent on the Ruby version number: I'm writing the classes out using 1.6.2, and someone who's trying to use ri with 1.6.1 will get an error. So, ideally I'd like to construct these marshaled classes not when I generate the distribution at my end, but instead when I install it on a target machine. To do that with the current scheme would require that every client have the Ruby xmlparser module installed, which in turn requires Jim Clark's expat library. This seems onerous! So, I initially started hacking together yet another flat file representation of the data. I'd ship it with ri, and when you type 'ruby install.rb', the installer would read it and generate the marshaled classes. Then that little alarm bell started ringing that said "there has to be a better way". Unfortunately, the battery ran down before it got around to telling me what that better way is. So, any ideas? Thanks Dave