Skip to content

Commit 81200f0

Browse files
yhk1038claude
andcommitted
fix(ci): resolve remaining CI failures
- Remove unused 'path' import in VSCode extension - Fix ESLint errors by using proper type annotations instead of 'any' - Fix SMT solver simplify methods to return TRuby::SMT::TRUE/FALSE instead of literals - Fix SMT solver test for double negation - Update Ruby version matrix: remove 3.0 (EOL), add 3.4 - Update required Ruby version from 3.0 to 3.1 in gemspec 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 953d778 commit 81200f0

File tree

6 files changed

+13
-15
lines changed

6 files changed

+13
-15
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
ruby: ['3.0', '3.1', '3.2', '3.3']
21+
ruby: ['3.1', '3.2', '3.3', '3.4']
2222

2323
steps:
2424
- uses: actions/checkout@v4

editors/vscode/src/extension.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as vscode from 'vscode';
2-
import * as path from 'path';
32
import {
43
LanguageClient,
54
LanguageClientOptions,

editors/vscode/src/test/suite/extension.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,13 @@ suite('T-Ruby Extension Test Suite', () => {
2828
});
2929

3030
test('T-Ruby language should be registered', () => {
31-
const languages = vscode.languages.getLanguages();
3231
// Language registration is async, so we just check the extension contributes it
3332
const extension = vscode.extensions.getExtension('t-ruby.t-ruby');
3433
assert.ok(extension);
3534

3635
const contributes = extension.packageJSON.contributes;
3736
assert.ok(contributes.languages);
38-
assert.ok(contributes.languages.some((lang: any) => lang.id === 't-ruby'));
37+
assert.ok(contributes.languages.some((lang: { id: string }) => lang.id === 't-ruby'));
3938
});
4039

4140
test('Grammar should be registered', () => {
@@ -44,7 +43,7 @@ suite('T-Ruby Extension Test Suite', () => {
4443

4544
const contributes = extension.packageJSON.contributes;
4645
assert.ok(contributes.grammars);
47-
assert.ok(contributes.grammars.some((grammar: any) => grammar.language === 't-ruby'));
46+
assert.ok(contributes.grammars.some((grammar: { language: string }) => grammar.language === 't-ruby'));
4847
});
4948

5049
test('Configuration should be available', () => {
@@ -62,7 +61,7 @@ suite('T-Ruby Extension Test Suite', () => {
6261
assert.ok(extension);
6362

6463
const languages = extension.packageJSON.contributes.languages;
65-
const tRubyLang = languages.find((lang: any) => lang.id === 't-ruby');
64+
const tRubyLang = languages.find((lang: { id: string; extensions: string[] }) => lang.id === 't-ruby');
6665

6766
assert.ok(tRubyLang);
6867
assert.ok(tRubyLang.extensions.includes('.trb'));

lib/t_ruby/smt_solver.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ def simplify
193193
l = @left.simplify
194194
r = @right.simplify
195195

196-
return false if l == false || r == false
197-
return r if l == true
198-
return l if r == true
196+
return FALSE if l == FALSE || r == FALSE
197+
return r if l == TRUE
198+
return l if r == TRUE
199199
return l if l == r
200200

201201
And.new(l, r)
@@ -235,9 +235,9 @@ def simplify
235235
l = @left.simplify
236236
r = @right.simplify
237237

238-
return true if l == true || r == true
239-
return r if l == false
240-
return l if r == false
238+
return TRUE if l == TRUE || r == TRUE
239+
return r if l == FALSE
240+
return l if r == FALSE
241241
return l if l == r
242242

243243
Or.new(l, r)
@@ -441,7 +441,7 @@ def substitute(bindings)
441441
end
442442

443443
def simplify
444-
return true if @left == @right
444+
return TRUE if @left == @right
445445

446446
self
447447
end

spec/t_ruby/smt_solver_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
it "simplifies double negation" do
3030
v = var("x")
31-
double_neg = !v.nil?
31+
double_neg = TRuby::SMT::Not.new(TRuby::SMT::Not.new(v))
3232
expect(double_neg.simplify).to eq(v)
3333
end
3434

t_ruby.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
1313
"and optional type signature files (.rbs)"
1414
spec.homepage = "https://type-ruby.github.io"
1515
spec.license = "MIT"
16-
spec.required_ruby_version = ">= 3.0.0"
16+
spec.required_ruby_version = ">= 3.1.0"
1717

1818
spec.files = Dir["lib/**/*.rb", "bin/*", "LICENSE", "README.md"]
1919
spec.bindir = "bin"

0 commit comments

Comments
 (0)