jruby-head (which will be JRuby 9.4.0.0) can now properly process
the keywords to Kernel#warn. I cannot think of any capability based
test for this so I constrained it using a version guard. Only JRuby
will ever hit the version guard.
https://github.com/rubygems/rubygems/commit/cd468c7e0f
* Link to packed data doc
* Update pack.rb
Co-authored-by: Peter Zhu <peter@peterzhu.ca>
* Update pack.rb
Co-authored-by: Peter Zhu <peter@peterzhu.ca>
* Update pack.rb
Co-authored-by: Peter Zhu <peter@peterzhu.ca>
Co-authored-by: Peter Zhu <peter@peterzhu.ca>
* The list of supported architectures was updated in
5ef048e5b1
but the first paragraph wasn't updated.
* `--yjit-trace-exits` was missing from the command-line options
* Fixes some spacing issues
* Updates call threshold default to 10, verified in the code that's
correct.
* Add code ticks around method names.
* Fix namespace of stats example
Text is reorganized so that most of the previous text is now in these newly-created sections:
Basic IO
Line IO
New text is added to form new sections:
Character IO
Byte IO
Codepoint IO
This gives the page a functional orientation, so that a reader can quickly find pertinent sections.
The page retains its original mission: to provide good link targets for the doc for related classes.
This page provides an overview of IO streams. It's meant to be linked to from many other doc spots. In particular it will be linked to from many places in ARGF, File, IO, and StringIO.
Deletes the :include: files in doc/time, which became no longer workable when @nobu pointed out that some (but not all) creator methods accept string values as well as integer-like values.
Changes to methods:
Time.utc
Time.local
Time.at
Time.new
dev is Shopify's internal tool that doesn't work if you use Intel
Homebrew on M1 (or rbenv, btw). Now that we maintain this outside
Shopify's repository, we should stop talking about it here.
- Former section "Directives in Trailing Comments" is reworked. The important thing about a directive is what it does, not whether it's trailing or stand-alone. Therefore I've worked the directives in the former section into the appropriate sections, based on function.
- Each directive is now explicitly marked as trailing or stand-alone.
- C-code directives are mentioned only for those directives that actually appear in our ruby/ruby C files, which are :startdoc:, :stopdoc:, :enddoc:, :include:, and :call-seq:. What effect, if any, other directives have in C, I'm not sure about.
https://github.com/ruby/rdoc/commit/b00978bfa5
Splits certain guidelines for singleton and instance method.
Calls for instance method to not prefix anything (like RDoc itself for a Ruby-coded instance method); e.g.:
count -> integer, not array.count,.
<=> other -> integer or nil, not hash <=> other -> integer or nil.
Groups previous guidelines into Arguments, Block, Return types, Aliases.
* Add missing space for `String#start_with?`.
* Add missing pluses for `String#tr` and
`Methods for Converting to New String` label.
* Move quote into the tag for `Whitespace in Strings` label.
The chart (https://www.unicode.org/charts/case) that is currently
referred seems to be wrong.
Also, use the "latest" redirect and add titles of the section and table.
[Bug #18590]
The `capstone` crate on crates.io does not need `libcapstone` on the system
because it builds from [source].
`gdbm` is now a separate gem (thanks for extracting it!).
[source]: c31409905a/capstone-sys/build.rs (L143)
In December 2021, we opened an [issue] to solicit feedback regarding the
porting of the YJIT codebase from C99 to Rust. There were some
reservations, but this project was given the go ahead by Ruby core
developers and Matz. Since then, we have successfully completed the port
of YJIT to Rust.
The new Rust version of YJIT has reached parity with the C version, in
that it passes all the CRuby tests, is able to run all of the YJIT
benchmarks, and performs similarly to the C version (because it works
the same way and largely generates the same machine code). We've even
incorporated some design improvements, such as a more fine-grained
constant invalidation mechanism which we expect will make a big
difference in Ruby on Rails applications.
Because we want to be careful, YJIT is guarded behind a configure
option:
```shell
./configure --enable-yjit # Build YJIT in release mode
./configure --enable-yjit=dev # Build YJIT in dev/debug mode
```
By default, YJIT does not get compiled and cargo/rustc is not required.
If YJIT is built in dev mode, then `cargo` is used to fetch development
dependencies, but when building in release, `cargo` is not required,
only `rustc`. At the moment YJIT requires Rust 1.60.0 or newer.
The YJIT command-line options remain mostly unchanged, and more details
about the build process are documented in `doc/yjit/yjit.md`.
The CI tests have been updated and do not take any more resources than
before.
The development history of the Rust port is available at the following
commit for interested parties:
1fd9573d8b
Our hope is that Rust YJIT will be compiled and included as a part of
system packages and compiled binaries of the Ruby 3.2 release. We do not
anticipate any major problems as Rust is well supported on every
platform which YJIT supports, but to make sure that this process works
smoothly, we would like to reach out to those who take care of building
systems packages before the 3.2 release is shipped and resolve any
issues that may come up.
[issue]: https://bugs.ruby-lang.org/issues/18481
Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
Co-authored-by: Noah Gibbs <the.codefolio.guy@gmail.com>
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
Treats:
#fixed_encoding?
#hash
#==
#=~
#match
#match?
Also, in regexp.rdoc:
Changes heading from 'Special Global Variables' to 'Regexp Global Variables'.
Add tiny section 'Regexp Interpolation'.
Adds to doc for String.new, also making it compliant with documentation_guide.rdoc.
Fixes some broken links in io.c (that I failed to correct yesterday).
Treats:
#chars
#codepoints
#each_char
#each_codepoint
#each_grapheme_cluster
#grapheme_clusters
Also, corrects a passage in #unicode_normalize that mentioned module UnicodeNormalize, whose doc (:nodoc:, actually) says not to mention it.
As @peterzhu2118 and @duerst have pointed out, putting string method's RDoc into doc/ (which allows non-ASCII in examples) makes the "click to toggle source" feature not work for that method.
This PR moves the primary method doc back into string.c, then includes RDoc from doc/string/*.rdoc, and also removes doc/string.rdoc.
The affected methods are:
::new
#bytes
#each_byte
#each_line
#split
The call-seq is in string.c because it works there; it did not work when the call-seq is in doc/string/*.rdoc.
This PR also updates the relevant guidance in doc/documentation_guide.rdoc.
* Enhanced RDoc for String#split
* Enhanced RDoc for String#split
* Enhanced RDoc for String#split
* Enhanced RDoc for String#split
* Enhanced RDoc for String#split
This file will be a link target for methods doc that cites character selectors (e.g., String#tr),
It covers only the character selector; +replacement+ is discussed at String#tr (which will be revised and simplified); multiple selectors will be discussed at String#delete and String#count.
Co-authored-by: Peter Zhu <peter@peterzhu.ca>
Currently, the guide says a "What's Here" section should have a labeled list for the methods. Such a list can render very differently in different browsers, and are often erratic in their indentation of continuation lines.
Adds section "Transcoding a Stream," listing relevant methods in IO.
Moves an example from section "String Encoding Example" to the new section.
Removes header "String Encoding Example" for now-empty section.
Changes items in section "Transcoding a String" from labeled list items to bullet list items. (Labeled list items are sometimes rendered with strange indentations for continued lines, and are always rendered with different indentations for the items.)
* Add encoding external/internal example to encoding.rdoc
* Add encoding external/internal example to encoding.rdoc
* Update doc/encoding.rdoc
I think there may be some more of these that I've recently put into io.c. Will check tomorrow and create new PR if so.
Co-authored-by: Peter Zhu <peter@peterzhu.ca>
Co-authored-by: Peter Zhu <peter@peterzhu.ca>
This is the beginning of an extended explication of Ruby encoding.
One of its more important jobs is to provide link targets for encoding documentation in other classes (String, File, IO, etc.). In particular, they can link to the "Encoding Options" section.
I'll have much to add to this document going forward, along with suitable adjustments in the class documentation.
The word "specification" can be confusing as it might make readers
assume that the Ruby Spec Suite is a specification similar to an ISO
specification. Avoid the word and link to the project so curious parties
could read more about the project.
This allows for the following syntax:
```ruby
def foo(*)
bar(*)
end
def baz(**)
quux(**)
end
```
This is a natural addition after the introduction of anonymous
block forwarding. Anonymous rest and keyword rest arguments were
already supported in method parameters, this just allows them to
be used as arguments to other methods. The same advantages of
anonymous block forwarding apply to rest and keyword rest argument
forwarding.
This has some minor changes to #parameters output. Now, instead
of `[:rest], [:keyrest]`, you get `[:rest, :*], [:keyrest, :**]`.
These were already used for `...` forwarding, so I think it makes
it more consistent to include them in other cases. If we want to
use `[:rest], [:keyrest]` in both cases, that is also possible.
I don't think the previous behavior of `[:rest], [:keyrest]` in
the non-... case and `[:rest, :*], [:keyrest, :**]` in the ...
case makes sense, but if we did want that behavior, we'll have to
make more substantial changes, such as using a different ID in the
... forwarding case.
Implements [Feature #18351]
Adds file doc/case_mapping.rdoc, which describes case mapping and provides a link target that methods doc can link to.
Revises:
String#capitalize
String#capitalize!
String#casecmp
String#casecmp?
String#downcase
String#downcase!
String#swapcase
String#swapcase!
String#upcase
String#upcase!
Symbol#capitalize
Symbol#casecmp
Symbol#casecmp?
Symbol#downcase
Symbol#swapcase
Symbol#upcase
Encourage use of RTEST(), direct Qfalse comparison, and remove references to
Qfalse == 0 in extension documentation.
See [Bug #18397] for detail.
[ci skip]
Makes link targets among percent literals.
Adds links to those targets.
Adds examples to percent literals.
Links from opening summary list to corresponding sections.
block to another method without having to provide a name for the
block parameter.
Implements [Feature #11256]
Co-authored-by: Yusuke Endoh mame@ruby-lang.org
Co-authored-by: Nobuyoshi Nakada nobu@ruby-lang.org
* Add --yjit-no-type-prop so we can test YJIT without type propagation
* Fix typo in command line option
* Leave just two test workflows enable for YJIT