From 88d6009d91c197049da9d6efeb406aec5eb5d551 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Thu, 21 Nov 2019 23:10:30 +0900 Subject: Use more strict regexp to avoid to match naninanirb.rb --- lib/irb.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/irb.rb') diff --git a/lib/irb.rb b/lib/irb.rb index ed91d29b91..cbf717d560 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -553,7 +553,7 @@ module IRB end def handle_exception(exc) - if exc.backtrace && exc.backtrace[0] =~ /irb(2)?(\/.*|-.*|\.rb)?:/ && exc.class.to_s !~ /^IRB/ && + if exc.backtrace && exc.backtrace[0] =~ /\/irb(2)?(\/.*|-.*|\.rb)?:/ && exc.class.to_s !~ /^IRB/ && !(SyntaxError === exc) irb_bug = true else -- cgit v1.2.3