There are some new Hash operators in Ruby 2.3:

Subset operators:

  • < - hash is a subset of other
  • <= - hash is a subset or equal to other
  • > - other is a subset of hash
  • >= - other is a subset or equal to hash


  • dig - “Extracts the nested value specified by the sequence of idx objects by calling dig at each step, returning nil if any intermediate step is nil.”
  • fetch_values - “Returns an array containing the values associated with the given keys but also raises KeyError when one of keys can’t be found. Also see Hash#values_at and Hash#fetch.”
  • to_proc - this isn’t documented, it seems