A
Size: a a a
A
A
A
A
RV
YL
RV
RV
A
EB
Б
A
A
RG
puts "STRING * X = " + "#{string * x}"почему интерпретатор говорит, что нет подразумеваемого перевода из строки в интеджер?
K
K
puts "STRING * X = " + "#{string * x}"почему интерпретатор говорит, что нет подразумеваемого перевода из строки в интеджер?
K
K
RG
RG
print "STRING \u{2a2f} X = " + string + " \u2a2f " + x.to_s + " = " + (string + " ") * x
puts nil
puts nil
puts "WOW it WORKS!"
puts nil
puts "...and now, using revers of issue get us an error: String can't be coerced into Integer (TypeError)"
puts nil
puts "X \u{2a2f} STRING = " + x.to_s + " \u2a2f " + string + " = ...and we'll have seen:"
puts nil
begin
puts x * string
rescue
end
puts nil
puts "Объектно-ориентированный язык, однако!"
...and now, using revers of issue get us an error: String can't be coerced into Integer (TypeError)
X ⨯ STRING = 3 ⨯ Well = ...and we'll have seen:
Объектно-ориентированный язык, однако!
Traceback (most recent call last):
1: from Lesson04.rb:34:in `<main>'
Lesson04.rb:34:in `*': String can't be coerced into Integer (TypeError)