jruby-launcher 1.0.6-java → 1.0.7-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -206,7 +206,29 @@ bool JvmLauncher::isVersionString(const char *str) {
206
206
  return *end == '\0';
207
207
  }
208
208
 
209
- bool JvmLauncher::startInProcJvm(const char *mainClassName, std::list<std::string> args, std::list<std::string> options) {
209
+ bool JvmLauncher::startInProcJvm(const char *mainClassName, std::list<std::string> mbcs_args, std::list<std::string> mbcs_options) {
210
+
211
+ std::list<std::string> args;
212
+ for (std::list<std::string>::iterator it = mbcs_args.begin(); it != mbcs_args.end(); ++it) {
213
+ wchar_t wstr[2048];
214
+ UINT cp = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
215
+ MultiByteToWideChar(cp, 0, it->c_str(), -1, wstr, sizeof(wstr) / sizeof(wchar_t));
216
+ int mb_size = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
217
+ char *mbstr = (char*)malloc(mb_size);
218
+ WideCharToMultiByte(CP_UTF8, 0, wstr, -1, mbstr, mb_size, NULL, NULL);
219
+ args.push_back(mbstr);
220
+ }
221
+
222
+ std::list<std::string> options;
223
+ for (std::list<std::string>::iterator it = mbcs_options.begin(); it != mbcs_options.end(); ++it) {
224
+ wchar_t wstr[2048];
225
+ UINT cp = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
226
+ MultiByteToWideChar(cp, 0, it->c_str(), -1, wstr, sizeof(wstr) / sizeof(wchar_t));
227
+ int mb_size = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
228
+ char *mbstr = (char*)malloc(mb_size);
229
+ WideCharToMultiByte(CP_UTF8, 0, wstr, -1, mbstr, mb_size, NULL, NULL);
230
+ options.push_back(mbstr);
231
+ }
210
232
 
211
233
  class Jvm {
212
234
  public:
@@ -1,3 +1,3 @@
1
1
  module JRubyLauncher
2
- VERSION = "1.0.6"
2
+ VERSION = "1.0.7"
3
3
  end
@@ -12,10 +12,10 @@ describe "JRuby native launcher" do
12
12
  it "should print help message" do
13
13
  args = jruby_launcher_args("-Xhelp 2>&1")
14
14
  args.detect{|l| l =~ /JRuby Launcher usage/}.should be_true
15
- args[-1].should == "-X"
15
+ args.should include("-X")
16
16
  args = jruby_launcher_args("-X 2>&1")
17
17
  args.detect{|l| l =~ /JRuby Launcher usage/}.should be_true
18
- args[-1].should == "-X"
18
+ args.should include("-X")
19
19
  end
20
20
 
21
21
  it "should use $JAVACMD when JAVACMD is specified" do
data/version.h CHANGED
@@ -6,6 +6,6 @@
6
6
  #ifndef _VERSION_H_
7
7
  #define _VERSION_H_
8
8
 
9
- #define JRUBY_LAUNCHER_VERSION "1.0.6"
9
+ #define JRUBY_LAUNCHER_VERSION "1.0.7"
10
10
 
11
11
  #endif // ! _VERSION_H_
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 6
9
- version: 1.0.6
8
+ - 7
9
+ version: 1.0.7
10
10
  platform: java
11
11
  authors:
12
12
  - Nick Sieger
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-27 00:00:00 -06:00
18
+ date: 2011-02-08 00:00:00 -06:00
19
19
  default_executable:
20
20
  dependencies: []
21
21