summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2024-03-06[ruby/prism] Fix up forwarding arguments for ripper translationKevin Newton
https://github.com/ruby/prism/commit/9dbad71aa3
2024-03-06[ruby/prism] Unary not for ripper translationKevin Newton
https://github.com/ruby/prism/commit/149d01f2c9
2024-03-06[ruby/prism] Implement fields for ripper translationKevin Newton
https://github.com/ruby/prism/commit/90f8b33fad
2024-03-06[ruby/prism] Revisit call nodes for ripper translationKevin Newton
https://github.com/ruby/prism/commit/372200f970
2024-03-06[ruby/prism] Fix implementation of [] and []= for ripper translationKevin Newton
https://github.com/ruby/prism/commit/d31cf63d45
2024-03-06[ruby/prism] Implement super for ripper translationKevin Newton
https://github.com/ruby/prism/commit/18dea6ce64
2024-03-06[ruby/prism] Implement other call nodes for ripper translationKevin Newton
https://github.com/ruby/prism/commit/a76744be47
2024-03-06[ruby/prism] Implement index nodes for ripper translationKevin Newton
https://github.com/ruby/prism/commit/3fd962f2d3
2024-03-06[ruby/prism] Implement hash patterns for ripper translationKevin Newton
https://github.com/ruby/prism/commit/6bd7ae2ed2
2024-03-06[ruby/prism] Implement multi target nodes for ripper translationKevin Newton
https://github.com/ruby/prism/commit/ceb5a5cf62
2024-03-06[ruby/prism] Implement lambdas for ripper translationKevin Newton
https://github.com/ruby/prism/commit/602d3d2ccb
2024-03-06[ruby/prism] Implement target nodes for ripper translationKevin Newton
https://github.com/ruby/prism/commit/c5c8299485
2024-03-06[ruby/prism] Implement for loop for ripper translationKevin Newton
https://github.com/ruby/prism/commit/2d635ce46b
2024-03-06[ruby/prism] Implement endless methods for ripper translationKevin Newton
https://github.com/ruby/prism/commit/6611820b7b
2024-03-06[ruby/prism] Implement find pattern for ripper translationKevin Newton
https://github.com/ruby/prism/commit/ef9dca2a4c
2024-03-06[ruby/prism] Implement case/in for ripper translationKevin Newton
https://github.com/ruby/prism/commit/7f5a09f40e
2024-03-06[ruby/prism] Add constant path ripper translationKevin Newton
https://github.com/ruby/prism/commit/5e47d8eb67
2024-03-06[ruby/prism] Implement def for ripper translationKevin Newton
https://github.com/ruby/prism/commit/a3c8c27c20
2024-03-06[ruby/prism] Implement if/unless for ripper translationKevin Newton
https://github.com/ruby/prism/commit/57c1dd4859
2024-03-06[ruby/prism] Implement regular expressions for ripper translationKevin Newton
https://github.com/ruby/prism/commit/788cf7c528
2024-03-06[ruby/prism] Start tracking failing fixtures in ripper translationKevin Newton
https://github.com/ruby/prism/commit/6285e31ccc
2024-03-06[ruby/prism] Reconsolidate ripper filesKevin Newton
https://github.com/ruby/prism/commit/7a277be5fb
2024-03-06[ruby/irb] Clear temporary directoriesNobuyoshi Nakada
(https://github.com/ruby/irb/pull/894) https://github.com/ruby/irb/commit/dc0dd25a39
2024-03-06[ruby/irb] Prevent `irb_history`'s creation during HistoryTestStan Lo
(https://github.com/ruby/irb/pull/893) Some cases of it currently create `~/.irb_history` files unintentionally while others don't. This is caused by the varying levels of setup/cleanup between them. This commit fixes the issue by wrapping every single test inside a consistent test setup and teardown callbacks. https://github.com/ruby/irb/commit/a2a3cbb0ef
2024-03-05[ruby/irb] Add the ability to fetch and load multiple irb files.Haroon Ahmed
(https://github.com/ruby/irb/pull/859) This allows hierarchy when loading rc files for example both files below are loaded; project/.irbrc ~/.irbrc https://github.com/ruby/irb/commit/b53ebc6655 Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-03-04[rubygems/rubygems] Bump rb-sysdependabot[bot]
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.89 to 0.9.90. - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.89...v0.9.90) --- updated-dependencies: - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> https://github.com/rubygems/rubygems/commit/eb93d8b238
2024-03-04[ruby/prism] Warnings for tokens at EOLKevin Newton
https://github.com/ruby/prism/commit/d0dbf01bef
2024-03-04Keep hidden local variables when dumping and loading iseqsJeremy Evans
Fixes [Bug #19975]
2024-03-04[ruby/prism] Add then keyword loc to when nodesKevin Newton
https://github.com/ruby/prism/commit/e1e613df16
2024-03-04[ruby/prism] Fix up some minor parser incompatibilitiesKevin Newton
https://github.com/ruby/prism/commit/c6c771d1fa
2024-03-04[Bug #20324] Uncomparable ranges are not overlappingNobuyoshi Nakada
2024-03-04[rubygems/rubygems] Clear `RUBY_CODESIGN` env var while running testsYuta Saito
The `RUBY_CODESIGN` environment variable is used by mkmf-generated Makefile to sign extension bundles on macOS. The variable specifies a key identifier to use for signing given by the user. However, the key is usually stored in `$HOME/Library/Keychains` directory, and the test suite creates a fake `$HOME` directory. This causes the test suite to try to find the specified key from the fake home directory, which results in a failure. https://github.com/rubygems/rubygems/commit/ddcfc65bf7
2024-03-04Support NODE_ONCE for pattern matchingS-H-GAMELINKS
2024-03-04Disable callcc when ASAN is enabledKJ Tsanaktsidis
callcc's implementation is fundamentally incompatible with ASAN. Since callcc is deprecated and almost never used, it's probably OK to disable callcc when ruby is compiled with ASAN. [Bug #20273]
2024-03-03[Bug #20322] Fix rb_enc_interned_str_cstr null encodingThomas Marshall
The documentation for `rb_enc_interned_str_cstr` notes that `enc` can be a null pointer, but this currently causes a segmentation fault when trying to autoload the encoding. This commit fixes the issue by checking for NULL before calling `rb_enc_autoload`.
2024-03-01Correctly set anon_kwrest flag for def f(b: 1, **)Jeremy Evans
In cases where a method accepts both keywords and an anonymous keyword splat, the method was not marked as taking an anonymous keyword splat. Fix that in the compiler. Doing that broke handling of nil keyword splats in yjit, so update yjit to handle that. Add a test to check that calling a method that accepts both a keyword argument and an anonymous keyword splat does not modify a passed keyword splat hash. Move the anon_kwrest check from setup_parameters_complex to ignore_keyword_hash_p, and only use it if the keyword hash is already a hash. This should speed things up slightly as it avoids a check previously used for all callers of setup_parameters_complex. Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2024-03-01[ruby/irb] Escape closing square brackets in regexpPeter Zhu
Fixes the following warning: test/irb/test_command.rb:546: warning: regular expression has ']' without escape https://github.com/ruby/irb/commit/7efadc243b
2024-03-01YJIT: Support opt_invokebuiltin_delegate for leaf builtin (#10152)Takashi Kokubun
2024-03-01[ruby/irb] Restructure workspace managementStan Lo
(https://github.com/ruby/irb/pull/888) * Remove dead irb_level method * Restructure workspace management Currently, workspace is an attribute of IRB::Context in most use cases. But when some workspace commands are used, like `pushws` or `popws`, a workspace will be created and used along side with the original workspace attribute. This complexity is not necessary and will prevent us from expanding multi-workspace support in the future. So this commit introduces a @workspace_stack ivar to IRB::Context so IRB can have a more natural way to manage workspaces. * Fix pushws without args * Always display workspace stack after related commands are used https://github.com/ruby/irb/commit/61560b99b3
2024-03-01Make Struct memory leak test fasterJean Boussier
[Bug #20311] It times out on some platform, so we can reduce iterations. On my machine it completes in 250ms and RSS grows 8X.
2024-03-01Don't pin named structs defined in RubyJean Boussier
[Bug #20311] `rb_define_class_under` assumes it's called from C and that the reference might be held in a C global variable, so it adds the class to the VM root. In the case of `Struct.new('Name')` it's wasteful and make the struct immortal.
2024-03-01[ruby/optparse] Invoke pager for `--help`Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/77dccce37c
2024-03-01Use `File.open` and `File.write` instead of `Kernel#open`Nobuyoshi Nakada
2024-02-29[ruby/resolv] Implement CAA resource recordKasumi Hanazuki
This patch implements handling of CAA resource records defined by [RFC8659]. - There are no known deployment of CAA records outside of IN (Internet), but the RFC does not state that CAA records are class-specific. Thus `CAA` class is defined as a class-independent RRType. - `CAA` class stores `flags` field (a 1-octet bitset) as an Integer. In this way it's easier to ensure the encoded RR is in the valid wire format. [RFC8659]: https://datatracker.ietf.org/doc/html/rfc8659 https://github.com/ruby/resolv/commit/cfc4de75e3 Co-authored-by: aeris <aeris@imirhil.fr>
2024-02-29[ruby/prism] Warn on integers in flip-flopsKevin Newton
https://github.com/ruby/prism/commit/500099e896
2024-02-29[ruby/prism] Command line options as a bitsetKevin Newton
https://github.com/ruby/prism/commit/369ffbd57e
2024-02-29[ruby/prism] Resync RBI and test it in CIKevin Newton
https://github.com/ruby/prism/commit/4ef4032774
2024-02-29[ruby/prism] Fix an incorrect parsing for `Prism::Translation::Parser`Koichi ITO
This PR fixes an incorrect parsing for `Prism::Translation::Parser` when one-line pattern mathing with Ruby 2.7 runtime. ## Expected Parsing should be done based on the specified Ruby parsing version, independent of the Ruby runtime version. When parsing for Ruby 3.3, it should return `:match_pattern_p` node: ```console $ ruby -rprism -rprism/translation/parser33 -ve 'p Prism::Translation::Parser33.parse("foo in bar")' ruby 3.0.6p216 (2023-03-30 revision https://github.com/ruby/prism/commit/23a532679b) [x86_64-darwin19] s(:match_pattern_p, s(:send, nil, :foo), s(:match_var, :bar)) ``` ## Actual When parsing with Ruby 2.7 runtime, `match_pattern` node is returned, even though it is expected to parse for Ruby 3.3: ```console $ ruby -rprism -rprism/translation/parser33 -ve 'p Prism::Translation::Parser33.parse("foo in bar")' ruby 2.7.8p225 (2023-03-30 revision https://github.com/ruby/prism/commit/1f4d455848) [x86_64-darwin19] s(:match_pattern, s(:send, nil, :foo), s(:match_var, :bar)) ``` The cause was the use of `RUBY_VERSION` for condition logic, which made it dependent on runtime Ruby version. `Prism::Translation::Parser` supports parsing for Ruby 3.3+. Therefore, the condition for parsing Ruby 2.7, which is not supported, is being removed. ## Background Found due to incompatibility with RuboCop's `Layout/SpaceAroundKeyword` and `Style/TernaryParentheses` cops. https://github.com/ruby/prism/commit/e752e251d2
2024-02-28Fix crash report path test on WindowsNobuyoshi Nakada
2024-02-28Fix to use `assert_crash_report` resultsNobuyoshi Nakada