]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/chef/libraries/edit_file.rb
Make deferring of edit_file work properly
[chef.git] / cookbooks / chef / libraries / edit_file.rb
index 9048da84e6c54305e1bc461af45ff46844a3a153..8a04a8090f3e45ce03a13e71bbba768d9b945376 100644 (file)
@@ -1,11 +1,15 @@
 class Chef
   class Util
 class Chef
   class Util
-    class EditedFile < String
+    class EditedFile
       def initialize(file, block)
         @file = file
         @block = block
       end
 
       def initialize(file, block)
         @file = file
         @block = block
       end
 
+      def kind_of?(klass)
+        klass == String || super
+      end
+
       def to_s
         ::File.new(@file).collect do |line|
           line = @block.call(line)
       def to_s
         ::File.new(@file).collect do |line|
           line = @block.call(line)