Merge pull request #3047 from csouls/rafactor_array_ruby_extension

Remove redundant conditions of Array#each in ruby extension
This commit is contained in:
Yukihiro "Matz" Matsumoto
2015-12-16 01:03:20 +09:00
+2 -4
View File
@@ -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