aboutsummaryrefslogtreecommitdiffstats
path: root/doc/syntax
Commit message (Collapse)AuthorAgeFilesLines
* Quick markup fixAlexey Mostovoy2022-05-121-4/+4
|
* [DOC] mention assignment expression valuesNobuyoshi Nakada2022-04-251-0/+6
|
* More details for Rational literals (#5840)Burdette Lamar2022-04-241-7/+28
|
* More details for regexp literals (#5800)Burdette Lamar2022-04-141-12/+22
|
* [DOC] Refine flip-flopNobuyoshi Nakada2022-03-241-13/+13
|
* [DOC] Prefer the original file names over generated namesNobuyoshi Nakada2022-02-091-1/+1
| | | | | Should also the label in an explicit `rdoc-ref:` link be converted in the future?
* Add support for anonymous rest and keyword rest argument forwardingJeremy Evans2021-12-301-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows for the following syntax: ```ruby def foo(*) bar(*) end def baz(**) quux(**) end ``` This is a natural addition after the introduction of anonymous block forwarding. Anonymous rest and keyword rest arguments were already supported in method parameters, this just allows them to be used as arguments to other methods. The same advantages of anonymous block forwarding apply to rest and keyword rest argument forwarding. This has some minor changes to #parameters output. Now, instead of `[:rest], [:keyrest]`, you get `[:rest, :*], [:keyrest, :**]`. These were already used for `...` forwarding, so I think it makes it more consistent to include them in other cases. If we want to use `[:rest], [:keyrest]` in both cases, that is also possible. I don't think the previous behavior of `[:rest], [:keyrest]` in the non-... case and `[:rest, :*], [:keyrest, :**]` in the ... case makes sense, but if we did want that behavior, we'll have to make more substantial changes, such as using a different ID in the ... forwarding case. Implements [Feature #18351]
* [DOC] Add documentation for hash value omission syntaxVictor Shepelev2021-12-202-0/+26
|
* Enhanced RDoc for literals.rdoc (#5213)Burdette Lamar2021-12-061-36/+118
| | | | | | | Makes link targets among percent literals. Adds links to those targets. Adds examples to percent literals. Links from opening summary list to corresponding sections.
* Adding links to literals and Kernel (#5192)Burdette Lamar2021-12-031-21/+23
| | | | * Adding links to literals and Kernel
* Enhanced RDoc for numeric.c (#5184)Burdette Lamar2021-11-271-10/+14
| | | Adds remarks about literals and Kernel methods to Float and Integer.
* Anonymous block forwarding allows a method to forward a passedJeremy Evans2021-11-181-1/+8
| | | | | | | | | | block to another method without having to provide a name for the block parameter. Implements [Feature #11256] Co-authored-by: Yusuke Endoh mame@ruby-lang.org Co-authored-by: Nobuyoshi Nakada nobu@ruby-lang.org
* Clarify docs about magic comments placementPeter Leitzen2021-10-301-3/+3
| | | | | | Magic comments like `frozen_string_literal` may appear everywhere within the first comment section while `encoding` have to be the first line, or second line after shebang.
* Allow omission of parentheses in one line pattern matching [Feature #16182]Kazuki Tsujimoto2021-08-191-1/+7
|
* One-line pattern matching is no longer experimentalKazuki Tsujimoto2021-07-171-1/+1
| | | | https://github.com/ruby/dev-meeting-log/blob/master/DevelopersMeeting20210715Japan.md#feature-17724-make-the-pin-operator-support-instanceclassglobal-variables-jeremyevans0
* Add pattern matching pin support for instance/class/global variablesJeremy Evans2021-07-151-1/+31
| | | | | | | | | | | Pin matching for local variables and constants is already supported, and it is fairly simple to add support for these variable types. Note that pin matching for method calls is still not supported without wrapping in parentheses (pin expressions). I think that's for the best as method calls are far more complex (arguments/blocks). Implements [Feature #17724]
* Remove extra word in heredoc documentationJeremy Evans2021-05-201-1/+1
| | | | | | From Thibault Jouan Fixes [Misc #17872]
* Update keyword argument description in method syntax guideJeremy Evans2021-05-111-77/+9
| | | | | | | Remove discussion of Ruby 2.7 specific handling of keyword argument separation. Add a small example of keyword to positional hash conversion for methods not accepting keyword arguments.
* [Doc] Fix a typo s/invokations/invocations/wonda-tea-coffee2021-04-251-1/+1
|
* Pattern matching pin operator against expression [Feature #17411]Kazuki Tsujimoto2021-03-211-0/+1
| | | | This commit is based on the patch by @nobu.
* [Doc] Fix multiple `Magic Comments` exampleKenichi Kamiya2021-03-131-1/+1
| | | | [ci skip]
* methods.rdoc: Improve method definition documentationMarcus Stollsteimer2020-12-261-18/+20
| | | | | | | * typos, grammar, formatting * use `concrete_method` again in `regular_method` example, to better distinguish from `forwarding_method` example * clarify that leading arguments before `...` require Ruby 3.0
* methods.rdoc: Clarify "currently" means "in 2.7" hereMarcus Stollsteimer2020-12-261-1/+1
|
* Update method definition documentationzverok2020-12-251-0/+86
| | | | | * Add endless methods * Add argument forwarding ...
* Adjusted the heading level of "Block Arguments" [ci skip]Nobuyoshi Nakada2020-12-251-1/+1
|
* doc/syntax/pattern_matching.rdoc: fix typos, grammar, styleMarcus Stollsteimer2020-12-241-23/+23
|
* Tweak magic comments [doc]Marc-Andre Lafortune2020-12-241-9/+9
|
* remove redundant example.Koichi Sasada2020-12-241-1/+0
| | | | pointed by @marcandre.
* shareable_constant_value: experimental_copyKoichi Sasada2020-12-241-5/+30
| | | | | | | "experimental_everything" makes the assigned value, it means the assignment change the state of assigned value. "experimental_copy" tries to make a deep copy and make copyied object sharable.
* Small improvements in magic comments docsMarcus Stollsteimer2020-12-231-13/+13
| | | | | | * remove a duplicate statement * fix rdoc markup * fix typos
* Document shareable_constant_value and other magic constants [doc]Marc-Andre Lafortune2020-12-231-0/+192
|
* Fix a message in example codeKazuki Tsujimoto2020-12-231-1/+1
| | | | Thanks to @zverok for the report.
* Update documentation for pattern matchingKazuki Tsujimoto2020-12-221-18/+37
|
* Fix markups and indentationKazuki Tsujimoto2020-12-201-8/+8
|
* Fix typosKazuki Tsujimoto2020-12-201-3/+3
|
* Update documentation for pattern matchingKazuki Tsujimoto2020-12-201-12/+88
|
* Reintroduce `expr in pat` [Feature #17371]Kazuki Tsujimoto2020-12-131-2/+10
|
* -> creates a lambda so this updates the documentation to reflect thatJames Koenig2020-11-301-1/+1
|
* Pattern matching is no longer experimentalKazuki Tsujimoto2020-11-011-48/+18
|
* Respectively, instead of respentivelyVictor Goff2020-10-121-1/+1
|
* doc/syntax/literals.rdoc: explain `#@@foo` too [ci skip]Nobuyoshi Nakada2020-09-291-2/+3
|
* doc/syntax/literals.rdoc: explain `#@foo` and `#$foo`Yusuke Endoh2020-09-291-0/+3
|
* Clarify behavior of super in method in module included in refinement [ci skip]Jeremy Evans2020-07-101-1/+2
| | | | Fixes [Bug #16977]
* [ci skip] Rdoc enhancements for Array (#3063)Burdette Lamar2020-05-151-1/+35
| | | | | | | * Per @nobu review * Rdoc enhancements for Array * Responses to review
* Removed NIL/TRUE/FALSE from documents tooKazuhiro NISHIYAMA2020-04-171-3/+0
| | | | This is follow up of 62554ca97812b454e78a0a9daf6e962ff7a2f589
* Fix typosKazuki Tsujimoto2020-04-051-2/+2
|
* Enhance pattern matching introductionzverok2020-04-041-27/+16
|
* Document defined? and global_variables handling of regexp global variables ↵Jeremy Evans2020-03-061-0/+30
| | | | | | [ci skip] Fixes [Bug #11304]
* Add pattern matching documentationzverok2020-02-242-1/+456
| | | | | | | | | Add separate doc/syntax/pattern_matching.rdoc, add link to control_expressions.rdoc. The documentation is "reverse-engineered" from Ruby 2.7 behavior and early preview presentations, and corrected by pattern-matching feature author @k-tsj.
* Update documentation for Array/Hash Argument section of methods.rdocAdam Isom2020-01-171-2/+13
|