Age | Commit message (Collapse) | Author | |
---|---|---|---|
10 days | Emit `warn` event for duplicated hash keys on ripper | yui-knk | |
Need to use `rb_warn` macro instead of calling `rb_compile_warn` directly to emit `warn` event on ripper. | |||
14 days | Fix segv when parsing `command` by ripper | yui-knk | |
89cfc152071 made this event dispatch to pass `Qundef` to user defined callback method by mistake. This commit fix it to be `nil`. | |||
2024-04-07 | Fix ripper to dispatch warning event for duplicated when clause | yui-knk | |
Need to separate `check_literal_when` function for parser and ripper otherwise warning event is not dispatched because parser `rb_warning1` is used in ripper. | |||
2024-02-20 | [Feature #20257] Rearchitect Ripper | yui-knk | |
Introduce another semantic value stack for Ripper so that Ripper can manage both Node and Ruby Object separately. This rearchitectutre of Ripper solves these issues. Therefore adding test cases for them. * [Bug 10436] https://bugs.ruby-lang.org/issues/10436 * [Bug 18988] https://bugs.ruby-lang.org/issues/18988 * [Bug 20055] https://bugs.ruby-lang.org/issues/20055 Checked the differences of `Ripper.sexp` for files under `/test/ruby` are only on test_pattern_matching.rb. The differences comes from the differences between `new_hash_pattern_tail` functions between parser and Ripper. Ripper `new_hash_pattern_tail` didn’t call `assignable` then `kw_rest_arg` wasn’t marked as local variable. This is also fixed by this commit. ``` --- a/./tmp/before/test_pattern_matching.rb +++ b/./tmp/after/test_pattern_matching.rb @@ -3607,7 +3607,7 @@ [:in, [:hshptn, nil, [], [:var_field, [:@ident, “a”, [984, 13]]]], [[:binary, - [:vcall, [:@ident, “a”, [985, 10]]], + [:var_ref, [:@ident, “a”, [985, 10]]], :==, [:hash, nil]]], nil]]], @@ -3662,7 +3662,7 @@ [:in, [:hshptn, nil, [], [:var_field, [:@ident, “a”, [993, 13]]]], [[:binary, - [:vcall, [:@ident, “a”, [994, 10]]], + [:var_ref, [:@ident, “a”, [994, 10]]], :==, [:hash, [:assoclist_from_args, @@ -3813,7 +3813,7 @@ [:command, [:@ident, “raise”, [1022, 10]], [:args_add_block, - [[:vcall, [:@ident, “b”, [1022, 16]]]], + [[:var_ref, [:@ident, “b”, [1022, 16]]]], false]]], [:else, [[:var_ref, [:@kw, “true”, [1024, 10]]]]]]]], nil, @@ -3876,7 +3876,7 @@ [:@int, “0”, [1033, 15]]], :“&&“, [:binary, - [:vcall, [:@ident, “b”, [1033, 20]]], + [:var_ref, [:@ident, “b”, [1033, 20]]], :==, [:hash, nil]]]], nil]]], @@ -3946,7 +3946,7 @@ [:@int, “0”, [1042, 15]]], :“&&“, [:binary, - [:vcall, [:@ident, “b”, [1042, 20]]], + [:var_ref, [:@ident, “b”, [1042, 20]]], :==, [:hash, [:assoclist_from_args, @@ -5206,7 +5206,7 @@ [[:assoc_new, [:@label, “c:“, [1352, 22]], [:@int, “0”, [1352, 25]]]]]], - [:vcall, [:@ident, “r”, [1352, 29]]]], + [:var_ref, [:@ident, “r”, [1352, 29]]]], false]]], [:binary, [:call, @@ -5299,7 +5299,7 @@ [:assoc_new, [:@label, “c:“, [1367, 34]], [:@int, “0”, [1367, 37]]]]]], - [:vcall, [:@ident, “r”, [1367, 41]]]], + [:var_ref, [:@ident, “r”, [1367, 41]]]], false]]], [:binary, [:call, @@ -5931,7 +5931,7 @@ [:in, [:hshptn, nil, [], [:var_field, [:@ident, “r”, [1533, 11]]]], [[:binary, - [:vcall, [:@ident, “r”, [1534, 8]]], + [:var_ref, [:@ident, “r”, [1534, 8]]], :==, [:hash, [:assoclist_from_args, ``` | |||
2024-02-15 | Do not include a backtick in error messages and backtraces | Yusuke Endoh | |
[Feature #16495] | |||
2023-12-02 | [Bug #19838] Flush delayed token nonconsecutive with the next token | Nobuyoshi Nakada | |
2023-12-01 | Dispatch invalid hex escape content too | Nobuyoshi Nakada | |
2023-12-01 | [Bug #20030] dispatch invalid escaped character without ignoring it | Nobuyoshi Nakada | |
2023-11-02 | Added TestRipper namespace to test_call_colon2 | Hiroshi SHIBATA | |
2023-11-02 | test/ripper: nest helper classes under TestRipper module | lukeg | |
Generic names like Node and NodeList should be namespaced properly. | |||
2023-08-26 | [Bug #19851] Ripper: Hide internal block argument ID | Nobuyoshi Nakada | |
Notes: Merged: https://github.com/ruby/ruby/pull/8293 | |||
2023-08-09 | Fix memory leak for incomplete lambdas | Peter Zhu | |
[Bug #19836] The parser does not free the chain of `struct vtable`, which causes memory leaks. The following script reproduces this issue: ``` 10.times do 100_000.times do Ripper.parse("-> {") end puts `ps -o rss= -p #{$$}` end ``` Notes: Merged: https://github.com/ruby/ruby/pull/8192 | |||
2023-08-09 | Fix memory leak in parser for incomplete tokens | Peter Zhu | |
[Bug #19835] The parser does not free the `tbl` of the `struct vtable` when there are leftover `lvtbl` in the parser. This causes a memory leak. The following script reproduces this issue: ``` 10.times do 100_000.times do Ripper.parse("class Foo") end puts `ps -o rss= -p #{$$}` end ``` Notes: Merged: https://github.com/ruby/ruby/pull/8192 | |||
2023-08-03 | Remove --disable-gems for assert_separately | Peter Zhu | |
assert_separately adds --disable=gems so we don't need to add --disable-gems when calling assert_separately. Notes: Merged: https://github.com/ruby/ruby/pull/8162 | |||
2023-08-01 | [Bug #19788] Use the result of `tCOLON2` event | Nobuyoshi Nakada | |
Notes: Merged: https://github.com/ruby/ruby/pull/8144 | |||
2023-07-16 | Fix null pointer access in Ripper#initialize | Nobuyoshi Nakada | |
In `rb_ruby_ripper_parser_allocate`, `r->p` is NULL between creating `self` and `parser_params` assignment. As GC can happen there, the typed-data functions for it need to consider the case. Notes: Merged: https://github.com/ruby/ruby/pull/8085 | |||
2023-06-28 | Increase memory leak test timeout | Peter Zhu | |
The test times out on some platforms, so increase the timeout. Notes: Merged: https://github.com/ruby/ruby/pull/7992 | |||
2023-06-28 | Fix memory leak in Ripper | Peter Zhu | |
The following script leaks memory in Ripper: ```ruby require "ripper" 20.times do 100_000.times do Ripper.parse("") end puts `ps -o rss= -p #{$$}` end ``` Notes: Merged: https://github.com/ruby/ruby/pull/7985 | |||
2023-06-20 | [Bug #19736] Recover after unterminated interpolation | Nobuyoshi Nakada | |
Notes: Merged: https://github.com/ruby/ruby/pull/7963 | |||
2023-04-07 | [Bug #19563] Yield words separators per lines | Nobuyoshi Nakada | |
So that newlines across a here-doc terminator will be separated tokens. Cf. https://github.com/ruby/irb/pull/558 Notes: Merged: https://github.com/ruby/ruby/pull/7675 Merged-By: nobu <nobu@ruby-lang.org> | |||
2023-04-01 | `*` in an array pattern should not be parsed as nil in ripper | Kazuki Tsujimoto | |
After 6c0925ba7017efde6091e2ec4f1a6be268166696, it was impossible to distinguish between the presence or absence of `*`. # Before the commit Ripper.sexp('0 in []')[1][0][2][1] #=> [:aryptn, nil, nil, nil, nil] Ripper.sexp('0 in [*]')[1][0][2][1] #=> [:aryptn, nil, nil, [:var_field, nil], nil] # After the commit Ripper.sexp('0 in []')[1][0][2][1] #=> [:aryptn, nil, nil, nil, nil] Ripper.sexp('0 in [*]')[1][0][2][1] #=> [:aryptn, nil, nil, nil, nil] This commit reverts it. | |||
2023-03-28 | Ripper: Add keyword options to `assert_parse_files` | Nobuyoshi Nakada | |
Notes: Merged: https://github.com/ruby/ruby/pull/7602 | |||
2023-03-26 | [Bug #19175] p_kw without a sub pattern should be `assignable' | Kazuki Tsujimoto | |
2023-03-26 | [Bug #19175] p_rest should be `assignable' | Kazuki Tsujimoto | |
It should also check for duplicate names. | |||
2023-02-02 | [Bug #19399] Parsing invalid heredoc inside block parameter | Nobuyoshi Nakada | |
Although this is of course invalid as Ruby code, allow to just parse and tokenize. Notes: Merged: https://github.com/ruby/ruby/pull/7229 | |||
2023-01-02 | [Bug #19291] Rewind to the previous line | Nobuyoshi Nakada | |
When rewinding looking ahead after newline token, also reset the last line string, the pointers to it, and the location, not only the line number. Notes: Merged: https://github.com/ruby/ruby/pull/7054 | |||
2023-01-02 | Adjut indent [ci skip] | Nobuyoshi Nakada | |
Notes: Merged: https://github.com/ruby/ruby/pull/7054 | |||
2022-08-28 | [Bug #18963] Separate string contents by here document terminator | Nobuyoshi Nakada | |
Notes: Merged: https://github.com/ruby/ruby/pull/6292 | |||
2022-08-12 | [Bug #18962] Do not read again once reached EOF | Nobuyoshi Nakada | |
`Ripper::Lexer#parse` re-parses the source code with syntax errors when `raise_errors: false`. Co-Authored-By: tompng <tomoyapenguin@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/6233 | |||
2022-06-14 | ripper: Check if anonymous parameters defined [Bug #18828] | Nobuyoshi Nakada | |
Notes: Merged: https://github.com/ruby/ruby/pull/6016 | |||
2021-12-14 | ripper: refine test to show expected states | Nobuyoshi Nakada | |
Notes: Merged: https://github.com/ruby/ruby/pull/5264 | |||
2021-09-11 | Hash values should be omitted in Ripper results | Shugo Maeda | |
2021-08-15 | Extract the wrapped value when yydebug [Bug #18075] | Nobuyoshi Nakada | |
Notes: Merged: https://github.com/ruby/ruby/pull/4742 | |||
2021-05-21 | ripper: wrap endless method in bodystmt [Bug #17869] | Nobuyoshi Nakada | |
Notes: Merged: https://github.com/ruby/ruby/pull/4516 | |||
2021-05-21 | ripper: assertions for rescue/ensure in method body | Nobuyoshi Nakada | |
Notes: Merged: https://github.com/ruby/ruby/pull/4516 | |||
2021-03-21 | Pattern matching pin operator against expression [Feature #17411] | Kazuki Tsujimoto | |
This commit is based on the patch by @nobu. | |||
2021-02-19 | Fix typo [ci skip] | Shugo Maeda | |
2021-02-19 | ripper: fix a bug of Ripper::Lexer with syntax error and heredoc [Bug #17644] | Shugo Maeda | |
2021-01-17 | Fix Ripper with heredoc. | manga_osyo | |
Notes: Merged: https://github.com/ruby/ruby/pull/4083 | |||
2021-01-09 | parse.y: handle "duplicated argument name" appropriately on ripper.y | Nobuhiro IMAI | |
refs: 733ed1e184 | |||
2020-12-23 | ripper: fix bad label parameter handling [Bug #17425] | Nobuyoshi Nakada | |
Notes: Merged: https://github.com/ruby/ruby/pull/3977 | |||
2020-12-19 | ripper: fix `#tok` on some error events [Bug 17345] | Nobuhiro IMAI | |
sorting alias target by event arity, and setup suitable `Elem` for error. Notes: Merged: https://github.com/ruby/ruby/pull/3936 | |||
2020-12-16 | Ripper: Fixed erred token on wrong alias [Bug #17345] | Nobuyoshi Nakada | |
2020-12-15 | Ripper: Refined error callbacks [Bug #17345] | Nobuyoshi Nakada | |
Notes: Merged: https://github.com/ruby/ruby/pull/3909 | |||
2020-11-26 | Store all kinds of syntax errors [Bug #17345] | Nobuyoshi Nakada | |
2020-11-26 | Removed a duplicate assertion | Nobuyoshi Nakada | |
2020-11-20 | Ripper.{lex,tokenize} return full tokens even if syntax error | Nobuhiro IMAI | |
yet another implements [Feature #17276] | |||
2020-11-17 | Support raise_errors keyword for Ripper.{lex,tokenize,sexp,sexp_raw} | Jeremy Evans | |
Implements [Feature #17276] Notes: Merged: https://github.com/ruby/ruby/pull/3774 Merged-By: jeremyevans <code@jeremyevans.net> | |||
2020-11-02 | ripper: Invalid pragma value warning | Nobuyoshi Nakada | |
2020-10-26 | Assoc pattern matching (#3703) | Nobuyoshi Nakada | |
[Feature #17260] One-line pattern matching using tASSOC R-assignment is rejected instead. Notes: Merged-By: nobu <nobu@ruby-lang.org> |