aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/reline] Reset IOGate in test_resetPhillip Hellewell2023-01-113-2/+2
| | | | https://github.com/ruby/reline/commit/331c1094ef
* [ruby/reline] Change IOGate back to GeneralIOPhillip Hellewell2023-01-112-0/+2
| | | | | | Staying with ANSI can cause side effects with other tests. https://github.com/ruby/reline/commit/ba36067802
* Suppressing pending messages with RSpecHiroshi SHIBATA2023-01-112-6/+12
|
* [ruby/psych] Get rid of anonymous eval callsJean Boussier2023-01-114-7/+7
| | | | | | Things declared in anonymous eval are always annoying to locate. https://github.com/ruby/psych/commit/38871ad4e5
* [ruby/set] Avoid the `block or return` pattern to save Proc allocationsJean Boussier2023-01-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the block param in a boolean context like this cause it to be allocated. Using it with an `if` or `unless` was optimized in 3.2 (https://github.com/ruby/ruby/pull/6286) but using it with `or` or `and` wasn't. ```ruby def foo(&block) block or return 1 end puts RubyVM::InstructionSequence.of(method(:foo)).disasm == disasm: #<ISeq:foo@(irb):11 (11,0)-(13,3)> (catch: false) local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: 0, kw: -1@-1, kwrest: -1]) [ 1] block@0<Block> 0000 getblockparam block@0, 0 ( 12)[LiCa] 0003 dup 0004 branchif 10 0006 pop 0007 putobject_INT2FIX_1_ 0008 leave [Re] 0009 putnil 0010 leave ``` versus ``` def foo(&block) return 1 if block end puts RubyVM::InstructionSequence.of(method(:foo)).disasm == disasm: #<ISeq:foo@(irb):15 (15,0)-(17,3)> (catch: false) local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: 0, kw: -1@-1, kwrest: -1]) [ 1] block@0<Block> 0000 getblockparamproxy block@0, 0 ( 16)[LiCa] 0003 branchunless 7 0005 putobject_INT2FIX_1_ 0006 leave ( 17)[Re] 0007 putnil ( 16) 0008 leave ``` https://github.com/ruby/set/commit/e89da977d4
* Skip unfixed assertion about objspace/dump_allKoichi Sasada2023-01-111-2/+6
| | | | | | | | | | | | | | | | | ``` {"address":"0x7f8c03e9fcf0", "type":"STRING", "shape_id":10, "slot_size":40, "class":"0x7f8c00dbed98", "frozen":true, "embedded":true, "fstring":true, "bytesize":5, "value":"TEST2", "encoding":"US-ASCII", "coderange":"7bit", "memsize":40, "flags":{"wb_protected":true}} {"address":"0x7f8c03e9ffc0", "type":"STRING", "shape_id":0, "slot_size":40, "class":"0x7f8c00dbed98", "embedded":true, "bytesize":5, "value":"TEST2", "encoding":"US-ASCII", "coderange":"7bit", "memsize":40, "flags":{"wb_protected":true}} {"address":"0x7f8c03e487c0", "type":"STRING", "shape_id":0, "slot_size":40, "class":"0x7f8c00dbed98", "embedded":true, "bytesize":5, "value":"TEST2", "encoding":"UTF-8", "coderange":"unknown", "file":"-", "line":4, "method":"dump_my_heap_please", "generation":1, "memsize":40, "flags":{"wb_protected":true}} 1) Failure: TestObjSpace#test_dump_all [/tmp/ruby/src/trunk-gc-asserts/test/objspace/test_objspace.rb:622]: number of strings. <2> expected but was <3>. ``` This failure only occurred on a ruby built with `DEFS=\"-DRGENGC_CHECK_MODE=2\""` and only on a specific machine (Docker container) and difficult to reproduce, so skip this failure to check other failures.
* Remove about ext/psych/yaml which is no longer bundled [ci skip]Kazuhiro NISHIYAMA2023-01-111-27/+1
|
* Differentiate T_ARRAY and array subclasses (#7091)Aaron Patterson2023-01-102-8/+22
| | | | | | | | | | | | | * Differentiate T_ARRAY and array subclasses This commit teaches the YJIT context the difference between Arrays (objects with type T_ARRAY and class rb_cArray) vs Array subclasses (objects with type T_ARRAY but _not_ class rb_cArray). It uses this information to reduce the number of guards emitted when using `jit_guard_known_klass` with rb_cArray, notably opt_aref * Update yjit/src/core.rs Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
* YJIT: Save PC and SP before calling leaf builtins (#7090)Alan Wu2023-01-102-0/+20
| | | | | | | | | | | | | | Previously, we did not update `cfp->sp` before calling the C function of ISEQs marked with `Primitive.attr! "inline"` (leaf builtins). This caused the GC to miss temporary values on the stack in case the function allocates and triggers a GC run. Right now, there is only a few leaf builtins in numeric.rb on Integer methods such as `Integer#~`. Since these methods only allocate when operating on big numbers, we missed this issue. Fix by saving PC and SP before calling the functions -- our usual protocol for calling C functions that may allocate on the GC heap. [Bug #19316]
* YJIT: Fix a compilation warning with release build (#7092)Takashi Kokubun2023-01-101-1/+4
| | | | | | | | | | | | | | | warning: unused variable: `start_addr` --> ../yjit/src/asm/mod.rs:359:39 | 359 | pub fn remove_comments(&mut self, start_addr: CodePtr, end_addr: CodePtr) { | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_start_addr` | = note: `#[warn(unused_variables)]` on by default warning: unused variable: `end_addr` --> ../yjit/src/asm/mod.rs:359:60 | 359 | pub fn remove_comments(&mut self, start_addr: CodePtr, end_addr: CodePtr) { |
* Just ignore empty lines in bundled_gems file [ci skip]Nobuyoshi Nakada2023-01-101-0/+1
|
* Remove ARY_SET_SHAREDPeter Zhu2023-01-101-15/+7
| | | | We don't need ARY_SET_SHARED since we already have rb_ary_set_shared.
* [ruby/reline] Add key binding for DeletePhillip Hellewell2023-01-104-5/+170
| | | | https://github.com/ruby/reline/commit/603eacee22
* Remove extra line which causes `make test-bundled-gems-fetch` to failBenoit Daloze2023-01-101-1/+0
|
* [DOC] Comments about fields in bundled_gems fileNobuyoshi Nakada2023-01-101-1/+8
|
* Merge RubyGems and Bundler masterHiroshi SHIBATA2023-01-1064-361/+529
| | | | from https://github.com/rubygems/rubygems/commit/0635c1423db5d7c461d53bf0c3329bca75de7609
* Update LEGAL sections for pub_grubHiroshi SHIBATA2023-01-101-1/+9
|
* Removed vendored LICENSE file.Hiroshi SHIBATA2023-01-101-21/+0
|
* Fixed a typoHiroshi SHIBATA2023-01-101-1/+1
|
* [rubygems/rubygems] Fix resolver edge caseDavid Rodríguez2023-01-102-1/+28
| | | | | | | Let it deal with legacy gems with equivalent version and different dependencies. https://github.com/rubygems/rubygems/commit/b430babe97
* [rubygems/rubygems] Bump rb-sysdependabot[bot]2023-01-102-5/+5
| | | | | | | | | | | | | | | Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.53 to 0.9.54. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.53...v0.9.54) --- updated-dependencies: - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
* Revert "Re-enable test_ractor for YJIT"Takashi Kokubun2023-01-091-3/+5
| | | | | | | This reverts commit 650a20a3e1205f47224a987676cdbad7d826d597. Now that 3.2.0 is released, let's disable flaky tests. Koichi said he'll rework Ractor implementation for this, and it has not been done yet.
* Allow overriding a gdb command on `make gdb`Takashi Kokubun2023-01-091-1/+2
| | | | | | | | | | With --enable-yjit, you see an annoying warning like this: warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts of file /home/k0kubun/src/github.com/ruby/ruby/.ruby/miniruby. Use `info auto-load python-scripts [REGEXP]' to list them. Using `rust-gdb` instead fixes it. I use this like `make gdb GDB=rust-gdb`.
* Fix off-by-one error in rb_vm_each_stack_valuePeter Zhu2023-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applying the following patch to test/erb/test_erb.rb and running that file will cause Ruby to crash on my machine (macOS 13.1 on M1 Pro): ``` --- a/test/erb/test_erb.rb +++ b/test/erb/test_erb.rb @@ -7,6 +7,12 @@ class TestERB < Test::Unit::TestCase class MyError < RuntimeError ; end + def setup + GC.auto_compact = true + GC.stress = true + GC.verify_compaction_references(expand_heap: true, toward: :empty) + end + ``` It crashes with the following log: ``` /Users/peter/src/ruby/lib/erb/compiler.rb:276: [BUG] Segmentation fault at 0x00000001083a8690 ... -- C level backtrace information ------------------------------------------- ... /Users/peter/src/ruby/build/ruby(rb_vm_each_stack_value+0xa8) [0x104cc3a44] ../vm.c:2737 /Users/peter/src/ruby/build/ruby(rb_vm_each_stack_value+0xa8) [0x104cc3a44] ../vm.c:2737 /Users/peter/src/ruby/build/ruby(check_stack_for_moved+0x2c) [0x104b272a4] ../gc.c:5512 /Users/peter/src/ruby/build/ruby(gc_compact_finish) ../gc.c:5534 /Users/peter/src/ruby/build/ruby(gc_sweep_compact) ../gc.c:8653 /Users/peter/src/ruby/build/ruby(gc_sweep) ../gc.c:6196 /Users/peter/src/ruby/build/ruby(has_sweeping_pages+0x0) [0x104b19c54] ../gc.c:9568 /Users/peter/src/ruby/build/ruby(gc_rest) ../gc.c:9570 ``` This crash happens because it's reading the VALUE at sp. But since sp points to the top of the stack, it's reading the VALUE above the top of the stack, which is causing this segfault. Fixes [Bug #19320]
* Fix a warning in .gdbinitTakashi Kokubun2023-01-091-1/+1
| | | | | Warning: 'set logging on', an alias for the command 'set logging enabled', is deprecated. Use 'set logging enabled on'.
* Update yjit.mdMaxime Chevalier-Boisvert2023-01-091-0/+2
| | | Add Alan Wu's keynote & Maxime's talk to the list of YJIT-related talks :)
* [rubygems/rubygems] Bump rb-sys in ↵dependabot[bot]2023-01-092-5/+5
| | | | | | | | | | | | | | | | | /test/rubygems/test_gem_ext_cargo_builder/custom_name Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.53 to 0.9.54. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.53...v0.9.54) --- updated-dependencies: - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
* YJIT: Remove old comments for regenerated branches (#7083)Takashi Kokubun2023-01-092-0/+12
|
* Set STR_SHARED_ROOT flag on root of stringPeter Zhu2023-01-091-0/+1
|
* Assert that resizing arrays will re-embed themPeter Zhu2023-01-091-4/+4
|
* Assert that resizing objects will re-embed themPeter Zhu2023-01-091-1/+2
|
* Fix re-embedding of strings during compactionPeter Zhu2023-01-093-15/+21
| | | | | | | | | The reference updating code for strings is not re-embedding strings because the code is incorrectly wrapped inside of a `if (STR_SHARED_P(obj))` clause. Shared strings can't be re-embedded so this ends up being a no-op. This means that strings can be moved to a large size pool during compaction, but won't be re-embedded, which would waste the space.
* mkmf.rb: Refine message from `pkg_config`Nobuyoshi Nakada2023-01-091-53/+60
|
* mkmf.rb: Prefer `caller_locations` over parsing `caller`Nobuyoshi Nakada2023-01-091-1/+5
|
* [ruby/zlib] Check for functions with arguments and the headerNobuyoshi Nakada2023-01-091-4/+3
| | | | | | With arguments, mkmf skips compilation check for the function as RHS. https://github.com/ruby/zlib/commit/9ed9d6d36e
* [ruby/zlib] Fix the test broken in older versionsNobuyoshi Nakada2023-01-091-3/+9
| | | | https://github.com/ruby/zlib/commit/fc89ff9ef0
* [ruby/psych] Fix wrong package name of MSYS2/MINGW dependencyLars Kanis2023-01-091-1/+1
| | | | There is no package called "libyaml-devel". "libyaml" is enough.
* [ruby/uri] [DOC] Enhanced RDoc for URIBurdette Lamar2023-01-081-1/+9
| | | | | | (https://github.com/ruby/uri/pull/55) https://github.com/ruby/uri/commit/89ab4f1407
* [ruby/uri] [DOC] Enhanced RDoc for URI.decode_www_formBurdette Lamar2023-01-081-14/+31
| | | | | | (https://github.com/ruby/uri/pull/53) https://github.com/ruby/uri/commit/ce379e6125
* Remove no longer used environment variable [ci skip]Nobuyoshi Nakada2023-01-092-6/+0
|
* Adjust spec of bundler like as `sync_default_gems` [ci skip]Nobuyoshi Nakada2023-01-081-1/+12
|
* Ignore LICENSE files of libraries vendored in rubygems [ci skip]Nobuyoshi Nakada2023-01-081-13/+1
|
* [Bug #19323] Raise `RangeError` instead of integer overflowNobuyoshi Nakada2023-01-082-11/+12
|
* [rubygems/rubygems] [DOC] Remove internal document about `Kernel` monkey patchNobuyoshi Nakada2023-01-081-5/+0
| | | | | | https://bugs.ruby-lang.org/issues/19285 https://github.com/rubygems/rubygems/commit/1e22219ed4
* [rubygems/rubygems] `LoadError#path` on the caught exception does not need ↵Nobuyoshi Nakada2023-01-081-8/+8
| | | | | | to protect https://github.com/rubygems/rubygems/commit/a31f5d1a18
* [rubygems/rubygems] Let RDoc parse the doc of `Kernel#require`Nobuyoshi Nakada2023-01-083-46/+47
| | | | | | | | | Since RDoc does not parse string literals as documents, `eval` the entire file instead of embedding in a here-document. On the contrary, as `gem_original_require` alias is an implementation detail but not for users, it should not be documented. https://github.com/rubygems/rubygems/commit/cad4cf16cf
* [ruby/uri] [DOC] Common rdoc (https://github.com/ruby/uri/pull/52)Burdette Lamar2023-01-071-6/+12
| | | | https://github.com/ruby/uri/commit/be8047028f
* Only RangeError on CRuby for shift width >= 2**67Benoit Daloze2023-01-072-28/+14
| | | | * It seems a better exception class too than NoMemoryError.
* Fix Integer#{<<,>>} specs with large shift widthBenoit Daloze2023-01-072-28/+46
| | | | | * The limit depends on the implementation and platform, it seems unavoidable. * See https://bugs.ruby-lang.org/issues/18518#note-9
* [ruby/did_you_mean] Keep the deprecated API for another year in case this ↵Yuki Nishijima2023-01-071-2/+2
| | | | | | could break 'bundle install' https://github.com/ruby/did_you_mean/commit/0f4b0806b7