[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rubygems usage as a fallback



On Mon, Apr 1, 2013 at 9:28 AM, Tollef Fog Heen <tfheen@err.no> wrote:
> require "rubygems" is a redundant task unless this library is being built
> for >1.9.3 and even if people don't consider it expensive (and it's not
> expensive in the grand scheme of things) it's just not needed unless you
> are on old-ruby.

In the code sample Praveen posted, it's only require-d if we get a
loaderror for the packaged version, hence dead code

It's not exactly dead code since it still has a cost considering it's wrapped inside a closure. 

Reply to: