Ruby (programming language)
Ruby has been described as a multi-paradigm programming language: it allows procedural programming (defining functions/variables outside classes makes them part of the root, 'self' Object), with object orientation (everything is an object) or functional programming (it has anonymous functions, closures, and continuations; statements all have values, and functions return the last evaluation). It has support for introspection, reflection and metaprogramming, as well as support for interpreter-based threads. Ruby features dynamic typing, and supports parametric polymorphism.
Ruby (programming language)
On the first pass, the block receives 10 (the argument to inject) as codice_21, and 1 (the first element of the array) as codice_22. This returns 11, which then becomes codice_21 on the next pass. It is added to 3 to get 14, which is then added to 5 on the third pass, to finally return 19.