From: Ryan Leavengood Date: 2001-10-30T08:44:52+09:00 Subject: [ruby-talk:23779] Re: RubyGems Status (was: Re: Some inspirations from REBOL) > Release to CVS as quickly as possible! Yes it would probably suck if I got hit by a truck or something. But I did email a tarball to a few key people before RubyConf so it wouldn't be a complete loss. > So you haven't considered my proposal of making them valid Ruby programs > by giving them a minimal Ruby header and then attching the binary data? > Would be no need to alter the interpreter for this... > > I'm sure there are many flaws with this idea but would be nice to > discuss... Well I didn't realize you had made this proposal (or I missed it.) Yes this could certainly be done. Something like: require 'rubygems' RubyGems.run($0) __END__ The problem is that this format would require special handling by the RubyGems system and it isn't consistent with the other file formats I've created. I would prefer that this "executable RubyGems" extension have minimal impact on the core system. Normal and executable gems should be treated the same. Another possible "trick" could be to have RubyGems look at $0 when it is required: (inside rubygems.rb): if $0 =~ /rbg$/ RubyGems.run($0) end You would use this like so: $ ruby -rrubygems SomeGem-1.0.0.0.rbg Of course for this all RubyGems files would need to start with __END__ so that Ruby doesn't try to run them itself. But that isn't too bad. But if in the long run if RubyGems is put in the core distribution and used a lot then adding support to the core interpreter may not be that bad of an idea. Ryan Leavengood