summaryrefslogtreecommitdiff
path: root/spec/ruby/shared
AgeCommit message (Collapse)Author
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-01-07Update to ruby/spec@18032a7Andrew Konchin
Notes: Merged: https://github.com/ruby/ruby/pull/12517
2024-12-10Update to ruby/spec@9f10222Andrew Konchin
Notes: Merged: https://github.com/ruby/ruby/pull/12297
2024-11-08Do not round `a**b` to infinityYusuke Endoh
... instead, just calculate the value unless it is too big. Also, this change raises an ArgumentError if it is expected to exceed 16 GB in a 64-bit environment. (It is possible to calculate it straightforward, but it would likely be out-of-memory, so I didn't think it would make sense.) [Feature #20811] Notes: Merged: https://github.com/ruby/ruby/pull/12033
2024-11-06Update to ruby/spec@54c391eBenoit Daloze
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-05-19Update to ruby/spec@6b04c1dAndrew Konchin
2024-03-19Implement chilled stringsÉtienne Barrié
[Feature #20205] As a path toward enabling frozen string literals by default in the future, this commit introduce "chilled strings". From a user perspective chilled strings pretend to be frozen, but on the first attempt to mutate them, they lose their frozen status and emit a warning rather than to raise a `FrozenError`. Implementation wise, `rb_compile_option_struct.frozen_string_literal` is no longer a boolean but a tri-state of `enabled/disabled/unset`. When code is compiled with frozen string literals neither explictly enabled or disabled, string literals are compiled with a new `putchilledstring` instruction. This instruction is identical to `putstring` except it marks the String with the `STR_CHILLED (FL_USER3)` and `FL_FREEZE` flags. Chilled strings have the `FL_FREEZE` flag as to minimize the need to check for chilled strings across the codebase, and to improve compatibility with C extensions. Notes: - `String#freeze`: clears the chilled flag. - `String#-@`: acts as if the string was mutable. - `String#+@`: acts as if the string was mutable. - `String#clone`: copies the chilled flag. Co-authored-by: Jean Boussier <[email protected]>
2024-03-18Update set_backtrace documentationJean Boussier
Followup: https://github.com/ruby/ruby/pull/10017 [Feature #13557]
2024-03-14Update to ruby/spec@89175b2Benoit Daloze
2024-03-14`Exception#set_backtrace` accept arrays of `Backtrace::Location`Jean Boussier
[Feature #13557] Setting the backtrace with an array of strings is lossy. The resulting exception will return nil on `#backtrace_locations`. By accepting an array of `Backtrace::Location` instance, we can rebuild a `Backtrace` instance and have a fully functioning Exception. Co-Authored-By: Étienne Barrié <[email protected]>
2024-02-15Move examples related core extension feature by Bigdecimal to under the ↵Hiroshi SHIBATA
library/bigdecimal
2024-02-12Update to ruby/spec@ce834adBenoit Daloze
2024-02-05Update to ruby/spec@3fc4444Benoit Daloze
2024-01-18Guard bigdecimal related examplesHiroshi SHIBATA
spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/core/integer/coerce_spec.rb spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/shared/rational/coerce.rb spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/library/bigmath/log_spec.rb and example of at_spec.rb
2023-12-25Typofix under bootstraptest, spec and yjit directoriesHiroshi SHIBATA
2023-11-27Update to ruby/spec@c3206f6Benoit Daloze
2023-10-30Update to ruby/spec@bd7017fBenoit Daloze
2023-09-04Update to ruby/spec@96d1072Benoit Daloze
2023-08-26[Bug #19784] Fix behaviors against prefix with broken encodingNobuyoshi Nakada
- String#start_with? - String#delete_prefix - String#delete_prefix! Notes: Merged: https://github.com/ruby/ruby/pull/8296
2023-08-02Update to ruby/spec@9e278f5Benoit Daloze
2023-06-26Update to ruby/spec@30e1c35Benoit Daloze
2023-05-21Fix typo in spec file description [ci skip]Ivanov-Anton
fixed typo for spec description Notes: Merged: https://github.com/ruby/ruby/pull/7832 Merged-By: nobu <[email protected]>
2023-04-25Update to ruby/spec@7f69c86Benoit Daloze
2023-02-27Update to ruby/spec@e7dc804Benoit Daloze
2023-01-05Update to ruby/spec@9d69b95Benoit Daloze
2022-11-07Update to ruby/spec@740ccc8Benoit Daloze
2022-10-17thread_sync.c: Clarify and document the behavior of timeout == 0Jean Boussier
[Feature #18982] Instead of introducing an `exception: false` argument to have `non_block` return nil rather than raise, we can clearly document that a timeout of 0 immediately returns. The code is refactored a bit to avoid doing a time calculation in such case. Notes: Merged: https://github.com/ruby/ruby/pull/6500
2022-08-29Update to ruby/spec@d01709fBenoit Daloze
2022-08-18Implement SizedQueue#push(timeout: sec)Jean Boussier
[Feature #18944] If both `non_block=true` and `timeout:` are supplied, ArgumentError is raised. Notes: Merged: https://github.com/ruby/ruby/pull/6207
2022-08-02Implement Queue#pop(timeout: sec)Jean Boussier
[Feature #18774] As well as `SizedQueue#pop(timeout: sec)` If both `non_block=true` and `timeout:` are supplied, ArgumentError is raised. Notes: Merged: https://github.com/ruby/ruby/pull/6185
2022-07-27Update to ruby/spec@cbfaf51Benoit Daloze
2022-04-25Update to ruby/spec@3affe1eBenoit Daloze
2022-03-28Update to ruby/spec@aaf998fBenoit Daloze
2022-03-03Update to ruby/spec@82cd3a3Benoit Daloze
2022-01-28Update to ruby/spec@902ab83Benoit Daloze
2021-11-02Fix typosNobuyoshi Nakada
2021-07-29Update to ruby/spec@b65d01fBenoit Daloze
2021-06-02Update to ruby/spec@a0b7d0dBenoit Daloze
2021-03-27Update to ruby/spec@fd6edddBenoit Daloze
2020-12-28Suppress too big exponent warningsNobuyoshi Nakada
2020-12-27Update to ruby/spec@4ce9f41Benoit Daloze
2020-12-21Use Integer instead of Fixnum/BignumNobuyoshi Nakada
2020-11-27Update to ruby/spec@ac878adBenoit Daloze
2020-11-20Make String methods return String instances when called on a subclass instanceJeremy Evans
This modifies the following String methods to return String instances instead of subclass instances: * String#* * String#capitalize * String#center * String#chomp * String#chop * String#delete * String#delete_prefix * String#delete_suffix * String#downcase * String#dump * String#each/#each_line * String#gsub * String#ljust * String#lstrip * String#partition * String#reverse * String#rjust * String#rpartition * String#rstrip * String#scrub * String#slice! * String#slice/#[] * String#split * String#squeeze * String#strip * String#sub * String#succ/#next * String#swapcase * String#tr * String#tr_s * String#upcase This also fixes a bug in String#swapcase where it would return the receiver instead of a copy of the receiver if the receiver was the empty string. Some string methods were left to return subclass instances: * String#+@ * String#-@ Both of these methods will return the receiver (subclass instance) in some cases, so it is best to keep the returned class consistent. Fixes [#10845] Notes: Merged: https://github.com/ruby/ruby/pull/3701
2020-11-13Update to ruby/spec@b0b7f53Benoit Daloze
2020-10-24Update to ruby/spec@4f59d86Benoit Daloze
2020-10-12relax Fiber#transfer's restrictionKoichi Sasada
Using Fiber#transfer with Fiber#resume for a same Fiber is limited (once Fiber#transfer is called for a fiber, the fiber can not be resumed more). This restriction was introduced to protect the resume/yield chain, but we realized that it is too much to protect the chain. Instead of the current restriction, we introduce some other protections. (1) can not transfer to the resuming fiber. (2) can not transfer to the yielding fiber. (3) can not resume transferred fiber. (4) can not yield from not-resumed fiber. [Bug #17221] Also at the end of a transferred fiber, it had continued on root fiber. However, if the root fiber resumed a fiber (and that fiber can resumed another fiber), this behavior also breaks the resume/yield chain. So at the end of a transferred fiber, switch to the edge of resume chain from root fiber. For example, root fiber resumed f1 and f1 resumed f2, transferred to f3 and f3 terminated, then continue from the fiber f2 (it was continued from root fiber without this patch). Notes: Merged: https://github.com/ruby/ruby/pull/3636