[前][次][番号順一覧][スレッド一覧]

ruby-changes:65976

From: Yusuke <ko1@a...>
Date: Tue, 27 Apr 2021 17:08:01 +0900 (JST)
Subject: [ruby-changes:65976] ea88f49a76 (master): test/ruby/test_exception.rb: suppress "warning: statement not reached"

https://git.ruby-lang.org/ruby.git/commit/?id=ea88f49a76

From ea88f49a76912fe0e5f0e125544356ed5b17482b Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Tue, 27 Apr 2021 17:06:51 +0900
Subject: test/ruby/test_exception.rb: suppress "warning: statement not
 reached"

---
 test/ruby/test_exception.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb
index 0a2a312..af29163 100644
--- a/test/ruby/test_exception.rb
+++ b/test/ruby/test_exception.rb
@@ -126,7 +126,7 @@ class TestException < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_exception.rb#L126
   def test_exception_in_ensure_with_return
     @string = "[ruby-core:97104] [Bug #16618]"
     def self.meow
-      return
+      return if true # This if modifier suppresses "warning: statement not reached"
       assert(false)
     rescue
       assert(false)
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]