for the host on which msf is running, my understanding is you should use RbConfig::CONFIG['target_os'], there's a great example in gemcache/ruby/1.9.1/gems/fssm-0.2.9/lib/fssm/support.rb. altho it doesn't explicitly check for windows.
<pre>
   if RbConfig::CONFIG['target_os'] =~ /^win/i
</pre>

check the return val on windows tho, I don't have a win machine w/ruby installed atm.  And don't forget the '^' so you don't pick up 'darwin'