summaryrefslogtreecommitdiff
path: root/doc/language
AgeCommit message (Collapse)Author
10 daysUpdate box.mdBrandon Zylstra
"Code" (when used to refer to what we create in Ruby or any other programming language) is an abstract non-count noun, so it cannot be pluralized. ("Codes" would be used when referring to specific countable things like PIN codes, which is a different use of the word "code".) This is somewhat confusing because English allows converting count nouns into non-count nouns, and converting non-count nouns into count nouns, and because many words have both forms. For an example of converting a non-count noun to a count noun, "water" is normally a non-count noun: > The world is covered with water. but people who work in restaurants often use the word as a count noun, as a shorthand for "cup of water": > I need 7 waters on the big table by the window. For an example of the opposite conversion, "worm" is normally a count noun: > There are lots of worms in the puddle. but someone might use it as a non-count noun when talking about non-distinct remains of worms: > You have worm all over the bottom of your shoe! So although a given noun can be flexible enough to be used in either way—even when it is unconventional—there is a definite change of meaning when using a word as a count noun or a non-count noun.
11 days[DOC] Tweak an example in language/box.mdKoichi ITO
Although the example code comments indicate that it returns `false`, a non-matching result for `=~` is actually `nil`. ```ruby Foo.foo.blank? #=> false "foo".blank? #=> false ``` https://github.com/ruby/ruby/blob/v4.0.0-preview3/doc/language/box.md?plain=1#L115-L122 This PR replaces `=~` with `match?` so that it returns the expected `false`. Since this makes the result a boolean, it also aligns with the expected behavior of a predicate method name like `blank?`.
11 days[DOC] Use `Ruby::Box#require_relative` in box.md examplesKoichi ITO
Based on the example, it appears that `foo.rb` and `main.rb` are expected to be in the same directory. Since Ruby 1.9, the current directory is not included in `$LOAD_PATH` by default. As a result, running `box.require('foo')` as shown in the sample code raises a `LoadError`: ```console main.rb:2:in `Ruby::Box#require': cannot load such file -- foo (LoadError) from main.rb:2:in `<main>' ``` To avoid this, it seems simplest to show either `box.require('./foo')` or `box.require_relative('foo')`. In this PR, `box.require('foo')` is replaced with `box.require_relative('foo')` to make the intention of using a relative path explicit. This should reduce the chance that users trying Ruby Box will run into an unexpected error.
2025-12-28[DOC] Japanese for multi-byte charactersBurdette Lamar
2025-12-27[DOC] Use Japanese for multi-byte charactersBurdetteLamar
2025-12-25[DOC] Escape capitalized word "data" not to be linked unexpectedlyNobuyoshi Nakada
2025-12-25[DOC] Reword "Regular Expression" to "Matched Data"Nobuyoshi Nakada
`$~` and its accessors are related to regular expressions, but are not themselves.
2025-12-24Revert "Add link to Ruby options doc in help text"NARUSE, Yui
This reverts commit 31ff07ed1eb05d01f7da3c017d542137a3db1e94. * Don't add a test which only runs on production release * https://github.com/ruby/actions/actions/runs/20486784889/job/58870959976 * Don't add a new line to `ruby --help` * https://github.com/ruby/ruby/pull/14142#issuecomment-3689829564
2025-12-24[DOC] Reword "Pattern Matching" to "Regular Expression"Nobuyoshi Nakada
In ruby, since 3.1 at least, the words "Pattern Matching" should refer the syntax.
2025-12-24[DOC] Fix minor typo in signals.rdocSteve
2025-12-23[DOC] Fix example in Ruby::Box documentationJeremy Evans
2025-12-22[DOC] Refine packed_data.rdocNobuyoshi Nakada
* Escape unexpected links * Remove unnecessary path name from in-file reference
2025-12-21More doc improvements to ractor.md (#15676)Luke Gruber
[DOC] More doc improvements to ractor.md
2025-12-21[DOC] Align tables in globals.mdNobuyoshi Nakada
* Align "Contains" column in "Streams" table * Align some columns vertically * Remove a duplicate `$-a` description
2025-12-20Small improvements to doc/language/ractor.md (#15588)Luke Gruber
[DOC] Improvements to doc/language/ractor.md
2025-12-20[DOC] Enhancements for globals.md (#15545)Burdette Lamar
* [DOC] Enhancements for globals.md
2025-12-20Small documentation adjustments for new/updated features (#15634)Victor Shepelev
* Document Range#to_set * Update Thread#raise and Fiber#raise signatures and docs * Add reference to String#strip to character_selectors.rdoc * Update *nil docs when calling methods * Enhance Array#find and #rfind docs * Add a notice to Kernel#raise about cause:
2025-12-20Revert pack/unpack support for LEB128Nobuyoshi Nakada
https://bugs.ruby-lang.org/issues/21785#note-10 > It is too late to introduce it in Ruby 4.0, let's aim for 4.1. This reverts commits: * d0b72429a93e54f1f956b4aedfc25c57dc7001aa Add support for signed and unsigned LEB128 to pack/unpack. * 68a900e30b4ca1537d7975c3a619fd94fca7b084 add news for pack / unpack directives
2025-12-20Box: [DOC] Uodate the name from NamespaceSatoshi Tagomori
2025-12-19[Feature #21785] [DOC] LEB128 supportNobuyoshi Nakada
2025-12-18Add support for signed and unsigned LEB128 to pack/unpack.Aaron Patterson
This commit adds a new pack format command `R` and `r` for unsigned and signed LEB128 encoding. The "r" mnemonic is because this is a "vaRiable" length encoding scheme. LEB128 is used in various formats including DWARF, WebAssembly, MQTT, and Protobuf. [Feature #21785]
2025-12-09[DOC] Clear one of known issues of Ruby BoxNobuyoshi Nakada
2025-12-09[DOC] Update Ruby Box documents (known issues)Satoshi Tagomori
2025-12-09[DOC] Add Ruby::Box on NEWSSatoshi Tagomori
2025-12-06[DOC] Link global variables to command line optionsNobuyoshi Nakada
2025-12-05[DOC] Describe `$F`Nobuyoshi Nakada
This variation is used when `-a` option is given.
2025-12-05[DOC] Describe the global variables set by command line optionsNobuyoshi Nakada
These variables are set by command line options, but it is deprecated to assign them any value other than nil in ruby code.
2025-12-05[DOC] Centerize Variable, English, and Constant columnsNobuyoshi Nakada
2025-11-27[DOC] Remove unneeded filename from rdoc-ref links (#15339)Stan Lo
2025-11-27Reorganize page documentations (#15154)Stan Lo
Re-organize page docs