Actions
Bug #16607
closedretried require does not raise Exception even if a library has SyntaxError
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]
Description
From shell:
% echo "class C" > c.rb
% ruby -e 'begin p require "./c" ; rescue SyntaxError; end; p require "./c"; C'
expected result: SyntaxError
2.7 and current master output:
false
Traceback (most recent call last):
-e:1:in `<main>': uninitialized constant C (NameError)
Actions
Like0
Like0Like0Like0