diff options
author | svn <svn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-20 10:20:53 +0000 |
---|---|---|
committer | svn <svn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-20 10:20:53 +0000 |
commit | 26f53214a8d4d79d21e3f5c1f343dcdf7a8c99ca (patch) | |
tree | a816cd299e27c235a5a6025b54488e9b131df8e2 | |
parent | 00ecff9f7858c1039089525ea5154d0a4e785860 (diff) |
* expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | vm_insnhelper.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 3f09991ba2..98828c1231 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -976,13 +976,13 @@ vm_getivar(VALUE obj, ID id, IC ic, struct rb_call_cache *cc, int is_attr) if (index < ROBJECT_NUMIV(obj)) { val = ROBJECT_IVPTR(obj)[index]; } - if (!is_attr) { - ic->ic_value.index = index; - ic->ic_serial = RCLASS_SERIAL(RBASIC(obj)->klass); - } - else { /* call_info */ - cc->aux.index = (int)index + 1; - } + if (!is_attr) { + ic->ic_value.index = index; + ic->ic_serial = RCLASS_SERIAL(RBASIC(obj)->klass); + } + else { /* call_info */ + cc->aux.index = (int)index + 1; + } } } } @@ -1031,10 +1031,10 @@ vm_setivar(VALUE obj, ID id, VALUE val, IC ic, struct rb_call_cache *cc, int is_ struct st_table *iv_index_tbl = ROBJECT_IV_INDEX_TBL(obj); if (iv_index_tbl && st_lookup(iv_index_tbl, (st_data_t)id, &index)) { - if (!is_attr) { - ic->ic_value.index = index; - ic->ic_serial = RCLASS_SERIAL(klass); - } + if (!is_attr) { + ic->ic_value.index = index; + ic->ic_serial = RCLASS_SERIAL(klass); + } else if (index >= INT_MAX) { rb_raise(rb_eArgError, "too many instance variables"); } |