Ruby Hash: Extract First Key-Value Pair
Ruby Hash: Extract First Key-Value Pair: a task in Terminal-Lego-15k (Harbor dataset). In Ruby, hashes maintain insertion order (since Ruby 1.9). Your task is to write a Ruby program that demonstrates how to extract the first key-value pair from a hash and return it as a new hash.
The task
In Ruby, hashes maintain insertion order (since Ruby 1.9). Your task is to write a Ruby program that demonstrates how to extract the first key-value pair from a hash and return it as a new hash.
Part of PrimeIntellect/Terminal-Lego-15k.