mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-24 01:51:38 +00:00
Fix a missing character in the comment.
remove useless whitespace at the end of the lines.
This commit is contained in:
parent
991e7b0045
commit
6062618d35
@ -36,7 +36,7 @@ You shouldn't either
|
|||||||
# Arithmetic is just syntactic sugar
|
# Arithmetic is just syntactic sugar
|
||||||
# for calling a method on an object
|
# for calling a method on an object
|
||||||
1.+(3) #=> 4
|
1.+(3) #=> 4
|
||||||
10.* 5 #=> 50
|
10.* 5 #=> 50
|
||||||
|
|
||||||
# Special values are objects
|
# Special values are objects
|
||||||
nil # Nothing to see here
|
nil # Nothing to see here
|
||||||
@ -242,7 +242,7 @@ when 'D'
|
|||||||
puts "Scraping through"
|
puts "Scraping through"
|
||||||
when 'F'
|
when 'F'
|
||||||
puts "You failed!"
|
puts "You failed!"
|
||||||
else
|
else
|
||||||
puts "Alternative grading system, eh?"
|
puts "Alternative grading system, eh?"
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -252,7 +252,7 @@ def double(x)
|
|||||||
x * 2
|
x * 2
|
||||||
end
|
end
|
||||||
|
|
||||||
# Functions (and all blocks) implcitly return the value of the last statement
|
# Functions (and all blocks) implicitly return the value of the last statement
|
||||||
double(2) #=> 4
|
double(2) #=> 4
|
||||||
|
|
||||||
# Parentheses are optional where the result is unambiguous
|
# Parentheses are optional where the result is unambiguous
|
||||||
|
Loading…
Reference in New Issue
Block a user