• morrowind@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    10 months ago
    for item in array do
      puts item[:name]
    end
    

    What’s with the weird syntax, isn’t idiomatic ruby

    array.each do |item|
      puts item[:name]
    end
    

    (or the shorthand version)?