1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-05 14:27:51 +02:00

Merge pull request #1373 from kalebdavis/patch-1

Update ruby.html.markdown
This commit is contained in:
Levi Bostian
2015-10-09 10:02:33 -05:00

View File

@@ -106,8 +106,14 @@ placeholder = 'use string interpolation'
'hello ' + 3 #=> TypeError: can't convert Fixnum into String 'hello ' + 3 #=> TypeError: can't convert Fixnum into String
'hello ' + 3.to_s #=> "hello 3" 'hello ' + 3.to_s #=> "hello 3"
# print to the output # print to the output with a newline at the end
puts "I'm printing!" puts "I'm printing!"
#=> I'm printing!
#=> nil
# print to the output without a newline
print "I'm printing!"
#=> I'm printing! => nill
# Variables # Variables
x = 25 #=> 25 x = 25 #=> 25