# File lib/main/program/instance_methods.rb, line 122
      def stdout= io
        unless(defined?(@stdout) and (@stdout == io))
          @stdout =
            if io.respond_to?('write')
              io
            else
              fd = open(io.to_s, 'w+')
              @finalizers.push(lambda{ fd.close })
              fd
            end
          begin
            STDOUT.reopen(@stdout)
          rescue
            $stdout = @stdout
            ::Object.const_set('STDOUT', @stdout)
          end
        end
      end