Hash.each and hash.each_pair


#1

I looked at RDoc documentation.

It says “each_pair” method is marginally more efficient.

Do we need to abandon “each”? Do you use “each” or stick to “each_pair”?


#2

2008/12/18 Hunt J. removed_email_address@domain.invalid:

I looked at RDoc documentation.

It says “each_pair” method is marginally more efficient.

Do we need to abandon “each”? Do you use “each” or stick to “each_pair”?

I do not care.

Kind regards

robert


#3

I looked at RDoc documentation.

It says “each_pair” method is marginally more efficient.

Do we need to abandon “each”? Do you use “each” or stick to “each_pair”?

»each_pair« is the better name for what it’s doing and »each« is a
standard
name used by »for« and »Enumeration«.

mfg, simon … l