summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2025-01-14Add tests for Proc#parameters on `it` blocksAlan Wu
[Bug #20955]
2025-01-14[ruby/mmtk] Exit with error message if MMTK_HEAP_MODE is invalidPeter Zhu
https://github.com/ruby/mmtk/commit/c8b1f4c156
2025-01-14[ruby/mmtk] Add tests for when MMTK_HEAP_MIN >= MMTK_HEAP_MAXPeter Zhu
https://github.com/ruby/mmtk/commit/65b34b5e86
2025-01-14[ruby/mmtk] Also test invalid values for MMTK_HEAP_MIN and MMTK_HEAP_MAXPeter Zhu
https://github.com/ruby/mmtk/commit/90f1aa8d76
2025-01-14Remove incorrectly committed snapshotsKevin Newton
Notes: Merged: https://github.com/ruby/ruby/pull/12574
2025-01-14[ruby/mmtk] Add framework for testsPeter Zhu
https://github.com/ruby/mmtk/commit/6d94549fc7
2025-01-14[ruby/prism] Fix parse.y translation for locals testKevin Newton
https://github.com/ruby/prism/commit/c8037dfaed
2025-01-14[ruby/prism] Be a bit stricter when comparing parser translator tokensEarlopain
When there were more actual tokens than expected tokens, the test would still pass. Now it's possible to receive an assertion like this: ``` expected: [] actual: [:tNL, [nil, #<Parser::Source::Range comment_single.txt 8...9>]] <[]> expected but was <[:tNL, [nil, #<Parser::Source::Range comment_single.txt 8...9>]]> ``` https://github.com/ruby/prism/commit/e9e9a48e43
2025-01-14[ruby/prism] Fix block parameters and it for RubyParserJustin Collins
https://github.com/ruby/prism/commit/7a93a307ac
2025-01-14[ruby/prism] Freeze AST optionKevin Newton
To make it so that you can pass `freeze: true` to Prism parse methods and get back a deeply-frozen AST that is Ractor- shareable. https://github.com/ruby/prism/commit/8e6a93b2d2
2025-01-14[ruby/openssl] ssl: update test_verify_hostname_on_connect for LibreSSLKazuki Yamaguchi
This reverts the change made to this test case in commit https://github.com/ruby/openssl/commit/a0e98d48c91f (Enhance TLS 1.3 support on LibreSSL 3.2/3.3, 2020-12-03). Part of the test case was skipped on LibreSSL because LibreSSL 3.2.2 introduced a stricter check during creation of the extension. The check was then relaxed in LibreSSL 3.4.0. https://github.com/ruby/openssl/commit/187b176ecd
2025-01-14[ruby/openssl] Require LibreSSL 3.9 or laterKazuki Yamaguchi
Drop support for LibreSSL 3.1-3.8. LibreSSL 3.8 has reached its EOL in 2024-10. https://github.com/ruby/openssl/commit/f33d611f9f
2025-01-14[ruby/openssl] Refactor buffer usage to only use `append_as_bytes`Jean Boussier
https://github.com/ruby/openssl/commit/28f2901c48
2025-01-14[ruby/json] Refactor JSON::Ext::Parser to split configuration and parsing stateJean Boussier
Ref: https://github.com/ruby/json/pull/718 The existing `Parser` interface is pretty bad, as it forces to instantiate a new instance for each document. Instead it's preferable to only take the config and do all the initialization needed, and then keep the parsing state on the stack on in ephemeral memory. This refactor makes the `JSON::Coder` pull request much easier to implement in a performant way. https://github.com/ruby/json/commit/c8d5236a92 Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com>
2025-01-14[ruby/yaml] We should load rubygems for optional pstore gemHiroshi SHIBATA
https://github.com/ruby/yaml/commit/d32dc11205
2025-01-14[ruby/fiddle] add regex for bool parsing & test struct w/ boolDmitrii
parsing (https://github.com/ruby/fiddle/pull/169) GitHub: fix https://github.com/ruby/fiddle/pull/168 Struct parsing invokes "parse_ctype" on the whole member signature, which fails if member type is "bool" due to plain string matching for it. This change updates "bool" type matching to a regexp, so TYPE_BOOL is correctly parsed for a whole signature like "bool toggle" as well as just "bool". --------- https://github.com/ruby/fiddle/commit/71607446d4 Co-authored-by: Sutou Kouhei <kou@cozmixng.org> Notes: Merged: https://github.com/ruby/ruby/pull/12568
2025-01-14[rubygems/rubygems] Bump the rb-sys group across 2 directories with 1 updatedependabot[bot]
Bumps the rb-sys group with 1 update in the /test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib directory: [rb-sys](https://github.com/oxidize-rb/rb-sys). Bumps the rb-sys group with 1 update in the /test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example directory: [rb-sys](https://github.com/oxidize-rb/rb-sys). Updates `rb-sys` from 0.9.105 to 0.9.107 - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.105...v0.9.107) Updates `rb-sys` from 0.9.105 to 0.9.107 - [Release notes](https://github.com/oxidize-rb/rb-sys/releases) - [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.105...v0.9.107) --- updated-dependencies: - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rb-sys - dependency-name: rb-sys dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rb-sys ... Signed-off-by: dependabot[bot] <support@github.com> https://github.com/rubygems/rubygems/commit/85156ce286 Notes: Merged: https://github.com/ruby/ruby/pull/12568
2025-01-13[ruby/mmtk] Remove accidentally committed filesPeter Zhu
https://github.com/ruby/mmtk/commit/154a038293
2025-01-13[ruby/mmtk] Exit with error message if MMTK_HEAP_MIN is invalidPeter Zhu
https://github.com/ruby/mmtk/commit/1d2f7b9cfc
2025-01-13[ruby/prism] Fix parser translator tokens for `%x(#{})`Earlopain
It falsely considered it to be a single backtick command https://github.com/ruby/prism/commit/dd762be590
2025-01-13Proc#parameters: Show anonymous optionals as `[:opt]`Alan Wu
Have this for lead parameters as well as parameters after rest ("post"). [Bug #20974] Notes: Merged: https://github.com/ruby/ruby/pull/12547
2025-01-13[ruby/prism] Fix parser translator heredoc dedention with leading interpolationEarlopain
```rb <<~F foo #{} bar F ``` has zero common whitespace. https://github.com/ruby/prism/commit/1f3c222a06
2025-01-13[ruby/mmtk] Unskip TestEnv#test_select_bang_in_ractorPeter Zhu
https://github.com/ruby/mmtk/commit/b2b83ecadb
2025-01-12[ruby/prism] Fix parser translator tSPACE tokens for percent arraysEarlopain
Tests worked around this but the incompatibility is not hard to fix. This fixes 17 token incompatibilies in tests here that were previously passing https://github.com/ruby/prism/commit/101962526d
2025-01-12[ruby/prism] Frozen strings in the ASTKevin Newton
https://github.com/ruby/prism/commit/8d9d429155
2025-01-12[ruby/prism] Fix parser translator tokens for comment-only fileEarlopain
In https://github.com/ruby/prism/pull/3393 I made a mistake. When there is no previous token, it wraps around to -1. Oops Additionally, if a comment has no newline then the offset should be kept as is https://github.com/ruby/prism/commit/3c266f1de4
2025-01-13[Bug #21030] Fix step for non-numeric rangeNobuyoshi Nakada
When the end points of an inclusive range equal, `Range#step` should yields the element once. Notes: Merged: https://github.com/ruby/ruby/pull/12559
2025-01-12[Bug #21018] Fix for s390xNobuyoshi Nakada
2025-01-12[ruby/prism] Fix binary encoding for the parser translatorEarlopain
Skipping detecting the encoding is almost always right, just for binary it should actually happen. A symbol containing escapes that are invalid in utf-8 would fail to parse since symbols must be valid in the script encoding. Additionally, the parser gem would raise an exception somewhere during string handling https://github.com/ruby/prism/commit/fa0154d9e4
2025-01-11[ruby/prism] Better comment token handling for the parser translatorEarlopain
There appear to be a bunch of rules, changing behaviour for inline comments, multiple comments after another, etc. This seems to line up with reality pretty closely, token differences for RuboCop tests go from 1129 to 619 which seems pretty impressive https://github.com/ruby/prism/commit/2e1b92670c
2025-01-11[ruby/prism] Fix parser translator tokens for backslashes in single-quoted ↵Earlopain
strings and word arrays These are not line continuations. They either should be taken literally, or allow the word array to contain the following whitespace (newlines in this case) Before: ``` 0...1: tSTRING_BEG => "'" 1...12: tSTRING_CONTENT => "foobar\\\n" 12...16: tSTRING_CONTENT => "baz\n" 16...17: tSTRING_END => "'" 17...18: tNL => nil ``` After: ``` 0...1: tSTRING_BEG => "'" 1...6: tSTRING_CONTENT => "foo\\\n" 6...12: tSTRING_CONTENT => "bar\\\n" 12...16: tSTRING_CONTENT => "baz\n" 16...17: tSTRING_END => "'" 17...18: tNL => nil ``` https://github.com/ruby/prism/commit/b6554ad64e
2025-01-11[ruby/prism] Implement more string token escaping in the parser translatorEarlopain
This leaves `\c` and `\M` escaping but I don't understand how these should even work yet. Maybe later. https://github.com/ruby/prism/commit/13db3e8cb9
2025-01-11[ruby/prism] Import code samples for Ruby 3.3 from the parser gemEarlopain
Slightly tweaking the import script becaues of backtrace format changes in Ruby 3.4 Most tests pass in all parsers, with only a handful of failures overall https://github.com/ruby/prism/commit/9b5b785aa4
2025-01-11[ruby/prism] [Bug #21010] Reject endless method definition of `[]=`ydah
Fixes: https://bugs.ruby-lang.org/issues/20785 https://github.com/ruby/prism/commit/192960ce5d
2025-01-11[ruby/prism] Better handle all kinds of multiline strings in the parser ↵Earlopain
translator This is a followup to #3373, where the implementation was extracted https://github.com/ruby/prism/commit/2637007929
2025-01-11[ruby/prism] Better handle multiline interpolated strings in the parser ↵Earlopain
translator Much of this logic should be shared between interpolated symbols and regexps. It's also incorrect when the node contains a literal `\\n` (same as for plain string nodes at the moment) https://github.com/ruby/prism/commit/561914f99b
2025-01-11[ruby/prism] Fix parser translator ast for empty regexEarlopain
In that specific case, no string node is emitted https://github.com/ruby/prism/commit/1166db13dd
2025-01-11[ruby/prism] Fix parser translator ast for regex with line continuationEarlopain
Turns out, the vast majority of work was already done with handling the same for heredocs I'm confident this should also apply to actual string nodes (there's even a todo for it) but no tests change if I apply it there too, so I can't say for sure if the logic would be correct. The individual test files are a bit too large, maybe something else would break that currently passes. Leaving it for later to look more closely into that. https://github.com/ruby/prism/commit/6bba1c54e1
2025-01-11[ruby/prism] Fix parser translator ast when using anonymous forwarding in ↵Earlopain
blocks/lambda Blocks and lambdas inherit anonymous arguments from the method they are a part of. They themselves don't allow to introduce new anonymous arguments. While you can write this: ```rb def foo(*) bar { |**| } end ``` referecing the new parameter inside of the block will always be a syntax error. https://github.com/ruby/prism/commit/2cbd27e134
2025-01-11[ruby/prism] Fix an incompatibility with the parser translatorEarlopain
The offset cache contains an entry for each byte so it can't be accessed via the string length. Adds tests for all variants except for this: ``` "fo o" "ba ’" ``` For some reason, this still has the wrong offset. https://github.com/ruby/prism/commit/a651126458
2025-01-11[ruby/prism] Support 3.5 for version optionKevin Newton
https://github.com/ruby/prism/commit/6b6aa05bfb
2025-01-11[ruby/irb] `IRB.conf[:SAVE_HISTORY]` should handle boolean valuesStan Lo
(https://github.com/ruby/irb/pull/1062) Although not documented, `IRB.conf[:SAVE_HISTORY]` used to accept boolean, which now causes `NoMethodError` when used. This commit changes the behavior to accept boolean values and adds tests for the behavior. https://github.com/ruby/irb/commit/8b1a07b2a8
2025-01-10[ruby/irb] Gracefully handle incorrect command aliasesStan Lo
(https://github.com/ruby/irb/pull/1059) * Gracefully handle incorrect command aliases Even if the aliased target is a helper method or does not exist, IRB should not crash. This commit warns users in such cases and treat the input as normal expression. * Streamline command parsing and introduce warnings for incorrect command aliases https://github.com/ruby/irb/commit/9fc14eb74b
2025-01-10[ruby/date] Skip tests failing on TruffleRubyAndrew Konchin
https://github.com/ruby/date/commit/d019ac8186
2025-01-10Make Pstore tests as optionalHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12537
2025-01-10Make logger as bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12537
2025-01-10Make benchmark as bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12537
2025-01-10Make pstore as bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12537
2025-01-09[Feature #6012] Extend `source_location` for end position and columnsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12539
2025-01-09[Bug #21018] Show invalid command line option more properlyNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12538