summaryrefslogtreecommitdiff
path: root/prism
AgeCommit message (Collapse)Author
2024-12-02[ruby/prism] Reject invalid operator after match predicate or after match ↵ydah
required Partially fixes: #3171 https://github.com/ruby/prism/commit/d0d9699c27
2024-12-02[ruby/prism] Reject invalid dot method call after match predicate or after ↵ydah
match required Partially fixes: https://github.com/ruby/prism/issues/3171 https://github.com/ruby/prism/commit/5c33fa5a1a
2024-12-02[ruby/prism] Reject extra comma in array after keyword argumentydah
Fixes: https://github.com/ruby/prism/issues/3109 https://github.com/ruby/prism/commit/9ed989c30d
2024-12-02Fix example of array pattern that results in a SyntaxErrorydah
``` ❯ ruby --parser=prism --dump=parsetree -e "foo in *1" ruby: -e:1: syntax error found (SyntaxError) > 1 | foo in *1 | ^ unexpected integer, expecting end-of-input 2 | ```
2024-12-02[ruby/prism] Add document BeginNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/b8f40988ab
2024-12-02[ruby/prism] Add document ArrayPatternNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/396c6d4340
2024-12-02[ruby/prism] Add document AliasMethodNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/27f13fabc6
2024-12-02[ruby/prism] Add document ArgumentsNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/1388ca389e
2024-12-02[ruby/prism] Add document BlockArgumentNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/b1c2f323f9
2024-12-02[ruby/prism] Add document BlockLocalVariableNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/8353be1dfe
2024-12-02[ruby/prism] Add document BlockNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/9c0ef71449
2024-12-02[ruby/prism] Add document BlockParameterNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/480897eccf
2024-12-02[ruby/prism] Add document BlockParametersNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/75d1bde6cc
2024-12-02[ruby/prism] Add document CallAndWriteNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/d1570f2e06
2024-12-02[ruby/prism] Add document CallNode fieldsydah
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/145ae8f993
2024-11-28[ruby/prism] Fix a copy-paste errorYusuke Endoh
This is not important because of the path of `assert(false)`, but just in case. Coverity Scan found this issue. https://github.com/ruby/prism/commit/7335c62f9d
2024-11-28[ruby/prism] Fix a possible leak of a file descriptorYusuke Endoh
When mmap fails for any reason, the fd must be closed. Coverity Scan found this issue. https://github.com/ruby/prism/commit/c06e9c400f
2024-11-12[ruby/prism] Fix use of uninitialized value when parsing regexpPeter Zhu
Parsing the regexp /\A{/ causes uses an uninitialized value because it tries to parse it as a range quantifier, so it reads the character after the closing curly bracket. This is using uninitialized values because prism strings are not null terminated. This can be seen in the Valgrind output: ==834710== Conditional jump or move depends on uninitialised value(s) ==834710== at 0x5DA010: pm_regexp_parse_range_quantifier (regexp.c:163) ==834710== by 0x5DA010: pm_regexp_parse_quantifier (regexp.c:243) ==834710== by 0x5DAD69: pm_regexp_parse_expression (regexp.c:738) ==834710== by 0x5DAD69: pm_regexp_parse_pattern (regexp.c:761) ==834710== by 0x5DAD69: pm_regexp_parse (regexp.c:773) ==834710== by 0x5A2EE7: parse_regular_expression_named_captures (prism.c:20886) ==834710== by 0x5A2EE7: parse_expression_infix (prism.c:21388) ==834710== by 0x5A5FA5: parse_expression (prism.c:21804) ==834710== by 0x5A64F3: parse_statements (prism.c:13858) ==834710== by 0x5A9730: parse_program (prism.c:22011) ==834710== by 0x576F0D: parse_input_success_p (extension.c:1062) ==834710== by 0x576F0D: parse_success_p (extension.c:1084) This commit adds checks for the end of the string to pm_regexp_parse_range_quantifier. https://github.com/ruby/prism/commit/be6cbc23ef
2024-11-08[ruby/prism] Fix splat after kwsplatHaldun Bayhantopcu
https://github.com/ruby/prism/commit/70c1cd480f
2024-11-03[ruby/prism] Error for def ivarKevin Newton
https://github.com/ruby/prism/commit/232a02acef
2024-10-28[ruby/prism] Only read from buffer if `size` is greater than 0Aaron Patterson
It looks like we can possibly do an out of bounds read if size is equal to 0. This commit adds a conditional to ensure size is actually greater than 0 before looking backwards in the buffer https://github.com/ruby/prism/commit/2031b626e6
2024-10-16[ruby/prism] RelocationKevin Newton
https://github.com/ruby/prism/commit/5ea6042408
2024-10-13[ruby/prism] Supress string_query function warningS-H-GAMELINKS
https://github.com/ruby/prism/commit/0635814327
2024-10-11[ruby/prism] Prism::StringQueryKevin Newton
Introduce StringQuery to provide methods to access some metadata about the Ruby lexer. https://github.com/ruby/prism/commit/d3f55b67b9
2024-10-10[ruby/prism] Short-circuit if possible for start line and unused warningKevin Newton
https://github.com/ruby/prism/commit/2745c81d31
2024-10-10[ruby/prism] Do not warn for unused variables on negative linesKevin Newton
Fixes [Bug #20788] https://github.com/ruby/prism/commit/27e91f21af
2024-10-10[ruby/prism] Reject invalid splat as last statement of parenthesesKevin Newton
https://github.com/ruby/prism/commit/3a0b1c6110
2024-10-10[ruby/prism] Update rescue node docStan Lo
Its `exception` field was renamed to `reference` in #1204 but the documentation was not updated. https://github.com/ruby/prism/commit/a477607ba2
2024-10-09[ruby/prism] Attempt to assume binary is UTF-8Kevin Newton
https://github.com/ruby/prism/commit/343197e4ff
2024-10-07[ruby/prism] Properly handle non-assoc operatorsKevin Newton
https://github.com/ruby/prism/commit/dbd5c929d6
2024-10-07[ruby/prism] Handle invalid commas in arguments, parameters, and arraysKevin Newton
https://github.com/ruby/prism/commit/023e894b74
2024-10-07[ruby/prism] Set contains_keywords flag for implicit gets($/, chomp: true) ↵Andrew Konchin
method call to handle -l CLI option https://github.com/ruby/prism/commit/717e41c87d
2024-10-07[ruby/prism] Fix up unary * binding powerKevin Newton
https://github.com/ruby/prism/commit/c1d23d4702
2024-10-07[ruby/prism] Fix up errors on invalid escape character syntaxKevin Newton
https://github.com/ruby/prism/commit/14c8559378
2024-10-04[ruby/prism] Fix up pattern parsing with trailing commasKevin Newton
https://github.com/ruby/prism/commit/51f2df60ff
2024-10-04[ruby/prism] Fix up multi target parsingKevin Newton
https://github.com/ruby/prism/commit/80cd335222
2024-10-03[ruby/prism] Handle single global variable character nameKevin Newton
https://github.com/ruby/prism/commit/7a0af49997
2024-10-03[ruby/prism] Pop lex mode for heredocs in the lexer, not the parserKevin Newton
https://github.com/ruby/prism/commit/5dd36b979e
2024-10-02[ruby/prism] Fix up binding power for singleton method receiverKevin Newton
https://github.com/ruby/prism/commit/f29ceae5cf
2024-10-02[ruby/prism] Fix up doubled range in argumentsKevin Newton
https://github.com/ruby/prism/commit/aee2de91a3
2024-10-02[ruby/prism] Fix up beginless ranges in method definitionsKevin Newton
https://github.com/ruby/prism/commit/ab9d80987a
2024-10-01[ruby/prism] Disallow dynamic patterns in labels at top level followed by pipesKevin Newton
https://github.com/ruby/prism/commit/ccc746f918
2024-10-01Resync to latest PrismKevin Newton
Notes: Merged: https://github.com/ruby/ruby/pull/11753
2024-10-01[ruby/prism] Disallow empty labels when not allowedKevin Newton
https://github.com/ruby/prism/commit/399ee28dc1
2024-10-01[ruby/prism] Disallow &. after endless rangeKevin Newton
https://github.com/ruby/prism/commit/498dd922d4
2024-09-30Sync Prism with latest main branchKevin Newton
Notes: Merged: https://github.com/ruby/ruby/pull/11741
2024-09-30[ruby/prism] Require a delimiter for singleton classesKevin Newton
https://github.com/ruby/prism/commit/fd58d6a9ea
2024-09-26[ruby/prism] Fix incorrect reference to AlternationPatternNode as non-void ↵Daniel Insley
expressions https://github.com/ruby/prism/commit/68de31919e
2024-09-26[ruby/prism] Add fields documentation for AliasMethodNode and ↵Daniel Insley
AlternationPatternNode https://github.com/ruby/prism/commit/6953daebde
2024-09-26[ruby/prism] Reject non-assoc ranges with subsequent operatorsKevin Newton
https://github.com/ruby/prism/commit/976a3cd0a5