Merge pull request #421 from masamitsu-murase/modify_puts

`puts` should print "\n" only when the argument does not end with "\n".
This commit is contained in:
Yukihiro "Matz" Matsumoto
2012-08-12 12:16:31 -07:00
+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