summaryrefslogtreecommitdiff
path: root/doc/syntax
AgeCommit message (Collapse)Author
2023-10-22[DOC] Mention the omission of a superclass when reopening a classKouhei Yanagita
2023-09-20doc: initial operators commitNicholas Browning
docs: expand on operator documentaion Include more specific details around logical operators. doc: update link with proper syntax doc: remove ambiguous language from operators doc doc: remove link to source code file doc: cleaning up some language, and removing some mistakes in understanding doc: revert example to prior state doc: fix spacing doc: Update doc/syntax/operators.rdoc align example with typical format Co-authored-by: Nobuyoshi Nakada <[email protected]> doc: Update doc/syntax/operators.rdoc align format of other examples with rest of documentation Co-authored-by: Nobuyoshi Nakada <[email protected]> Update doc/syntax/operators.rdoc align format of other examples with rest of documentation Co-authored-by: Nobuyoshi Nakada <[email protected]> doc: include `and` & `or` operators doc(operators): remove accute language
2023-07-18[DOC] Fix a magic comment in the section for `experimental_copy`Ivanov-Anton
Notes: Merged: https://github.com/ruby/ruby/pull/8087 Merged-By: nobu <[email protected]>
2023-06-29Fix broken wiki links (#8002)Jemma Issroff
Since [Misc #19679] migrated the wiki, these links should be updated to their new locations. Notes: Merged-By: jemmaissroff
2023-06-20[DOC] Regexp doc (#7923)Burdette Lamar
Notes: Merged-By: peterzhu2118 <[email protected]>
2023-05-26Document throw/catch in the control expressions document [ci skip]Jeremy Evans
This are implemented as Kernel methods and not keywords, but I still think they are worth documenting with the other control flow expressions. Notes: Merged: https://github.com/ruby/ruby/pull/7856 Merged-By: jeremyevans <[email protected]>
2023-03-19[Bug #19485] [DOC] Mention tabs in indentation of heredoc identifierNobuyoshi Nakada
Co-Authored-By: sawa (Tsuyoshi Sawada) <[email protected]> Notes: Merged: https://github.com/ruby/ruby/pull/7526
2023-02-19[DOC] Update pattern matching docs for 3.2zverok
* Remove section about experimental status * Add references to core objects that can deconstruct Notes: Merged: https://github.com/ruby/ruby/pull/7316
2023-02-15[DOC] Add an example of the splat operator with a non-array object (#7098)Kouhei Yanagita
Notes: Merged-By: hsbt <[email protected]>
2023-01-23[DOC] Change local method to local variable in assignment docsTalal Al-Humaidi
Notes: Merged: https://github.com/ruby/ruby/pull/7173 Merged-By: nobu <[email protected]>
2022-07-14Fix language describing protected methodsJeremy Evans
Fixes [Bug #18887]
2022-06-23Correct documentation for protected methods [ci skip]John Hawthorn
2022-05-12Quick markup fixAlexey Mostovoy
Notes: Merged: https://github.com/ruby/ruby/pull/5902
2022-04-25[DOC] mention assignment expression valuesNobuyoshi Nakada
2022-04-24More details for Rational literals (#5840)Burdette Lamar
Notes: Merged-By: BurdetteLamar <[email protected]>
2022-04-14More details for regexp literals (#5800)Burdette Lamar
Notes: Merged-By: BurdetteLamar <[email protected]>
2022-03-24[DOC] Refine flip-flopNobuyoshi Nakada
2022-02-09[DOC] Prefer the original file names over generated namesNobuyoshi Nakada
Should also the label in an explicit `rdoc-ref:` link be converted in the future?
2021-12-30Add support for anonymous rest and keyword rest argument forwardingJeremy Evans
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] Notes: Merged: https://github.com/ruby/ruby/pull/5148
2021-12-20[DOC] Add documentation for hash value omission syntaxVictor Shepelev
Notes: Merged: https://github.com/ruby/ruby/pull/5244 Merged-By: nobu <[email protected]>
2021-12-06Enhanced 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 <[email protected]>
2021-12-03Adding links to literals and Kernel (#5192)Burdette Lamar
* Adding links to literals and Kernel Notes: Merged-By: BurdetteLamar <[email protected]>
2021-11-27Enhanced RDoc for numeric.c (#5184)Burdette Lamar
Adds remarks about literals and Kernel methods to Float and Integer. Notes: Merged-By: BurdetteLamar <[email protected]>
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 [email protected] Co-authored-by: Nobuyoshi Nakada [email protected] Notes: Merged: https://github.com/ruby/ruby/pull/5051
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: https://github.com/ruby/ruby/pull/4985
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
https://github.com/ruby/dev-meeting-log/blob/master/DevelopersMeeting20210715Japan.md#feature-17724-make-the-pin-operator-support-instanceclassglobal-variables-jeremyevans0
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: https://github.com/ruby/ruby/pull/4502
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: https://github.com/ruby/ruby/pull/4409
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: https://github.com/ruby/ruby/pull/4264
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: https://github.com/ruby/ruby/pull/3997
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: https://github.com/ruby/ruby/pull/3989
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: https://github.com/ruby/ruby/pull/3828