On 1/25/10 3:46 PM, Roger Pack wrote:
> I could add the method "OS.fork_supported?" to the OS gem if it would
> help the original poster (and/or if it could help make unnecessary the
> modification of respond_to? in 1.9.2)
> 
> Just thinking out loud.

Thanks but I'm fine. I currently use the following code:

RUBY_ENGINE = defined?(::RUBY_ENGINE) ? ::RUBY_ENGINE : "ruby"
def self.fork_supported?
	# MRI >= 1.9.2's respond_to? returns false for methods
	# that are not implemented.
	return Process.respond_to?(:fork) &&
		RUBY_ENGINE != "jruby" &&
		RUBY_ENGINE != "macruby" &&
		Config::CONFIG['target_os'] !~ /mswin|windows/
end