Each or each_pair yields key value pairs.

On 8 Mar. 2017 5:35 am, "Die Optimisten" <inform / die-optimisten.net> wrote:

> Hello
>
> Is there a method for directly getting [key, value]-pairs? (like .keys)
> hash.to_a seems to build the whole array before retuning.
>
> thanks
> Opti
>
>
>
>
> Unsubscribe: <mailto:ruby-talk-request / ruby-lang.org?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>
(supressed text/html)
Unsubscribe: <mailto:ruby-talk-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>