X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=lib%2Fredact%2Fprogram.rb;h=2342b53a4fa5f90549625472c4d8f88f581756ec;hb=da6a7a4135192be1eb7b31a7f4a6aba9a4b6bf83;hp=a77536748aab2b036a9729dd6e33977d29acef77;hpb=e6589624744430b826a27a71e3d4894516969fb3;p=redact.git diff --git a/lib/redact/program.rb b/lib/redact/program.rb index a775367..2342b53 100644 --- a/lib/redact/program.rb +++ b/lib/redact/program.rb @@ -1,5 +1,5 @@ #-- -# $Id: program.rb 28 2005-04-14 19:53:45Z tilman $ +# $Id: program.rb 71 2005-09-21 16:00:31Z tilman $ # # Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de) # @@ -181,8 +181,8 @@ module Redact super @type = TYPE_EMIT_SIGNAL - @emission_signal = nil - @emission_source = nil + @emission_signal = "" + @emission_source = "" end def emission_signal=(v) @@ -212,7 +212,8 @@ module Redact end def script=(v) - @script = v.to_str.dup + v = v.to_str + @script = (File.exist?(v) ? File.read(v) : v).dup end end