summaryrefslogtreecommitdiff
path: root/test/ruby
AgeCommit message (Collapse)Author
2024-06-13clear `kw_flag` if given hash is nilKoichi Sasada
https://bugs.ruby-lang.org/issues/20570 is caused I missed to clear the `kw_flag` even if `keyword_hash` is nil.
2024-06-12Add regression test for Bug #20573Aaron Patterson
Just a regression test to ensure behavior remains the same
2024-06-12[Bug #20572] Abandon if replacing destination is the sameNobuyoshi Nakada
2024-06-11compile.c: use putspecialobject for RubyVM::FrozenCoreJean Boussier
[Bug #20569] `putobject RubyVM::FrozenCore`, is not serializable, we have to use `putspecialobject VM_SPECIAL_OBJECT_VMCORE`.
2024-06-10Don't skip test_inspect_under_gc_compact_stressPeter Zhu
Commit 1471a16 seems to have fixed this flaky test, so we don't need to skip it for YJIT or RJIT anymore.
2024-06-07Remove prism compiler warningKevin Newton
2024-06-07Don't use SEGV signal when timeout in test_gc_compactPeter Zhu
Using a SEGV signal for timeout makes it difficult to tell if it's a real SEGV or if it timed out, so we should just use the default signals.
2024-06-07TestRequire#test_loading_fifo_threading_success: Extend the timeout limitYusuke Endoh
2024-06-07TestRegexp#test_match_cache_positive_look_behind: Extend the timeout limitYusuke Endoh
2024-06-07TestRegexp#test_timeout_shorter_than_global: Extend the timeout limitYusuke Endoh
2024-06-07TestRequire#test_loading_fifo_fd_leak: Extend the timeout limitYusuke Endoh
2024-06-07TestGc#test_thrashing_for_young_objects: extend the timeout limitYusuke Endoh
2024-06-07TestRegexp#test_s_timeout: accept timeout errors more tolerantlyYusuke Endoh
This test seems flaky on macOS GitHub Actions
2024-06-07Extend timeout of TestGCCompect#test_moving_objects_between_size_poolsYusuke Endoh
It is too flaky on macOS GitHub Actions
2024-06-06Fix Module#define_method to change visibility when passed existing method bodyJeremy Evans
Fixes [Bug #19749]
2024-06-06Remove circular parameter syntax errorKevin Newton
https://bugs.ruby-lang.org/issues/20478
2024-06-05Don't add `+YJIT` to `RUBY_DESCRIPTION` until it's actually enabledJean Boussier
If you start Ruby with `--yjit-disable`, the `+YJIT` shouldn't be added until `RubyVM::YJIT.enable` is actually called. Otherwise it's confusing in crash reports etc.
2024-06-04Remove dependency on fiddle from test/rubyHiroshi SHIBATA
Co-authored-by: "Nobuyoshi Nakada" <nobu@ruby-lang.org>
2024-05-31Make error messages clear blocks/keywords are disallowed in index assignmentJeremy Evans
Blocks and keywords are allowed in regular index. Also update NEWS to make this more clear. Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2024-05-30test_bignum: defined? returns String (#10880)Sorah Fukumori
didn't verify the test is working properly due to mistaken auto-merge… [Bug #20515] bug: https://bugs.ruby-lang.org/issues/20515 follow-up: 22e4eeda6561693367fc7a00b92b90f46b09cabd follow-up: https://github.com/ruby/ruby/pull/10875
2024-05-30ci: Test whether GMP is working in compilers.yml (#10875)Sorah Fukumori
Avoid reoccurence of [Bug #20515] Requires https://github.com/ruby/ruby/pull/10876 since 18eaf0be905e3e251423b42d6f4e56b7cae1bc3b bug: https://bugs.ruby-lang.org/issues/20515
2024-05-28Make ensure first lineno the first line of the ensureKevin Newton
Previously, ensure ISEQs took their first line number from the line number coming from the AST. However, if this is coming from an empty `begin`..`end` inside of a method, this can be all of the way back to the method declaration. Instead, this commit changes it to be the first line number of the ensure block itself. The first_lineno field is only accessible through manual ISEQ compilation or through tracepoint. Either way, this will be more accurate for targeting going forward.
2024-05-29[Bug #20438] Disallow "%\n" and "%\0"Nobuyoshi Nakada
2024-05-28Stop marking chilled strings as frozenÉtienne Barrié
They were initially made frozen to avoid false positives for cases such as: str = str.dup if str.frozen? But this may cause bugs and is generally confusing for users. [Feature #20205] Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
2024-05-27Add a debug print for a random failureYusuke Endoh
``` 1) Error: TestRubyLiteral#test_float: ArgumentError: SyntaxError#path changed: "(eval at /home/chkbuild/chkbuild/tmp/build/20240527T050036Z/ruby/test/ruby/test_literal.rb:642)"->"(eval at /home/chkbuild/chkbuild/tmp/build/20240527T050036Z/ruby/test/ruby/test_literal.rb:642)" ``` https://rubyci.s3.amazonaws.com/s390x/ruby-master/log/20240527T050036Z.fail.html.gz
2024-05-26Debug unexpectedly changed pathNobuyoshi Nakada
2024-05-25[Bug #20510] Do not count optional hash argument for `IO.new`Nobuyoshi Nakada
Since `IO.new` accepts one or two positional arguments except for the optional hash argument, exclude the optional hash argument from the check for delegation to `IO.new`.
2024-05-24Update duplicated when clause warning messageKevin Newton
2024-05-23Introduce a specialize instruction for Array#packNobuyoshi Nakada
Instructions for this code: ```ruby # frozen_string_literal: true [a].pack("C") ``` Before this commit: ``` == disasm: #<ISeq:<main>@test.rb:1 (1,0)-(3,13)> 0000 putself ( 3)[Li] 0001 opt_send_without_block <calldata!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0003 newarray 1 0005 putobject "C" 0007 opt_send_without_block <calldata!mid:pack, argc:1, ARGS_SIMPLE> 0009 leave ``` After this commit: ``` == disasm: #<ISeq:<main>@test.rb:1 (1,0)-(3,13)> 0000 putself ( 3)[Li] 0001 opt_send_without_block <calldata!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0003 putobject "C" 0005 opt_newarray_send 2, :pack 0008 leave ``` Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2024-05-22[PRISM] Properly support 'it'Kevin Newton
2024-05-21Avoid array allocation for empty ruby2_keywords flagged keyword hashJeremy Evans
If the method being called does not have a positional splat parameter, there is no point in allocating the array, as decrementing given_argc is sufficient to ensure the empty keyword hash is not considered an argument, assuming that we are calling a method/lambda and not a regular proc.
2024-05-21Avoid hash allocation for empty ruby2_keywords flagged keyword hashJeremy Evans
If the method being called does not have a keyword splat parameter, there is no point in allocating the hash, because the hash will be unused (as empty keyword hashes are ignored).
2024-05-21Add allocation tests for ruby2_keywordsJeremy Evans
This tests ruby2_keywords flagged methods, as well as passing ruby2_keywords flagged hashes to other methods. Some of the behavior here is questionable, such as allocating different numbers of objects depending on whether a block is passed or whether YJIT is enabled. I think there are likely ways to eliminate allocations in certain cases. However, this gives us a baseline and shows us where it is possible to make improvements.
2024-05-20[PRISM] Enable TestSyntax#test_warn_balancedKevin Newton
2024-05-16[PRISM] Enable TestParse#test_truncated_source_lineKevin Newton
2024-05-16[PRISM] Enable TestParse#test_stringKevin Newton
2024-05-16[PRISM] Enable TestISeq#test_syntax_error_messageKevin Newton
2024-05-16[PRISM] Enable TestSyntax#test_syntax_error_at_newlineKevin Newton
2024-05-16[Bug #20468] Fix safe navigation in `for` variableNobuyoshi Nakada
2024-05-15[PRISM] Enable TestParse#test_global_variableKevin Newton
2024-05-15[PRISM] Enable test_location_of_invalid_tokenKevin Newton
2024-05-15[PRISM] Enable TestParse#test_unexpected_eofKevin Newton
2024-05-15[PRISM] Enable TestParse#test_unexpected_token_after_numericKevin Newton
2024-05-14Fix TestPatternMatching#test_deconstruct_keys testAndrew Konchin
Before the change `C.keys` returned keys captured in some previous test case that by chance captured `nil` value what made this test passed successfully. Now it returns keys captured in this test case.
2024-05-12[Bug #20481] Check for unmarshaling ivarNobuyoshi Nakada
Prohibit setting instance variables of existing classes and modules via link.
2024-05-12[Bug #7759] Fix instance variable names to be checkedNobuyoshi Nakada
2024-05-09[PRISM] Enable passing testsKevin Newton
2024-05-08[Bug #20474] Keep spaces in leading blank lineNobuyoshi Nakada
2024-05-07[PRISM] Enable test_methoddef_endless_commandKevin Newton
2024-05-03[PRISM] Enable RubyVM tests for prismKevin Newton