summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-12-22 09:01:55 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-12-22 09:01:55 +0000
commit6d583574ab87c7cd18b66382c6892b545167bff6 (patch)
tree515b7c169ce2cd30fe085c5d861f5fad59aa76f7 /ruby.c
parente299d511db939232c628d6880e61c32e83937d66 (diff)
1.1d1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1dev@357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/ruby.c b/ruby.c
index fb78235..7c789fc 100644
--- a/ruby.c
+++ b/ruby.c
@@ -81,12 +81,6 @@ static char **origargv;
#define RUBY_SITE_LIB "/usr/local/lib/site_ruby"
#endif
-#if defined(MSDOS) || defined(NT) || defined(__MACOS__)
-#define RUBY_LIB_SEP ';'
-#else
-#define RUBY_LIB_SEP ':'
-#endif
-
extern VALUE rb_load_path;
static FILE *e_fp;
@@ -96,6 +90,8 @@ static void
addpath(path)
char *path;
{
+ const char sep = *RUBY_LIB_SEP;
+
if (path == 0) return;
#if defined(__CYGWIN32__)
{
@@ -104,14 +100,14 @@ addpath(path)
path = rubylib;
}
#endif
- if (strchr(path, RUBY_LIB_SEP)) {
+ if (strchr(path, sep)) {
char *p, *s;
VALUE ary = rb_ary_new();
p = path;
while (*p) {
- while (*p == RUBY_LIB_SEP) p++;
- if (s = strchr(p, RUBY_LIB_SEP)) {
+ while (*p == sep) p++;
+ if (s = strchr(p, sep)) {
rb_ary_push(ary, rb_str_new(p, (int)(s-p)));
p = s + 1;
}
@@ -623,7 +619,7 @@ set_arg0(val, id)
len = s - origargv[0];
}
#endif
- s = str2cstr(val, &i);
+ s = rb_str2cstr(val, &i);
#ifndef __hpux
if (i > len) {
memcpy(origargv[0], s, len);
@@ -650,7 +646,7 @@ set_arg0(val, id)
j.pst_command = s;
pstat(PSTAT_SETCMD, j, i, 0, 0);
}
- rb_progname = str_taint(str_new(s, i));
+ rb_progname = rb_tainted_str_new(s, i);
#endif
}