• morrowind@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    1 year 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)?