Updated mcollective.init according to OSCI-658
[packages/precise/mcollective.git] / spec / monkey_patches / instance_variable_defined.rb
diff --git a/spec/monkey_patches/instance_variable_defined.rb b/spec/monkey_patches/instance_variable_defined.rb
new file mode 100644 (file)
index 0000000..e090327
--- /dev/null
@@ -0,0 +1,7 @@
+unless Object.respond_to?("instance_variable_defined?")
+  class Object
+    def instance_variable_defined?(meth)
+      instance_variables.include?(meth)
+    end
+  end
+end