On Mar 8, 2006, at 4:18 PM, Joe Van Dyk wrote:
> Are there any good Ruby idioms for managing the separate OS- 
> specific functions?

Lots of ways to do this.  Here is another thought:

class A
   case RUBY_PLATFORM
   when /linux/
        def alpha; 'linux implmentation'; end
   when /darwin/
        def alpha; 'darwin implementation'; end
   else
        def alpha; 'default implementation'; end
   end
   def beta; 'works on all systems'; end
end

puts A.new.alpha	# 'darwin implementation' (on Mac OS X)
puts A.new.beta         # 'works on all systems'

Gary Wright