summaryrefslogtreecommitdiff
path: root/test/ruby/test_syntax.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-10-10 13:23:07 +0900
committerNobuyoshi Nakada <[email protected]>2024-10-10 13:23:07 +0900
commite00b746b7578ed7b2f168cb7bc867ef3c8cbca69 (patch)
treedc2f25a3781b98d729fb015543db83dcbd8fbddf /test/ruby/test_syntax.rb
parenta1db8dbe166d82d7238b3d375344799e057dab2b (diff)
Suppress warnings with `RUBYPOT=-w`
``` -:3: warning: assigned but unused variable - var -:3: warning: assigned but unused variable - var -:3: warning: assigned but unused variable - var -:3: warning: assigned but unused variable - var -:3: warning: assigned but unused variable - var -:3: warning: assigned but unused variable - var ```
Diffstat (limited to 'test/ruby/test_syntax.rb')
-rw-r--r--test/ruby/test_syntax.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index 811a21937e..7a6c66d782 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -2248,11 +2248,11 @@ eom
conds.each do |cond|
code = %Q{
def my_method
- var = nil
+ var = "there"
if #{cond}
- "here"
+ var = "here"
end
- raise
+ raise var
end
begin
my_method