aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Tsujimoto <kazuki@callcc.net>2019-05-28 01:30:15 +0900
committeraycabta <aycabta@gmail.com>2019-05-28 01:32:07 +0900
commitb2b5ed14104d2010ceae9fc81823bdcdc84b3bd7 (patch)
treefcd06eb0dae738028c8a3b0b1f6ac3e08404c92c
parent9a68aba79f8a3e144e6409988c2e17a5d3f11f26 (diff)
downloadruby-b2b5ed14104d2010ceae9fc81823bdcdc84b3bd7.tar.gz
Supress duplicated warning
-rw-r--r--lib/irb/ruby-lex.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb
index a14ac8a275..4121fa1f7c 100644
--- a/lib/irb/ruby-lex.rb
+++ b/lib/irb/ruby-lex.rb
@@ -152,6 +152,7 @@ class RubyLex
end
begin # check if parser error are available
+ verbose, $VERBOSE = $VERBOSE, nil
RubyVM::InstructionSequence.compile(code)
rescue SyntaxError => e
case e.message
@@ -199,6 +200,8 @@ class RubyLex
# method / f /
return false
end
+ ensure
+ $VERBOSE = verbose
end
last_lex_state = @tokens.last[3]