summaryrefslogtreecommitdiffhomepage
path: root/ruby.html.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.html.markdown')
-rw-r--r--ruby.html.markdown13
1 files changed, 11 insertions, 2 deletions
diff --git a/ruby.html.markdown b/ruby.html.markdown
index d77672ab..376f4a47 100644
--- a/ruby.html.markdown
+++ b/ruby.html.markdown
@@ -23,6 +23,15 @@ contributors:
```ruby
# This is a comment
+=begin
+This is a multi-line comment.
+The beginning line must start with "=begin"
+and the ending line must start with "=end".
+
+You can do this, or start each line in
+a multi-line comment with the # character.
+=end
+
# In Ruby, (almost) everything is an object.
# This includes numbers...
3.class #=> Integer
@@ -247,7 +256,7 @@ else
'else, also optional'
end
-# If a condition controls invokation of a single statement rather than a block of code
+# If a condition controls invocation of a single statement rather than a block of code
# you can use postfix-if notation
warnings = ['Patronimic is missing', 'Address too short']
puts("Some warnings occurred:\n" + warnings.join("\n")) if !warnings.empty?
@@ -410,7 +419,7 @@ def guests(&block)
end
# The 'call' method on the Proc is similar to calling 'yield' when a block is
-# present. The arguments passed to 'call' will be forwarded to the block as arugments.
+# present. The arguments passed to 'call' will be forwarded to the block as arguments.
guests { |n| "You have #{n} guests." }
# => "You have 4 guests."