summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsersut <serdar@opscode.com>2014-01-14 13:35:21 -0800
committersersut <serdar@opscode.com>2014-01-14 13:35:21 -0800
commit589b127b61264cf52e64e17236d87077a4aaa144 (patch)
treed823551fa760a2e0f7e9d6397b19b6f62ac6027f
parenteabfceba44dfd506de78a0a90310a7a23e46863a (diff)
downloadohai-589b127b61264cf52e64e17236d87077a4aaa144.tar.gz
Make sure the file_path is passed to eval.
-rw-r--r--lib/ohai/loader.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ohai/loader.rb b/lib/ohai/loader.rb
index 3716dd9d..879d7cac 100644
--- a/lib/ohai/loader.rb
+++ b/lib/ohai/loader.rb
@@ -165,7 +165,7 @@ For more information visit here: docs.opscode.com/ohai_custom.html")
end
def load_v7_plugin_class(contents, plugin_path)
- plugin_class = eval(contents, TOPLEVEL_BINDING)
+ plugin_class = eval(contents, TOPLEVEL_BINDING, plugin_path)
unless plugin_class.kind_of?(Class) and plugin_class < Ohai::DSL::Plugin
raise Ohai::Exceptions::IllegalPluginDefinition, "Plugin file cannot contain any statements after the plugin definition"
end