prism 1.7.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 34ddf7552f6698f496fba09232eac5bcfb053d0455cdac655d81d4a9e5c60d96
4
- data.tar.gz: 248141836d3f2502508f3374586bfd6590d1457dd0508494588a8905c56aea91
3
+ metadata.gz: cc702a11a2b52196e74eee050fefa294ac3c2aef3dcd7d4ab2f347e075707286
4
+ data.tar.gz: 32666fef05c64edc7a55ab517d6b582931f9b5b11ff22b5d9dfc5c7d00ee00b2
5
5
  SHA512:
6
- metadata.gz: 6e46578f5a2dd28f487bd4ffbdc7cd34bf15f230118f53bf932bea0ccff22cc4fcd000804f9a7bc27fd3399099bbd368f9ac89b6408df7de766ad1aef24a3cda
7
- data.tar.gz: 7e25c7caf0fbf963e7c7aadaf35535f3c770c1813e0b9cfd3f8d4623d2d47c5a1d8e2e487d59d75a711871b9bdf5dca92c9e85af0dd4d3f513e86d3d7a66e37d
6
+ metadata.gz: 2507880056ab51a2aafb14b6927a5d009ff8f3be4eb9917705a56ac59ac6c21c4a687f984652f2f4abe813e24f239077ee5aa0cd7308b6f3240fa864b1b06b28
7
+ data.tar.gz: 921a61d5bd263f70975250aca097c6ed36b747762098b2bc90d113d88f8c8f802e931bf7c2f78c365bce9390190b53bc1c243c1dfa5d3ea2a9c89a12b45659fb
data/CHANGELOG.md CHANGED
@@ -6,6 +6,30 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.8.1] - 2026-03-16
10
+
11
+ ### Changed
12
+
13
+ - Fix `not` binding power in endless methods.
14
+ - Correctly handle `and?` and similar on Ruby 4.0.
15
+ - Fix error message for block/lambda with `...` argument.
16
+ - Fix `in` handling.
17
+
18
+ ## [1.8.0] - 2026-01-12
19
+
20
+ ### Added
21
+
22
+ - Optimize ruby visitor.
23
+ - Report unterminated construct errors at opening token.
24
+
25
+ ### Changed
26
+
27
+ - Correctly expose ripper state.
28
+ - Use one file for versioned parser classes.
29
+ - Fix denominator of rational float literal.
30
+ - Decouple ripper translator from ripper library.
31
+ - Sync Prism::Translation::ParserCurrent with Ruby 4.0.
32
+
9
33
  ## [1.7.0] - 2025-12-18
10
34
 
11
35
  ### Added
@@ -716,7 +740,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
716
740
 
717
741
  - 🎉 Initial release! 🎉
718
742
 
719
- [unreleased]: https://github.com/ruby/prism/compare/v1.7.0...HEAD
743
+ [unreleased]: https://github.com/ruby/prism/compare/v1.8.1...HEAD
744
+ [1.8.1]: https://github.com/ruby/prism/compare/v1.8.0...v1.8.1
745
+ [1.8.0]: https://github.com/ruby/prism/compare/v1.7.0...v1.8.0
720
746
  [1.7.0]: https://github.com/ruby/prism/compare/v1.6.0...v1.7.0
721
747
  [1.6.0]: https://github.com/ruby/prism/compare/v1.5.2...v1.6.0
722
748
  [1.5.2]: https://github.com/ruby/prism/compare/v1.5.1...v1.5.2
data/Makefile CHANGED
@@ -43,7 +43,13 @@ build/libprism.a: $(STATIC_OBJECTS)
43
43
 
44
44
  javascript/src/prism.wasm: Makefile $(SOURCES) $(HEADERS)
45
45
  $(ECHO) "building $@"
46
- $(Q) $(WASI_SDK_PATH)/bin/clang --sysroot=$(WASI_SDK_PATH)/share/wasi-sysroot/ $(DEBUG_FLAGS) -DPRISM_EXPORT_SYMBOLS -D_WASI_EMULATED_MMAN -lwasi-emulated-mman $(CPPFLAGS) $(CFLAGS) -Wl,--export-all -Wl,--no-entry -mexec-model=reactor -o $@ $(SOURCES)
46
+ $(Q) $(WASI_SDK_PATH)/bin/clang --sysroot=$(WASI_SDK_PATH)/share/wasi-sysroot/ \
47
+ $(DEBUG_FLAGS) \
48
+ -DPRISM_EXPORT_SYMBOLS -DPRISM_EXCLUDE_PRETTYPRINT -DPRISM_EXCLUDE_JSON -DPRISM_EXCLUDE_PACK \
49
+ -D_WASI_EMULATED_MMAN -lwasi-emulated-mman $(CPPFLAGS) $(CFLAGS) \
50
+ -Wl,--export-all -Wl,--gc-sections -Wl,--strip-all -Wl,--lto-O3 -Wl,--no-entry -mexec-model=reactor \
51
+ -Oz -g0 -flto -fdata-sections -ffunction-sections \
52
+ -o $@ $(SOURCES)
47
53
 
