SF.net SVN: jython:[7174] trunk/jython

[email protected] Fri, 24 Dec 2010 00:34:32 +0000
Newsgroups gmane.comp.lang.jython.cvs
Message-ID <[email protected]>
Revision: 7174
          http://jython.svn.sourceforge.net/jython/?rev=7174&view=rev
Author:   pjenvey
Date:     2010-12-24 00:34:31 +0000 (Fri, 24 Dec 2010)

Log Message:
-----------
allow -c/-w options without a space separator
fixes #1680
thanks Zemian Deng

Modified Paths:
--------------
    trunk/jython/NEWS
    trunk/jython/src/org/python/util/jython.java

Modified: trunk/jython/NEWS
===================================================================
--- trunk/jython/NEWS	2010-11-23 06:51:27 UTC (rev 7173)
+++ trunk/jython/NEWS	2010-12-24 00:34:31 UTC (rev 7174)
@@ -2,7 +2,8 @@
 
 Jython 2.5.2rc3
   Bugs Fixed
-    - [ 1674 ] PDB crashes under the JSR-223 scripting engine 
+    - [ 1674 ] PDB crashes under the JSR-223 scripting engine
+    - [ 1680 ] jython -c option is not parsed right
       
 Jython 2.5.2rc2
   Bugs Fixed

Modified: trunk/jython/src/org/python/util/jython.java
===================================================================
--- trunk/jython/src/org/python/util/jython.java	2010-11-23 06:51:27 UTC (rev 7173)
+++ trunk/jython/src/org/python/util/jython.java	2010-12-24 00:34:31 UTC (rev 7174)
@@ -436,7 +436,7 @@
                 Options.verbose +=3 ;
             } else if (arg.equals("-S")) {
                 Options.importSite = false;
-            } else if (arg.equals("-c")) {
+            } else if (arg.startsWith("-c")) {
                 runCommand = true;
                 if (arg.length() > 2) {
                     command = arg.substring(2);
@@ -453,7 +453,7 @@
                 }
                 index++;
                 break;
-            } else if (arg.equals("-W")) {
+            } else if (arg.startsWith("-W")) {
                 warnoptions.add(args[++index]);
             } else if (arg.equals("-C")) {
                 encoding = args[++index];


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl