From: Kristoph Date: 2007-10-20T08:15:02+09:00 Subject: capture code in a block Greetings, How might I capture the code in a block so that I can serialize it for later use? So for example ... file = CodeFile.new( 'something.rb') file.capture do puts 'Hello World' end ... which prompts a file to be created with ... puts 'Hello World' Any thoughts how this might be accomplished? ]{