summaryrefslogtreecommitdiff
path: root/doc/syntax/pattern_matching.rdoc
diff options
context:
space:
mode:
-rw-r--r--doc/syntax/pattern_matching.rdoc8
1 files changed, 7 insertions, 1 deletions
@@ -422,7 +422,8 @@ These core and library classes implement deconstruction:
== Guard clauses
-+if+ can be used to attach an additional condition (guard clause) when the pattern matches. This condition may use bound variables:
case [1, 2]
in a, b if b == a*2
@@ -450,6 +451,11 @@ These core and library classes implement deconstruction:
end
#=> "matched"
== Appendix A. Pattern syntax
Approximate syntax is: