summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ruby.c b/ruby.c
index b85b1440a6..9c011ce1f2 100644
--- a/ruby.c
+++ b/ruby.c
@@ -809,6 +809,9 @@ proc_options(argc, argv)
}
else {
script = argv[0];
+#if defined DOSISH || defined __CYGWIN__
+ translate_char(argv[0], '\\', '/');
+#endif
if (script[0] == '\0') {
script = "-";
}
@@ -825,10 +828,10 @@ proc_options(argc, argv)
if (!script) script = argv[0];
script = ruby_sourcefile = rb_source_filename(script);
script_node = NEW_NEWLINE(0);
- }
#if defined DOSISH || defined __CYGWIN__
- translate_char(script, '\\', '/');
+ translate_char(ruby_sourcefile, '\\', '/');
#endif
+ }
argc--; argv++;
}
}