diff options
author | sersut <serdar@opscode.com> | 2014-01-14 13:35:21 -0800 |
---|---|---|
committer | sersut <serdar@opscode.com> | 2014-01-14 13:35:21 -0800 |
commit | 589b127b61264cf52e64e17236d87077a4aaa144 (patch) | |
tree | d823551fa760a2e0f7e9d6397b19b6f62ac6027f | |
parent | eabfceba44dfd506de78a0a90310a7a23e46863a (diff) | |
download | ohai-589b127b61264cf52e64e17236d87077a4aaa144.tar.gz |
Make sure the file_path is passed to eval.
-rw-r--r-- | lib/ohai/loader.rb | 2 |
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 |