summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-06-26 09:45:09 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-06-26 09:45:09 +0000
commit05da25f297c4d26b6bb454a9649b1dd63a102910 (patch)
tree568d1118ca9c2c7bfbcaf2d2132a7e870367d407 /ruby.c
parent839f4c5f3fdb4ea6b270fce17f1c3881060087d4 (diff)
980626
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ruby.c b/ruby.c
index e675b3b..eb75630 100644
--- a/ruby.c
+++ b/ruby.c
@@ -613,7 +613,6 @@ set_arg0(val, id)
static int len;
if (origargv == 0) Fail("$0 not initialized");
- Check_Type(val, T_STRING);
if (len == 0) {
s = origargv[0];
s += strlen(s);
@@ -624,8 +623,7 @@ set_arg0(val, id)
}
len = s - origargv[0];
}
- s = RSTRING(val)->ptr;
- i = RSTRING(val)->len;
+ s = str2cstr(val, &i);
if (i > len) {
memcpy(origargv[0], s, len);
origargv[0][len] = '\0';