- Added example in "Argument Converters"; it doesn't seem right for a tutorial to have no example in one of its topics (and instead just linking elsewhere).
- Added section "Command-Line Abbreviations."
- Added section "Keyword Argument into," showing how to:
- Collect options.
- Check for missing options.
- Provide option defaults.
https://github.com/ruby/optparse/commit/39d39676c4
* Resolve shared mixed_names.rb
* Add long option with negation
* Show --help for all examples
* Table of contents for tutorial
* Move argument converters to separate rdoc
* Add references to argument_converters.rdoc
* Tune up argument converters
* Change explicit links to auto-links
https://github.com/ruby/optparse/commit/c91ed8d33d
rb_cData is deprecated and the characteristic alloc_func was already
removed in ruby-3.0. So this updates the recommendation accordingly.
It also adds fdbm_alloc() in order to show the allocation process
and to gives TypedData_Make_Struct() more context.
Moreover it describes fdbm_aref(), so that the relation to
rb_define_method() is shown.
And fdbm_aref() makes use of GetDBM() now, to show how this macro
might be used.
This change moves the statement that `Proc#isolate` isn't yet exposed for Ruby users to the first time the method is mentioned. This is so that readers don't waste time trying to look it up in Ruby docs.
There was also unnecessary duplication:
```
Paragraph 1: "Given block will be isolated from outer scope by Proc#isolate."
Paragraph 2: "Given block will be isolated by Proc#isolate method"
```
So I combined the two sentences and slightly improved the wording for clarity.
`File.absolute_path?` has been added since Ruby 2.7.0, but it isn't
mentioned in the NEWS. So this patch adds a NEWS entry.
ref: https://bugs.ruby-lang.org/issues/15868
Co-authored-by: nagachika <nagachika@ruby-lang.org>
Reintroduce removed empty line to fix indentation on rendered page
(the first line is _not_ indented despite the leading spaces,
and ends up "outdented" compared to the rest of the block).
Also add a missing "-".
* 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
"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.