diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-15 02:33:03 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-15 02:33:03 +0000 |
| commit | a6e496565317ba3034de6a23f5956214349cc2c6 (patch) | |
| tree | f4ff80d2d9ce4e1ab60eef7c10c70d8b3faaea5e /string.c | |
| parent | ec62a3f79da3448e9c5b6b8c2806051e5f73c466 (diff) | |
| download | ruby-a6e496565317ba3034de6a23f5956214349cc2c6.tar.gz ruby-a6e496565317ba3034de6a23f5956214349cc2c6.tar.xz ruby-a6e496565317ba3034de6a23f5956214349cc2c6.zip | |
* eval.c (rb_yield_0): should not re-submit TAG_BREAK if this
yield is not break destination. [ruby-dev:23197]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@5953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
| -rw-r--r-- | string.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1692,7 +1692,7 @@ rb_str_aset(str, indx, val) switch (TYPE(indx)) { case T_FIXNUM: num_index: - idx = NUM2LONG(indx); + idx = FIX2LONG(indx); if (RSTRING(str)->len <= idx) { out_of_range: rb_raise(rb_eIndexError, "index %ld out of string", idx); @@ -1707,7 +1707,7 @@ rb_str_aset(str, indx, val) RSTRING(str)->len += 1; RESIZE_CAPA(str, RSTRING(str)->len); } - RSTRING(str)->ptr[idx] = NUM2INT(val) & 0xff; + RSTRING(str)->ptr[idx] = FIX2INT(val) & 0xff; } else { rb_str_splice(str, idx, 1, val); |
