Is there an opposite function of slice function in Ruby? May 7, 2023 by Tarik Use except: a = {"foo" => 0, "bar" => 42, "baz" => 1024 } a.except("foo") # returns => {"bar" => 42, "baz" => 1024}