From c31679c3a09247c449907a91b43dffd797766727 Mon Sep 17 00:00:00 2001 From: "K. Adam Christensen" Date: Sat, 8 Jan 2011 22:56:04 -0500 Subject: [PATCH] [CLASSPATH] Using A Better Way To Detect if Platform is Windows I was getting the incorrect classpath for jruby and the C ruby installers on Windows. This was due to those two rubies not returning 'win32' for the platform. So I've gone and used the technique outlined at http://blog.emptyway.com/2009/11/03/proper-way-to-detect-windows-platform-in-ruby/ --- lib/ruby/java/classpath.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ruby/java/classpath.rb b/lib/ruby/java/classpath.rb index 4fc257aa..6f1f0e88 100644 --- a/lib/ruby/java/classpath.rb +++ b/lib/ruby/java/classpath.rb @@ -2,6 +2,7 @@ module Java class Classpath require 'pathname' + require 'rbconfig' def initialize(root_dir) @root = root_dir @@ -20,7 +21,7 @@ def definition end def separator - PLATFORM['win32'] ? ";" : ":" + Config::CONFIG['host_os'] =~ /mswin|mingw/ ? ';' : ':' end end