mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-07-31 20:10:49 +02:00
Update error output in ruby.md (#5321)
This commit is contained in:
2
ruby.md
2
ruby.md
@@ -118,7 +118,7 @@ placeholder = 'use string interpolation'
|
||||
|
||||
# You can combine strings using `+`, but not with other types
|
||||
'hello ' + 'world' #=> "hello world"
|
||||
'hello ' + 3 #=> TypeError: can't convert Fixnum into String
|
||||
'hello ' + 3 #=> TypeError: no implicit conversion of Integer into String
|
||||
'hello ' + 3.to_s #=> "hello 3"
|
||||
"hello #{3}" #=> "hello 3"
|
||||
|
||||
|
Reference in New Issue
Block a user