summaryrefslogtreecommitdiff
path: root/spec/ruby/optional
AgeCommit message (Collapse)Author
2025-04-14Expose `ruby_thread_has_gvl_p`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/11975
2025-04-14Add `RUBY_VERSION_IS_3_5`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/11975
2025-04-10Restore the original order of const_added and inherited callbacksXavier Noria
Originally, if a class was defined with the class keyword, the cref had a const_added callback, and the superclass an inherited callback, const_added was called first, and inherited second. This was discussed in https://bugs.ruby-lang.org/issues/21143 and an attempt at changing this order was made. While both constant assignment and inheritance have happened before these callbacks are invoked, it was deemed nice to have the same order as in C = Class.new This was mostly for alignment: In that last use case things happen at different times and therefore the order of execution is kind of obvious, whereas when the class keyword is involved, the order is opaque to the user and it is up to the interpreter. However, soon in https://bugs.ruby-lang.org/issues/21193 Matz decided to play safe and keep the existing order. This reverts commits: de097fbe5f3df105bd2a26e72db06b0f5139bc1a de48e47ddf78aba02fd9623bc7ce685540a10743 Notes: Merged: https://github.com/ruby/ruby/pull/13085
2025-04-02Removed Solaris conditions from optional and shared directoriesHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13037
2025-03-27Update to ruby/spec@5e579e2Andrew Konchin
Notes: Merged: https://github.com/ruby/ruby/pull/12984
2025-03-20Trigger `inherited` and `const_set` callbacks after const has been definedJean Boussier
[Misc #21143] [Bug #21193] The previous change caused a backward compatibility issue with code that called `Object.const_source_location` from the `inherited` callback. To fix this, the order is now: - Define the constant - Invoke `inherited` - Invoke `const_set` Notes: Merged: https://github.com/ruby/ruby/pull/12956
2025-03-19avoid platform dependent messageYO4
(Bug #21083) https://bugs.ruby-lang.org/issues/21083 Notes: Merged: https://github.com/ruby/ruby/pull/12622
2025-03-14Invoke `inherited` callbacks before `const_added`Jean Boussier
[Misc #21143] Conceptually this makes sense and is more consistent with using the `Name = Class.new(Superclass)` alternative method. However the new class is still named before `inherited` is called. Notes: Merged: https://github.com/ruby/ruby/pull/12927
2025-02-25Prefer `0.000001` over `0.000001f` for timeout calculations. (#12803)Samuel Williams
Notes: Merged-By: ioquatix <[email protected]>
2025-01-30Update to ruby/spec@affef93Andrew Konchin
Notes: Merged: https://github.com/ruby/ruby/pull/12679
2024-12-10Fix formatting of spec/ruby/optional/capi/ext/hash_spec.cAndrew Konchin
Notes: Merged: https://github.com/ruby/ruby/pull/12297
2024-12-10Update to ruby/spec@9f10222Andrew Konchin
Notes: Merged: https://github.com/ruby/ruby/pull/12297
2024-11-06Update to ruby/spec@54c391eBenoit Daloze
2024-11-04YJIT: Replace Array#each only when YJIT is enabled (#11955)Takashi Kokubun
* YJIT: Replace Array#each only when YJIT is enabled * Add comments about BUILTIN_ATTR_C_TRACE * Make Ruby Array#each available with --yjit as well * Fix all paths that expect a C location * Use method_basic_definition_p to detect patches * Copy a comment about C_TRACE flag to compilers * Rephrase a comment about add_yjit_hook * Give METHOD_ENTRY_BASIC flag to Array#each * Add --yjit-c-builtin option * Allow inconsistent source_location in test-spec * Refactor a check of BUILTIN_ATTR_C_TRACE * Set METHOD_ENTRY_BASIC without touching vm->running Notes: Merged-By: maximecb <[email protected]>
2024-10-04Update `io_spec.c` to use `rb_io_maybe_wait*` if possible. (#11792)Samuel Williams
Notes: Merged-By: ioquatix <[email protected]>
2024-10-04Better handling of timeout in `rb_io_maybe_wait_*`. (#9531)Samuel Williams
Notes: Merged-By: ioquatix <[email protected]>
2024-10-03Update spec/ruby/ for colon-style hash inspecttompng
Notes: Merged: https://github.com/ruby/ruby/pull/10924
2024-07-24Stop depending on Integer#size to return `sizeof(long)`Alan Wu
There is no guarantee that Integer#size will continue to return `sizeof(long)` for small integers. Use the `l!` specifier for Array#pack instead. It is a public interface that has a direct relationship with the `long` type. Notes: Merged: https://github.com/ruby/ruby/pull/11130
2024-07-24Add "c_long_size" guard, supplanting "wordsize" and stop using Integer#sizeAlan Wu
What a "word" is when talking about sizes is confusing because it's a highly overloaded term. Intel, Microsoft, and GDB are just a few vendors that have their own definition of what a "word" is. Specs that used the "wordsize" guard actually were mostly testing for the size of the C `long` fundamental type, so rename the guard for clarity. Also, get the size of `long` directly from RbConfig instead of guessing using Integer#size. Integer#size is not guaranteed to have anything to do with the `long` type. Notes: Merged: https://github.com/ruby/ruby/pull/11130
2024-07-02Update to ruby/spec@f8987acAndrew Konchin
2024-06-10Update to ruby/spec@517f06fAndrew Konchin
2024-06-07Balance block braces with `#if`Nobuyoshi Nakada
2024-06-07Enclose in ruby_version_is blocksNobuyoshi Nakada
2024-06-07Remove the old untyped Data API in spec/rubyNobuyoshi Nakada
2024-05-19Update to ruby/spec@6b04c1dAndrew Konchin
2024-05-02Declare as NORETURNNobuyoshi Nakada
2024-04-17Revert an accidentally merged change [ci skip]Nobuyoshi Nakada
2024-04-17[Feature #20335] `Thread.each_caller_location` argumentsNobuyoshi Nakada
Accecpt the same arguments as `caller` and `caller_locations`.
2024-04-02Update to ruby/spec@573cf97Andrew Konchin
2024-03-27[DOC] remove repetitive words in commentscrazeteam
Signed-off-by: crazeteam <[email protected]>
2024-03-14Update to ruby/spec@89175b2Benoit Daloze
2024-03-14[Feature #20265] Remove rb_newobj_of and RB_NEWOBJ_OFPeter Zhu
2024-03-03[Bug #20322] Fix rb_enc_interned_str_cstr null encodingThomas Marshall
The documentation for `rb_enc_interned_str_cstr` notes that `enc` can be a null pointer, but this currently causes a segmentation fault when trying to autoload the encoding. This commit fixes the issue by checking for NULL before calling `rb_enc_autoload`.
2024-02-26Update to ruby/spec@3a510bbBenoit Daloze
2024-02-23Stop using rb_fstring publiclyPeter Zhu
rb_fstring is a private API, so we should use rb_str_to_interned_str instead, which is a public API.
2024-02-12Update to ruby/spec@ce834adBenoit Daloze
2024-02-05Update to ruby/spec@3fc4444Benoit Daloze
2023-12-25Move non-portable pragmas to rubyspec.hNobuyoshi Nakada
In the extension libraries in spec/ruby/optional/capi, do not care about deprecated declarations.
2023-11-27Update to ruby/spec@c3206f6Benoit Daloze
2023-10-31Missing format stringNobuyoshi Nakada
Do not use a variable as a format string. Also we usually don't expect non-ascii data in C string literals.
2023-10-30Update to ruby/spec@bd7017fBenoit Daloze
2023-09-04Update to ruby/spec@96d1072Benoit Daloze
2023-08-02Update to ruby/spec@9e278f5Benoit Daloze
2023-06-26Update to ruby/spec@30e1c35Benoit Daloze
2023-06-01rb_io_descriptor() is available since 3.1Benoit Daloze
2023-06-01Hide the usage of `rb_io_t` where possible. (#7880)Samuel Williams
This retries the compatible parts of the previously reverted PR so we can continue to update related code without breaking backwards compatibility. Notes: Merged-By: ioquatix <[email protected]>
2023-06-01Revert "Hide most of the implementation of `struct rb_io`. (#6511)"NARUSE, Yui
This reverts commit 18e55fc1e1ec20e8f3166e3059e76c885fc9f8f2. fix [Bug #19704] https://bugs.ruby-lang.org/issues/19704 This breaks compatibility for extension libraries. Such changes need a discussion.
2023-05-30Hide most of the implementation of `struct rb_io`. (#6511)Samuel Williams
* Add rb_io_path and rb_io_open_descriptor. * Use rb_io_open_descriptor to create PTY objects * Rename FMODE_PREP -> FMODE_EXTERNAL and expose it FMODE_PREP I believe refers to the concept of a "pre-prepared" file, but FMODE_EXTERNAL is clearer about what the file descriptor represents and aligns with language in the IO::Buffer module. * Ensure that rb_io_open_descriptor closes the FD if it fails If FMODE_EXTERNAL is not set, then it's guaranteed that Ruby will be responsible for closing your file, eventually, if you pass it to rb_io_open_descriptor, even if it raises an exception. * Rename IS_EXTERNAL_FD -> RUBY_IO_EXTERNAL_P * Expose `rb_io_closed_p`. * Add `rb_io_mode` to get IO mode. --------- Co-authored-by: KJ Tsanaktsidis <[email protected]> Notes: Merged-By: ioquatix <[email protected]>
2023-05-24Fix "runs a C function with the global lock unlocked and unlocks IO with the ↵Samuel Williams
generic RUBY_UBF_IO" on Windows. (#7848) * Enable borked spec. * Ensure win32 wrappers are visible and used. * Reorganise `read`/`write`/`pipe` in `thread_spec.c`. Notes: Merged-By: ioquatix <[email protected]>
2023-05-24Add support for pread/pwrite on windows. (#7827)Samuel Williams
Notes: Merged-By: ioquatix <[email protected]>