https://no-color.org has been updated (jcs/no_color#83):
> Command-line software which adds ANSI color to its output by default
should check for a `NO_COLOR` environment variable that, when present
and **not an empty string** (regardless of its value), prevents the
addition of ANSI color.
https://github.com/ruby/irb/commit/46e0f7e370
Co-authored-by: Stan Lo <stan001212@gmail.com>
This code used to roll its own heap object check before we made a better
version in guard_known_class(). The improved version uses one fewer
comparison, so let's use that.
This proc displays rdoc document when the input matches certain symbols
perfectly, like "String". It's commonly triggered with autocompletion
but only has 1 test case. So this commit increases its test coverage.
https://github.com/ruby/irb/commit/d85d719313
The previous one was the url of this notification action, but we want to
see a link to Cirrus CI.
This code follows https://cirrus-ci.org/guide/notifications/.
Also, head_branch was null only for pull requests from a fork, so we can
use it for branch-based filtering, which is good.
It's not an intentional behavior of the command and it behaves
differently in different environments. So checking it actually brings
more problem than benefit.
https://github.com/ruby/irb/commit/b3203bc784
The name test_helper.rb conflicts with the test_helper.rb in JSON,
causing build failures. This commit renames test_helper.rb to helper.rb.
https://github.com/ruby/irb/commit/b6a92bf6b3
Co-Authored-By: Stan Lo <stan001212@gmail.com>
Ruby CI runs irb and other Ruby core/stdlib tests in the same process.
So adding irb-specific helper to Test::Unit::TestCase could potentially
pollute other components' tests and should be avoided.
The internal location in ractor.rb is not usefull at all.
```
$ ruby -e 'Ractor.new {}'
<internal:ractor>:267: warning: Ractor is experimental, ...
```
It looks like Cirrus doesn't natively support notifications and they
recomment to use GitHub Actions for it.
https://cirrus-ci.org/guide/notifications/
Because I don't know what the payload looks like, I just added a basic
payload and dumped GitHub context so that we could improve it later.
esent.h is the header for MS essential storage engine (JET) which is not
needed in ruby. basetsd.h has existed since _MSC_VER >= 1200 (VS 6.0)
and is the preferred header to use for WCHAR.
It's moved from k0kubun to ruby org.
Also, we don't need JavaScript eval to generate branch if we use
github.ref_name, so v3.0.0 is a version that doesn't use eval.
Co-Authored-By: Nobuyoshi Nakada <nobu@ruby-lang.org>
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
- Add mswin/mswin64 to platforms
- Use TruffleRuby as example instead of Rubinius
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
Co-authored-by: André Arko <andre@arko.net>
A code pattern `p + enclen(enc, p, pend)` may lead to a buffer overrun
if incomplete bytes of a UTF-8 character is placed at the end of a
string. Because this pattern is used in several places in onigmo,
this change fixes the issue in the side of `enclen`: the function should
not return a number that is larger than `pend - p`.
Co-Authored-By: Nobuyoshi Nakada <nobu@ruby-lang.org>
Use `Enumerable#find` to iterate over the candidates, not `Enumerable.each`.
(this makes the code more functional, and - IMO - slightly more idiomatic,
as it avoids setting the "global" (by which I mean: non-local) `tmp`
variable from inside the block)
https://github.com/ruby/tmpdir/commit/d1f20ad694