Skip to content

Commit

Permalink
Merge pull request #749 from dmarcotte/fix_dash_s_spec
Browse files Browse the repository at this point in the history
Fix dash_s_spec
  • Loading branch information
atambo committed May 19, 2013
2 parents fe118a0 + 9b96e9f commit 3cd83a9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
4 changes: 0 additions & 4 deletions spec/tags/1.8/ruby/command_line/dash_s_tags.txt

This file was deleted.

8 changes: 0 additions & 8 deletions spec/tags/1.9/ruby/command_line/dash_s_tags.txt

This file was deleted.

5 changes: 4 additions & 1 deletion src/org/jruby/util/cli/ArgumentProcessor.java
Expand Up @@ -118,7 +118,10 @@ private void processArgv() {
arg = arg.substring(1);
if (arg.indexOf('=') > 0) {
String[] keyvalue = arg.split("=", 2);
config.getOptionGlobals().put(keyvalue[0], keyvalue[1]);

// argv globals get their dashes replaced with underscores
String globalName = keyvalue[0].replaceAll("-", "_");
config.getOptionGlobals().put(globalName, keyvalue[1]);
} else {
config.getOptionGlobals().put(arg, null);
}
Expand Down

0 comments on commit 3cd83a9

Please sign in to comment.