summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2023-04-05[rubygems/rubygems] Extract class method used by self.methodHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/d900453ca2
2023-04-05[rubygems/rubygems] We don't use process_based_port and self.process_based_portHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/f1a20c4c69
2023-04-05[rubygems/rubygems] We don't use self.make_commandHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/241f376c32
2023-04-05[rubygems/rubygems] Unify win_platform? to Gem.win_platform?Hiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/b18a4ef076
2023-04-05[rubygems/rubygems] Unify java_platform? to Gem.java_platform?Hiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/7f27ab32b8
2023-04-05[rubygems/rubygems] Removed self.mingw_windows?, It's not used rubygemsHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/ba3c985701
2023-04-05[rubygems/rubygems] add some test suites under the Gem namespace, so as not ↵lukeg
to collide To avoid collisions especially in ruby/ruby https://github.com/rubygems/rubygems/commit/e6b2359975
2023-04-05Use `em_delete` in `key_delete` (#504)Étienne Barrié
* Test existing behavior Typing Ctrl-D ends editing but typing <Del> does not. Also renamed a test that is not testing ed_delete_next_char but key_delete. * Check if line empty first in em_delete By distributivity of AND over OR, we can factor out this condition. This will make the next commit simpler. * Use em_delete in key_delete When the editing mode is emacs, use `em_delete` in `key_delete`. We need to add a condition though to `em_delete`, because it implements both `delete-char` and `end-of-file`. We only want the `end-of-file` behavior is the key is really Ctrl-D. This matches the behavior of the <Del> key with readline, i.e. deleting the next character if there is one, but not moving the cursor, while not finishing the editing if there are no characters.
2023-04-04[Feature #19579] Remove !USE_RVARGC code (#7655)Peter Zhu
Remove !USE_RVARGC code [Feature #19579] The Variable Width Allocation feature was turned on by default in Ruby 3.2. Since then, we haven't received bug reports or backports to the non-Variable Width Allocation code paths, so we assume that nobody is using it. We also don't plan on maintaining the non-Variable Width Allocation code, so we are going to remove it. Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2023-04-04Revert "Fix transient heap mode"Aaron Patterson
This reverts commit 87253d047ce35e7836b6f97edbb4f819879a3b25. Revert "Implement `Process.warmup`" This reverts commit ba6ccd871442f55080bffd53e33678c0726787d2.
2023-04-04Implement `Process.warmup`Jean Boussier
[Feature #18885] For now, the optimizations performed are: - Run a major GC - Compact the heap - Promote all surviving objects to oldgen Other optimizations may follow. Notes: Merged: https://github.com/ruby/ruby/pull/7346
2023-04-04Fix crash in Time on 32-bit systemsPeter Zhu
[Bug #19575] struct vtm is packed causing it to have a size that is not aligned on 32-bit systems. When allocating it on the stack, it will have unaligned addresses which means that the fields won't be marked by the GC when scanning the stack (since the GC only marks aligned addresses). This can cause crashes when the fields are heap allocated objects like Bignums. This commit moves the flags in struct time_object into struct vtm for space efficiency and removes the need for packing. This is an example of a crash: ruby(rb_print_backtrace+0xd) [0x56848945] ../src/vm_dump.c:785 ruby(rb_vm_bugreport) ../src/vm_dump.c:1101 ruby(rb_assert_failure+0x7a) [0x56671857] ../src/error.c:878 ruby(vm_search_cc+0x0) [0x56666e47] ../src/vm_method.c:1366 ruby(rb_vm_search_method_slowpath) ../src/vm_insnhelper.c:2090 ruby(callable_method_entry+0x5) [0x568232d3] ../src/vm_method.c:1406 ruby(rb_callable_method_entry) ../src/vm_method.c:1413 ruby(gccct_method_search_slowpath) ../src/vm_eval.c:427 ruby(gccct_method_search+0x20f) [0x568237ef] ../src/vm_eval.c:476 ruby(opt_equality_by_mid_slowpath+0x2c) [0x5682388c] ../src/vm_insnhelper.c:2338 ruby(rb_equal+0x37) [0x566fe577] ../src/object.c:133 ruby(rb_big_eq+0x34) [0x56876ee4] ../src/bignum.c:5554 ruby(rb_int_equal+0x14) [0x566f3ed4] ../src/numeric.c:4640 ruby(rb_int_equal) ../src/numeric.c:4634 ruby(vm_call0_cfunc_with_frame+0x6d) [0x568303c2] ../src/vm_eval.c:148 ruby(vm_call0_cfunc) ../src/vm_eval.c:162 ruby(vm_call0_body) ../src/vm_eval.c:208 ruby(rb_funcallv_scope+0xd1) [0x56833971] ../src/vm_eval.c:85 ruby(RB_TEST+0x0) [0x567e8488] ../src/time.c:78 ruby(eq) ../src/time.c:78 ruby(small_vtm_sub) ../src/time.c:1523 ruby(timelocalw+0x23b) [0x567f3e9b] ../src/time.c:1593 ruby(time_s_alloc+0x0) [0x567f536b] ../src/time.c:3698 ruby(time_new_timew) ../src/time.c:2694 ruby(time_s_mktime) ../src/time.c:3698 Notes: Merged: https://github.com/ruby/ruby/pull/7650
2023-04-04[rubygems/rubygems] util/rubocop -AHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/8c9ea5d180
2023-04-04[rubygems/rubygems] util/rubocop -A --only Performance/RegexpMatchHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/52ae4452c2
2023-04-04[rubygems/rubygems] Don't copy and paste methods in helper methodsHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/b87ac64343
2023-04-04[rubygems/rubygems] Disabled to test rustc with msys2 platform.Hiroshi SHIBATA
https://github.com/rubygems/rubygems/actions/runs/4598776839/jobs/8123290246 https://github.com/rubygems/rubygems/commit/5c3b0a112e
2023-04-03Avoid failing test_enable on warningsTakashi Kokubun
This fails on RubyCI due to RJIT warnings too often. It should be enough to test RJIT feature in test_rjit_version. We only want warnings instead of test failures when there are warnings, at least for this case.
2023-04-02[ruby/irb] Don't check RUBY_ENGINE when deciding whether to accept kargsStan Lo
Ruby implementations like JRuby and TruffleRuby already indicate their compatibility target with RUBY_VERSION. We don't need to exclude them from accepting keyword arguments as long as they target 2.7+. https://github.com/ruby/irb/commit/bf20faa4e6 Co-authored-by: Kevin Menard <kevin@nirvdrum.com>
2023-04-01`*` in an array pattern should not be parsed as nil in ripperKazuki Tsujimoto
After 6c0925ba7017efde6091e2ec4f1a6be268166696, it was impossible to distinguish between the presence or absence of `*`. # Before the commit Ripper.sexp('0 in []')[1][0][2][1] #=> [:aryptn, nil, nil, nil, nil] Ripper.sexp('0 in [*]')[1][0][2][1] #=> [:aryptn, nil, nil, [:var_field, nil], nil] # After the commit Ripper.sexp('0 in []')[1][0][2][1] #=> [:aryptn, nil, nil, nil, nil] Ripper.sexp('0 in [*]')[1][0][2][1] #=> [:aryptn, nil, nil, nil, nil] This commit reverts it.
2023-03-31[ruby/irb] Drop unnecessary pends for trufflerubyStan Lo
https://github.com/ruby/irb/commit/2517039812
2023-03-31[ruby/rdoc] Read generated files in binary modeNobuyoshi Nakada
So that fixes crash with "invalid byte sequence in US-ASCII" on ci.rvm.jp and some RubyCIs. https://github.com/ruby/rdoc/commit/4b416644f0
2023-03-31Support `IO#pread` / `IO#pwrite` using fiber scheduler. (#7594)Samuel Williams
* Skip test if non-blocking file IO is not supported. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2023-03-30[Bug #19547] Add token for unescaped backslashNobuyoshi Nakada
This token is exposed only when `RubyVM::AbstractSyntaxTree` with `keep_tokens` option. Notes: Merged: https://github.com/ruby/ruby/pull/7622
2023-03-30[ruby/time] Test for quadratic backtracking on invalid timeNobuyoshi Nakada
https://hackerone.com/reports/1485501 https://github.com/ruby/time/commit/b30b7bc6e6
2023-03-29[ruby/reline] Improve OSC sequence regexp. OSC sequence can end withtomoya ishida
ST(ESC\) and it should not to include \a and \e inside. (https://github.com/ruby/reline/pull/527) https://github.com/ruby/reline/commit/a88052adec
2023-03-29[ruby/win32ole] Skip test failure with mswin platformHiroshi SHIBATA
https://github.com/ruby/win32ole/actions/runs/4507614838/jobs/7935550685?pr=18 https://github.com/ruby/win32ole/commit/39ae6c2bc7
2023-03-29[ruby/uri] Increase rehearsalsNobuyoshi Nakada
2023-03-28YJIT: Add `--yjit-pause` and `RubyVM::YJIT.resume` (#7609)Maxime Chevalier-Boisvert
* YJIT: Add --yjit-pause and RubyVM::YJIT.resume This allows booting YJIT in a suspended state. We chose to add a new command line option as opposed to simply allowing YJIT.resume to work without any command line option because it allows for combining with YJIT tuning command line options. It also simpifies implementation. Paired with Kokubun and Maxime. * Update yjit.rb Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com> --------- Co-authored-by: Alan Wu <XrXr@users.noreply.github.com> Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com> Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2023-03-28[ruby/reline] Expand the scanned array to later case statement moreStan Lo
straightforward (https://github.com/ruby/reline/pull/526) * Improve test coverage on Unicode.take_range * Add test for Unicode.calculate_width * Expand the scanned array to later case statement more straightforward
2023-03-28Fix memory leak for iclassPeter Zhu
[Bug #19550] If !RCLASS_EXT_EMBEDDED (e.g. 32 bit systems) then the rb_classext_t is allocated throug malloc so it must be freed. The issue can be seen in the following script: ``` 20.times do 100_000.times do mod = Module.new Class.new do include mod end end # Output the Resident Set Size (memory usage, in KB) of the current Ruby process puts `ps -o rss= -p #{$$}` end ``` Before this fix, the max RSS is 280MB, while after this change, it's 30MB. Notes: Merged: https://github.com/ruby/ruby/pull/7597
2023-03-28Ripper: Add keyword options to `assert_parse_files`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/7602
2023-03-28[rubygems/rubygems] Bump rb-sysdependabot[bot]
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.68 to 0.9.70. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.68...v0.9.70) --- updated-dependencies: - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2023-03-28[rubygems/rubygems] Use double-quotes instead of single-quotes in warningsHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/c7f1cb9941
2023-03-28[ruby/uri] Test for quadratic backtracking on invalid URINobuyoshi Nakada
https://hackerone.com/reports/1444501 https://github.com/ruby/uri/commit/54abaa739b
2023-03-27[ruby/reline] Fix cursor position overruntomoya ishida
(https://github.com/ruby/reline/pull/515) * Fix cursor position overrun * Remove unnecessary local variable Co-authored-by: Stan Lo <stan001212@gmail.com> --------- https://github.com/ruby/reline/commit/d4ad9b96c8 Co-authored-by: Stan Lo <stan001212@gmail.com>
2023-03-27Revert an accidentally sync.Hiroshi SHIBATA
Revert "[ruby/open3] Removed to load jit_support.rb" This reverts commit 67feb782f947046f65951303893713052a19a546.
2023-03-27[ruby/open3] Removed to load jit_support.rbHiroshi SHIBATA
It's removed at https://github.com/ruby/open3/commit/4445b9e2a2dd https://github.com/ruby/open3/commit/41b180deab
2023-03-26Historical timezones of Lisbon in tzdata are unstableNobuyoshi Nakada
2023-03-26[Bug #19175] p_kw without a sub pattern should be `assignable'Kazuki Tsujimoto
2023-03-26[Bug #19175] p_rest should be `assignable'Kazuki Tsujimoto
It should also check for duplicate names.
2023-03-25Skip test_europe_lisbon on macOSTakashi Kokubun
until we figure out why it's failing.
2023-03-25[ruby/reline] Fix split_by_width to retain color sequencestomoya ishida
(https://github.com/ruby/reline/pull/490) * Fix split_by_width to retain color sequences * Add OSC escape sequence testcase of Reline::Unicode.split_by_width
2023-03-25Fix incorrect usage of `rb_fiber_scheduler_io_(p)(read|write)`. (#7593)Samuel Williams
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2023-03-25IO::Buffer#resize: Free internal buffer if new size is zero (#7569)Kasumi Hanazuki
`#resize(0)` on an IO::Buffer with internal buffer allocated will result in calling `realloc(data->base, 0)`. The behavior of `realloc` with size = 0 is implementation-defined (glibc frees the object and returns NULL, while BSDs return an inaccessible object). And thus such usage is deprecated in standard C (upcoming C23 will make it UB). To avoid this problem, just `free`s the memory when the new size is zero. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2023-03-24Raise ArgumentError if IO.read is provided negative offsetJeremy Evans
Fixes [Bug #19380] Notes: Merged: https://github.com/ruby/ruby/pull/7289
2023-03-24Add Dir.for_fdJeremy Evans
This returns a Dir instance for the given directory file descriptor. If fdopendir is not supported, this raises NotImplementedError. Implements [Feature #19347] Notes: Merged: https://github.com/ruby/ruby/pull/7135
2023-03-24Add Dir#chdirJeremy Evans
This uses Dir.fchdir if supported, or Dir.chdir otherwise. Implements [Feature #19347] Notes: Merged: https://github.com/ruby/ruby/pull/7135
2023-03-24[rubygems/rubygems] remove test skips/pends on mswin platformMSP-Greg
https://github.com/rubygems/rubygems/commit/1d52eff8bf
2023-03-24Write keyword arguments directlyNobuyoshi Nakada
`assert_normal_exit` uses keyword arguments since 2013, commit 05dd6b194cc29961a7cecfd5c3852f06dd56a871. Notes: Merged: https://github.com/ruby/ruby/pull/7589
2023-03-23YJIT: Save PC on rb_str_concat (#7586)Takashi Kokubun
[Bug #19483] Co-authored-by: Alan Wu <alansi.xingwu@shopify.com> Notes: Merged-By: k0kubun <takashikkbn@gmail.com>