summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-19 11:00:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-19 11:00:33 +0000
commit926fd9a939e82e22302a95769fac0dacd294f134 (patch)
tree6931f51273b248f89d3630457ec58a94e23a6a81
parent596154321886b1936de2cfe42e46743fdbd0eefc (diff)
* lib/resolv.rb (Resolv::Config.default_config_hash): return an
empty hash when resolv.conf is not available. [ruby-core:27620] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/resolv.rb2
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 290f71d7b4..a5da8aa2eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
-Tue Jan 19 19:58:26 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Jan 19 20:00:30 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/resolv.rb (Resolv::Config.default_config_hash): return an
+ empty hash when resolv.conf is not available. [ruby-core:27620]
* lib/resolv.rb (Resolv::DNS::Config#lazy_initialize): fixed the
defaults of nameserver and port.
diff --git a/lib/resolv.rb b/lib/resolv.rb
index cf1a1b9a75..b9bb536c2e 100644
--- a/lib/resolv.rb
+++ b/lib/resolv.rb
@@ -850,7 +850,7 @@ class Resolv
config_hash[:search] = [search].flatten if search
end
end
- config_hash
+ config_hash || {}
end
def lazy_initialize