summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index b6ea4f2f0d..f32e44c4ae 100644
--- a/eval.c
+++ b/eval.c
@@ -1366,6 +1366,10 @@ ruby_options(argc, argv)
{
int state;
+#ifdef _WIN32
+ argc = rb_w32_cmdvector(GetCommandLine(), &argv);
+#endif
+
Init_stack((void*)&state);
PUSH_TAG(PROT_NONE);
if ((state = EXEC_TAG()) == 0) {
@@ -1377,6 +1381,11 @@ ruby_options(argc, argv)
exit(error_handle(state));
}
POP_TAG();
+
+#ifdef _WIN32_WCE
+ // free commandline buffer
+ wce_FreeCommandLine();
+#endif
}
void rb_exec_end_proc _((void));