Commit graph

67695 commits

Author SHA1 Message Date
Hiroshi SHIBATA
454a36794f Promote matrix to the bundled gems 2021-05-27 14:42:11 +09:00
Hiroshi SHIBATA
c9178c1127 Promote prime to the bundled gems 2021-05-27 14:42:11 +09:00
git
eae7fd0ea3 * 2021-05-27 [ci skip] 2021-05-27 06:22:10 +09:00
Aaron Patterson
8fdb15fdd3 Fill out switch statement in push_mark_stack
When objects are popped from the mark stack, we check that the object is
the right type (otherwise an rb_bug happens).  The problem is that when
we pop a bad object from the stack, we have no idea what pushed the bad
object on the stack.

This change makes an error happen when a bad object is pushed on the
mark stack, that way we can track down the source of the bug.
2021-05-26 14:21:54 -07:00
Jun Aruga
af43198738 .travis.yml: Remove skipped tests on ppc64le.
It was fixed at fc832ffbfa .
2021-05-26 11:33:05 +02:00
Yusuke Endoh
055ec5254d Rescue NotImplementedError for a test of Thread#native_thread_id
20210526T070003Z.fail.html.gz
```
  1) Error:
TestThread#test_thread_native_thread_id:
NotImplementedError: native_thread_id() function is unimplemented on this machine
    /export/home/users/chkbuild/cb-gcc/tmp/build/20210526T070003Z/ruby/test/ruby/test_thread.rb:1338:in `native_thread_id'
    /export/home/users/chkbuild/cb-gcc/tmp/build/20210526T070003Z/ruby/test/ruby/test_thread.rb:1338:in `test_thread_native_thread_id'
```
2021-05-26 18:02:06 +09:00
Nobuyoshi Nakada
251fafec1b
Suppress debug message 2021-05-26 15:33:25 +09:00
NARUSE, Yui
9ddc767434 Add NEWS about 46655156dc
* Add Thread#native_thread_id [Feature #17853]
2021-05-26 15:18:16 +09:00
NARUSE, Yui
46655156dc Add Thread#native_thread_id [Feature #17853] 2021-05-26 15:14:11 +09:00
Hiroshi SHIBATA
88e3848fca
RSS library is the bundled gems now 2021-05-26 11:39:01 +09:00
Hiroshi SHIBATA
e54bef92d5
Ignore lib/irb/ext/tracer.rb with TestRequireLib because tracer library was removed from ruby repo 2021-05-26 10:04:24 +09:00
git
59928a75bd * 2021-05-26 [ci skip] 2021-05-26 09:37:39 +09:00
Aaron Patterson
fc832ffbfa Disable compaction on platforms that can't support it
Manual compaction also requires a read barrier, so we need to disable
even manual compaction on platforms that don't support mprotect.

