Detect Ruby implementation version and noop unless appropriate #17

Open
ivar opened this Issue Jun 21, 2011 · 2 comments

Projects

None yet

2 participants

@ivar
ivar commented Jun 21, 2011

Since the SystemTimer gem is admittedly a hack (though a very useful and appreciated hack) to work around implementation issues for a limited subset of ruby implementations (ie: 1.8.x), it would be great if the gem could detect the current environment in which is it is running and only take effect when appropriate. This would would allow otherwise compatible gems to run successfully in other environments (ie: Ruby 1.9, jruby, etc..).

see also #10

@zimbatm
zimbatm commented Jul 4, 2011

If you use a Gemfile, you can target a dependency for ruby 1.8 only like that:

gem 'SystemTimer', :platforms => :mri_18
@ivar
ivar commented Jul 4, 2011

see bundler/bundler#1281

apparently, the 'official' solution is to create a different gem version for each platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment