Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/cruby-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
with:
repository: ruby/ruby
path: ruby/ruby
ref: ruby_3_4
fetch-depth: 1
- name: Install libraries
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
toolchain: "1.91.1"
targets: wasm32-wasip1
- uses: actions/cache@v4
with:
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
toolchain: "1.91.1"
components: clippy, rustfmt
- uses: actions/cache@v4
with:
Expand Down
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
prism (1.5.2)
prism (1.5.3)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -33,10 +33,10 @@ GEM
tsort
ruby_memcheck (3.0.1)
nokogiri
ruby_parser (3.21.1)
ruby_parser (3.22.0)
racc (~> 1.5)
sexp_processor (~> 4.16)
sexp_processor (4.17.4)
sexp_processor (4.17.5)
stringio (3.1.7)
test-unit (3.7.0)
power_assert
Expand All @@ -59,4 +59,4 @@ DEPENDENCIES
test-unit

BUNDLED WITH
2.5.16
4.0.14
2 changes: 2 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ errors:
- ARGUMENT_FORWARDING_UNBOUND
- ARGUMENT_NO_FORWARDING_AMPERSAND
- ARGUMENT_NO_FORWARDING_ELLIPSES
- ARGUMENT_NO_FORWARDING_ELLIPSES_LAMBDA
- ARGUMENT_NO_FORWARDING_ELLIPSES_BLOCK
- ARGUMENT_NO_FORWARDING_STAR
- ARGUMENT_NO_FORWARDING_STAR_STAR
- ARGUMENT_SPLAT_AFTER_ASSOC_SPLAT
Expand Down
2 changes: 1 addition & 1 deletion ext/prism/extension.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef PRISM_EXT_NODE_H
#define PRISM_EXT_NODE_H

#define EXPECTED_PRISM_VERSION "1.5.2"
#define EXPECTED_PRISM_VERSION "1.5.3"

#include <ruby.h>
#include <ruby/encoding.h>
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/2.7/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (1.5.2)
prism (1.5.3)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/3.0/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (1.5.2)
prism (1.5.3)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/3.1/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (1.5.2)
prism (1.5.3)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/3.2/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (1.5.2)
prism (1.5.3)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/3.3/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (1.5.2)
prism (1.5.3)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/3.4/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (1.5.2)
prism (1.5.3)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/3.5/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

ruby "~> 3.5.0.dev"
ruby ">= 3.5.0.dev"

gemspec path: "../.."

Expand Down
6 changes: 3 additions & 3 deletions gemfiles/3.5/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (1.5.2)
prism (1.5.3)

GEM
remote: https://rubygems.org/
Expand All @@ -26,10 +26,10 @@ GEM
logger
ruby_memcheck (3.0.1)
nokogiri
ruby_parser (3.21.1)
ruby_parser (3.22.0)
racc (~> 1.5)
sexp_processor (~> 4.16)
sexp_processor (4.17.4)
sexp_processor (4.17.5)
test-unit (3.7.0)
power_assert

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/jruby/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

ruby "~> 3.4.2", engine: "jruby", engine_version: "~> 10.0.0"
ruby ">= 3.4.2", engine: "jruby", engine_version: ">= 10.0.0"

gemspec path: "../.."

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/jruby/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (1.5.2)
prism (1.5.3)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/truffleruby/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

ruby "~> 3.3.7", engine: "truffleruby", engine_version: "~> 25.0.0"
ruby ">= 3.3.7", engine: "truffleruby", engine_version: ">= 25.0.0"

gemspec path: "../.."

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/truffleruby/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ../..
specs:
prism (1.5.2)
prism (1.5.3)

GEM
remote: https://rubygems.org/
Expand Down
4 changes: 2 additions & 2 deletions include/prism/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
/**
* The patch version of the Prism library as an int.
*/
#define PRISM_VERSION_PATCH 2
#define PRISM_VERSION_PATCH 3

/**
* The version of the Prism library as a constant string.
*/
#define PRISM_VERSION "1.5.2"
#define PRISM_VERSION "1.5.3"

#endif
2 changes: 1 addition & 1 deletion javascript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ruby/prism",
"version": "1.5.2",
"version": "1.5.3",
"description": "Prism Ruby parser",
"type": "module",
"main": "src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion prism.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |spec|
spec.name = "prism"
spec.version = "1.5.2"
spec.version = "1.5.3"
spec.authors = ["Shopify"]
spec.email = ["ruby@shopify.com"]

Expand Down
4 changes: 2 additions & 2 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/ruby-prism-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ruby-prism-sys"
version = "1.5.2"
version = "1.5.3"
edition = "2021"
license-file = "../../LICENSE.md"
repository = "https://github.com/ruby/prism"
Expand Down
2 changes: 1 addition & 1 deletion rust/ruby-prism-sys/tests/utils_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn version_test() {
CStr::from_ptr(version)
};