[Bug #17871]
2021-05-25 17:37:21 -07:00
Jun Aruga
2a29a5311c
Add Travis badge image to README.md. [ci skip] (#4527)
Align the order of the badges with ones on the wiki page.
https://bugs.ruby-lang.org/projects/ruby/wiki/CIServers
2021-05-25 14:42:25 +02:00
Hiroshi SHIBATA
43fb97dfba
Update the latest list of default gems for misc/expand_tabs.rb 2021-05-25 20:19:11 +09:00
Hiroshi SHIBATA
edcc29dcff Removed gdbm from ruby repo 2021-05-25 20:04:54 +09:00
Jun Aruga
9e56a22be6 bootstraptest/test_ractor.rb: Skip an assertion on Travis arm64.
Skip the assertion to test the `Ractor.select` from multiple ractors that rarely
fails on Travis arm64.
See <https://bugs.ruby-lang.org/issues/17878>.
2021-05-25 12:38:05 +02:00
Jun Aruga
9d4266fd55 .travis.yml: Update to use arm64/ppc64le/s390x.
* Use only the free pipelines arm64/ppc64le/s390x without credits on Travis.
  See <https://docs.travis-ci.com/user/billing-overview/#partner-queue-solution>.
* Add ppc64le case.
* Update the gcc to gcc-11.
* Remove unused logic.
* Add the `tool/travis_wait.sh` to avoid a command timeout.
* Run the tests skipping some failing tests.
  * Set `TEST_ALL_SKIPPED_TESTS` env to skip the tests.
  * Run the tests separately returning ok status.
    The tests are executed if `TEST_ALL_SKIPPED_TESTS` env is set or
    `TEST_ALL_SEPARATED_TESTS` env is set.
  * Add `tool/ci_functions.sh` to manage the functions used in CI.
* Add arm64 to allow_failures due to the following issue.
  An arm64 job sometimes does not start right now.
  https://travis-ci.community/t/11629
2021-05-25 12:38:05 +02:00
卜部昌平
83efb2e47c .travis.yml: Ubuntu 20.04 Focal Fossa
This is a LTS.  Must be better than Xenial.
2021-05-25 12:38:05 +02:00
Jun Aruga
4f735903c2 Revert "Remove .travis.yml" to revive Travis.
This reverts commit 6b978d5427.
2021-05-25 12:38:05 +02:00
Hiroshi SHIBATA
55cd3e4ebf Removed dbm from ruby repo 2021-05-25 15:18:31 +09:00
Hiroshi SHIBATA
ab3266ea5c Removed tracer from ruby repo 2021-05-25 13:13:52 +09:00
git
274d0aa768 * 2021-05-25 [ci skip] 2021-05-25 08:03:04 +09:00
Aaron Patterson
45ddefb14a
add rb_id2str to lldb debugging scripts 2021-05-24 16:02:42 -07:00
Hiroshi SHIBATA
4aaa98e626
xibbar is retired from cgi.rb maintainer 2021-05-24 18:37:18 +09:00
aycabta
f57968e329 Set USE_COLORIZE to the default value in a test 2021-05-24 12:13:46 +09:00
jethrodaniel
d06d4560a1 [ruby/irb] update test/irb/test_init.rb to avoid useless eval
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>

2dfdc031ec
2021-05-24 11:56:05 +09:00
Mark Delk
b8ffb1c46f [ruby/irb] respect NO_COLOR environment variable
When `NO_COLOR` is set to any non-nil value, output is not colorized.

See https://no-color.org/

401d0916fe
2021-05-24 11:55:58 +09:00
git
e16a642900 * 2021-05-24 [ci skip] 2021-05-24 09:41:24 +09:00
S.H
ce36097748
Refactor num_zero_p function (#4522) 2021-05-23 17:41:03 -07:00
aycabta
c264d30261 Use YAML.safe_load to use the permitted_classes option 2021-05-21 21:45:03 +09:00
Takashi Kokubun
fb4195b969
Show a backtrace when tool/extlibs.rb fails
I'd like to retry this kind of error, but showing no backtrace is hard
to deal with.
2644908002
2021-05-21 23:36:56 -07:00
Takashi Kokubun
141861a222
Update a comment about what 'inline' attr means 2021-05-21 23:27:36 -07:00
Nobuyoshi Nakada
c4162a4cb8
Refined portability of test for [Bug #17739]
The order of arguments to callback of qsort is not defined.
That means `a` may not be 3 at all.
2021-05-22 14:34:23 +09:00
Jeremy Evans
8b00bfb7c2
Do not allow array modifications after freeze inside sort!
If freezing an array inside sort!, previously the array could be
modified after the freeze.  This checks whether the receiver is
frozen after every yield and potential call to #> or #<,
preventing modifications if the receiver is frozen inside the
block or by the #> or #< call.

Fixes [Bug #17739]
2021-05-21 18:33:56 -07:00
Alan Wu
b2fc592c30
Build CDHASH properly when loading iseq from binary
Before this change, CDHASH operands were built as plain hashes when
loaded from binary. Without setting up the hash with the correct
st_table type, the hash can sometimes be an ar_table. When the hash is
an ar_table, lookups can call the `eql?` method on keys of the hash,
which makes the `opt_case_dispatch` instruction not "leaf" as it
implicitly declares.

The following script trips the stack canary for checking the leaf
attribute for `opt_case_dispatch` on VM_CHECK_MODE > 0 (enabled by
default with RUBY_DEBUG).

    rb_vm_iseq = RubyVM::InstructionSequence

    iseq = rb_vm_iseq.compile(<<-EOF)
      case Class.new(String).new("foo")
      when "foo"
        42
      end
    EOF

    puts rb_vm_iseq.load_from_binary(iseq.to_binary).eval

This commit changes the binary loading logic to build CDHASH with the
right st_table type. The dumping logic and the dump format stays the
same
2021-05-21 12:13:55 -04:00
git
0772f1b583 * 2021-05-22 [ci skip] 2021-05-22 01:12:48 +09:00
Alan Wu
636d4f7eb9 Avoid setting the visibility of refinement method entries
Since refinement search is always performed, these entries should always
be public. The method entry that the refinement search returns decides
the visibility.

Fixes [Bug #17822]
2021-05-21 12:12:31 -04:00
Nobuyoshi Nakada
50a534a152 ripper: wrap endless method in bodystmt [Bug #17869] 2021-05-21 18:28:24 +09:00
Nobuyoshi Nakada
050bb06e66 ripper: assertions for rescue/ensure in method body 2021-05-21 18:28:24 +09:00
Nobuyoshi Nakada
e9974a466a
Get rid of sporadic WSAEACCES on Windows [ruby-dev:42661] 2021-05-21 18:26:07 +09:00
Koichi Sasada
817764bd82 simple rescue+while+break should not use throw
609de71f04 fixes the issue by using
`throw` insn if `ensure` is used. However, that patch introduce
additional `throw` even if it is not needed. This patch solves
the issue.

This issue is pointed by @mame.
2021-05-21 18:12:14 +09:00
Nobuyoshi Nakada
59b327aa58
[ruby/rdoc] Drop support for Ruby 2.4
f480b970cc
2021-05-21 15:53:34 +09:00
Nobuyoshi Nakada
f18a0b7654
[ruby/rdoc] Follow-up rubygems
Use test-unit assertions instead of minitest.

d6a6209d7f
2021-05-21 15:53:34 +09:00
Nobuyoshi Nakada
10e63f3f56
[ruby/rdoc] Vertical-bar is disallowed in path names on Windows
No risk of remote code execution, when the file cannot be created.

2565343916 (step):5:58
```
Error: test_remove_unparseable_CVE_2021_31799(TestRDocRDoc): Errno::EINVAL: Invalid argument @ utime_failed - | touch evil.txt && echo tags
D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1142:in `utime'
D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1142:in `block in touch'
D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1139:in `each'
D:/rubyinstaller-head-x64/lib/ruby/3.1.0/fileutils.rb:1139:in `touch'
D:/a/rdoc/rdoc/test/rdoc/test_rdoc_rdoc.rb:463:in `block (2 levels) in test_remove_unparseable_CVE_2021_31799'
     460:     temp_dir do
     461:       file_list = ['| touch evil.txt && echo tags']
     462:       file_list.each do |f|
  => 463:         FileUtils.touch f
     464:       end
     465:
     466:       assert_equal file_list, @rdoc.remove_unparseable(file_list)
```

a7df7dc8fa
2021-05-21 15:53:34 +09:00
Nobuyoshi Nakada
a298bdf860
[ruby/rdoc] Dir.children is 2.5+
RDoc seems still supporting outdated 2.4.

2565344070 (step):5:64
```
Error: test_remove_unparseable_CVE_2021_31799(TestRDocRDoc): NoMethodError: undefined method `children' for Dir:Class
/home/runner/work/rdoc/rdoc/test/rdoc/test_rdoc_rdoc.rb:467:in `block in test_remove_unparseable_CVE_2021_31799'
     464:       end
     465:
     466:       assert_equal file_list, @rdoc.remove_unparseable(file_list)
  => 467:       assert_equal file_list, Dir.children('.')
     468:     end
     469:   end
     470:
```

5a4a64dc0f
2021-05-21 15:53:34 +09:00
Yusuke Endoh
21d24767e8
[ruby/rdoc] Update rdoc.gemspec by adding lib/rdoc/markup/table.rb
Fixes ruby/rdoc#808

80766fd389
2021-05-21 15:51:53 +09:00
aycabta
0ee24b4fab [ruby/rdoc] Version 6.3.1
9307f932b7
2021-05-21 13:42:24 +09:00
aycabta
b1c73f239f [ruby/rdoc] Use File.open to fix the OS Command Injection vulnerability in CVE-2021-31799
a7f5d6ab88
2021-05-21 13:42:24 +09:00
Nobuyoshi Nakada
9edad0df74
Remove short options with argument [Bug #17870]
Remove GNU make `-O` and `-W` options which are short but followed
by an argument, so that `$mflags.set?(?n)` does not return `true`
wrongly.
2021-05-21 10:34:28 +09:00