Skip to content

Commit a9d85aa

Browse files
committed
test: use Boolean instead of bool in .trb test examples
Update compiler_spec.rb to use Boolean type in .trb file examples for consistency with stdlib definition (type Boolean = true | false)
1 parent 6de1eb5 commit a9d85aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec/t_ruby/compiler_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,10 @@
260260
context "with return type validation" do
261261
it "raises TypeCheckError when return type mismatches declaration" do
262262
Dir.mktmpdir do |tmpdir|
263-
# Method declares bool but returns nil
263+
# Method declares Boolean but returns nil
264264
input_file = File.join(tmpdir, "type_mismatch.trb")
265265
File.write(input_file, <<~RUBY)
266-
def test(name: String): bool
266+
def test(name: String): Boolean
267267
return
268268
end
269269
RUBY
@@ -341,7 +341,7 @@ def greet(name: String): String
341341
# Type mismatch but type_check is disabled in config
342342
input_file = File.join(tmpdir, "skip_check.trb")
343343
File.write(input_file, <<~RUBY)
344-
def test(): bool
344+
def test(): Boolean
345345
return
346346
end
347347
RUBY

0 commit comments

Comments
 (0)