diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-04-24 06:44:13 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-04-24 06:44:13 +0000 |
commit | be712bae3a4af4161efc5cb48f6a2f62ef12d925 (patch) | |
tree | 5d75bff5b5014e4e1581e61e05c6803fffb7709f /ruby.c | |
parent | 81e661b298177105d915a1fe8e1e47ddd0a46122 (diff) |
* ruby.c (set_arg0): wrong predicate when new $0 value is bigger
than original space.
* gc.c (id2ref): should use NUM2ULONG()
* object.c (rb_mod_const_get): check whether name is a class
variable name.
* object.c (rb_mod_const_set): ditto.
* object.c (rb_mod_const_defined): ditto.
* marshal.c (w_float): precision changed to "%.16g"
* eval.c (rb_call0): wrong retry behavior.
* numeric.c (fix_aref): a bug on long>int architecture.
* eval.c (rb_eval_string_wrap): should restore ruby_wrapper.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -877,9 +877,9 @@ set_arg0(val, id) #endif s = rb_str2cstr(val, &i); #ifndef __hpux - if (i > len) { - memcpy(origargv[0], s, len); - origargv[0][len] = '\0'; + if (i < len) { + memcpy(origargv[0], s, i); + origargv[0][i] = '\0'; } else { memcpy(origargv[0], s, i); |