assert_eq!(&cstring.to_string_lossy(), "1.5.2");
assert_eq!(&cstring.to_string_lossy(), "1.5.3");
}

#[test]
Expand Down
4 changes: 2 additions & 2 deletions rust/ruby-prism/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ruby-prism"
version = "1.5.2"
version = "1.5.3"
edition = "2021"
license-file = "../../LICENSE.md"
repository = "https://github.com/ruby/prism"
Expand All @@ -26,7 +26,7 @@ serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.9"

[dependencies]
ruby-prism-sys = { version = "1.5.2", path = "../ruby-prism-sys" }
ruby-prism-sys = { version = "1.5.3", path = "../ruby-prism-sys" }

[features]
default = ["vendored"]
Expand Down
6 changes: 3 additions & 3 deletions rust/ruby-prism/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ fn struct_name(name: &str) -> String {
result
}

fn kind_to_type(kind: &String) -> String {
match kind.as_str() {
fn kind_to_type(kind: &str) -> String {
match kind {
"non-void expression" | "pattern expression" | "Node" => String::new(),
_ => kind.to_string(),
_ => kind.to_owned(),
}
}

Expand Down
78 changes: 78 additions & 0 deletions snapshots/case_in_in.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
@ ProgramNode (location: (1,0)-(4,3))
├── flags: ∅
├── locals: [:event]
└── statements:
@ StatementsNode (location: (1,0)-(4,3))
├── flags: ∅
└── body: (length: 1)
└── @ CaseMatchNode (location: (1,0)-(4,3))
├── flags: newline
├── predicate:
│ @ CallNode (location: (1,5)-(1,9))
│ ├── flags: variable_call, ignore_visibility
│ ├── receiver: ∅
│ ├── call_operator_loc: ∅
│ ├── name: :args
│ ├── message_loc: (1,5)-(1,9) = "args"
│ ├── opening_loc: ∅
│ ├── arguments: ∅
│ ├── closing_loc: ∅
│ └── block: ∅
├── conditions: (length: 1)
│ └── @ InNode (location: (2,0)-(3,25))
│ ├── flags: ∅
│ ├── pattern:
│ │ @ ArrayPatternNode (location: (2,3)-(2,10))
│ │ ├── flags: ∅
│ │ ├── constant: ∅
│ │ ├── requireds: (length: 1)
│ │ │ └── @ LocalVariableTargetNode (location: (2,4)-(2,9))
│ │ │ ├── flags: ∅
│ │ │ ├── name: :event
│ │ │ └── depth: 0
│ │ ├── rest: ∅
│ │ ├── posts: (length: 0)
│ │ ├── opening_loc: (2,3)-(2,4) = "["
│ │ └── closing_loc: (2,9)-(2,10) = "]"
│ ├── statements:
│ │ @ StatementsNode (location: (3,2)-(3,25))
│ │ ├── flags: ∅
│ │ └── body: (length: 1)
│ │ └── @ MatchPredicateNode (location: (3,2)-(3,25))
│ │ ├── flags: newline
│ │ ├── value:
│ │ │ @ CallNode (location: (3,2)-(3,15))
│ │ │ ├── flags: ∅
│ │ │ ├── receiver:
│ │ │ │ @ CallNode (location: (3,2)-(3,9))
│ │ │ │ ├── flags: variable_call, ignore_visibility
│ │ │ │ ├── receiver: ∅
│ │ │ │ ├── call_operator_loc: ∅
│ │ │ │ ├── name: :context
│ │ │ │ ├── message_loc: (3,2)-(3,9) = "context"
│ │ │ │ ├── opening_loc: ∅
│ │ │ │ ├── arguments: ∅
│ │ │ │ ├── closing_loc: ∅
│ │ │ │ └── block: ∅
│ │ │ ├── call_operator_loc: (3,9)-(3,10) = "."
│ │ │ ├── name: :event
│ │ │ ├── message_loc: (3,10)-(3,15) = "event"
│ │ │ ├── opening_loc: ∅
│ │ │ ├── arguments: ∅
│ │ │ ├── closing_loc: ∅
│ │ │ └── block: ∅
│ │ ├── pattern:
│ │ │ @ PinnedVariableNode (location: (3,19)-(3,25))
│ │ │ ├── flags: ∅
│ │ │ ├── variable:
│ │ │ │ @ LocalVariableReadNode (location: (3,20)-(3,25))
│ │ │ │ ├── flags: ∅
│ │ │ │ ├── name: :event
│ │ │ │ └── depth: 0
│ │ │ └── operator_loc: (3,19)-(3,20) = "^"
│ │ └── operator_loc: (3,16)-(3,18) = "in"
│ ├── in_loc: (2,0)-(2,2) = "in"
│ └── then_loc: ∅
├── else_clause: ∅
├── case_keyword_loc: (1,0)-(1,4) = "case"
└── end_keyword_loc: (4,0)-(4,3) = "end"
Loading
Loading