What Is It (in Ruby 3.4)? - Kevin Murphy
17-Jan-2025 14
An explanation of the it block parameter introduced in Ruby 3.4The block we pass to map does not define a name for the parameter to represent the variable we’re manipulating in each iteration. Instead, Ruby knows it refers to that variable.
Starting in Ruby 2.7, we had access to numbered parameters in a block with an underscore. We can write that same example using numbered parameters.
What Is It (in Ruby 3.4)? - Kevin Murphy #ruby #rubydeveloper #rubyonrails #3.4)? #Kevin #Murphy https://rubyonrails.ba/link/what-is-it-in-ruby-3-4-kevin-murphy