On Tue, Nov 4, 2008 at 1:41 PM, Ken Bloom <kbloom / gmail.com> wrote:
> I'm updating my SqlStatement gem http://sqlstatement.rubyforge.org/ to be
> compatible with Ruby 1.9, and owing to totally different ways of doing s-
> expressions in Ruby 1.8 (which required RubyNode) and 1.9 (which can trap
> the not and != operators as methods, so I can use the interpreter itself
> to generate everything I need in an s-expression), the Ruby 1.9 version
> no longer requires a dependency on RubyNode. In fact, RubyNode doesn't
> exist for 1.9 AFAICT.
>

Cool!

> Is there a way to reate a Ruby 1.8 flavor of the gem and another Ruby 1.9
> flavor. I'd like the gems to have the same name and live side-by side on
> RubyForge. It doesn't look the RubyGem metadata is flexible enough for
> this.
>

Gem::Specification#required_ruby_version is the closest match to what
you're looking for:

http://rubygems.org/read/chapter/20#required_ruby_version

You can use ~> >= and others.

In any case, two gem files, with exact same version cannot live in the
same system. is not a "metadata" limitation only.

You can append a special name for the 1.9 version of the gem, like
several gem developers do: json (and json_pure)

BTW, I suggest you ask these questions in ruby-talk instead of core,
since is more likely you get feedback form the community without
adding noise to ruby core developers (which is this mailing list).

HTH,
-- 
Luis Lavena
AREA 17
-
Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams