summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2015-08-12 12:11:43 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2015-08-12 12:11:43 +0900
commita1731254bee12c831ea1d509bf43520db1d0d9af (patch)
treec04c3c48908406c2aa5b243c1b31bbbeea39ffb9 /src
parent1fd9dca510c2c4d4a40e70543415c538dffbd190 (diff)
parentc7fad5aa33f77d1869d9b879c9f8aeb5e688d64c (diff)
downloadmruby-a1731254bee12c831ea1d509bf43520db1d0d9af.tar.gz
mruby-a1731254bee12c831ea1d509bf43520db1d0d9af.zip
Merge pull request #2913 from gkta/remove-duplicate-len-check
Remove duplicated RARRAY_LEN check in ary_elt
Diffstat (limited to 'src')
-rw-r--r--src/array.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/array.c b/src/array.c
index 0a99040c0..2622ee528 100644
--- a/src/array.c
+++ b/src/array.c
@@ -19,7 +19,6 @@
static inline mrb_value
ary_elt(mrb_value ary, mrb_int offset)
{
- if (RARRAY_LEN(ary) == 0) return mrb_nil_value();
if (offset < 0 || RARRAY_LEN(ary) <= offset) {
return mrb_nil_value();
}