Project

General

Profile

« Previous | Next » 

Revision 214eecd3

Added by Eric Wong almost 9 years ago

resolv: use safe navigation operator to avoid extra hash lookups

@addr2name is a private Hash and never changes its default_proc,
so only pay the hash lookup cost once; we know missing entries
in the hash will be nil.

  • lib/resolv.rb (each_name): use safe navigation operator

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e