From: Jim Weirich Date: 2005-03-04T09:31:12+09:00 Subject: Re: Unifying RPA and RubyGems On Thursday 03 March 2005 05:03 pm, Ben Giddings wrote: > IMHO that's a shortcoming of Ruby's "require" statement to begin with. > It would be handy to be able to "require" a particular version of a > library, if you know that more recent ones don't work for you. Maybe in > Ruby 2.0 Matz can spruce up "require" a bit. Actually, I'm not sure a version number on the require statement is a good idea. Require deals with stuff at a file level. Versions are applied at a packaging level. Version requirements are something you want to specify in one place, not in every single require statement in an application or library. What you really want is the ability to say "When I ask for a file from package XYZ, please use files from version 1.2.3 of that package". Then latter requires will "do the right thing" without having to update every single require statement in the program. You can then collect the package version constraints in a centralized location for the app, kinda like a config file. Rail applications do this with the environment files. Makes it easy to switch a Rails app from one version of Rails to another. -- -- Jim Weirich jim@weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)