summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2023-08-25[ruby/yarp] fix: unterminated regular expression with a heredocMike Dalessio
Previously this snippet would track the same newline twice, leading to a failed assertion in yp_newline_list_append. https://github.com/ruby/yarp/commit/1d3fe19a94
2023-08-25[Bug #19848] Flush BOMNobuyoshi Nakada
The token just after BOM needs to position at column 0, so that the indentation matches closing line. Notes: Merged: https://github.com/ruby/ruby/pull/8281
2023-08-24mv test/bom_test.rb test/yarp/Takashi Kokubun
This sync 0e3dc5a056abf51363070ad94de4a8097bc80197 wasn't successful.
2023-08-24[ruby/yarp] Fix lex compat with BOMKevin Newton
* BOM should not impact looking for the encoding string * We should re-encode tokens when the encoding changes * BOM should change the column of comments only https://github.com/ruby/yarp/commit/119fc2d7b2
2023-08-24[ruby/yarp] Fix backslash-r (CR) delimited stringsHParker
now CR can be used as a string delimiter https://github.com/ruby/yarp/commit/3d27bad797
2023-08-24[ruby/irb] Deprecate RubyLex and warn about referencing to itStan Lo
(https://github.com/ruby/irb/pull/692) `RubyLex` has always been a private component of IRB, so we should explicitly discourage usages of it. Also, it should be placed under the `IRB` module like other components. https://github.com/ruby/irb/commit/069b5625f7
2023-08-24[ruby/yarp] Improve handling of line endingsMike Dalessio
Introduce three new inline helper functions: - `match_line_ending` - `match_line_ending_at` - `match_line_ending_addr` These functions are similar in signature to the `peek*` functions, but return the length of the line ending being inspected (or 0 if no line ending was found). These functions are then used to simplify how we're detecting line endings throughout "src/yarp.c". Also: - test coverage backfilled for `__END__` comments with CRLF line endings. - error message for invalid `%` tokens updated to not include the potential line endings. - some small refactorings for readability along the way https://github.com/ruby/yarp/commit/a00067386d
2023-08-24[ruby/open-uri] Close leaked filesNobuyoshi Nakada
https://github.com/ruby/open-uri/commit/c52ee9e430
2023-08-23Handle Array#* raising ArgumentError in testJeremy Evans
Treat ArgumentError as NoMemoryError, so it will resize the array and try again. Fixes [Bug #12500] Notes: Merged: https://github.com/ruby/ruby/pull/8270
2023-08-23[ruby/open-uri] Make URI.open pass keywordsJeremy Evans
Fixes [Bug #19238] https://github.com/ruby/open-uri/commit/f636d01b85
2023-08-23[ruby/yarp] Match EOF after newline behaviorHParker
in Ripper EOL after whitespace is returned as a on_nl node with the whitespace as the content k0kubun: This is a resync of 9aca3528aa1a1545468a508b02b77bc922bb7321. git.ruby-lang.org had an old git version and the diff was wrong. It now has a newer git, so this should succeed next time. https://github.com/ruby/yarp/commit/be16d1deed
2023-08-23[ruby/yarp] Constant paths followed by an & should be lexed as a callKevin Newton
https://github.com/ruby/yarp/commit/b0a2ba2c4d
2023-08-23[ruby/yarp] Match EOF after newline behaviorHParker
in Ripper EOL after whitespace is returned as a on_nl node with the whitespace as the content https://github.com/ruby/yarp/commit/be16d1deed
2023-08-23[ruby/yarp] fix: newline tracking for a comment at EOFMike Dalessio
https://github.com/ruby/yarp/commit/62fb0bddf5
2023-08-23YJIT: Implement VM_CALL_ARGS_BLOCKARG with Proc for ISeq callsAlan Wu
Rack uses this. Speculate that the `obj` in `the_call(&obj)` will be a proc when the compile-time sample is a proc. Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com> Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/8117 Merged-By: XrXr
2023-08-21[ruby/yarp] fix: parsing a '%' expression with a CR but not a newlineMike Dalessio
Previously this failed an assertion and aborted. https://github.com/ruby/yarp/commit/a037d942a8
2023-08-21[ruby/irb] Avoid overriding user's `irb_name` setting in debuggerStan Lo
integration (https://github.com/ruby/irb/pull/688) * Avoid overriding user's irb_name setting in debugger integration Instead of always setting `irb_name` to `irb:rdbg`, it should respect the user's setting and only append `:rdbg` to it. * Introduce write_rc test helper https://github.com/ruby/irb/commit/2ce7593351
2023-08-21Manually resync YARPJemma Issroff
YARP commits were synced out of order. We are doing this reset commit to ensure that all files are currently correct and we can proceed with monitoring syncs so this doesn't happen again.
2023-08-21[ruby/yarp] fix: newline tracking for nl-terminated % %q %QMike Dalessio
https://github.com/ruby/yarp/commit/1e4940864b
2023-08-21[ruby/yarp] fix: support newline-terminated regular expressionsMike Dalessio
Previously, parsing a snippet like this: %r\nfoo\n would result in tracking the second newline twice, resulting in a failed runtime assertion. Fixing that issue reveals another bug, which is that the _first_ newline was not being tracked at all. So we introduce a call to yp_newline_list right when we construct the REGEXP_BEGIN token. https://github.com/ruby/yarp/commit/0d5d759091
2023-08-21[ruby/yarp] Change AndWriteNode, OrWriteNode, OperatorWriteNode to contain ↵Kevin Newton
write nodes It makes it more difficult to find all locations where a variable is written to if they're just read nodes. To keep things consistent we should make them write nodes. https://github.com/ruby/yarp/commit/840e094045
2023-08-21[ruby/yarp] Consolidate OperatorAndWrite and OperatorOrWrite nodesKevin Newton
https://github.com/ruby/yarp/commit/9e680a7598
2023-08-21[ruby/yarp] handle missing HEREDOC endline at start of heredocHParker
https://github.com/ruby/yarp/commit/7b72493b6d
2023-08-21[ruby/yarp] Ensure correct location with if/elsif, allow FOCUS env var, fix ↵Kevin Newton
newlines on __END__ https://github.com/ruby/yarp/commit/9da0bc4452
2023-08-21[ruby/yarp] Handle interpolated regular expressions with the o flag for ↵Kevin Newton
locals checking https://github.com/ruby/yarp/commit/db95191207
2023-08-21[ruby/yarp] Update to latest unparserKevin Newton
https://github.com/ruby/yarp/commit/5ba7394261
2023-08-21[ruby/yarp] Update to latest whitequarkKevin Newton
https://github.com/ruby/yarp/commit/3607efb01d
2023-08-21[ruby/yarp] fix: newline tracking for nl-terminated % %q %QMike Dalessio
https://github.com/ruby/yarp/commit/1e4940864b
2023-08-21[ruby/yarp] prefactor: extract yp_newline_list_check_appendMike Dalessio
https://github.com/ruby/yarp/commit/149c74291b
2023-08-21Manually move files from test/snapshots to test/yarp/snapshotsJemma Issroff
2023-08-21[ruby/yarp] fix: support newline-terminated regular expressionsMike Dalessio
Previously, parsing a snippet like this: %r\nfoo\n would result in tracking the second newline twice, resulting in a failed runtime assertion. Fixing that issue reveals another bug, which is that the _first_ newline was not being tracked at all. So we introduce a call to yp_newline_list right when we construct the REGEXP_BEGIN token. https://github.com/ruby/yarp/commit/0d5d759091
2023-08-21[ruby/yarp] Update to latest seattlerbKevin Newton
https://github.com/ruby/yarp/commit/d5365f08d0
2023-08-21[ruby/irb] Move input processing out of RubyLexStan Lo
(https://github.com/ruby/irb/pull/683) * Add a test case for Ctrl-C handling * Test symbol aliases with integration tests There are a few places that also need to check symbol aliases before `Irb#eval_input`. But since the current command test skip them, we don't have test coverage on them. * Move each_top_level_statement and readmultiline to Irb This will save RubyLex from knowning information about commands and aliases. https://github.com/ruby/irb/commit/69cb5b5615
2023-08-21[ruby/yarp] Add a convenience value method for numeric literalsBenoit Daloze
https://github.com/ruby/yarp/commit/a328f27d8f
2023-08-21[rubygems/rubygems] Confirm verification warningsNobuyoshi Nakada
Fix up https://github.com/rubygems/rubygems/pull/6882 https://github.com/rubygems/rubygems/commit/71c73ac6d9
2023-08-20[ruby/irb] Support `VISUAL` env var, and prefer it over `EDITOR`Summer ☀️
(https://github.com/ruby/irb/pull/686) * Support `VISUAL` env var, and prefer it over `EDITOR` * Update test/irb/test_cmd.rb --------- https://github.com/ruby/irb/commit/399b872c31 Co-authored-by: Stan Lo <stan001212@gmail.com>
2023-08-20Tempfile is not neededNobuyoshi Nakada
2023-08-20[ruby/reline] Remove Timeout usageStan Lo
(https://github.com/ruby/reline/pull/580) Timeout's implementation relies on Thread, which would conflict with `ruby/debug`'s thread-freezing implementation and has casued issues like - ruby/debug#877 - ruby/debug#934 - ruby/debug#1000 This commit avoids the issue by completely removing the use of Timeout. https://github.com/ruby/reline/commit/d4f0cd3fe1
2023-08-20[rubygems/rubygems] Use assert_raise instead of assert_raisesSamuel Giddins
For ruby-core compat https://github.com/rubygems/rubygems/commit/83aa7b794e
2023-08-20[rubygems/rubygems] Ensure that loading multiple gemspecs with legacy YAML ↵Samuel Giddins
class references does not warn Before this, you would get constant redefinition warnings on Psych::DefaultKey Additionally, ensure the retries wont continue infinitely in the case of the ArgumentError not being caused by Marshal trying to load the undefined classes https://github.com/rubygems/rubygems/commit/919e8c2de4
2023-08-19[rubygems/rubygems] Fix leaked tempfilesNobuyoshi Nakada
Fix up https://github.com/rubygems/rubygems/pull/6882 https://github.com/rubygems/rubygems/commit/525b94a89f
2023-08-19[ruby/yarp] Rename statements to body where appropriateKevin Newton
https://github.com/ruby/yarp/commit/0aa7d9d10c
2023-08-18[ruby/yarp] Consolidate operator write nodesKevin Newton
https://github.com/ruby/yarp/commit/22b287e2b1
2023-08-18[ruby/yarp] Consolidate OperatorAndWrite and OperatorOrWrite nodesKevin Newton
https://github.com/ruby/yarp/commit/9e680a7598
2023-08-18[ruby/yarp] fix: multiple heredocs with embedded expressions with newlinesMike Dalessio
Set heredoc_end to NULL at the start of lexing a heredoc, to avoid having state from the previous heredoc confuse the parser's current location. https://github.com/ruby/yarp/commit/21ee304f0e
2023-08-18[ruby/yarp] handle missing HEREDOC endline at start of heredocHParker
https://github.com/ruby/yarp/commit/7b72493b6d
2023-08-18[rubygems/rubygems] Make nil a valid license specJohn Hong
https://github.com/rubygems/rubygems/commit/675effb67e
2023-08-18[ruby/yarp] fix: unterminated % in argumentsMike Dalessio
https://github.com/ruby/yarp/commit/efb3102369
2023-08-18[ruby/io-console] Avoid the influence of special variable `$/`Nobuyoshi Nakada
https://github.com/ruby/io-console/commit/5f71354332
2023-08-18[ruby/io-console] Enable `getpass` methods alwaysNobuyoshi Nakada
https://github.com/ruby/io-console/commit/57f9649df4