Nobuyoshi Nakada
e9593eb967
[DOC] Fix an error example
...
`%q{c}` after another string literal is parsed as RHS of modulo, `q`
method call with a block.
2025-01-07 09:56:54 +09:00
Earlopain
89c505dc47
Move string escape sequence documention further down
...
If someone looks at documention for strings,
I don't think escape sequences is what they look
for in majority of the cases.
2025-01-07 07:56:48 +09:00
Earlopain
b0d291ec83
Fix link to strings in literals.rdoc
...
Since 5e1001f754
, the string link is broken
Instead of changing the anchor reference, I changed the header directly,
to keep in line with other titles
2025-01-07 07:56:48 +09:00
ydah
b8fe5550e7
s/backslashs/backslashes/
2024-12-22 18:09:02 +09:00
Nobuyoshi Nakada
1fd2437b63
[DOC] Move the comma outside the <tt>
tag
2024-12-13 11:59:58 +09:00
BurdetteLamar
07a0aa9be6
[DOC] Fix link
2024-09-10 14:07:04 -04:00
Tanaka Akira
5e1001f754
[DOC] document line continuation.
...
Document details of escape sequences including line continuation.
[Bug #20518 ]
2024-06-07 21:55:42 +09:00
Tanaka Akira
61af722d4e
fix typos.
2024-06-03 14:37:32 +09:00
Tanaka Akira
ca2170e69f
[DOC] percent literals can be nested.
2024-06-03 12:24:55 +09:00
Burdette Lamar
932dd9f10e
[DOC] Regexp doc ( #7923 )
2023-06-20 09:28:21 -04:00
Nobuyoshi Nakada
e7342e76df
[Bug #19485 ] [DOC] Mention tabs in indentation of heredoc identifier
...
Co-Authored-By: sawa (Tsuyoshi Sawada) <sawadatsuyoshi@gmail.com>
2023-03-19 18:10:55 +09:00
Alexey Mostovoy
9f9a0940dd
Quick markup fix
2022-05-12 07:53:46 +09:00
Burdette Lamar
d41bc9b68e
More details for Rational literals ( #5840 )
2022-04-24 19:41:26 -05:00
Burdette Lamar
01395d84ab
More details for regexp literals ( #5800 )
2022-04-14 14:25:06 -05:00
Victor Shepelev
a0f10a973f
[DOC] Add documentation for hash value omission syntax
2021-12-20 01:09:52 +09:00
Burdette Lamar
0209beaca6
Enhanced RDoc for literals.rdoc ( #5213 )
...
Makes link targets among percent literals.
Adds links to those targets.
Adds examples to percent literals.
Links from opening summary list to corresponding sections.
2021-12-06 16:26:28 -06:00
Burdette Lamar
28fb6d6b9e
Adding links to literals and Kernel ( #5192 )
...
* Adding links to literals and Kernel
2021-12-03 07:12:28 -06:00
Burdette Lamar
eac7c63538
Enhanced RDoc for numeric.c ( #5184 )
...
Adds remarks about literals and Kernel methods to Float and Integer.
2021-11-27 13:07:37 -06:00
Jeremy Evans
2e919e4a64
Remove extra word in heredoc documentation
...
From Thibault Jouan
Fixes [Misc #17872 ]
2021-05-20 12:24:41 -07:00
James Koenig
a67cd8a888
-> creates a lambda so this updates the documentation to reflect that
2020-11-30 20:11:18 -05:00
Victor Goff
1336698294
Respectively, instead of respentively
2020-10-12 13:08:13 +09:00
Nobuyoshi Nakada
dcb705ace7
doc/syntax/literals.rdoc: explain #@@foo
too [ci skip]
2020-09-29 15:28:09 +09:00
Yusuke Endoh
2e947bc181
doc/syntax/literals.rdoc: explain #@foo
and #$foo
2020-09-29 14:39:52 +09:00
Kazuhiro NISHIYAMA
5257a53090
Removed NIL/TRUE/FALSE from documents too
...
This is follow up of 62554ca97812b454e78a0a9daf6e962ff7a2f589
2020-04-17 17:40:57 +09:00
Olivier Lacan
8e7df4bbf9
Use the word heredocs in Here Documents docs
...
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-08-04 09:18:48 +09:00
Marcus Stollsteimer
1f349ea297
Fix typo
2019-05-03 16:12:22 +02:00
Nobuyoshi Nakada
1432471a75
Disallow also CR in here-doc identifier
...
* 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-29 13:47:20 +09:00
Nobuyoshi Nakada
330b376133
parse.y: fix here-doc identifier with newline
...
* 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-29 12:49:59 +09:00
mame
95f7992b89
Introduce beginless range [Feature#14799]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-03 08:11:41 +00:00
marcandre
296bd00e02
range.c: Documentation on endless ranges.
...
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-12-12 19:49:22 +00:00
nobu
077a15c829
[DOC] rational and imaginary literals [ci skip]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-17 01:21:18 +00:00
normal
90fdfec11a
doc: Fix error for escape sequences in string literals
...
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
2017-02-03 23:34:48 +00:00
hsbt
4f94cb43fc
* doc/syntax/*.rdoc: separated modifier at sentence.
...
[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-18 03:39:49 +00:00
nobu
9a28a29b87
parse.y: indented hereoc
...
* 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-12-07 14:39:52 +00:00
knu
11b804feee
[DOC] Remove \0
since it's aprt of octal notation
...
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 06:58:56 +00:00
knu
5ac401c8dc
[DOC] \0
is interpreted as NUL only if not followed by an octal digit.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-16 06:31:39 +00:00
nobu
2b89d63e61
literals.rdoc: add DEL [ci skip]
...
* 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 06:21:13 +00:00
knu
6989f24117
[DOC] Revise the character literal part.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-16 06:16:15 +00:00
knu
d23857e558
[DOC] Document the full list of supported escape sequences in string literals
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-16 06:03:18 +00:00
nobu
22190b3f32
literals.rdoc: fix typos
...
* 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 05:31:26 +00:00
usa
35947f6d42
* doc/syntax/literals.rdoc (Strings): mention about ?a literal.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-16 04:24:31 +00:00
normal
12c2ad515e
doc/syntax/literals.rdoc: spelling fix
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-29 16:54:32 +00:00
nobu
d1e65737f6
literals.rdoc: quoted symbol keys
...
* 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-29 05:29:28 +00:00
nobu
25dddf158c
literals.rdoc: Update for symbol literals
...
* 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-12-29 05:27:36 +00:00
zzak
cac997eb95
* doc/syntax/literals.rdoc: [DOC] Single quote strings allows escape
...
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
2014-03-14 03:09:17 +00:00
zzak
077fa24833
* doc/syntax/literals.rdoc: [DOC] String literal concat by @cknadler
...
[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-12 23:54:38 +00:00
charliesome
a5c3ca07f8
* doc/syntax/literals.rdoc: Use single quotes instead of double quotes
...
[Bug #8766 ] [ruby-core:56514]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-10 20:56:13 +00:00
drbrain
d86ee14c5a
* doc/syntax/literals.rdoc (Strings): Fixed typo. Fixes #236 on
...
github by Doug Yun.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-16 21:54:31 +00:00
drbrain
8255e83912
* doc/syntax/literals.rdoc: Added 0d decimal format. Thanks Nobu!
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-19 07:30:58 +00:00
drbrain
aa233d3f33
* doc/syntax/literals.rdoc: Used simplified heredoc example that
...
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
2012-12-18 07:46:33 +00:00