summaryrefslogtreecommitdiff
path: root/doc/syntax/literals.rdoc
AgeCommit message (Collapse)Author
2025-01-07[DOC] Fix an error exampleNobuyoshi Nakada
`%q{c}` after another string literal is parsed as RHS of modulo, `q` method call with a block.
2025-01-07Move string escape sequence documention further downEarlopain
If someone looks at documention for strings, I don't think escape sequences is what they look for in majority of the cases. Notes: Merged: https://github.com/ruby/ruby/pull/12318
2025-01-07Fix link to strings in literals.rdocEarlopain
Since https://github.com/ruby/ruby/commit/5e1001f754b34e1f0cc67563512c6036b6eb75ab, the string link is broken Instead of changing the anchor reference, I changed the header directly, to keep in line with other titles Notes: Merged: https://github.com/ruby/ruby/pull/12318
2024-12-22s/backslashs/backslashes/ydah
Notes: Merged: https://github.com/ruby/ruby/pull/12426
2024-12-13[DOC] Move the comma outside the `<tt>` tagNobuyoshi Nakada
2024-09-10[DOC] Fix linkBurdetteLamar
Notes: Merged: https://github.com/ruby/ruby/pull/11528
2024-06-07[DOC] document line continuation.Tanaka Akira
Document details of escape sequences including line continuation. [Bug #20518]
2024-06-03fix typos.Tanaka Akira
2024-06-03[DOC] percent literals can be nested.Tanaka Akira
2023-06-20[DOC] Regexp doc (#7923)Burdette Lamar
Notes: Merged-By: peterzhu2118 <[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
2022-05-12Quick markup fixAlexey Mostovoy
Notes: Merged: https://github.com/ruby/ruby/pull/5902
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]>
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-05-20Remove extra word in heredoc documentationJeremy Evans
From Thibault Jouan Fixes [Misc #17872]
2020-11-30-> creates a lambda so this updates the documentation to reflect thatJames Koenig
Notes: Merged: https://github.com/ruby/ruby/pull/3828
2020-10-12Respectively, instead of respentivelyVictor Goff
Notes: Merged: https://github.com/ruby/ruby/pull/3651
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-04-17Removed NIL/TRUE/FALSE from documents tooKazuhiro NISHIYAMA
This is follow up of 62554ca97812b454e78a0a9daf6e962ff7a2f589
2019-08-04Use the word heredocs in Here Documents docsOlivier Lacan
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
2019-05-03Fix typoMarcus Stollsteimer
2019-04-29Disallow also CR in here-doc identifierNobuyoshi Nakada
* 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.
2019-04-29parse.y: fix here-doc identifier with newlineNobuyoshi Nakada
* 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 ```
2019-04-03Introduce beginless range [Feature#14799]mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-12range.c: Documentation on endless ranges.marcandre
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
2018-11-17[DOC] rational and imaginary literals [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-03doc: Fix error for escape sequences in string literalsnormal
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 <[email protected]> [ruby-core:79418] [Bug #13190] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-18* doc/syntax/*.rdoc: separated modifier at sentence.hsbt
[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-07parse.y: indented hereocnobu
* parse.y: add heredoc <<~ syntax. [Feature #9098] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-16[DOC] Remove `\0` since it's aprt of octal notationknu
A typo is fixed while at it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-16[DOC] `\0` is interpreted as NUL only if not followed by an octal digit.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-16literals.rdoc: add DEL [ci skip]nobu
* doc/syntax/literals.rdoc (Strings): [DOC] add DEL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-16[DOC] Revise the character literal part.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-16[DOC] Document the full list of supported escape sequences in string literalsknu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-16literals.rdoc: fix typosnobu
* doc/syntax/literals.rdoc (Strings): fix typos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-16* doc/syntax/literals.rdoc (Strings): mention about ?a literal.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-29doc/syntax/literals.rdoc: spelling fixnormal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-29literals.rdoc: quoted symbol keysnobu
* doc/syntax/literals.rdoc (Hashes): describe about quoted symbol keys. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-29literals.rdoc: Update for symbol literalsnobu
* doc/syntax/literals.rdoc (Symbols): now Symbols created by interpolation can be garbage collected. patch by Yihang Ho in [ruby-core:67194]. [Bug #10671] [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-14* doc/syntax/literals.rdoc: [DOC] Single quote strings allows escapezzak
of backslash as well, patch by @idupree [Fixes GH-553] [ci skip] https://github.com/ruby/ruby/pull/553 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-12* doc/syntax/literals.rdoc: [DOC] String literal concat by @cknadlerzzak
[Fixes GH-380] https://github.com/ruby/ruby/pull/380 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-10* doc/syntax/literals.rdoc: Use single quotes instead of double quotescharliesome
[Bug #8766] [ruby-core:56514] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-16* doc/syntax/literals.rdoc (Strings): Fixed typo. Fixes #236 ondrbrain
github by Doug Yun. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-19 * doc/syntax/literals.rdoc: Added 0d decimal format. Thanks Nobu!drbrain
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-18 * doc/syntax/literals.rdoc: Used simplified heredoc example thatdrbrain
doesn't include method definition. Added heredoc with backticks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e