diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-01-19 14:22:27 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-01-19 14:22:27 +0000 |
commit | d102ce6d09908fef31b2728abfa81de05aa4239b (patch) | |
tree | dc7913c0f26455b734eea5817356f240eaa20888 /array.c | |
parent | e664d467a92df0e7655c453c0eda9bc7fd1e1884 (diff) | |
download | ruby-d102ce6d09908fef31b2728abfa81de05aa4239b.tar.gz |
* eval.c (rb_eval): need not to clar method cache for NODE_CLASS,
NODE_SCLASS.
* gc.c (obj_free): need not to clear method cache on class/module
finalization.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -550,7 +550,8 @@ rb_ary_fetch(argc, argv, ary) idx += RARRAY(ary)->len; } if (idx < 0 || RARRAY(ary)->len <= idx) { - return ifnone; + if (argc == 2) return ifnone; + rb_raise(rb_eIndexError, "index %d out of array", idx); } return RARRAY(ary)->ptr[idx]; } |