Thomas E Enebo wrote:
Too bad we cannot preserve original 1.0 semantics and have -O turn off
Objectspace and +O enable it.  Then we can default to -O.  -O really
just keeps getting worse and worse (comparatively to not having it
enabled) and people generally do not realize they can disable it.  So
I have come around on this and also think it should be off by default.

Index: src/org/jruby/util/CommandlineParser.java
===================================================================
--- src/org/jruby/util/CommandlineParser.java   (revision 4774)
+++ src/org/jruby/util/CommandlineParser.java   (working copy)
@@ -103,7 +103,7 @@
     }

     private boolean isInterpreterArgument(String argument) {
-        return argument.charAt(0) == '-' && !endOfArguments;
+ return (argument.charAt(0) == '-' || argument.charAt(0) == '+') && !endOfArguments;
     }

     private void processArgument() {
@@ -137,7 +137,11 @@
                     assumeLoop = true;
                     break;
                 case 'O' :
-                    objectSpaceEnabled = false;
+                    if (argument.charAt(0) == '-') {
+                        objectSpaceEnabled = false;
+                    } else if (argument.charAt(0) == '+') {
+                        objectSpaceEnabled = true;
+                    }
                     break;
                 case 'C' :
                     compilerEnabled = true;

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to