aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [rubygems/rubygems] Update man page for `require` option in `bundle add` commandnobuyo2022-05-0626-29/+36
| | | | https://github.com/rubygems/rubygems/commit/08a0a5b7d1
* Mark RCLASS_INCLUDERAlan Wu2022-05-051-0/+4
| | | | | | | | | | Since 4d8f76286beefbb8f7fba2479f6d0a0b4a47304c, we need to dereference the includer field on iclasses, so we need to mark it to make sure it's alive. Sometimes during compaction we crash because the field is dangling, though I have a hard time constructing such a situation. See http://ci.rvm.jp/results/trunk@ruby-iga/3947725
* Fix potential GC issue while iterating over weak refsAlan Wu2022-05-051-8/+9
| | | | | | | | | | | | While walking over the list of subclasses for `include` and friends, we check whether the subclass is a garbage object. After the check, we allocate objects which might trigger GC and make the subclass garbage, even though before the allocation the subclass was not garbage. This is a sort of time-of-check-time-of-use issue. Fix this by saving the weak reference to a local variable, upgrading it to a strong reference while we do the allocation. It makes the code look slightly nicer even if it doesn't fix any runtime issues.
* * 2022-05-06 [ci skip]git2022-05-061-1/+1
|
* File rdoc (#5888)Burdette Lamar2022-05-051-14/+29
| | | | | | | | | Treats: ::pipe? ::symlink? ::socket? ::blockdev? ::chardev?
* Link from printf methods to format spec doc (#5886)Burdette Lamar2022-05-053-259/+28
|
* [ruby/logger] Prefer String#[0, 1] over [0..0]Akira Matsuda2022-05-051-1/+1
| | | | | | [0..0] internally creates an extra Array object, and so is slower and much more memory consuming https://github.com/ruby/logger/commit/20616ad34a
* * remove trailing spaces. [ci skip]git2022-05-051-3/+3
|
* [DOC] More on format specs (#5877)Burdette Lamar2022-05-041-9/+151
| | | | | | * Update doc/format_specifications.rdoc Co-authored-by: Peter Zhu <peter@peterzhu.ca>
* * 2022-05-05 [ci skip]git2022-05-051-1/+1
|
* Unpoison freelist when iterating over it in gc_sweep_pageJemma Issroff2022-05-041-0/+2
|
* Update lldb helper for iseq disassembly to use correct var nameJemma Issroff2022-05-041-1/+1
|
* Remove unneeded castPeter Zhu2022-05-041-1/+1
| | | | `start` is of type uintptr_t so it does not need to be casted to VALUE.
* [rubygems/rubygems] Also speed up the case when nothing changedDavid Rodríguez2022-05-041-3/+6
| | | | https://github.com/rubygems/rubygems/commit/fa0ac74883
* [rubygems/rubygems] Fix missing space in specDavid Rodríguez2022-05-041-1/+1
| | | | https://github.com/rubygems/rubygems/commit/fabc357e70
* [rubygems/rubygems] Make looping more concise with `select`David Rodríguez2022-05-041-5/+2
| | | | https://github.com/rubygems/rubygems/commit/c43d5f979a
* [rubygems/rubygems] Don't converge specs in frozen modeDavid Rodríguez2022-05-041-4/+4
| | | | https://github.com/rubygems/rubygems/commit/ea09bc4680
* Update reference for RCLASS_INCLUDER during compactionAlan Wu2022-05-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We didn't update the includer field during compaction so it could become a dangling pointer after compaction. It's only recently that we started to dereference the field, and we were only comparing the pointer before then, so the omission only recently started to cause crashes. By instrumenting object.c:833 with `rp(includer);`, you can see the includer field become `T_NONE` with the following script: ```ruby mod = Module.new do protected def foo = 1 end klass = Class.new do include Module.new def run foo end end klass.include(mod) GC.verify_compaction_references(double_heap: true, toward: :empty) klass.new.run ``` I found a crash in a private application that this patch fixes, but wasn't able to develop a small reproducer. Hence the above demo that requires instrumentation.
* Add a regression test for opt_plus with unknown type (#5878)Maxime Chevalier-Boisvert2022-05-031-0/+25
|
* * 2022-05-04 [ci skip]git2022-05-041-1/+1
|
* [DOC] mention macros for public headersNobuyoshi Nakada2022-05-042-3/+23
|
* Remove _with_gc functions in darrayPeter Zhu2022-05-032-60/+13
| | | | | | | darray was used in YJIT which required the functions to not trigger GC. YJIT has now moved to Rust and does not use darray anymore, so we can remove the functions that don't trigger GC and only keep the ones that trigger GC.
* Fix bug identified by @noahgibbs. (#5876)Maxime Chevalier-Boisvert2022-05-021-1/+4
| | | Turned out to be a one-character fix :)
* YJIT: Reject USE_FLONUM=0 builds at build timeAlan Wu2022-05-021-0/+4
| | | | | YJIT can't support these builds so it's better to reject with a message than to crash at runtime.
* [DOC] Some YJIT dependencies are no longer requiredAlan Wu2022-05-021-3/+3
| | | | | | | The `capstone` crate on crates.io does not need `libcapstone` on the system because it builds from [source]. `gdbm` is now a separate gem (thanks for extracting it!). [source]: https://github.com/capstone-rust/capstone-rs/blob/c31409905a9fc4581133de248fcd0a66b2c37e36/capstone-sys/build.rs#L143
* [DOC] Fix links to doc pagesNobuyoshi Nakada2022-05-031-12/+12
|
* * 2022-05-03 [ci skip]git2022-05-031-1/+1
|
* [ruby/getoptlong] Enhanced RDoc for GetoptLong ↵Burdette Lamar2022-05-0311-160/+569
| | | | | | | | (https://github.com/ruby/getoptlong/pull/4) Detailed introductory material. https://github.com/ruby/getoptlong/commit/1544f2fb7b
* YJIT: Remove redundant `extern crate` (#5869)Koichi ITO2022-05-022-2/+0
| | | | | | | | | | | | | | | | | Follow up https://github.com/ruby/ruby/commit/0514d81 Rust YJIT requires Rust 1.60.0 or later. So, `extern crate` looks unnecessary because it can use the following Rust 2018 edition feature: https://doc.rust-lang.org/stable/edition-guide/rust-2018/path-changes.html#no-more-extern-crate It passes the following tests. ```console % cd yjit % cargo test --features asm_comments,disasm (snip) test result: ok. 56 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s ```
* Bump github/codeql-action from 1 to 2dependabot[bot]2022-05-021-3/+3
| | | | | | | | | | | | | | | Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v1...v2) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
* Fix a typo [ci skip]Kazuhiro NISHIYAMA2022-05-021-1/+1
|
* * 2022-05-02 [ci skip]git2022-05-021-2/+2
|
* Repair internal links (#5866)Burdette Lamar2022-05-011-26/+26
| | | | | * Repair internal links * Minor changes to format spec
* Document best-practices for writing hash methods (#5805)Chris Seaton2022-04-301-0/+13
| | | | | * Discussion is as per https://bugs.ruby-lang.org/issues/18611. Co-authored-by: Sam Bostock <sam.bostock@shopify.com>
* YJIT: Enable default rustc lints (warnings) (#5864)Alan Wu2022-04-2911-309/+309
| | | | | | | | | | | | | | `rustc` performs in depth dead code analysis and issues warning even for things like unused struct fields and unconstructed enum variants. This was annoying for us during the port but hopefully they are less of an issue now. This patch enables all the unused warnings we disabled and address all the warnings we previously ignored. Generally, the approach I've taken is to use `cfg!` instead of using the `cfg` attribute and to delete code where it makes sense. I've put `#[allow(unused)]` on things we intentionally keep around for printf style debugging and on items that are too annoying to keep warning-free in all build configs.
* [DOC] Format specs (#5857)Burdette Lamar2022-04-291-0/+196
| | | This new document would eventually replace the format spec discussion at Kernel#sprintf.
* * 2022-04-30 [ci skip]git2022-04-301-1/+1
|
* YJIT: Adopt Clippy suggestions we likeAlan Wu2022-04-298-39/+39
| | | | | | | | | This adopts most suggestions that rust-clippy is confident enough to auto apply. The manual changes mostly fix manual if-lets and take opportunities to use the `Default` trait on standard collections. Co-authored-by: Kevin Newton <kddnewton@gmail.com> Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
* YJIT: Do not create `CodeBlock.asm_comments` if the `asm_comments` feature ↵Dmitry Dygalo2022-04-291-9/+19
| | | | is disabled (#5863)
* [rubygems/rubygems] Generalize description to account for different push serversMatthias Viehweger2022-04-291-2/+6
| | | | https://github.com/rubygems/rubygems/commit/cbf13edd3a
* [rubygems/rubygems] Clarify description of owner-flagsMatthias Viehweger2022-04-291-3/+4
| | | | https://github.com/rubygems/rubygems/commit/28864b1057
* Prevent a "warning: `*' interpreted as argument prefix"Yusuke Endoh2022-04-291-2/+2
|
* YJIT: Handle spaces in build dir path using find(1) `-exec`Alan Wu2022-04-281-9/+3
| | | | | | | | | | | | | | | | | | | | Previously, we relied on shell word splitting, which leads to passing the wrong arguments when there are white spaces in the path. Avoiding command substitution also makes this script more likely to work under Solaris 10, where `/bin/sh` is not POSIX compliant [1]. (Thanks you, `@znz` for fixing the syntax error in 4210ae2158b545beda908fb29e03d23994f262e3 though!) The hack from c466f270b891962518763ad299f907beac0ebf62 doesn't actually work so this commit reverts it. The shell still needs to parse through all of the code, maybe because make doesn't in fact send newlines to the shell. By the way, we also use the `-exec` option in the `ext/distclean` task. [1]: https://docs.oracle.com/cd/E26505_01/html/816-5165/sh-1.html
* Don't set LDFLAGS by defaultAaron Patterson2022-04-281-7/+0
| | | | | | | | This fixes a bug where Ruby on macOS running on ARM would try to look in `/usr/local/lib` for things to link against, but the libraries in that directory are from the x86 installation of Homebrew [ruby-core:108424]
* YJIT: replace BLOCKID_NULL with Option<BlockId>, more idiomatic (#5858)Maxime Chevalier-Boisvert2022-04-282-29/+22
| | | | | | | | | | | | | * YJIT: replace BLOCKID_NULL with Option<BlockId>, more idiomatic * Update yjit/src/core.rs Co-authored-by: Alan Wu <XrXr@users.noreply.github.com> * Update yjit/src/core.rs Co-authored-by: Alan Wu <XrXr@users.noreply.github.com> Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
* * 2022-04-29 [ci skip]git2022-04-291-1/+1
|
* Add missing write barriers to Array#replaceAlan Wu2022-04-282-2/+12
| | | | | | | Previously it made object references without using write barriers, creating GC inconsistencies. See: http://ci.rvm.jp/results/trunk-gc-asserts@phosphorus-docker/3925529
* Skip test for cargo builderHiroshi SHIBATA2022-04-281-0/+1
|
* Move testing_ruby_repo into test helperHiroshi SHIBATA2022-04-282-4/+8
|
* Merge ↵Hiroshi SHIBATA2022-04-2831-487/+611
| | | | https://github.com/rubygems/rubygems/commit/3f7d0352e84b29d4a2d4cd93b31e5ebdb5f79cc6