summaryrefslogtreecommitdiff
path: root/prism
AgeCommit message (Collapse)Author
11 days[ruby/prism] Clarify the documentation of -x, it always searches aBenoit Daloze
shebang that includes "ruby" (https://github.com/ruby/prism/pull/4110) * Clarify the documentation of -x, it always searches a shebang that includes "ruby" * Update one more occurence --------- https://github.com/ruby/prism/commit/0cdf579295 Co-authored-by: Earlopain <14981592+Earlopain@users.noreply.github.com>
11 daysReject `END { next } ` as wellEarlopain
Followup for https://bugs.ruby-lang.org/issues/20409
2026-05-08[ruby/prism] Respect `encoding` option in `Prism.lex` and friendsEarlopain
utf-8 is the default for source files but can be overwritten via options https://github.com/ruby/prism/commit/355f451528
2026-04-30Rename `putstring` instruction as `dupstring`Jean Boussier
As well as `putchilledstring` as `dupchilledstring`. This is more consistent with similar `duparray` and `duphash` instructions and better reflect it's behavior.
2026-04-29[ruby/prism] Fix array-bounds error with GCC 9Benoit Daloze
* In file included from /usr/include/string.h:535, from include/prism/internal/arena.h:12, from src/prism.c:6: In function 'memset', inlined from 'lex_mode_push_regexp' at src/prism.c:290:5: .../string_fortified.h:59:10: error: '__builtin_memset' offset [26, 34] from the object at 'lex_mode' is out of the bounds of referenced subobject 'breakpoints' with type 'uint8_t[7]' {aka 'unsigned char[7]'} at offset 18 [-Werror=array-bounds] https://github.com/ruby/prism/commit/2908c1c6c5
2026-04-27[ruby/prism] Reject `END { break }` for Ruby 4.0Earlopain
For [Bug #20409] https://github.com/ruby/prism/commit/4848eb344e
2026-04-09[ruby/prism] Reject `return` and similar with block pass argumentEarlopain
Same handling as for `yield`. Fixes [Bug #21988] https://github.com/ruby/prism/commit/2dd20183ad
2026-04-05[ruby/prism] Fix type for `ArrayPatternNode#rest`Earlopain
It can only ever be one of these two https://github.com/ruby/prism/commit/f871ce0260
2026-04-01[ruby/prism] Generate templated sources under main/java-templatesCharles Oliver Nutter
This path avoids the sources getting wiped out during `mvn clean`, since they are not generated during the maven build. This patch also moves the generated WASM build under src/main/wasm since it is really a source file and not a test file. It will not be included in the built artifact. https://github.com/ruby/prism/commit/08dba29eb5
2026-04-01[ruby/prism] Remove a warning from `discarded-qualifiers`Earlopain
I've been seeing this for a while now: ``` ../../../../ext/prism/../../src/memchr.c: In function ‘pm_memchr’: ../../../../ext/prism/../../src/memchr.c:35:16: warning: return discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 35 | return memchr(memory, character, number); | ^~~~~~ ``` https://github.com/ruby/prism/commit/a3b1f10dbc
2026-03-30Fall back writing prism sources to the current directoryNobuyoshi Nakada
2026-03-30Update prism sources before dump_astNobuyoshi Nakada
2026-03-27[ruby/prism] Fix -Wconversion warnings from gcc 8.5.0Benoit Daloze
https://github.com/ruby/prism/commit/6069d67d22
2026-03-26[ruby/prism] Fix `Source.offsets` with `freeze: true`Earlopain
We still need to do it eagerly when the result will be frozen, same as for locations. Fixes the following error for the added test: > FrozenError: can't modify frozen Prism::ASCIISource: #<Prism::ASCIISource:0x00007ff9d57586f0 @source="1 + 2", @start_line=1, @offsets="\x00\x00\x00\x00"> https://github.com/ruby/prism/commit/0667d23f4f
2026-03-25[ruby/prism] Pull out parse_class and parse_moduleKevin Newton
https://github.com/ruby/prism/commit/781ecf4338
2026-03-25[ruby/prism] Pull out parse_*_array from parse_expression_prefixKevin Newton
https://github.com/ruby/prism/commit/80220a9d6a
2026-03-25[ruby/prism] Pull out parse_parentheses from parse_expression_prefixKevin Newton
https://github.com/ruby/prism/commit/3349087895
2026-03-25[ruby/prism] Pull out parse_case from parse_expression_prefixKevin Newton
https://github.com/ruby/prism/commit/410a623cdf
2026-03-25[ruby/prism] Pull out parse_def from parse_expression_prefixKevin Newton
https://github.com/ruby/prism/commit/f77dc15864
2026-03-25[ruby/prism] Add `keyword_loc` to `ForwardingSuperNode`Earlopain
They can take a block and so the keyword location is not always the entirety of the node. You can get it by constructing a location that is just the first 5 characters but why not have it be provided by prism? https://github.com/ruby/prism/commit/878d79eb8c
2026-03-24[ruby/prism] More gracefully handle interpolated keys in hpnKevin Newton
https://github.com/ruby/prism/commit/31c71e7a40
2026-03-24[PRISM] Replace MissingNode with ErrorRecoveryNodeKevin Newton
2026-03-24[ruby/prism] Fix accepting newline in multitarget before =Kevin Newton
https://github.com/ruby/prism/commit/3c89c5606d
2026-03-24[ruby/prism] Rework Java template generation for Maven buildCharles Oliver Nutter
This uses the JRuby rake-maven-plugin to generate the templates as part of the Maven build. The generated output for the Java templates will be under java/api/target/generated-sources/java. https://github.com/ruby/prism/commit/b257151391
2026-03-24[ruby/prism] Begin splitting the Java artifact into componentsCharles Oliver Nutter
* The Loader API lives under java/api. * The current native endpoint for the Prism shared library lives under java/native. * The WASM build and binding lives under java/wasm. The libraries will be released together but can be developed and snapshotted independently. Users that copy the source from the previous java/ will want to grab both java/api/src/main/java and java/native/src/main/java contents. https://github.com/ruby/prism/commit/03358d5bcf
2026-03-21[ruby/prism] Tweaks for byte[] identifiersCharles Oliver Nutter
* Allocate array of byte[] as byte[length][]. * Default JAVA_BACKEND to "default" with "truffleruby" the custom option. https://github.com/ruby/prism/commit/5f29860bb7
2026-03-21[ruby/prism] Swich identifiers to byte[]Charles Oliver Nutter
* JAVA_STRING_TYPE and related change to IDENTIFIER * TruffleRuby still uses java.lang.String Fixes https://github.com/ruby/prism/pull/4009 https://github.com/ruby/prism/commit/32028c52c5
2026-03-20[PRISM] Remove checked-in generated fileKevin Newton
2026-03-20[ruby/prism] Ensure Source#offsets is set correctly in all casesBenoit Daloze
* See https://github.com/ruby/prism/issues/3861 https://github.com/ruby/prism/commit/3f6014dc53
2026-03-20[ruby/prism] Revert "Switch identifiers to byte[]"Kevin Newton
https://github.com/ruby/prism/commit/efe36fbc46
2026-03-20[ruby/prism] Tweaks for byte[] identifiersCharles Oliver Nutter
* Allocate array of byte[] as byte[length][]. * Default JAVA_BACKEND to "default" with "truffleruby" the custom option. https://github.com/ruby/prism/commit/6ad180a00d
2026-03-20[ruby/prism] Swich identifiers to byte[]Charles Oliver Nutter
* JAVA_STRING_TYPE and related change to IDENTIFIER * TruffleRuby still uses java.lang.String Fixes https://github.com/ruby/prism/pull/4009 https://github.com/ruby/prism/commit/cbe91a3f36
2026-03-20[ruby/prism] Provide a single-entry cache on parser for avoiding constant hashesKevin Newton
https://github.com/ruby/prism/commit/56cdcbbb8c
2026-03-20[ruby/prism] Fast path for returning from parse_arguments_listKevin Newton
https://github.com/ruby/prism/commit/9df357af89
2026-03-20[ruby/prism] Use an arena for building the Prism ASTKevin Newton
https://github.com/ruby/prism/commit/bbcb5690ce
2026-03-20[ruby/prism] Lazily build offsets from a packed arrayKevin Newton
https://github.com/ruby/prism/commit/3cffc44510
2026-03-20[ruby/prism] Use common method to construct Location hereCharles Oliver Nutter
https://github.com/ruby/prism/commit/588f41ed6b
2026-03-20Leverage new Prism APIsKevin Newton
Prism changed structure quite a bit. Most of the previously-public structs are now opaque. This requires quite a bit of changes internally. It also triggered some unrelated changes, which were necessary because Prism's main header used to pull in standard headers. So box.c and jit.c are now no longer transitively getting all the headers they needed.
2026-03-20[ruby/prism] Move PRISM_NODISCARD to the correct positionKevin Newton
https://github.com/ruby/prism/commit/ba16ae2256
2026-03-20[ruby/prism] Rename strings to stringy because of linux conflictsKevin Newton
https://github.com/ruby/prism/commit/eb1d518736
2026-03-20[ruby/prism] Revert xfree_sized for integerKevin Newton
https://github.com/ruby/prism/commit/eb398af793
2026-03-20[ruby/prism] pm_source_owned_newKevin Newton
https://github.com/ruby/prism/commit/0c6494a3e1
2026-03-20[ruby/prism] Use xfree_sized everywhere possibleKevin Newton
https://github.com/ruby/prism/commit/603e482c10
2026-03-20[ruby/prism] Introduce pm_source_tKevin Newton
https://github.com/ruby/prism/commit/f50c25b5c1
2026-03-20[ruby/prism] Also expose pm_constant_id_list_init, ↵Kevin Newton
pm_constant_id_list_append, and pm_string_owned_init https://github.com/ruby/prism/commit/a52c48186e
2026-03-20[ruby/prism] pm_parser_constant_findKevin Newton
https://github.com/ruby/prism/commit/d4a3ef9e43
2026-03-20[ruby/prism] Add necessary functions for CRuby integrationKevin Newton
https://github.com/ruby/prism/commit/6ba2c6424e
2026-03-20[ruby/prism] Ensure we free options before raising type errorsKevin Newton
https://github.com/ruby/prism/commit/717e4e738d
2026-03-20[ruby/prism] Clean up documentationKevin Newton
https://github.com/ruby/prism/commit/94d16c61cf
2026-03-20[ruby/prism] Fix up bindingsKevin Newton
https://github.com/ruby/prism/commit/1c1e94849e