summaryrefslogtreecommitdiff
path: root/spec/ruby
Commit message (Collapse)AuthorAgeFilesLines
* fix wording of spec description [ci skip]Martin Dürst2023-05-131-1/+1
|
* [Bug #19597] Freeze script nameNobuyoshi Nakada2023-05-101-2/+4
|
* marshal.c: shallow freeze user objectsJean Boussier2023-04-261-9/+7
| | | | | | When `freeze: true` argument is passed. [Bug #19427]
* Update to ruby/spec@7f6ca5bBenoit Daloze2023-04-252-1/+2
|
* Workaround CRuby adding x86_64-linux-fake in $LOADED_FEATURESBenoit Daloze2023-04-251-1/+5
|
* Update to ruby/spec@7f69c86Benoit Daloze2023-04-2599-183/+2316
|
* Allow anonymous memberless StructJeremy Evans2023-04-241-0/+14
| | | | | | | Previously, named memberless Structs were allowed, but anonymous memberless Structs were not. Fixes [Bug #19416]
* Check the precision of `getrusage` at runtimeNobuyoshi Nakada2023-04-231-1/+11
|
* Fix a guard of `Process.times`Nobuyoshi Nakada2023-04-221-8/+5
| | | | | | `GETRUSAGE_BASED_CLOCK_PROCESS_CPUTIME_ID` clock uses `getrusage` always if available as the name states. That is if it is implemented `getrusage` is available, regardless microseconds in its results.
* Fix an example of `Process.times`Nobuyoshi Nakada2023-04-221-1/+1
| | | | | | | | Prior to commit 5806c54447439f2ba22892e4045e78dd80f96f0c, it was "at least one result with precision beyond milliseconds (with none-zero microseconds) should exist"; after this commit, "at least one result should have zero microseconds". This chance is lower than the previous condition.
* Skip when unix socket path is too longNobuyoshi Nakada2023-04-211-1/+3
| | | | | Eventually the path directly under "/tmp" is complained by `rm_r` in spec/mspec/lib/mspec/helpers/fs.rb.
* Use ASCII-compatible encoding for testsNobuyoshi Nakada2023-04-202-0/+0
| | | | | | Since these files are written in a wide character encoding, stop at first NUL byte and are actually empty. ASCII-incompatible encodings have never been supported as source encoding.
* MatchData#named_captures: add optional symbolize_names keyword (#6952)Vladimir Dementyev2023-04-191-0/+12
|
* Add spec for `Warning[:performance]`Jean Boussier2023-04-171-0/+7
| | | | [Feature #19538]
* Implement ObjectSpace::WeakMap#delete and ObjectSpace::WeakKeyMap#deleteJean Boussier2023-04-152-0/+70
| | | | | | [Feature #19561] It's useful to be able to remove references from weak maps.
* * append newline at EOF. [ci skip]git2023-04-151-1/+1
|
* Add specs for ObjectSpace::WeakKeyMapJean Boussier2023-04-155-0/+161
| | | | [Feature #18498]
* Revert "Add specs for ObjectSpace::WeakKeyMap"Jean Boussier2023-04-145-151/+0
| | | | This reverts commit fce8f9f24e4903784266fc9694f86ddd930d6141.
* Add specs for ObjectSpace::WeakKeyMapJean Boussier2023-04-145-0/+151
| | | | [Feature #18498]
* [Bug #19533] Add spec of infinite range inclusionNobuyoshi Nakada2023-04-141-0/+6
|
* [Bug #19584] Register global variables before assignmentNobuyoshi Nakada2023-04-071-3/+3
|
* Revert "Fix transient heap mode"Aaron Patterson2023-04-041-11/+0
| | | | | | | | This reverts commit 87253d047ce35e7836b6f97edbb4f819879a3b25. Revert "Implement `Process.warmup`" This reverts commit ba6ccd871442f55080bffd53e33678c0726787d2.
* Implement `Process.warmup`Jean Boussier2023-04-041-0/+11
| | | | | | | | | | | | [Feature #18885] For now, the optimizations performed are: - Run a major GC - Compact the heap - Promote all surviving objects to oldgen Other optimizations may follow.
* Raise ArgumentError if IO.read is provided negative offsetJeremy Evans2023-03-241-3/+12
| | | | Fixes [Bug #19380]
* Add Dir.fchdirJeremy Evans2023-03-241-0/+78
| | | | | | | | | | | | This is useful for passing directory file descriptors over UNIX sockets or to child processes to avoid TOCTOU vulnerabilities. The implementation follows the Dir.chdir code. This will raise NotImplementedError on platforms not supporting both fchdir and dirfd. Implements [Feature #19347]
* Change Hash#compact to keep default values and compare_by_identity flagJeremy Evans2023-03-241-0/+24
| | | | | | | | | The documentation states it returns a copy of self with nil value entries removed. However, the previous behavior was creating a plain new hash with non-nil values copied into it. This change aligns the behavior with the documentation. Fixes [Bug #19113]
* Copy compare_by_identity flag for empty hashes in Hash.ruby2_keywords_hashJeremy Evans2023-03-241-0/+24
| | | | | | | This was already copied for non-empty hashes. As Hash.ruby2_keywords_hash copies default values, it should also copy the compare_by_identity flag. Partially Fixes [Bug #19113]
* Do not copy compare_by_identity flag for non-empty hashes in Hash.[]Jeremy Evans2023-03-241-0/+18
| | | | | | | | It wasn't copied for empty hashes, and Hash.[] doesn't copy the default value, so copying the compare_by_identity flag does not make sense. Partially Fixes [Bug #19113]
* Added assertion values for Amazon Linux 2023Hiroshi SHIBATA2023-03-221-3/+5
|
* rb_ary_sum: don't enter fast path if initial isn't a native numeric type.Jean Boussier2023-03-151-0/+13
| | | | | | | [Bug #19530] If the initial value isn't one of the special cased types, we directly jump to the slow path.
* Accept `sleep(nil)` as sleep forever. (#7484)Samuel Williams2023-03-101-4/+23
|
* s/mjit/rjit/Takashi Kokubun2023-03-063-3/+3
|
* s/MJIT/RJIT/Takashi Kokubun2023-03-064-12/+12
|
* Skip a spec failing on masterTakashi Kokubun2023-02-271-5/+7
| | | | | | https://github.com/ruby/ruby/actions/runs/4286361460/jobs/7466545010 http://ci.rvm.jp/results/trunk_gcc9@ruby-sp2-docker/4462424 http://ci.rvm.jp/results/trunk_clang_13@ruby-sp2-docker/4462422
* Update to ruby/spec@e7dc804Benoit Daloze2023-02-27230-187/+1887
|
* Assigning `nil` to fiber storage deletes the association. (#7378)Samuel Williams2023-02-251-6/+13
| | | Also avoid allocations when looking up `Fiber#storage` if not needed.
* Use `BigDecimal::VERSION` instead of `RUBY_VERSION`Nobuyoshi Nakada2023-02-221-1/+1
|
* Marshal.load: restore instance variables on RegexpJean Boussier2023-02-211-0/+11
| | | | | | | | | | | | | | | | | | | [Bug #19439] The instance variables were restore on the Regexp source, not the regexp itself. Unfortunately we have a bit of a chicken and egg problem. The source holds the encoding, and the encoding need to be set on the source to be able to instantiate the Regexp. So the instance variables have to be read on the `source`. To correct this we transfert the instance variables after instantiating the Regexp. The only way to avoid this would be to read the instance variable twice and rewind.
* Update some ruby specs for the new message format of NoMethodErrorYusuke Endoh2023-02-201-17/+40
|
* BigDecimal changed #remainder's specTakashi Kokubun2023-02-171-13/+15
| | | | | | | | | | | | | | This test is no longer passing: ``` 1) BigDecimal#remainder returns NaN if Infinity is involved FAILED Expected Infinity.nan? to be truthy but was false /home/runner/work/ruby/ruby/src/spec/ruby/library/bigdecimal/remainder_spec.rb:58:in `block (2 levels) in <top (required)>' /home/runner/work/ruby/ruby/src/spec/ruby/library/bigdecimal/remainder_spec.rb:4:in `<top (required)>' ``` https://github.com/ruby/bigdecimal/pull/243
* Marshal.load: also freeze extended objectsJean Boussier2023-02-131-0/+20
| | | | | | [Bug #19427] The `proc` wouldn't be called either, that fixes both.
* [DOC] Move old ChangeLog files to doc/ChangeLog (#7293)Takashi Kokubun2023-02-102-2/+2
|
* Use Thread.pass until thread.stop? to wait for thread to blockJean Boussier2023-02-081-1/+1
| | | | | | [Bug #19415] It should be more reliable
* Only emit circular dependency warning for owned thread shieldsJean byroot Boussier2023-02-082-0/+15
| | | | | | | | | | [Bug #19415] If multiple threads attemps to load the same file concurrently it's not a circular dependency issue. So we check that the existing ThreadShield is owner by the current fiber before warning about circular dependencies.
* Revert "Only emit circular dependency warning for owned thread shields"Jean byroot Boussier2023-02-062-11/+0
| | | | This reverts commit fa49651e05a06512e18ccb2f54a7198c9ff579de.
* Only emit circular dependency warning for owned thread shieldsJean Boussier2023-02-062-0/+11
| | | | | | | | | | [Bug #19415] If multiple threads attemps to load the same file concurrently it's not a circular dependency issue. So we check that the existing ThreadShield is owner by the current fiber before warning about circular dependencies.
* Add tests for variables in `END` block shared with the toplevelNobuyoshi Nakada2023-01-241-0/+4
|
* blade is hosted under ruby-lang.org nowHiroshi SHIBATA2023-01-235-5/+5
|
* More coverage tests & specs. (#7171)Samuel Williams2023-01-221-1/+7
| | | | | * Add spec for eval and line coverage. * Add test for main file coverage.
* Define RUBY_VERSION_IS_3_3 macro in rubyspec.hNobuyoshi Nakada2023-01-181-3/+8
|