summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2022-10-07[ruby/fiddle] test: suppress a warningSutou Kouhei
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
2022-10-07[ruby/fiddle] Add `sym_defined?` methods to test if a symbol is defined ↵Aaron Patterson
(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>
2022-10-07[ruby/fiddle] Move "type" constants to `Fiddle::Types` ↵Aaron Patterson
(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>
2022-10-07[ruby/fiddle] Add constants for unsigned values ↵Aaron Patterson
(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>
2022-10-07[ruby/fiddle] test: ensure GC-ing closuresSutou Kouhei
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
2022-10-07[ruby/date] Fix misplaced time zone offset checksNobuyoshi Nakada
https://github.com/ruby/date/commit/d21c69450a
2022-10-07[ruby/rdoc] Special characters are prohibited as filename on WindowsNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/13b9da5932
2022-10-07[ruby/rdoc] Escape file namesNobuyoshi Nakada
https://hackerone.com/reports/1321358 https://github.com/ruby/rdoc/commit/8c07cc4657
2022-10-07[ruby/rdoc] Escape main titleNobuyoshi Nakada
https://hackerone.com/reports/1187156 https://github.com/ruby/rdoc/commit/5dedb5741d
2022-10-07[ruby/rdoc] Escape HYPERLINKsNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/ac35485be6
2022-10-07[ruby/rdoc] Escape RDOCLINKsNobuyoshi Nakada
https://hackerone.com/reports/1187156 https://github.com/ruby/rdoc/commit/7cecf1efae
2022-10-07[ruby/rdoc] Escape TIDYLINKsNobuyoshi Nakada
https://hackerone.com/reports/1187156 https://github.com/ruby/rdoc/commit/1ad2dd3ca2
2022-10-06Add debug output to test_thrashing_for_young_objectsPeter Zhu
The test is failing only on trunk-repeat50@phosphorus-docker. This commit adds some debugging output to debug the failure.
2022-10-06[ruby/rdoc] Add center alignNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/512cc55a0e
2022-10-06[ruby/rdoc] Allow spaces around pipesNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/3b3a583580
2022-10-06[ruby/rdoc] Allow escaped pipes in cellsNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/333952a62d
2022-10-06[ruby/rdoc] Allow leading pipes to be ommittedNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/d263a2c9c4
2022-10-06[ruby/rdoc] Allow trailing pipes to be ommittedNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/1318048877
2022-10-06Introduce `Fiber.blocking{}` for bypassing the fiber scheduler. (#6498)Samuel Williams
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2022-10-06[ruby/rdoc] Allow RDoc markups in table cellsNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/b16d3f1727
2022-10-06[ruby/rdoc] Add `RDoc::Markup::ToHtml#accept_table` testNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/0cb3df713b
2022-10-06[ruby/open-uri] fix: added test case that validates that bad TLS version is ↵Nishant Patel
silently ignored https://github.com/ruby/open-uri/commit/4b91b11730
2022-10-06[ruby/open-uri] feat: allow option to pass version of SSL / TLS to use ↵Nishant Patel
during communication. Allow versions are OpenSSL::SSL::SSLContext::METHODS https://github.com/ruby/open-uri/commit/8729858517
2022-10-06[ruby/open-uri] Use omit instead of skip for test-unitHiroshi SHIBATA
https://github.com/ruby/open-uri/commit/63f466d6ed
2022-10-06[ruby/open-uri] Run global constant count test only under Ruby 3.2Hiroshi SHIBATA
https://github.com/ruby/open-uri/commit/a8f1605ae9
2022-10-06[ruby/open-uri] Avoid busting the global constant cacheJean Boussier
`Object#extend(mod)` bump the global constant cache if the module has constants of its own. So by moving these constants outside of `Meta` we avoid bumping the cache. https://github.com/ruby/open-uri/commit/363c399bac
2022-10-05[ruby/irb] Fixed sort of variables in completionImir Kiyamov
https://github.com/ruby/irb/commit/5842888255
2022-10-03Cannot `define` from defined `Data` class againNobuyoshi Nakada
2022-10-03[rubygems/rubygems] Revert "Cleaup unnecessary code"David Rodríguez
Unclear why, but https://github.com/rubygems/rubygems/commit/2e05dadbc5de created some warnings in ruby-core CI, so let's revert it. https://github.com/rubygems/rubygems/commit/729ce3a6e1
2022-10-03[ruby/irb] Change to explicit method call in completion ↵osyo-manga
(https://github.com/ruby/irb/pull/369) Ensure that methods are called even when local variables are defined. see: https://github.com/ruby/irb/issues/368 https://github.com/ruby/irb/commit/c34d54b8bb
2022-10-02Also the tests should use the configured pkg-configNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6482
2022-09-30Revert "This commit implements the Object Shapes technique in CRuby."Aaron Patterson
This reverts commit 68bc9e2e97d12f80df0d113e284864e225f771c2.
2022-09-30Fix frozen object inspecteileencodes
In the rails/rails CI build for Ruby master we found that some tests were failing due to inspect on a frozen object being incorrect. An object's instance variable count was incorrect when frozen causing the object's inspect to not splat out the object. This fixes the issue and adds a test for inspecting frozen objects. Co-Authored-By: Jemma Issroff <jemmaissroff@gmail.com> Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/6478
2022-10-01[rubygems/rubygems] Fix matching of eabihf platformsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/a03d30cd58
2022-10-01[rubygems/rubygems] Fix matching of linux platforms with eabi modifiersDavid Rodríguez
https://github.com/rubygems/rubygems/commit/89362c18ef Co-authored-by: Mike Dalessio <mike.dalessio@gmail.com>
2022-10-01[ruby/irb] Fix ripper_lex_without_warning duplicated heredoc tokentompng
https://github.com/ruby/irb/commit/45b539af39
2022-09-30Add Data class implementation: Simple immutable value objectVictor Shepelev
Notes: Merged: https://github.com/ruby/ruby/pull/6353 Merged-By: nobu <nobu@ruby-lang.org>
2022-09-30[rubygems/rubygems] Prevent a "warning: assigned but unused variable - data"Yusuke Endoh
https://github.com/rubygems/rubygems/commit/ec3fd55d40
2022-09-29Reduce diff to proc.c @ b0b9f7201acab05c2a3ad92c3043a1f01df3e17fBenoit Daloze
* So it's easy to review https://github.com/ruby/ruby/pull/6242 + https://github.com/ruby/ruby/pull/6467 and there are less changes overall.
2022-09-29Extend tests for a zsuper method of which the method it resolved to has been ↵Benoit Daloze
removed Notes: Merged: https://github.com/ruby/ruby/pull/6467
2022-09-29Resolve zsuper method during lookup but preserve owner separatelyBenoit Daloze
* See https://bugs.ruby-lang.org/issues/18729#note-34 * See [Bug #18729] Notes: Merged: https://github.com/ruby/ruby/pull/6467
2022-09-29[rubygems/rubygems] Refine error message to check the push URL instead of ↵Jenny Shen
just the host https://github.com/rubygems/rubygems/commit/46990f3292
2022-09-29[rubygems/rubygems] Refactor tests to use Net::HTTPResponse instances for ↵Jenny Shen
fetcher.data[:path] https://github.com/rubygems/rubygems/commit/4d91cacb1f Co-authored-by: Jacques Chester <jacques.chester@shopify.com>
2022-09-29[rubygems/rubygems] Surface entire redirect uri in permanent redirectionsJenny Shen
https://github.com/rubygems/rubygems/commit/da7837630b
2022-09-29[rubygems/rubygems] Add error message when api response is a permanent redirectJenny Shen
https://github.com/rubygems/rubygems/commit/ccca30c77a Co-authored-by: Nick Schwaderer <nick.schwaderer@shopify.com>
2022-09-29[ruby/date] The shrunk words to be copied is limitedNobuyoshi Nakada
Th buffer size is small enough and no need to allocate dynamically. https://github.com/ruby/date/commit/f62bf0a01d
2022-09-29[ruby/date] Narrow ALLOCV region for shrunk wordsNobuyoshi Nakada
https://github.com/ruby/date/commit/f51b038074
2022-09-29Add `Coverage.supported?` to detect what modes are supported.Samuel Williams
2022-09-29Add `eval: true/false` flag to `Coverage.setup`.Samuel Williams
2022-09-29[rubygems/rubygems] Put bundler gemspec stub at the right placeDavid Rodríguez
So that it's found when needed, rather than dynamically modifying loaded stubs and thus messing with RubyGems internals. https://github.com/rubygems/rubygems/commit/cd3e7cb9e5