News for hackers. Stuff that matters.
Re:News for Ruby 3.2.0 by the-alchemist on Friday December 23, 2022 @08:40PM (#34112921)
Yeah, that's strange to me too. In Clojure (similar conceptual mode with Ruby, with sequences, hashes, etc.), the code is very similar, with predictable results:

  Clojure 1.11.1
  user=> (first [])
    nil
  user=> (first {})
    nil
  user=> (last [])
    nil
  user=> (last {})
    nil
  user=>
Re:News for Ruby 3.2.0 by anamexis on Saturday December 24, 2022 @12:53AM (#34114396)
Well sure, but what about non-empty collections? How are hashes ordered?
Re:News for Ruby 3.2.0 by LesZedCB on Saturday December 24, 2022 @01:10AM (#34114460)

    Clojure 1.11.1
    user=> (first {:one 1 :two 2})
    [:one 1]
    user=> (last {:one 1 :two 2})
    [:two 2]