From 9ec57bb367c6e8ab592da7c810295bdcb2760932 Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Mon, 9 Sep 2024 23:00:42 +0900 Subject: [PATCH] Fix smoke tests Changing type of `Array#sample` caused the problems. --- smoke/and/a.rb | 2 +- smoke/diagnostics/else_on_exhaustive_case.rb | 2 +- smoke/diagnostics/unsupported_syntax.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/smoke/and/a.rb b/smoke/and/a.rb index 6f317224a..844f1bc64 100644 --- a/smoke/and/a.rb +++ b/smoke/and/a.rb @@ -1,7 +1,7 @@ # @type var b: String # @type var c: ::Integer -a = ["foo"].sample +a = ["foo"].find { true } b = a && a.to_str diff --git a/smoke/diagnostics/else_on_exhaustive_case.rb b/smoke/diagnostics/else_on_exhaustive_case.rb index 2346863a7..c86e4f9d2 100644 --- a/smoke/diagnostics/else_on_exhaustive_case.rb +++ b/smoke/diagnostics/else_on_exhaustive_case.rb @@ -1,4 +1,4 @@ -x = [1, ""].sample +x = [1, ""].find { true } case x when Integer diff --git a/smoke/diagnostics/unsupported_syntax.rb b/smoke/diagnostics/unsupported_syntax.rb index e6911491c..edfed9260 100644 --- a/smoke/diagnostics/unsupported_syntax.rb +++ b/smoke/diagnostics/unsupported_syntax.rb @@ -1,2 +1,2 @@ -class <<[1, ""].sample +class <<([1, ""].find { true }) end