summaryrefslogtreecommitdiffstats
path: root/lib/puppet/indirector
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/indirector')
-rw-r--r--lib/puppet/indirector/indirection.rb2
-rw-r--r--lib/puppet/indirector/ldap.rb2
-rw-r--r--lib/puppet/indirector/request.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/indirector/indirection.rb b/lib/puppet/indirector/indirection.rb
index 89235f356..8eaaf26d6 100644
--- a/lib/puppet/indirector/indirection.rb
+++ b/lib/puppet/indirector/indirection.rb
@@ -77,7 +77,7 @@ class Puppet::Indirector::Indirection
def doc
text = ""
- text += scrub(@doc) + "\n\n" if defined?(@doc) and @doc
+ text += scrub(@doc) + "\n\n" if @doc
if s = terminus_setting()
text += "* **Terminus Setting**: #{terminus_setting}"
diff --git a/lib/puppet/indirector/ldap.rb b/lib/puppet/indirector/ldap.rb
index 0b95b6ee0..3ccb21d52 100644
--- a/lib/puppet/indirector/ldap.rb
+++ b/lib/puppet/indirector/ldap.rb
@@ -61,7 +61,7 @@ class Puppet::Indirector::Ldap < Puppet::Indirector::Terminus
# Create an ldap connection.
def connection
- unless defined?(@connection) and @connection
+ unless @connection
raise Puppet::Error, "Could not set up LDAP Connection: Missing ruby/ldap libraries" unless Puppet.features.ldap?
begin
conn = Puppet::Util::Ldap::Connection.instance
diff --git a/lib/puppet/indirector/request.rb b/lib/puppet/indirector/request.rb
index 898722fd6..32494e18c 100644
--- a/lib/puppet/indirector/request.rb
+++ b/lib/puppet/indirector/request.rb
@@ -21,7 +21,7 @@ class Puppet::Indirector::Request
end
def environment
- @environment = Puppet::Node::Environment.new() unless defined?(@environment) and @environment
+ @environment = Puppet::Node::Environment.new() unless @environment
@environment
end