From 55515ef463971ecfdfa61ff32868d0e02129e753 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 20 Feb 2018 10:08:27 +0000 Subject: error.c: bypass Exception.new * error.c (rb_exc_new, rb_exc_new_str): instantiate exception object directly without Exception.new method call. Redefinition of class method `new` is an outdated style, and internal exceptions should not be affected by it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bootstraptest/test_exception.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstraptest') diff --git a/bootstraptest/test_exception.rb b/bootstraptest/test_exception.rb index 35c8d25e37..0fb6f552b8 100644 --- a/bootstraptest/test_exception.rb +++ b/bootstraptest/test_exception.rb @@ -402,7 +402,7 @@ assert_equal 'nil', %q{ exc.inspect }, '[ruby-dev:32608]' -assert_equal 'exception class/object expected', %q{ +assert_equal 'divided by 0', %q{ class ZeroDivisionError def self.new(message) 42 -- cgit v1.2.1