summaryrefslogtreecommitdiff
path: root/doc/syntax
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-17 01:21:28 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-17 01:21:28 +0000
commit66013dc6d071f432fc6a1902f8e0d16abb08aa5a (patch)
treeb480fbb40908b3333d314b3663cc6baccb3bdb1d /doc/syntax
parent219e1566876c2a6996b88728eb558691d5c77459 (diff)
* doc/syntax/miscellaneous.rdoc: Added Ending an Expression and
indentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'doc/syntax')
-rw-r--r--doc/syntax/miscellaneous.rdoc16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/syntax/miscellaneous.rdoc b/doc/syntax/miscellaneous.rdoc
index 409afc7..cb5865f 100644
--- a/doc/syntax/miscellaneous.rdoc
+++ b/doc/syntax/miscellaneous.rdoc
@@ -1,5 +1,21 @@
= Miscellaneous Syntax
+== Ending an Expression
+
+Ruby uses a newline as the end of an expression. When ending a line with an
+operator, open parentheses, comma, etc. the expression will continue.
+
+You can end an expression with a <code>;</code> (semicolon). Semicolons are
+most frequently used with <code>ruby -e</code>.
+
+== Indentation
+
+Ruby does not require any indentation. Typically ruby programs are indented
+two spaces.
+
+If you run ruby with warnings enabled and have an indentation mis-match you
+will receive a warning.
+
== +alias+
The +alias+ keyword is most frequently used to alias methods. When aliasing a