summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add spec for `Coverage.supported?` and `start(eval: true)`. (#6499)Samuel Williams2022-10-082-6/+29
| | | * Don't emit coverage for eval when eval coverage is disabled.
* [ruby/logger] Fix the Logger::Formatter documentationlijunwei2022-10-071-1/+1
| | | | https://github.com/ruby/logger/commit/db554fbda7
* Simplify default argument specification. (#6507)Samuel Williams2022-10-073-11/+9
|
* Add IO#timeout attribute and use it for blocking IO operations. (#5653)Samuel Williams2022-10-0717-97/+426
|
* Update bundled gems list at c3a87e16d8edea1496eebc60d7514f [ci skip]git2022-10-071-1/+1
|
* Bundle RBS 2.7.0 (#6506)Soutaro Matsumoto2022-10-071-1/+1
|
* Add --with-libffi-source-dir feature and removed --enable-bundled-libffi ↵Hiroshi SHIBATA2022-10-074-25/+12
| | | | | | | | | option. (#113) https://bugs.ruby-lang.org/issues/18571 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Co-authored-by: Sutou Kouhei <kou@clear-code.com>
* [ruby/fiddle] test: don't use assert_true/assert_falseSutou Kouhei2022-10-071-2/+2
| | | | | | | | GitHub: GH-102 They aren't available in ruby/ruby. https://github.com/ruby/fiddle/commit/ced671e43b
* [ruby/fiddle] closure: follow variable name changeSutou Kouhei2022-10-071-1/+1
| | | | | | GitHub: GH-102 https://github.com/ruby/fiddle/commit/2530496602
* [ruby/fiddle] closure: free resources when an exception is raised in Closure.newSutou Kouhei2022-10-071-13/+43
| | | | | | GitHub: GH-102 https://github.com/ruby/fiddle/commit/81a8a56239
* [ruby/fiddle] test: ensure freeing closureSutou Kouhei2022-10-071-3/+6
| | | | | | GitHub: GH-102 https://github.com/ruby/fiddle/commit/b2fef1770d
* [ruby/fiddle] test: ensure freeing closureSutou Kouhei2022-10-071-10/+15
| | | | | | | | GitHub: GH-102 This also improves freed closures assertions. https://github.com/ruby/fiddle/commit/0495624caf
* [ruby/fiddle] test: don't use power-assertSutou Kouhei2022-10-071-6/+2
| | | | | | It seems that we can't use it in ruby/ruby. https://github.com/ruby/fiddle/commit/e1221297fb
* [ruby/fiddle] test: ensure freeing closureSutou Kouhei2022-10-072-18/+25
| | | | | | | | GitHub: GH-102 This also improves freed closures assertions. https://github.com/ruby/fiddle/commit/f6431f3cf8
* [ruby/fiddle] Add Fiddle::Closure.create and Fiddle::Closure.freeSutou Kouhei2022-10-073-47/+131
| | | | | | | | | | | | | | | | GitHub: fix GH-102 It's for freeing a closure explicitly. We can't use Fiddle::Closure before we fork the process. If we do it, the process may be crashed with SELinux. See https://github.com/ruby/fiddle/issues/102#issuecomment-1241763091 for details. Reported by Vít Ondruch. Thanks!!! https://github.com/ruby/fiddle/commit/a0ccc6bb1b
* [ruby/fiddle] test: suppress a warningSutou Kouhei2022-10-071-1/+2
| | | | | | | test/fiddle/test_import.rb:138: warning: ambiguous first argument; put parentheses or a space even after `-' operator https://github.com/ruby/fiddle/commit/060eef76ad
* [ruby/fiddle] Add `sym_defined?` methods to test if a symbol is defined ↵Aaron Patterson2022-10-072-4/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://github.com/ruby/fiddle/pull/108) I would like to check if a symbol is defined before trying to access it. Some symbols aren't available on all platforms, so instead of raising an exception, I want to check if it's defined first. Today we have to do: ```ruby begin addr = Fiddle::Handle.sym("something") # do something rescue Fiddle::DLError end ``` I want to write this: ```ruby if Fiddle::Handle.sym_defined?("something") addr = Fiddle::Handle.sym("something") # do something end ``` https://github.com/ruby/fiddle/commit/9d3371de13 Co-authored-by: Sutou Kouhei <kou@clear-code.com>
* [ruby/fiddle] Move "type" constants to `Fiddle::Types` ↵Aaron Patterson2022-10-073-58/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://github.com/ruby/fiddle/pull/112) This helps to reduce repetition in code. Instead of doing "TYPE_*" everywhere, you can do `include Fiddle::Types`, and write the type name directly. This PR is to help reduce repetition when writing Fiddle code. Right now we have to type `TYPE_` everywhere, and you also have to include all of `Fiddle` to access `TYPE_*` constants. With this change, you can just include `Fiddle::Types` and it will shorten your code and also you only have to include those constants. Here is an example before: ```ruby require "fiddle" module MMAP # All Fiddle constants included include Fiddle def self.make_function name, args, ret ptr = Handle::DEFAULT[name] func = Function.new ptr, args, ret, name: name define_singleton_method name, &func.to_proc end make_function "munmap", [TYPE_VOIDP, # addr TYPE_SIZE_T], # len TYPE_INT make_function "mmap", [TYPE_VOIDP, TYPE_SIZE_T, TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT], TYPE_VOIDP make_function "mprotect", [TYPE_VOIDP, TYPE_SIZE_T, TYPE_INT], TYPE_INT end ``` After: ```ruby require "fiddle" module MMAP # Only type names included include Fiddle::Types def self.make_function name, args, ret ptr = Fiddle::Handle::DEFAULT[name] func = Fiddle::Function.new ptr, args, ret, name: name define_singleton_method name, &func.to_proc end make_function "munmap", [VOIDP, # addr SIZE_T], # len INT make_function "mmap", [VOIDP, SIZE_T, INT, INT, INT, INT], VOIDP make_function "mprotect", [VOIDP, SIZE_T, INT], INT end ``` We only need to import the type names, and you don't have to type `TYPE_` over and over. I think this makes Fiddle code easier to read. https://github.com/ruby/fiddle/commit/49fa7233e5 Co-authored-by: Sutou Kouhei <kou@clear-code.com>
* [ruby/fiddle] Add constants for unsigned values ↵Aaron Patterson2022-10-077-44/+183
| | | | | | | | | | | | | | | (https://github.com/ruby/fiddle/pull/111) This commit adds constants for unsigned values. Currently we can use `-` to mean "unsigned", but I think having a specific name makes Fiddle more user friendly. This commit continues to support `-`, but introduces negative constants with "unsigned" names I think this will help to eliminate [this code](https://github.com/ruby/ruby/blob/3a56bf0bcc66e14ffe5ec89efc32ecfceed180f4/lib/mjit/c_type.rb#L31-L38) https://github.com/ruby/fiddle/commit/2bef0f1082 Co-authored-by: Sutou Kouhei <kou@clear-code.com>
* [ruby/fiddle] test: ensure GC-ing closuresSutou Kouhei2022-10-074-6/+24
| | | | | | | | | | | | | | GitHub: fix GH-102 We can't use Fiddle::Closure before we fork the process. If we do it, the process may be crashed with SELinux. See https://github.com/ruby/fiddle/issues/102#issuecomment-1241763091 for details. Reported by Vít Ondruch. Thanks!!! https://github.com/ruby/fiddle/commit/1343ac7a95
* [ruby/date] Fix misplaced time zone offset checksNobuyoshi Nakada2022-10-072-2/+7
| | | | https://github.com/ruby/date/commit/d21c69450a
* [ruby/psych] Removed the related condition of --enable-bundled-libyamlHiroshi SHIBATA2022-10-071-6/+1
| | | | https://github.com/ruby/psych/commit/7c211a43c1
* [ruby/psych] --enable-bundled-libyaml config has been removedHiroshi SHIBATA2022-10-071-1/+1
| | | | https://github.com/ruby/psych/commit/447d372dcd
* [ruby/rdoc] Special characters are prohibited as filename on WindowsNobuyoshi Nakada2022-10-071-1/+10
| | | | https://github.com/ruby/rdoc/commit/13b9da5932
* [ruby/rdoc] Escape search resultsNobuyoshi Nakada2022-10-073-12/+12
| | | | | | https://hackerone.com/reports/1321358 https://github.com/ruby/rdoc/commit/2ebf8fd510
* [ruby/rdoc] Escape file namesNobuyoshi Nakada2022-10-073-5/+19
| | | | | | https://hackerone.com/reports/1321358 https://github.com/ruby/rdoc/commit/8c07cc4657
* [ruby/rdoc] Escape main titleNobuyoshi Nakada2022-10-072-1/+22
| | | | | | https://hackerone.com/reports/1187156 https://github.com/ruby/rdoc/commit/5dedb5741d
* [ruby/rdoc] Escape HYPERLINKsNobuyoshi Nakada2022-10-072-1/+6
| | | | https://github.com/ruby/rdoc/commit/ac35485be6
* [ruby/rdoc] Escape RDOCLINKsNobuyoshi Nakada2022-10-072-7/+30
| | | | | | https://hackerone.com/reports/1187156 https://github.com/ruby/rdoc/commit/7cecf1efae
* [ruby/rdoc] Escape TIDYLINKsNobuyoshi Nakada2022-10-072-2/+29
| | | | | | https://hackerone.com/reports/1187156 https://github.com/ruby/rdoc/commit/1ad2dd3ca2
* YJIT: add an assert for branch_stub_hit() (#6505)Alan Wu2022-10-061-1/+4
| | | | | We set the PC in branch_stub_hit(), which only makes sense if we're running with the intended iseq for the stub. We ran into an issue caught by this while tweaking code layout.
* YJIT: fix ARM64 bitmask encoding for 32 bit registers (#6503)Alan Wu2022-10-064-22/+148
| | | | | | | | | | | | | | For logical instructions such as AND, there is a constraint that the N part of the bitmask immediate must be 0. We weren't respecting this condition previously and were silently emitting undefined instructions. Check for this condition in the assembler and tweak the backend to correctly detect whether a number could be encoded as an immediate in a 32 bit logical instruction. Due to the nature of the immediate encoding, the same numeric value encodes differently depending on the size of the register the instruction works on. We currently don't have cases where we use 32 bit immediates but we ran into this encoding issue during development.
* [ruby/open-uri] Support 308 status redirectJanko Marohnić2022-10-071-1/+2
| | | | https://github.com/ruby/open-uri/commit/d8899ae4ac
* Adapt doc guide to new GFM features (#6504)Burdette Lamar2022-10-061-6/+4
| | | | | * Adapt doc guide to new GFM features * Adapt doc guide to new GFM features
* Notify CI failures of Miscellaneous checksTakashi Kokubun2022-10-061-0/+14
|
* [ruby/rdoc] Remove trailing spaces to fix CITakashi Kokubun2022-10-061-1/+1
| | | | | | https://github.com/ruby/ruby/actions/runs/3199301563/jobs/5224898228 https://github.com/ruby/rdoc/commit/369e4fa32d60bc00982801a6848efe5338603ac5
* Add debug output to test_thrashing_for_young_objectsPeter Zhu2022-10-061-5/+8
| | | | | The test is failing only on trunk-repeat50@phosphorus-docker. This commit adds some debugging output to debug the failure.
* fix Data docs (#6497)Yuri Smirnov2022-10-061-3/+3
|
* [DOC] Integrate io_streams.rdoc into io.c (#6491)Burdette Lamar2022-10-061-14/+33
| | | Integrate io_streams.rdoc into io.c
* [ruby/rdoc] Add center alignNobuyoshi Nakada2022-10-062-70/+12
| | | | https://github.com/ruby/rdoc/commit/512cc55a0e
* [ruby/rdoc] Allow spaces around pipesNobuyoshi Nakada2022-10-062-5/+65
| | | | https://github.com/ruby/rdoc/commit/3b3a583580
* [ruby/rdoc] Allow escaped pipes in cellsNobuyoshi Nakada2022-10-062-69/+21
| | | | https://github.com/ruby/rdoc/commit/333952a62d
* [ruby/rdoc] Allow leading pipes to be ommittedNobuyoshi Nakada2022-10-062-93/+204
| | | | https://github.com/ruby/rdoc/commit/d263a2c9c4
* [ruby/rdoc] Allow trailing pipes to be ommittedNobuyoshi Nakada2022-10-062-4/+33
| | | | https://github.com/ruby/rdoc/commit/1318048877
* [Bug #19038] Fix corruption of generic_iv_tbl when compactingPeter Zhu2022-10-061-5/+10
| | | | | | | | | | | | | | When the generic_iv_tbl is resized up, rebuild_table performs allocations that can trigger GC. If autocompaction is enabled, then moved objects are removed from and inserted into the generic_iv_tbl. This may cause another call to rebuild_table to resize the generic_iv_tbl. When returning back to the original rebuild_table, some of the data may be stale, causing the generic_iv_tbl to be corrupted. This commit changes rebuild_table to only read data from the st_table after the allocations have completed. Co-Authored-By: Matt Valentine-House <matt@eightbitraptor.com>
* Introduce `Fiber.blocking{}` for bypassing the fiber scheduler. (#6498)Samuel Williams2022-10-063-0/+60
|
* [ruby/rdoc] Allow RDoc markups in table cellsNobuyoshi Nakada2022-10-062-2/+6
| | | | https://github.com/ruby/rdoc/commit/b16d3f1727
* [ruby/rdoc] Add `RDoc::Markup::ToHtml#accept_table` testNobuyoshi Nakada2022-10-061-0/+23
| | | | https://github.com/ruby/rdoc/commit/0cb3df713b
* * remove trailing spaces. [ci skip]git2022-10-061-1/+1
|
* [ruby/open-uri] fix: added test case that validates that bad TLS version is ↵Nishant Patel2022-10-061-10/+20
| | | | | | silently ignored https://github.com/ruby/open-uri/commit/4b91b11730