path: root/doc/syntax
AgeCommit message (Collapse)Author
12 hoursEnhanced RDoc for literals.rdoc (#5213)Burdette Lamar
Makes link targets among percent literals. Adds links to those targets. Adds examples to percent literals. Links from opening summary list to corresponding sections. Notes: Merged-By: BurdetteLamar <>
4 daysAdding links to literals and Kernel (#5192)Burdette Lamar
* Adding links to literals and Kernel Notes: Merged-By: BurdetteLamar <>
10 daysEnhanced RDoc for numeric.c (#5184)Burdette Lamar
Adds remarks about literals and Kernel methods to Float and Integer. Notes: Merged-By: BurdetteLamar <>
2021-11-18Anonymous block forwarding allows a method to forward a passedJeremy Evans
block to another method without having to provide a name for the block parameter. Implements [Feature #11256] Co-authored-by: Yusuke Endoh Co-authored-by: Nobuyoshi Nakada Notes: Merged:
2021-10-30Clarify docs about magic comments placementPeter Leitzen
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. Notes: Merged:
2021-08-19Allow omission of parentheses in one line pattern matching [Feature #16182]Kazuki Tsujimoto
2021-07-17One-line pattern matching is no longer experimentalKazuki Tsujimoto
2021-07-15Add pattern matching pin support for instance/class/global variablesJeremy Evans
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] Notes: Merged:
2021-05-20Remove extra word in heredoc documentationJeremy Evans
From Thibault Jouan Fixes [Misc #17872]
2021-05-11Update keyword argument description in method syntax guideJeremy Evans
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.
2021-04-25[Doc] Fix a typo s/invokations/invocations/wonda-tea-coffee
Notes: Merged:
2021-03-21Pattern matching pin operator against expression [Feature #17411]Kazuki Tsujimoto
This commit is based on the patch by @nobu.
2021-03-13[Doc] Fix multiple `Magic Comments` exampleKenichi Kamiya
[ci skip] Notes: Merged:
2020-12-26methods.rdoc: Improve method definition documentationMarcus Stollsteimer
* 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
2020-12-26methods.rdoc: Clarify "currently" means "in 2.7" hereMarcus Stollsteimer
2020-12-25Update method definition documentationzverok
* Add endless methods * Add argument forwarding ... Notes: Merged:
2020-12-25Adjusted the heading level of "Block Arguments" [ci skip]Nobuyoshi Nakada
2020-12-24doc/syntax/pattern_matching.rdoc: fix typos, grammar, styleMarcus Stollsteimer
2020-12-24Tweak magic comments [doc]Marc-Andre Lafortune
2020-12-24remove redundant example.Koichi Sasada
pointed by @marcandre.
2020-12-24shareable_constant_value: experimental_copyKoichi Sasada
"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. Notes: Merged:
2020-12-23Small improvements in magic comments docsMarcus Stollsteimer
* remove a duplicate statement * fix rdoc markup * fix typos
2020-12-23Document shareable_constant_value and other magic constants [doc]Marc-Andre Lafortune
2020-12-23Fix a message in example codeKazuki Tsujimoto
Thanks to @zverok for the report.
2020-12-22Update documentation for pattern matchingKazuki Tsujimoto
2020-12-20Fix markups and indentationKazuki Tsujimoto
2020-12-20Fix typosKazuki Tsujimoto
2020-12-20Update documentation for pattern matchingKazuki Tsujimoto
2020-12-13Reintroduce `expr in pat` [Feature #17371]Kazuki Tsujimoto
2020-11-30-> creates a lambda so this updates the documentation to reflect thatJames Koenig
Notes: Merged:
2020-11-01Pattern matching is no longer experimentalKazuki Tsujimoto
2020-10-12Respectively, instead of respentivelyVictor Goff
Notes: Merged:
2020-09-29doc/syntax/literals.rdoc: explain `#@@foo` too [ci skip]Nobuyoshi Nakada
2020-09-29doc/syntax/literals.rdoc: explain `#@foo` and `#$foo`Yusuke Endoh
2020-07-10Clarify behavior of super in method in module included in refinement [ci skip]Jeremy Evans
Fixes [Bug #16977]
2020-05-15[ci skip] Rdoc enhancements for Array (#3063)Burdette Lamar
* Per @nobu review * Rdoc enhancements for Array * Responses to review Notes: Merged-By: drbrain <>
2020-04-17Removed NIL/TRUE/FALSE from documents tooKazuhiro NISHIYAMA
This is follow up of 62554ca97812b454e78a0a9daf6e962ff7a2f589
2020-04-05Fix typosKazuki Tsujimoto
2020-04-04Enhance pattern matching introductionzverok
Notes: Merged:
2020-03-06Document defined? and global_variables handling of regexp global variables ↵Jeremy Evans
[ci skip] Fixes [Bug #11304]
2020-02-24Add pattern matching documentationzverok
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. Notes: Merged:
2020-01-17Update documentation for Array/Hash Argument section of methods.rdocAdam Isom
Notes: Merged:
2019-12-31Redmine /projects/ruby-trunk is now redirectedTakashi Kokubun
to /projects/ruby-master
2019-12-24[DOC] Fix typoMarcus Stollsteimer
2019-12-23Fix typos of previous docs PRzverok
In #2612 I made two typos (extra ,, and copy-pasted same line of code instead of showing two different ones), fixing them. Notes: Merged:
2019-12-22Update private visibility explanationzverok
Notes: Merged:
2019-12-20Fixed misspellingsNobuyoshi Nakada
Fixed misspellings reported at [Bug #16437], only in ruby and rubyspec.
2019-10-26Documentation improvements for Ruby corezverok
* Top-level `return`; * Documentation for comments syntax; * `rescue` inside blocks; * Enhance `Object#to_enum` docs; * Make `chomp:` option more obvious for `String#each_line` and `#lines`; * Enhance `Proc#>>` and `#<<` docs; * Enhance `Processs` class docs. Notes: Merged:
2019-10-10Document the difference between expressions and statements [ci skip]Jeremy Evans
In the grammar, all expressions are statements, but not all statements are expressions. Some parts of the grammar accept expressions and not other types of statements, which causes similar looking code to parse differently due to operator precedence. Mostly from Dan0042 (Daniel DeLorme). Fixes [Bug #16092]
2019-10-03Add documentation regarding keyword argument separation [ci skip]Jeremy Evans