aboutsummaryrefslogtreecommitdiffstats
path: root/doc/syntax
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Redmine /projects/ruby-trunk is now redirectedTakashi Kokubun2019-12-311-1/+1
| | | | to /projects/ruby-master
* [DOC] Fix typoMarcus Stollsteimer2019-12-241-1/+1
|
* Fix typos of previous docs PRzverok2019-12-231-1/+1
| | | | | | In #2612 I made two typos (extra ,, and copy-pasted same line of code instead of showing two different ones), fixing them.
* Update private visibility explanationzverok2019-12-221-3/+35
|
* Fixed misspellingsNobuyoshi Nakada2019-12-201-1/+1
| | | | Fixed misspellings reported at [Bug #16437], only in ruby and rubyspec.
* Documentation improvements for Ruby corezverok2019-10-262-1/+45
| | | | | | | | | | | * 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.
* Document the difference between expressions and statements [ci skip]Jeremy Evans2019-10-102-3/+65
| | | | | | | | | | | | 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]
* Add documentation regarding keyword argument separation [ci skip]Jeremy Evans2019-10-032-1/+97
|
* Minor updates to methods and calling_methods documentation [ci skip]Jeremy Evans2019-10-032-24/+32
|
* [DOC] DOT is not a part of a receiver [ci skip]Nobuyoshi Nakada2019-09-201-1/+1
| | | | [Feature #11297] [Feature #16123]
* Update NEWS and documents [ci skip]Nobuyoshi Nakada2019-09-202-3/+4
| | | | [Feature #11297] [Feature #16123]
* Use the word heredocs in Here Documents docsOlivier Lacan2019-08-041-1/+1
| | | | | | | | | | | | | | | | Two advantages: - higher relevance of the extremely common word "heredocs" which may help people find this page when searching for "ruby heredocs" - the anchor link becomes `#label-Here+Documents+-28heredocs-29`, which is ugly due to the parentheses but includes the word "heredocs" in the URL to this section If anyone knows a way to prevent RDoc from turning invalid characters into ugly and meaningless ASCII codes, I'm listening. I don't want to break existing anchor links but RDoc should really ignore these characters or turn them into dashes. Closes: https://github.com/ruby/ruby/pull/2103
* Document use of ensure and else at method level [ci skip]Jeremy Evans2019-07-191-0/+22
|
* Remove section on performance advantage of not using a block parameter [ci skip]Jeremy Evans2019-07-191-5/+0
| | | | | Improvements in Ruby 2.5 and 2.6 make this section no longer accurate.
* Remove mention of Proc.new with implicit block [ci skip]Jeremy Evans2019-07-191-4/+0
| | | | This support is now deprecated and will be removed in Ruby 3.
* Document evaluation order of arguments [ci skip]Jeremy Evans2019-07-191-0/+19
| | | | Fixes [Misc #8905]
* Document required keyword argument syntax [ci skip]Jeremy Evans2019-07-191-0/+11
| | | | Fixes [Bug #8952]
* Improve wording of Local Variables and eval sectionJeremy Evans2019-06-251-7/+7
| | | | As pointed out by nobu, "defined" should be used instead of "assigned".
* * remove trailing spaces.git2019-06-261-1/+1
|
* Document local variable interactions with evalJeremy Evans2019-06-251-0/+22
| | | | Fixes [Bug #13337]
* Fix typoMarcus Stollsteimer2019-05-031-1/+1
|
* Disallow also CR in here-doc identifierNobuyoshi Nakada2019-04-291-1/+1
| | | | | | * parse.y (heredoc_identifier): CR in here-document identifier might or might not result in a syntax error, by the EOL code. make a syntax error regardless of the EOL code.
* parse.y: fix here-doc identifier with newlineNobuyoshi Nakada2019-04-291-0/+3
| | | | | | | | | | | | | | | * parse.y (heredoc_identifier): quoted here-document identifier must end within the same line. the only corner case that here-document identifier can contain a newline is that the closing qoute is placed at the beginning of the next line, and has been warned since 2.4. ```ruby <<"EOS " # warning: here document identifier ends with a newline EOS ```
* Introduce beginless range [Feature#14799]mame2019-04-031-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update refinements docstenderlove2019-01-101-4/+2
| | | | | | Co-Authored-By: Vladimir Dementyev <dementiev.vm@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Small improvement in refinements docsstomar2018-12-241-2/+2
| | | | | | | Move general statement about refinements of modules from example to the top of the document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* range.c: Documentation on endless ranges.marcandre2018-12-121-0/+1
| | | | | | Based on patch by Victor Shepelev [DOC] [#7552] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC] rational and imaginary literals [ci skip]nobu2018-11-171-0/+27
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Improve safe navigation operator's docs [Misc #15109]aycabta2018-10-201-4/+23
| | | | | | * 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
* [DOC] Refinements on modules are allowedhsbt2018-01-301-2/+1
| | | | | | From: Leo Correa <lcorr005@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix typos.hsbt2018-01-101-1/+1
| | | | | | | * doc/contributors.rdoc: pathces -> patches. * doc/syntax/refinements.rdoc: exmaple -> example. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* doc/syntax/refinements.rdoc: fix typosstomar2017-12-081-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Specify refinement inheritance by Module#include.shugo2017-12-031-0/+23
| | | | | | [ruby-core:79880] [Bug #13271] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* refinements.rdoc: improve docsstomar2017-11-071-3/+4
| | | | | | | * doc/syntax/refinements.rdoc: [DOC] fix typos and grammar and remove superfluous "for the first time". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* doc/syntax/methods.rdoc: fix a misleading examplerhe2017-10-221-3/+3
| | | | | | As a bonus, wrap a long line added by r60295. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2017-10-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Clarify return value for assignment methods.hsbt2017-10-211-1/+5
| | | | | | | | https://github.com/ruby/ruby/pull/1682 Patch by @sos4nt [fix GH-1682] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* refinements.rdoc: [DOC] improved [Fix GH-1659]nobu2017-06-231-14/+14
| | | | | | | | | | | | * doc/syntax/refinements.rdocrefinements.rdoc: grammatical correction and code highlighting improved * doc/syntax/refinements.rdocrefinements.rdoc: Fixnum replaced with Integer and Integer with Numeric Author: Shiva Bhusal <shivabhusal@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* methods.rdoc: small improvementsstomar2017-03-291-9/+9
| | | | | | | * doc/syntax/methods.rdoc: [DOC] small improvements: fix some typos, grammar, punctuation, consistently use capitalized "Ruby". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* doc: Fix error for escape sequences in string literalsnormal2017-02-031-1/+1
| | | | | | | | | | | Backslash goes first in escape sequences, so it must be "any other character following a backslash is interpreted as ...", while the doc says "...followed by...". Author: Marcus Stollsteimer <sto.mar@web.de> [ruby-core:79418] [Bug #13190] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * doc/syntax/control_expressions.rdoc: Add missing 'as'hsbt2016-09-301-2/+2
| | | | | | [ci skip][fix GH-1448] Patch by @jsyeo git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use https instead of http in some URLskazu2016-09-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* methods.rdoc: closing tagnobu2016-05-211-1/+1
| | | | | | | * doc/syntax/methods.rdoc (Method Names): add proper closing tag. [Fix GH-1356] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * doc/syntax/calling_methods.rdoc: fix old operator for safe navigationhsbt2015-12-301-1/+1
| | | | | | 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
* * doc/syntax/*.rdoc: separated modifier at sentence.hsbt2015-12-189-53/+45
| | | | | | [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
* * doc/syntax/refinements.rdoc: remove outdated description.shugo2015-12-091-6/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: indented hereocnobu2015-12-071-0/+14
| | | | | | * parse.y: add heredoc <<~ syntax. [Feature #9098] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e