144 Commits
Author SHA1 Message Date
Marcus Stollsteimer 9f9a389d95 doc/syntax/pattern_matching.rdoc: fix typos, grammar, style 2020-12-24 11:35:03 +01:00
Marc-Andre Lafortune 8aa299de24 Tweak magic comments [doc] 2020-12-24 01:36:08 -05:00
Koichi Sasada e43b5aa52d remove redundant example.
pointed by @marcandre.
2020-12-24 14:31:01 +09:00
Koichi Sasada 6f29716f9f shareable_constant_value: experimental_copy
"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.
2020-12-24 14:28:47 +09:00
Marcus Stollsteimer 458d5175b9 Small improvements in magic comments docs
* remove a duplicate statement
* fix rdoc markup
* fix typos
2020-12-23 19:47:26 +01:00
Marc-Andre Lafortune 8feb40f49a Document shareable_constant_value and other magic constants [doc] 2020-12-23 11:50:33 -05:00
Kazuki Tsujimoto b222a1a494 Fix a message in example code
Thanks to @zverok for the report.
2020-12-23 02:37:27 +09:00
Kazuki Tsujimoto 5c0abe2d94 Update documentation for pattern matching 2020-12-22 02:08:57 +09:00
Kazuki Tsujimoto 85ec6cc387 Fix markups and indentation 2020-12-20 13:35:20 +09:00
Kazuki Tsujimoto d37be18af5 Fix typos 2020-12-20 13:25:43 +09:00
Kazuki Tsujimoto 4902f96ee5 Update documentation for pattern matching 2020-12-20 13:22:53 +09:00
Kazuki Tsujimoto 88f3ce12d3 Reintroduce expr in pat [Feature #17371] 2020-12-13 11:51:49 +09:00
James Koenig a67cd8a888 -> creates a lambda so this updates the documentation to reflect that 2020-11-30 20:11:18 -05:00
Kazuki Tsujimoto b601532411 Pattern matching is no longer experimental 2020-11-01 13:33:58 +09: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
Jeremy Evans 021cec938a Clarify behavior of super in method in module included in refinement [ci skip]
Fixes [Bug #16977]
2020-07-10 15:31:51 -07:00
Burdette Lamar 24739c62e5 [ci skip] Rdoc enhancements for Array (#3063)
* Per @nobu review

* Rdoc enhancements for Array

* Responses to review
2020-05-15 14:12:40 -07:00
Kazuhiro NISHIYAMA 5257a53090 Removed NIL/TRUE/FALSE from documents too
This is follow up of 62554ca978
2020-04-17 17:40:57 +09:00
Kazuki Tsujimoto cab9788e0c Fix typos 2020-04-05 12:15:18 +09:00
zverok 33260d404f Enhance pattern matching introduction 2020-04-04 23:16:49 +09:00
Jeremy Evans f991340e07 Document defined? and global_variables handling of regexp global variables [ci skip]
Fixes [Bug #11304]
2020-03-06 13:06:49 -08:00
zverok 281b350058 Add pattern matching documentation
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.
2020-02-24 00:28:13 +09:00
Adam Isom 09271acdaf Update documentation for Array/Hash Argument section of methods.rdoc 2020-01-17 19:50:39 +09:00
Takashi Kokubun afd3f64f8c Redmine /projects/ruby-trunk is now redirected
to /projects/ruby-master
2019-12-31 22:06:19 -08:00
Marcus Stollsteimer 66e518f7b3 [DOC] Fix typo 2019-12-24 13:01:24 +01:00
zverok a4b99f9764 Fix typos of previous docs PR
In #2612 I made two typos (extra ,, and copy-pasted
same line of code instead of showing two different
ones), fixing them.
2019-12-23 08:36:58 +09:00
zverok e568bb5649 Update private visibility explanation 2019-12-22 23:17:39 +09:00
Nobuyoshi Nakada db16629008 Fixed misspellings
Fixed misspellings reported at [Bug #16437], only in ruby and rubyspec.
2019-12-20 09:32:42 +09:00
zverok bddb31bb37 Documentation improvements for Ruby core
* 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.
2019-10-26 14:58:08 +09:00
Jeremy Evans 29c1e9a0d4 Document the difference between expressions and statements [ci skip]
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-10 13:45:19 -07:00
Jeremy Evans c7715a4936 Add documentation regarding keyword argument separation [ci skip] 2019-10-03 14:13:27 -07:00
Jeremy Evans 12e27a411c Minor updates to methods and calling_methods documentation [ci skip] 2019-10-03 14:13:27 -07:00
Nobuyoshi Nakada 2683171994 [DOC] DOT is not a part of a receiver [ci skip]
[Feature #11297] [Feature #16123]
2019-09-20 16:43:39 +09:00
Nobuyoshi Nakada b80df6e8e0 Update NEWS and documents [ci skip]
[Feature #11297] [Feature #16123]
2019-09-20 02:40:59 +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
Jeremy Evans c945d115a5 Document use of ensure and else at method level [ci skip] 2019-07-19 11:39:05 -07:00
Jeremy Evans ceeb1535dd Remove section on performance advantage of not using a block parameter [ci skip]
Improvements in Ruby 2.5 and 2.6 make this section no longer
accurate.
2019-07-19 11:38:49 -07:00
Jeremy Evans 7e2677675d Remove mention of Proc.new with implicit block [ci skip]
This support is now deprecated and will be removed in Ruby 3.
2019-07-19 11:38:49 -07:00
Jeremy Evans bf2f84b2ff Document evaluation order of arguments [ci skip]
Fixes [Misc #8905]
2019-07-19 11:38:49 -07:00
Jeremy Evans 71d21f3c75 Document required keyword argument syntax [ci skip]
Fixes [Bug #8952]
2019-07-19 11:38:42 -07:00
Jeremy Evans 0f28094201 Improve wording of Local Variables and eval section
As pointed out by nobu, "defined" should be used instead of "assigned".
2019-06-25 11:18:08 -07:00
git dd57442f74 * remove trailing spaces. 2019-06-26 01:53:19 +09:00
Jeremy Evans 0bd5f846df Document local variable interactions with eval
Fixes [Bug #13337]
2019-06-25 09:52:34 -07: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
tenderloveandVladimir Dementyev d95b13ead1 Update refinements docs
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
2019-01-10 17:28:13 +00:00