summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2023-10-31Keep unused literal nodesyui-knk
For static analysis, it’s better to keep unused literal nodes. If simply change `block_append` to fall through, both "unused literal ignored" and "possibly useless use of a literal in void context" warnings are shown for the same line. But it’s verbose then remove "unused literal ignored" warning. This kind of optimization is already implemented on compile.c. `compile_block` calls `iseq_compile_each0` with `popped = 1` when NODE_BLOCK has next.
2023-10-31[Feature #10602] Add new API rb_profile_thread_frames()Daisuke Aritomo
Add a new API rb_profile_thread_frames(), which is essentialy a per-thread version of rb_profile_frames(). While the original rb_profile_frames() always returns results about the current active thread obtained by GET_EC(), this new API takes a Thread to be profiled as an argument. This should come in handy when profiling I/O-bound programs such as webapps, since this new API allows us to learn about Threads performing I/O (which do not have the GVL). Profiling worker threads (such as Sidekiq workers) may be another application. Implements [Feature #10602] Co-authored-by: Mike Perham <mike@perham.net>
2023-10-30[Prism] Add ForNode testsMatt Valentine-House
2023-10-30[ruby/irb] Use IRB's own doc for doc dialog testsStan Lo
(https://github.com/ruby/irb/pull/743) * Use IRB's own doc for doc dialog tests * Run doc dialog tests for older Rubies too * Remove unnecessary CI setups https://github.com/ruby/irb/commit/97a2b86f0a
2023-10-30[ruby/rdoc] test/rdoc/test_rdoc_generator_json_index.rb: Use assert_equal ↵Jun Aruga
instead of assert. It's better because assert_equal prints the values when it fails. https://github.com/ruby/rdoc/commit/91d40ce8f8
2023-10-30[ruby/prism] parse_inline_comments -> parse_commentsKevin Newton
https://github.com/ruby/prism/commit/bd4d248fd6
2023-10-30[ruby/prism] Remove newlines from magic comment testKevin Newton
https://github.com/ruby/prism/commit/4a7be1fc50
2023-10-30[ruby/net-http] fix a false-negative testChristian van Rensen
* no_proxy is meant to operate on the destination address, not on the name of the proxy * if both end with `'.example'`, the test does not nail down the behaviour https://github.com/ruby/net-http/commit/bb9a5cfa3d
2023-10-30Optimize regexp matching for look-around and atomic groups (#7931)Hiroya Fujinami
2023-10-28Extract transcoding assertionsNobuyoshi Nakada
- Prefix `check_both_ways` with `assert_` to show proper failure lines. - Extract dedicated assertions for Encoding::UndefinedConversionError and Encoding::InvalidByteSequenceError.
2023-10-28test/fiber/test_queue.rb: Make the stuck test fail. (#8791)Jun Aruga
test/fiber/test_queue.rb: Make the stuck tests fail. We observed the 2 tests in the `test/fiber/test_queue.rb` getting stuck in some GCC compilers in Ubuntu ppc64le focal/jammy, even when the timeout `queue.pop(timeout: 0.0001)` is set in the code. This commit is to make the tests fail rather than getting stuck.
2023-10-27Make get_next_shape_internal idempotentJean Boussier
Since the check for MAX_SHAPE_ID was done before even checking if the transition we're looking for even exists, as soon as the max shape is reached, get_next_shape_internal would always return `TOO_COMPLEX` regardless of whether the transition we're looking for already exist or not. In addition to entirely de-optimize all newly created objects, it also made an assertion fail in `vm_setivar`: ``` vm_setivar:rb_shape_get_next_iv_shape(rb_shape_get_shape_by_id(source_shape_id), id) == dest_shape ```
2023-10-27Revert "Add debug info for flaky test_warmup_frees_pages"Peter Zhu
This reverts commit db3b814cb0ff6ffe83fe0c4f66cd6ce8951c3ca7. This debugging information is no longer needed.
2023-10-27[ruby/prism] Prism.parse_inline_commentsKevin Newton
https://github.com/ruby/prism/commit/5b72f84480
2023-10-27[ruby/prism] Parse inline commentsKevin Newton
https://github.com/ruby/prism/commit/44090d9f26
2023-10-27[ruby/prism] Use MatchWriteNode on split InterpolatedRENKevin Newton
https://github.com/ruby/prism/commit/ee54244800
2023-10-27[ruby/prism] Fix parsing lone assoc splat within hash patternsKevin Newton
https://github.com/ruby/prism/commit/1da5e05672
2023-10-27[Feature #19244] Windows: Prefer USERPROFILE over HOMEPATH on startup as wellLars Kanis
2023-10-26[ruby/prism] Fix up newline testKevin Newton
https://github.com/ruby/prism/commit/9fdb41d8ba
2023-10-26[ruby/prism] Regenerate snapshotsKevin Newton
https://github.com/ruby/prism/commit/160df9a687
2023-10-26[ruby/prism] Rename to lefts/rightsKevin Newton
https://github.com/ruby/prism/commit/e6deed05a5
2023-10-26[ruby/prism] Remove RequiredDestructuredParameterNode in favor of ↵Kevin Newton
MultiTargetNode https://github.com/ruby/prism/commit/6d1858192e
2023-10-26[ruby/prism] Ensure no extra multi-target nodes are created for splatsKevin Newton
https://github.com/ruby/prism/commit/e60240d54b
2023-10-26[ruby/prism] Ensure no extra multi-target nodes are createdKevin Newton
https://github.com/ruby/prism/commit/ec31fd827f
2023-10-26[ruby/prism] Split up multi target/write targetsKevin Newton
https://github.com/ruby/prism/commit/dda7a0da52
2023-10-26[ruby/prism] Add KeywordSplat flag to ArgumentsNodeJemma Issroff
Method calls with keyword splat args compile differently than without since they merge the keyword arg hash with the keyword splat hash. We know this information at parse time, so can set a flag which the compiler can use. https://github.com/ruby/prism/commit/e5f8a9a3cd
2023-10-26[PRISM] Implement regex encoding flagseileencodes
Added the correct encoding to the allocated regex. This required making a new method to set the encoding and pass that to `rb_enc_reg_new` instead of `rb_reg_new`. The former `rb_reg_new` would set the encoding to ASCII8BIT regardless of encoding flag.
2023-10-26add more shapes testslukeg
2023-10-26teach prism define to compile basic typesHParker
2023-10-26[PRISM] Implement compilation for ConstantPathAndWriteNodeJemma Issroff
2023-10-26[PRISM] Implement compilation for ConstantPathOrWriteNodeJemma Issroff
2023-10-26[PRISM] Implemented ConstantPathOperatorWriteNodeJemma Issroff
2023-10-26[PRISM] Implement compilation for CaseNodeJemma Issroff
2023-10-26[PRISM] Rename new tests to use `assert_prism_eval`Jemma Issroff
2023-10-26[PRISM] Refactor tests to deconflict with existing testsJemma Issroff
2023-10-26[PRISM] Implement CallOperatorWriteNodeJemma Issroff
2023-10-26[PRISM] Implement compilation for CallOrWriteNodeJemma Issroff
2023-10-26[PRISM] Implemented compilation for CallAndWriteNodeJemma Issroff
2023-10-26Prevent a warning: assigned but unused variable - zYusuke Endoh
2023-10-26Revert "[ruby/prism] Use `cargo fmt`"Hiroshi SHIBATA
This reverts commit 4259d5b5aefd58d0bf86ad20122beee53533ff59. This commits is wrong result of sync_default_gems.rb
2023-10-26[Feature #19362] Call `#initialize_dup` hook at `Proc#dup`Nobuyoshi Nakada
2023-10-26[Bug #19973] Warn duplicated keyword arguments after keyword splatNobuyoshi Nakada
2023-10-26Make beginless Range#size return nil if it ends with non-numericfn ⌃ ⌥
2023-10-26[ruby/prism] Use `cargo fmt`Ian Ker-Seymer
https://github.com/ruby/prism/commit/5969b827ae
2023-10-25Fix few test_prism_eval that snuck inHParker
2023-10-25[rubygems/rubygems] Raise exception on unexpected EOF in marshalSamuel Giddins
Instead of NoMethodError being raised by accidentally trying to use nil https://github.com/rubygems/rubygems/commit/ac8f812bbf
2023-10-25Use `assert_prism_eval` over `test_prism_eval` in helpereileencodes
When we use `test_prism_eval`, failed tests will point to the line number of the `test_prism_eval` method definition instead of the test that failed. If we use `assert_prism_eval` instead, failed tests will properly poin to the test that failed because the test framework knows to stop the backtrace earlier. Before line number in failure points to helper definition: ``` Prism::TestCompilePrism#test_RegularExpressionNode = 0.21 s 1) Failure: Prism::TestCompilePrism#test_RegularExpressionNode [test/ruby/test_compile_prism.rb:755]: </pit/> (Windows-31J) expected but was </pit/> (US-ASCII). ``` After line number in failure points to test that failed: ``` Prism::TestCompilePrism#test_RegularExpressionNode = 0.00 s 1) Failure: Prism::TestCompilePrism#test_RegularExpressionNode [test/ruby/test_compile_prism.rb:334]: </pit/> (Windows-31J) expected but was </pit/> (US-ASCII). ```
2023-10-25[PRISM] Add tests for ParametersNodeJemma Issroff
2023-10-25[PRISM] Implement NoKeywordsParameterNodeJemma Issroff
2023-10-25Reduce the number of times IO is passed in send_io/recv_io testYusuke Endoh
Since Linux 4.5, sendmsg(2) fails with ETOOMANYREFS if the number of "in-flight" IOs, which has been sent by sendmsg(2) but has not yet accepted by recvmsg(2), exceeds the RLIMIT_NOFILE resource limit. https://rubyci.s3.amazonaws.com/arm64-neoverse-n1/ruby-master/log/20231025T090004Z.fail.html.gz ``` 1) Error: TestSocket_UNIXSocket#test_fd_passing_race_condition: Errno::ETOOMANYREFS: Too many references: cannot splice - sendmsg(2) ``` This change reduces the number of times of IO passing under 1024, which is a default limit in many environments.