puts should print "\n" only when the argument does not end with "\n".

This commit is contained in:
Masamitsu MURASE
2012-08-13 02:42:32 +09:00
parent 119b9f5bd5
commit 44b408ad10
+3 -2
View File
@@ -48,8 +48,9 @@ module Kernel
i = 0
len = args.size
while i < len
__printstr__ args[i].to_s
__printstr__ "\n"
s = args[i].to_s
__printstr__ s
__printstr__ "\n" if (s[-1] != "\n")
i += 1
end
__printstr__ "\n" if len == 0