var i = 0 [].each {|item| i = i + 1 } System.print(i) // expect: 0