mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
219e156687
commit
66013dc6d0
2 changed files with 21 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Jan 17 10:21:05 2013 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* doc/syntax/miscellaneous.rdoc: Added Ending an Expression and
|
||||
indentation.
|
||||
|
||||
Thu Jan 17 09:30:21 2013 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* lib/rubygems/installer.rb: Untaint string when checking output
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue