1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

11 commits

Author SHA1 Message Date
aycabta
ecc627b20a Improve safe navigation operator's docs [Misc #15109]
* doc/syntax/calling_methods.rdoc: Add Safe navigation operator section.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20 10:57:33 +00:00
hsbt
8f8f92b508 * doc/syntax/calling_methods.rdoc: fix old operator for safe navigation
operator. [ci skip][fix GH-1182] Patch by @dougo

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-30 11:26:09 +00:00
hsbt
4f94cb43fc * doc/syntax/*.rdoc: separated modifier at sentence.
[ci skip][fix GH-1121] Patch by @clandry94

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-18 03:39:49 +00:00
knu
1b5dce5a4e * NEWS: [DOC] In the new safe call syntax, arguments are evaluated
only if a call is made.

* doc/syntax/calling_methods.rdoc: Fix a typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 16:53:41 +00:00
nobu
a356fe1c35 Safe navigation operator
* compile.c (iseq_peephole_optimize): peephole optimization for
  branchnil jumps.
* compile.c (iseq_compile_each): generate save navigation operator
  code.
* insns.def (branchnil): new opcode to pop the tos and branch if
  it is nil.
* parse.y (NEW_QCALL, call_op, parser_yylex): parse token '.?'.
  [Feature #11537]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 06:30:12 +00:00
hsbt
23b9356a0e * doc/syntax/calling_methods.rdoc: Fix documentation for "calling_methods"
Patch by @sos4nt [fix GH-830][ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-17 02:04:02 +00:00
drbrain
dbcf20069a * doc/syntax/calling_methods.rdoc: Added a Method Lookup section.
* doc/syntax/refinements.rdoc (Method Lookup):  Clarified that
  refinement methods are looked up in classes, not instances.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-24 07:54:45 +00:00
drbrain
4cf9fa309d * doc/syntax/calling_methods.rdoc: Link to defining methods.
* doc/syntax/methods.rdoc:  Link to calling methods, fixed typo.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-15 18:29:05 +00:00
drbrain
ec2bdfc763 * doc/syntax/calling_methods.rdoc (Arguments): Added improved
introduction to arguments including passing style and lazy
  evaluation.  Thanks to Matt Aimonetti.
* doc/syntax/calling_methods.rdoc (Positional Arguments):  Added
  description for sending a message to a method with *arguments
* doc/syntax/calling_methods.rdoc (Default Positional Arguments):
  Added description.  Thanks to Andy Lindeman.
* doc/syntax/calling_methods.rdoc (Block Local Arguments):
  Added description of block locals.  Thanks to Justin Collins.
* doc/syntax/calling_methods.rdoc (Hash to Keyword Arguments):  Added
  section describing ** operator.  Thanks  to Justin Collins.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-15 02:48:49 +00:00
drbrain
17bc951fc5 * doc/syntax/calling_methods.rdoc (Receiver): Added :: as pointed out
by Tony Arcieri
* doc/syntax/calling_methods.rdoc (Block Argument):  Fixed { } block
  examples as pointed out by David Copeland.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-15 00:29:56 +00:00
drbrain
c3319d991a * doc/syntax/calling_methods.rdoc: Added document describing method
calls.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-14 23:56:47 +00:00