rakelib/02-test.rake
# NOTE: avoid TypeError: String can't be coerced into Fixnum
# due this method getting some strings == [ 1 ] argument ...
avoid TypeError: String can't be coerced into Fixnum
due this method getting some strings == [ 1 ] argument
avoid TypeError : String can ' t be coerced into Fixnum due this method getting some strings == [ 1 ] argument
def trace_on(out, *strings)
    sep = $\ || "\n"
    if strings.empty?
      output = sep
    else
      output = strings.map { |s|
        next if s.nil?; s = s.to_s
        s =~ /#{sep}$/ ? s : s + sep
      }.join
    end
    out.print(output)
  end
def trace_on ( out , * strings ) sep = $\ || "\n" if strings . empty? output = sep else output = strings . map { | s | next if s . nil? ; s = s . to_s s =~ / #{ sep } $ / ? s : s + sep } . join end out . print ( output ) end
NOTE: avoid TypeError: String can't be coerced into Fixnum
due this method getting some strings == [ 1 ] argument ...
NOTE : avoid TypeError : String can ' t be coerced into Fixnum due this method getting some strings == [ 1 ] argument ...
out
strings