hsh.shift â anArray or obj
Instance Public methods
Removes a key-value pair from hsh and returns it as the two-item
array [ key, value ], or the hash's
default value if the hash is empty.
h = { 1 => "a", 2 => "b", 3 => "c" }
h.shift #=> [1, "a"]
h #=> {2=>"b", 3=>"c"}
Please login to continue.