summaryrefslogtreecommitdiff
path: root/prism/templates
AgeCommit message (Collapse)Author
6 days[ruby/prism] Bump to v1.8.0Takashi Kokubun
https://github.com/ruby/prism/commit/9c12be6e6a
2026-01-01[ruby/prism] Fix spacing in the generated #each_child_nodeBenoit Daloze
https://github.com/ruby/prism/commit/91f60cb736
2025-12-29[ruby/prism] Optimize ruby visitorEarlopain
`compact_child_nodes` allocates an array. We can skip that step by simply yielding the nodes. Benchmark for visiting the rails codebase: ```rb require "prism" require "benchmark/ips" files = Dir.glob("../rails/**/*.rb") results = files.map { Prism.parse_file(it) } visitor = Prism::Visitor.new Benchmark.ips do |x| x.config(warmup: 3, time: 10) x.report do results.each do visitor.visit(it.value) end end end RubyVM::YJIT.enable Benchmark.ips do |x| x.config(warmup: 3, time: 10) x.report do results.each do visitor.visit(it.value) end end end ``` Before: ``` ruby 3.4.8 (2025-12-17 revision https://github.com/ruby/prism/commit/995b59f666) +PRISM [x86_64-linux] Warming up -------------------------------------- 1.000 i/100ms Calculating ------------------------------------- 2.691 (± 0.0%) i/s (371.55 ms/i) - 27.000 in 10.089422s ruby 3.4.8 (2025-12-17 revision https://github.com/ruby/prism/commit/995b59f666) +YJIT +PRISM [x86_64-linux] Warming up -------------------------------------- 1.000 i/100ms Calculating ------------------------------------- 7.278 (±13.7%) i/s (137.39 ms/i) - 70.000 in 10.071568s ``` After: ``` ruby 3.4.8 (2025-12-17 revision https://github.com/ruby/prism/commit/995b59f666) +PRISM [x86_64-linux] Warming up -------------------------------------- 1.000 i/100ms Calculating ------------------------------------- 3.429 (± 0.0%) i/s (291.65 ms/i) - 35.000 in 10.208580s ruby 3.4.8 (2025-12-17 revision https://github.com/ruby/prism/commit/995b59f666) +YJIT +PRISM [x86_64-linux] Warming up -------------------------------------- 1.000 i/100ms Calculating ------------------------------------- 16.815 (± 0.0%) i/s (59.47 ms/i) - 169.000 in 10.054668s ``` ~21% faster on the interpreter, ~56% with YJIT https://github.com/ruby/prism/commit/bf631750cf
2025-12-18[ruby/prism] Bump to v1.7.0Kevin Newton
https://github.com/ruby/prism/commit/21c499d6e4
2025-12-05[ruby/prism] Avoid undefined int overflow behaviourSteven Johnstone
Fixes https://github.com/ruby/prism/pull/3786. https://github.com/ruby/prism/commit/b72b664675
2025-12-02[ruby/prism] Introduce PM_NODE_FLAGS macroKevin Newton
https://github.com/ruby/prism/commit/a20afe1674
2025-12-02[ruby/prism] Introduce PM_NODE_UPCAST macro for readabilityKevin Newton
https://github.com/ruby/prism/commit/7eb169513a
2025-11-16Handle deeply nested capture variables syntax errKevin Newton
When there are nested capture variables inside of a pattern match that has an alternation pattern, it is a syntax error. Currently it only adds a syntax error when it is at the top level of the pattern.
2025-11-14[ruby/prism] Reject endless method as a block parameter defaultEarlopain
Fixes [Bug #21661] https://github.com/ruby/prism/commit/475fa46a82
2025-11-14[Feature #21572] Syntax error at capture in alternation patternNobuyoshi Nakada
Should fail even with `-c` option.
2025-10-16[ruby/prism] Bump to v1.6.0Kevin Newton
https://github.com/ruby/prism/commit/b72fcc6183
2025-10-09[ruby/prism] Bump to vKevin Newton
https://github.com/ruby/prism/commit/7574837b7b
2025-10-08[ruby/prism] For these special cases, there exists no optional argument ↵Earlopain
type. Since a endless method is started with `=`, there was ambiguity here. We have to simply reject these in all cases. This adds a new error for the following reason: * `def foo arg = nil` is interpreted as a normal method call with optional `arg` without matching `end` * `def foo *arg = nil; end` is interpreted as a endless method call that has body `nil` with extraneous `end` `def foo *arg = nil` is somewhere inbetween and I don't know how to otherwise indicate the error. Now the second case above also shows the newly added error message. Fixes [Bug #21623] https://github.com/ruby/prism/commit/e1910d4492
2025-10-01[ruby/prism] Add a "LAST" enum field to all flags enumsAaron Patterson
This allows us to use the "last" of the enums in order to make masks, etc. This particular commit uses the call flag's last enum field as an offset so that we can define "private" flags but not accidentally clobber any newly added call node flags. https://github.com/ruby/prism/commit/e71aa980d8
2025-09-13[ruby/prism] Bump to v1.5.1Kevin Newton
https://github.com/ruby/prism/commit/cac5118884
2025-09-12[ruby/prism] Bump to v1.5.0Kevin Newton
https://github.com/ruby/prism/commit/194edab827
2025-08-05[ruby/prism] Improve error handling for missing parentheses after 'not' in ↵ydah
command calls https://github.com/ruby/prism/commit/d9151b8a82
2025-08-05[ruby/prism] Reject `true && not true`Yusuke Endoh
A command-call-like `not true` must be rejected after `&&` and `||`. https://bugs.ruby-lang.org/issues/21337 https://github.com/ruby/prism/commit/0513cf22ad
2025-07-16[ruby/prism] Improve error handling for missing parentheses after 'not' in ↵ydah
command calls https://github.com/ruby/prism/commit/d9151b8a82
2025-07-16[ruby/prism] Reject `true && not true`Yusuke Endoh
A command-call-like `not true` must be rejected after `&&` and `||`. https://bugs.ruby-lang.org/issues/21337 https://github.com/ruby/prism/commit/0513cf22ad
2025-06-09[ruby/prism] Fix typo in visitor example codeTim Craft
https://github.com/ruby/prism/commit/5aa963f8e6
2025-05-29[ruby/prism] [DOC] No RDoc in include/prism/ast.hNobuyoshi Nakada
https://github.com/ruby/prism/commit/1cae6e3b02
2025-05-29[ruby/prism] [DOC] Simply use `String#ljust`Nobuyoshi Nakada
https://github.com/ruby/prism/commit/ba019ab4b4
2025-05-29[ruby/prism] [DOC] Stop rdoc from processing non-rdoc commentsNobuyoshi Nakada
https://github.com/ruby/prism/commit/de1faa1680
2025-05-29[ruby/prism] [DOC] Specify markdown mode to RDocNobuyoshi Nakada
https://github.com/ruby/prism/commit/12af4e144e
2025-05-23[ruby/prism] Monomorphise visitor methodsUfuk Kayserilioglu
The current implementation of the visitor pattern in Prism uses a single method (`visit_child_nodes`) to handle all node types. This can lead to performance issues since the `node` argument will end up being polymorphic, and will prevent effective use of inline caches, which in CRuby are monomorphic. This commit generates an inlined version of the previous code for each node type, thus making the calls inside visitor methods monomorphic. This should improve performance, especially in cases where the visitor is called frequently. https://github.com/ruby/prism/commit/60d324a701
2025-05-13Handle to look up CGI::EscapeExt instead of using LoadError. cgi/escape is ↵Hiroshi SHIBATA
provided snce Ruby 2.3 Notes: Merged: https://github.com/ruby/ruby/pull/13311
2025-05-09Use cgi/escape instead of cgi/utilHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13275
2025-04-24Use cgi/util if that uses like CGI.escape methodsHiroshi SHIBATA
2025-03-23[ruby/prism] Update Ruby depsKevin Newton
https://github.com/ruby/prism/commit/594e2a69ed
2025-03-22[ruby/prism] Include nodeId in Java Node only if necessaryBenoit Daloze
* See https://github.com/ruby/prism/issues/3502 https://github.com/ruby/prism/commit/b7aedfe696
2025-03-21[ruby/prism] Add node_id to Java serializationKevin Newton
https://github.com/ruby/prism/commit/93e768bd18
2025-03-20[ruby/prism] Dynamically register events to dispatchSam Bostock
Instead of requiring the consumer to provide a list of all events which they wish to handle, we can give them to option of dynamically detecting them, by scanning the listener's public methods. This approach is similar to that used by Minitest (scanning for `test_` methods) and Rails generators (running all public methods in the order they are defined). While this is slower than specifying a hard coded list, the penalty is only during registration. There is no change the the behaviour of dispatching the events. https://github.com/ruby/prism/commit/781ebed743
2025-03-19[ruby/prism] Mark Prism as ractor-safeKevin Newton
https://github.com/ruby/prism/commit/c02429765b
2025-03-18[ruby/prism] Bump to v1.4.0Kevin Newton
https://github.com/ruby/prism/commit/71d31db496
2025-03-12[ruby/prism] Revert "Mark extension as Ractor-safe"Kevin Newton
https://github.com/ruby/prism/commit/56eaf53732
2025-03-12[ruby/prism] Mark extension as Ractor-safeKevin Newton
https://github.com/ruby/prism/commit/10e5431b38
2025-01-14[ruby/prism] Refactor serializerKevin Newton
https://github.com/ruby/prism/commit/8ab2532f09
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-12[ruby/prism] Frozen strings in the ASTKevin Newton
https://github.com/ruby/prism/commit/8d9d429155
2025-01-11[ruby/prism] Bump to v1.3.0Kevin Newton
https://github.com/ruby/prism/commit/a679ee0e5c
2025-01-05Use a single quote instead of a backtick for error messagesJunichi Ito
Fix https://bugs.ruby-lang.org/issues/20977 Notes: Merged: https://github.com/ruby/ruby/pull/12424
2024-12-16[ruby/prism] Bump to v1.2.0Kevin Newton
https://github.com/ruby/prism/commit/817a8e39d9 Notes: Merged: https://github.com/ruby/ruby/pull/12358
2024-12-16[ruby/prism] Bump to v1.1.0Kevin Newton
https://github.com/ruby/prism/commit/f80026883d Notes: Merged: https://github.com/ruby/ruby/pull/12358
2024-12-11[ruby/prism] Bump typechecking depsKevin Newton
https://github.com/ruby/prism/commit/230c8b8a48
2024-10-16[ruby/prism] RelocationKevin Newton
https://github.com/ruby/prism/commit/5ea6042408
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] Handle invalid commas in arguments, parameters, and arraysKevin Newton
https://github.com/ruby/prism/commit/023e894b74
2024-10-01Resync to latest PrismKevin Newton
Notes: Merged: https://github.com/ruby/ruby/pull/11753
2024-09-30Sync Prism with latest main branchKevin Newton
Notes: Merged: https://github.com/ruby/ruby/pull/11741