mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Remove redundant conditions of Array#each in ruby extension
This commit is contained in:
+2
-4
@@ -15,10 +15,8 @@ class Array
|
||||
idx, length = -1, self.length-1
|
||||
while idx < length and length <= self.length and length = self.length-1
|
||||
elm = self[idx += 1]
|
||||
unless elm
|
||||
if elm.nil? and length >= self.length
|
||||
break
|
||||
end
|
||||
if elm.nil? and length >= self.length
|
||||
break
|
||||
end
|
||||
block.call(elm)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user