summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2023-09-21[rubygems/rubygems] Fix safe marshal test on jrubySamuel Giddins
Allow for variance in order of dumped ivars, fix by setting the disallowed ivar on an object that will have no other ivars so the index is consistent https://github.com/rubygems/rubygems/commit/ccb8f42753
2023-09-21[rubygems/rubygems] Remove usage of Dir.chdir that just execute a subprocessSamuel Giddins
Preferring instead to spawn the subprocess in the correct directory https://github.com/rubygems/rubygems/commit/ad5abd6a45
2023-09-21[rubygems/rubygems] Freeze more strings in generated gemspecsSamuel Giddins
Specifically, this will have frozen string literals for: - Gem platform tuple entries - Gem::Version strings - Gem::Specification#installed_by_version - Dependency requirement strings https://github.com/rubygems/rubygems/commit/6195da5bdb
2023-09-21[ruby/openssl] Fix test_pkey_ec.rb on FIPS.Jun Aruga
https://github.com/ruby/openssl/commit/d07183f639
2023-09-21[ruby/openssl] test_pkey.rb: Refactor the test_ed25519 on FIPS.Jun Aruga
* Split the test in the FIPS case as another test. * test/openssl/utils.rb: Add omit_on_fips and omit_on_non_fips methods. https://github.com/ruby/openssl/commit/4d64c38ed0
2023-09-21[ruby/openssl] test_fips.rb: Fix the `OpenSSL.fips_mode` affecting other tests.Jun Aruga
Run the test with `assert_separately` for the `false` value of the `OpenSSL.fips_mode` not to affect other tests. https://github.com/ruby/openssl/commit/2fe3438d8a
2023-09-21[rubygems/rubygems] Aggressively optimize allocations in SafeMarshalSamuel Giddins
Reduces allocations in a bundle install --full-index by an order of magnitude Main wins are (a) getting rid of exessive string allocations for exception message stack (b) Avoiding hash allocations caused by kwargs for #initialize (c) avoid using unpack to do bit math, its easy enough to do by hand (d) special case the most common elements so they can be read without an allocation (e) avoid string allocations every time a symbol->string lookup is done by using symbol#name https://github.com/rubygems/rubygems/commit/7d2ee51402
2023-09-21Optimize Range#bsearch for beginless/endless ranges within FixnumKouhei Yanagita
2023-09-21[Bug #19624] Clean up backquote IONobuyoshi Nakada
It should not be hidden, since it can be grabbed by a fiber scheduler.
2023-09-20[ruby/yarp] Print locations using line / col instead of offsetsJemma Issroff
This commit changes printing of locations to use the format (start_line,start_column)-(end_line,end_column) instead of using offsets. https://github.com/ruby/yarp/commit/c078696e22
2023-09-20[ruby/yarp] Check whether the conditional predicate is closedHaldun Bayhantopcu
https://github.com/ruby/yarp/commit/5022b51db2
2023-09-20Fix memory leak in complemented method entriesPeter Zhu
[Bug #19894] When a copy of a complemented method entry is created, there are two issues: 1. IMEMO_FL_USER3 is not copied, so the complemented status is not copied over. 2. In rb_method_entry_clone we increment both alias_count and complemented_count. However, when we free the method entry in rb_method_definition_release, we only decrement one of the two counters, resulting in the rb_method_definition_t being leaked. Co-authored-by: Adam Hess <adamhess1991@gmail.com>
2023-09-20[rubygems/rubygems] Give up, load Time via Marshal.loadSamuel Giddins
https://github.com/rubygems/rubygems/commit/6c92ba2ba3
2023-09-20[rubygems/rubygems] Ruby 2.6 compatSamuel Giddins
https://github.com/rubygems/rubygems/commit/1a84960af3
2023-09-20[rubygems/rubygems] All rubies working with different time zonesSamuel Giddins
Tested with: `ruby -e 'trap("INT") { exit 1 }; TZ=%w[UTC +0000 -0000]; RUBY=%w[ruby-2.7 ruby-3.2.2 jruby-9.4 truffleruby-22 truffleruby-23]; TZ.product(RUBY).each { |t, r| puts ?**120, "TZ=#{t} RUBY=#{r}", "*"*120; system({"TZ"=>t,"RUBY"=>r}, *ARGV) }' zsh -lic 'chruby $RUBY; ruby -vw -Ilib test/rubygems/test_gem_safe_marshal.rb --verbose=progress'` https://github.com/rubygems/rubygems/commit/6192005afb
2023-09-20[rubygems/rubygems] Tests passing on truffleruby 22 in addition to 23Samuel Giddins
https://github.com/rubygems/rubygems/commit/8065530d43
2023-09-20[rubygems/rubygems] safe_load tests passing on jruby & trufflerubySamuel Giddins
https://github.com/rubygems/rubygems/commit/a64b21b052
2023-09-20[rubygems/rubygems] Verified working on mri/jruby/truffleruby with specs on ↵Samuel Giddins
rubygems.org https://github.com/rubygems/rubygems/commit/4f51741cc6
2023-09-20[rubygems/rubygems] Broader version compatibility in marshal testsSamuel Giddins
https://github.com/rubygems/rubygems/commit/6ec518c563
2023-09-20[rubygems/rubygems] Fix UTC time loadingSamuel Giddins
https://github.com/rubygems/rubygems/commit/2a4d0a44b0
2023-09-20[rubygems/rubygems] Add a Marshal.load replacement that walks an AST to ↵Samuel Giddins
safely load permitted classes/symbols https://github.com/rubygems/rubygems/commit/7e4478fe73
2023-09-19[YARP] Implement GlobalVariableTargetNodeMatt Valentine-House
2023-09-19[ruby/yarp] Only use Ripper on CRubyBenoit Daloze
https://github.com/ruby/yarp/commit/9c23f53d7b
2023-09-19[ruby/yarp] Ignore parseing specific files on TruffleRuby to make CI greenJemma Issroff
CI is currently failing due to an issue with Ripper on the latest TruffleRuby version. This commit removes the offending tests from running, to ensure CI is green again. https://github.com/ruby/yarp/commit/dae2c80c42
2023-09-19[ruby/yarp] fix: handling escaped whitespace in a %w listMike Dalessio
Introduces a new flavor of unescaping, YP_UNESCAPE_WHITESPACE, which is the same as MINIMAL but also unescapes whitespace. Note that a spanning_heredoc.txt fixture test is updated to be less wrong, but YARP's behavior doesn't yet fully match Ruby in this case. Fixes https://github.com/ruby/yarp/pull/1505 https://github.com/ruby/yarp/commit/0af69bdeb1
2023-09-19[ruby/yarp] Consistently place block arguments on block slot for callKevin Newton
https://github.com/ruby/yarp/commit/fe208302e5
2023-09-19[YARP] Implement ClassVariableTargetNodeMatt Valentine-House
2023-09-19[YARP] Implement InstanceVariableTargetNode, LocalVariableTargetNodeMatt Valentine-House
2023-09-19[YARP] Implement ConstantTargetNodeMatt Valentine-House
2023-09-19[ruby/securerandom] Removed extra argument for build failure of ruby/rubyHiroshi SHIBATA
https://github.com/ruby/ruby/actions/runs/6230184763/job/16909829150 https://github.com/ruby/securerandom/commit/f60582432c
2023-09-19[ruby/securerandom] Add support for UUID version 7nick evans
Although the specification for UUIDv7 is still in draft, the UUIDv7 algorithm has been relatively stable as it progresses to completion. Version 7 UUIDs can be very useful, because they are lexographically sortable, which can improve e.g: database index locality. See section 6.10 of the draft specification for further explanation: https://datatracker.ietf.org/doc/draft-ietf-uuidrev-rfc4122bis/ The specification allows up to 12 bits of extra timestamp precision, to make UUID generation closer to monotonically increasing. This provides between 1ms and ~240ns of timestamp precision. At the cost of some code complexity and a small performance penalty, a kwarg may specify any arbitrary precision between 0 and 12 extra bits. Any stronger guarantees of monotonicity have considerably larger tradeoffs, so nothing more is implemented. This limitation is documented. Ruby issue: https://bugs.ruby-lang.org/issues/19735 https://github.com/ruby/securerandom/commit/34ed1a2ec3
2023-09-18[ruby/yarp] Use compact_child_nodes where possibleKevin Newton
https://github.com/ruby/yarp/commit/c1911fa9b1
2023-09-18[YARP] Restructure tests to compare YARP evaluation to CRuby evaluation (#8467)Jemma Issroff
Previously, we were hardcoding the expected evaluation value. Now, instead, we structure it so that we compare the YARP evaluation value against CRuby's evaluation value.
2023-09-18[Bug #19887] RUBYOPT should work without leading `-`Nobuyoshi Nakada
2023-09-18Simplify restoring ENVNobuyoshi Nakada
2023-09-17[ruby/irb] Test should not depend on user's irbrc file specified bytomoya ishida
ENV['IRBRC'] (https://github.com/ruby/irb/pull/717) https://github.com/ruby/irb/commit/1d2d35dd33
2023-09-16[ruby/irb] Test should not depend on user's irbrc filetomoya ishida
(https://github.com/ruby/irb/pull/714) https://github.com/ruby/irb/commit/02703c46f9
2023-09-16Fix regression when testing inclusion in unbounded rangesJeremy Evans
Caused by 04a92a6764bf678919cf4b68a27496a39d6b886a. This treats unbounded ranges of arbitrary objects the same as how unbounded string ranges are treated: (..x) === y # (y <=> x) <= 0 (...x) === y # (y <=> x) < 0 (x..) === y # (x <=> y) <= 0 Fixes [Bug #19864]
2023-09-16[ruby/irb] Handle Concurrent Sessions and Saving Readline::HISTORYChad Schroeder
(https://github.com/ruby/irb/pull/651) * handle concurrent sessions and saving Readline::HISTORY, fixes https://github.com/ruby/irb/pull/510 * separate tests * don't mutate the HISTORY object on the class * avoid repeated .to_i calls * remove intermediary history array * work with array, fix test comment --------- https://github.com/ruby/irb/commit/1681ada328 Co-authored-by: Stan Lo <stan001212@gmail.com>
2023-09-16[Feature #19839] Fix `Range#overlap?` for empty rangesNobuyoshi Nakada
Empty ranges do not overlap with any range. Regarding benchmarks, PR#8242 is significantly faster in some cases, but one of these two cases is a wrong result. | |ActiveSupport| PR#8242|built-ruby| |:--------------------------|------------:|-------:|---------:| |(2..3).overlap?(1..1) | 7.761M| 15.053M| 32.368M| | | -| 1.94x| 4.17x| |(2..3).overlap?(2..4) | 25.720M| 55.070M| 21.981M| | | 1.17x| 2.51x| -| |(2..3).overlap?(4..5) | 7.616M| 15.048M| 21.730M| | | -| 1.98x| 2.85x| |(2..3).overlap?(2..1) | 25.585M| 56.545M| 32.786M| | | -| 2.21x| 1.28x| |(2..3).overlap?(0..1) | 7.554M| 14.755M| 32.545M| | | -| 1.95x| 4.31x| |(2..3).overlap?(...1) | 6.681M| 5.843M| 32.255M| | | 1.14x| -| 5.52x| |(2...3).overlap?(..2) | 6.676M| 5.817M| 21.572M| | | 1.15x| -| 3.71x| |(2...3).overlap?(3...) | 7.392M| 14.755M| 31.805M| | | -| 2.00x| 4.30x| |(2..3).overlap?('a'..'d') | 3.675M| 3.482M| 17.009M| | | 1.06x| -| 4.89x|
2023-09-16[Feature #19839] Add Range#overlap?Shouichi Kamiya
Add a method that returns true if two range overlap, otherwise false. ``` (0..10).overlap?(5..15) #=> true (0..10).overlap?(20..30) #=> false ```
2023-09-15[ruby/yarp] Handle missing clauses in case statementKevin Newton
https://github.com/ruby/yarp/commit/1ad7fba5ef
2023-09-15[ruby/yarp] Ensure multi targets are only in valid locationsKevin Newton
https://github.com/ruby/yarp/commit/8bffb8a762
2023-09-15[ruby/yarp] Alnum cannot be %-literal delimitersKevin Newton
https://github.com/ruby/yarp/commit/4ba6d5ca70
2023-09-15[ruby/yarp] Properly handle invalid underscores in number literalsKevin Newton
https://github.com/ruby/yarp/commit/35da3d1a4c
2023-09-15[ruby/yarp] Extract test listener to its own classKevin Newton
https://github.com/ruby/yarp/commit/c8caa997c0
2023-09-15[ruby/yarp] Add node event dispatcherVinicius Stock
This commit changes the node template to create a dispatcher class, which can be used to walk an AST an emit events to all registered listeners https://github.com/ruby/yarp/commit/03a45f85e6 Co-authored-by: Kevin Newton <kddnewton@users.noreply.github.com>
2023-09-15[ruby/yarp] Handle unterminated interpolated symbolKevin Newton
https://github.com/ruby/yarp/commit/9222faa1c6
2023-09-15[ruby/yarp] Handle missing terminators in parenthesized expressionKevin Newton
https://github.com/ruby/yarp/commit/a8b54e8ed0
2023-09-15[ruby/yarp] Handle infinite opt terms after missing case predicateKevin Newton
https://github.com/ruby/yarp/commit/d931e258d1