#NEWLINE# def test_regexp_new_errors( self , space ) : #NEWLINE# #INDENT# with self . raises ( space , 'RegexpError' ) : #NEWLINE# #INDENT# space . execute ( "Regexp.new '?~'" ) #NEWLINE# #UNINDENT# with self . raises ( space , 'RegexpError' ) : #NEWLINE# #INDENT# space . execute ( '\n            class Regexp\n              def self.compile(*args); /foo/; end\n            end\n            Regexp.new "(?~)"\n            ' )