48
54
  java-wasm/src/test/resources/prism.wasm: Makefile $(SOURCES) $(HEADERS)
49
55
  $(ECHO) "building $@"
data/config.yml CHANGED
@@ -17,6 +17,8 @@ errors:
17
17
  - ARGUMENT_FORWARDING_UNBOUND
18
18
  - ARGUMENT_NO_FORWARDING_AMPERSAND
19
19
  - ARGUMENT_NO_FORWARDING_ELLIPSES
20
+ - ARGUMENT_NO_FORWARDING_ELLIPSES_LAMBDA
21
+ - ARGUMENT_NO_FORWARDING_ELLIPSES_BLOCK
20
22
  - ARGUMENT_NO_FORWARDING_STAR
21
23
  - ARGUMENT_NO_FORWARDING_STAR_STAR
22
24
  - ARGUMENT_SPLAT_AFTER_ASSOC_SPLAT
data/docs/releasing.md CHANGED
@@ -47,10 +47,8 @@ bundle install
47
47
  * Update the version-specific lockfiles:
48
48
 
49
49
  ```sh
50
- for VERSION in "2.7" "3.0" "3.1" "3.2" "3.3" "3.4"; do docker run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app -e BUNDLE_GEMFILE="gemfiles/$VERSION/Gemfile" "ruby:$VERSION" bundle update; done
51
- docker run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app -e BUNDLE_GEMFILE="gemfiles/4.0/Gemfile" ruby:4.0.0-preview2 bundle update
52
- docker run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app -e BUNDLE_GEMFILE="gemfiles/jruby/Gemfile" jruby:latest bundle update
53
- BUNDLE_GEMFILE=gemfiles/truffleruby/Gemfile chruby-exec truffleruby -- bundle update
50
+ for VERSION in "2.7" "3.0" "3.1" "3.2" "3.3" "3.4" "4.0"; do docker run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app -e BUNDLE_GEMFILE="gemfiles/$VERSION/Gemfile" "ruby:$VERSION" bundle update; done
51
+ chruby ruby-4.1.0-dev && BUNDLE_GEMFILE=gemfiles/4.1/Gemfile bundle install
54
52
  ```
55
53
 
56
54
  * Update the cargo lockfiles:
data/docs/ruby_api.md CHANGED
@@ -36,6 +36,7 @@ Once you have nodes in hand coming out of a parse result, there are a number of
36
36
  * `#accept(visitor)` - a method that will immediately call `visit_*` to specialize for the node type
37
37
  * `#child_nodes` - a positional array of the child nodes of the node, with `nil` values for any missing children
38
38
  * `#compact_child_nodes` - a positional array of the child nodes of the node with no `nil` values
39
+ * `#each_child_node` - with a block given yields all child nodes, without a block return an enumerator containing all child nodes
39
40
  * `#copy(**keys)` - a method that allows creating a shallow copy of the node with the given keys overridden
40
41
  * `#deconstruct`/`#deconstruct_keys(keys)` - the pattern matching interface for nodes
41
42
  * `#inspect` - a string representation that looks like the syntax tree of the node
@@ -1,7 +1,7 @@
1
1
  #ifndef PRISM_EXT_NODE_H
2
2
  #define PRISM_EXT_NODE_H
3
3
 
4
- #define EXPECTED_PRISM_VERSION "1.7.0"
4
+ #define EXPECTED_PRISM_VERSION "1.8.1"
5
5
 
6
6
  #include <ruby.h>
7
7
  #include <ruby/encoding.h>
@@ -48,6 +48,8 @@ typedef enum {
48
48
  PM_ERR_ARGUMENT_FORWARDING_UNBOUND,
49
49
  PM_ERR_ARGUMENT_NO_FORWARDING_AMPERSAND,
50
50
  PM_ERR_ARGUMENT_NO_FORWARDING_ELLIPSES,
51
+ PM_ERR_ARGUMENT_NO_FORWARDING_ELLIPSES_LAMBDA,
52
+ PM_ERR_ARGUMENT_NO_FORWARDING_ELLIPSES_BLOCK,
51
53
  PM_ERR_ARGUMENT_NO_FORWARDING_STAR,
52
54
  PM_ERR_ARGUMENT_NO_FORWARDING_STAR_STAR,
53
55
  PM_ERR_ARGUMENT_SPLAT_AFTER_ASSOC_SPLAT,
@@ -14,16 +14,16 @@
14
14
  /**
15
15
  * The minor version of the Prism library as an int.
16
16
  */
17
- #define PRISM_VERSION_MINOR 7
17
+ #define PRISM_VERSION_MINOR 8
18
18
 
19
19
  /**
20
20
  * The patch version of the Prism library as an int.
21
21
  */
22
- #define PRISM_VERSION_PATCH 0
22
+ #define PRISM_VERSION_PATCH 1
23
23
 
24
24
  /**
25
25
  * The version of the Prism library as a constant string.
26
26
  */
27
- #define PRISM_VERSION "1.7.0"
27
+ #define PRISM_VERSION "1.8.1"
28
28
 
29
29
  #endif