From: Eric Hodel Date: 2007-01-21T15:40:03+09:00 Subject: Re: Getting the version number for rubygems? On Jan 20, 2007, at 21:03, Jeremy McAnally wrote: > require 'rubygems' > > unless Kernel.respond_to? :gem > alias gem require_gem > end > > gem 'ruport' > > That should work I believe... NO! NO! NO! NO! NO! NO! NO! NO! NO! NO! NO! NO! NO! #gem and #require_gem do different things (autorequire). You'll screw over other gems by aliasing things around. Instead, just fall back to require_gem when gem isn't loaded. if Kernel.respond_to? :gem then gem blah else require_gem blah end DO NOT go aliasing methods on top of each other. #require and #require_gem do different things, much like #sub and #sub! do different things, respect that. -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net I LIT YOUR GEM ON FIRE!