# File lib/highline.rb, line 620 def say( statement ) statement = format_statement(statement) return unless statement.length > 0 out = (indentation+statement).encode(Encoding.default_external, { :undef => :replace } ) # Don't add a newline if statement ends with whitespace, OR # if statement ends with whitespace before a color escape code. if /[ \t](\e\[\d+(;\d+)*m)?\Z/ =~ statement @output.print(out) @output.flush else @output.puts(out) end end