On Wed, Aug 27, 2008 at 7:35 AM, Caspar Florian Ebeling
<[EMAIL PROTECTED]> wrote:
> I'm just writing a gem spec and I got a warning about
> Specification#autorequire being deprecated. Maybe I
> miss an important part, but isn't that the idea, to first
> require "rubygems" (if ruby 1.8), then the gem, and then
> be able to access classes etc? How is it meant to work
> otherwise?

#autorequire is a bit dangerous and was probably a mistake from the beginning.

What it did was required a file when the gem was activated.

It worked like:

  require 'rubygems'
  require_gem 'pdf-writer' # this would be gem 'pdf-writer' these days, mostly

The only difference these days is:

  require 'rubygems'
  require 'pdf/writer' # RubyGems automatically finds and activates the gem

-austin
-- 
Austin Ziegler * [EMAIL PROTECTED] * http://www.halostatue.ca/
 * [EMAIL PROTECTED] * http://www.halostatue.ca/feed/
 * [EMAIL PROTECTED]
_______________________________________________
Rubygems-developers mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to