[前][次][番号順一覧][スレッド一覧]

ruby-changes:26804

From: drbrain <ko1@a...>
Date: Thu, 17 Jan 2013 10:22:04 +0900 (JST)
Subject: [ruby-changes:26804] drbrain:r38856 (trunk): * doc/syntax/miscellaneous.rdoc: Added Ending an Expression and

drbrain	2013-01-17 10:21:28 +0900 (Thu, 17 Jan 2013)

  New Revision: 38856

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38856

  Log:
    * doc/syntax/miscellaneous.rdoc:  Added Ending an Expression and
      indentation.

  Modified files:
    trunk/ChangeLog
    trunk/doc/syntax/miscellaneous.rdoc

Index: doc/syntax/miscellaneous.rdoc
===================================================================
--- doc/syntax/miscellaneous.rdoc	(revision 38855)
+++ doc/syntax/miscellaneous.rdoc	(revision 38856)
@@ -1,5 +1,21 @@ https://github.com/ruby/ruby/blob/trunk/doc/syntax/miscellaneous.rdoc#L1
 = 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
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38855)
+++ ChangeLog	(revision 38856)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Jan 17 10:21:05 2013  Eric Hodel  <drbrain@s...>
+
+	* doc/syntax/miscellaneous.rdoc:  Added Ending an Expression and
+	  indentation.
+
 Thu Jan 17 09:30:21 2013  Eric Hodel  <drbrain@s...>
 
 	* lib/rubygems/installer.rb:  Untaint string when checking output

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]