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

ruby-changes:64753

From: Nobuyoshi <ko1@a...>
Date: Tue, 5 Jan 2021 18:13:51 +0900 (JST)
Subject: [ruby-changes:64753] 903af74bbd (master): [ruby/irb] Ensure to restore $VERBOSE

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

From 903af74bbd2998cbc159c70010fdba0543509a0f Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Tue, 5 Jan 2021 17:42:05 +0900
Subject: [ruby/irb] Ensure to restore $VERBOSE

https://github.com/ruby/irb/commit/cef474a76a

diff --git a/lib/irb/color.rb b/lib/irb/color.rb
index 37b0c22..8162699 100644
--- a/lib/irb/color.rb
+++ b/lib/irb/color.rb
@@ -192,6 +192,7 @@ module IRB # :nodoc: https://github.com/ruby/ruby/blob/trunk/lib/irb/color.rb#L192
             end
           end
         end
+      ensure
         $VERBOSE = verbose
       end
 
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb
index e7adfb4..35af148 100644
--- a/lib/irb/ruby-lex.rb
+++ b/lib/irb/ruby-lex.rb
@@ -139,8 +139,9 @@ class RubyLex https://github.com/ruby/ruby/blob/trunk/lib/irb/ruby-lex.rb#L139
         tokens = lexer.parse
       end
     end
-    $VERBOSE = verbose
     tokens
+  ensure
+    $VERBOSE = verbose
   end
 
   def find_prev_spaces(line_index)
-- 
cgit v0.10.2


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

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