Skip to content

Commit d137b6d

Browse files
authored
Merge pull request #21 from ruby/gemspec_ci_prism_ver
Update required prism version to < 0.26.0
2 parents d29d8ed + 2c16533 commit d137b6d

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
strategy:
5454
fail-fast: false
5555
matrix:
56-
prism: ['latest', '0.24.0', '0.21.0', '0.19.0']
56+
prism: ['latest', '0.25.0', '0.24.0', '0.21.0', '0.19.0']
5757
env:
5858
GEMFILE_PRISM_VERSION: ${{ matrix.prism }}
5959
steps:

lib/repl_type_completor/type_analyzer.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,8 @@ def evaluate_case_in_condition(target, node, scope)
971971
end
972972

973973
def evaluate_match_pattern(value, pattern, scope)
974+
pattern = pattern.body while pattern.is_a?(Prism::ParenthesesNode)
975+
974976
# TODO: scope.terminate_with Scope::PATTERNMATCH_BREAK, Types::NIL
975977
case pattern
976978
when Prism::FindPatternNode

repl_type_completor.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ Gem::Specification.new do |spec|
2929
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
3030
spec.require_paths = ["lib"]
3131

32-
spec.add_dependency "prism", ">= 0.19.0", "< 0.25.0"
32+
spec.add_dependency "prism", ">= 0.19.0", "< 0.26.0"
3333
spec.add_dependency "rbs", ">= 2.7.0", "< 4.0.0"
3434
end

test/repl_type_completor/test_type_analyze.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@ def test_pattern_match
660660
assert_call('1 in a; a.', include: Integer)
661661
assert_call('a=1; x in String=>a; a.', include: [Integer, String])
662662
assert_call('a=1; x=>String=>a; a.', include: String, exclude: Integer)
663+
assert_call('x in (((String)|Integer))=>a; a.', include: [String, Integer])
663664
end
664665

665666
def test_bottom_type_termination

0 commit comments

Comments
 (0)