From c9caea64c81a2679ea7c832173aa3e30aa931f3e Mon Sep 17 00:00:00 2001 From: Daniel Bovensiepen Date: Sun, 9 Jun 2013 11:21:51 +0800 Subject: Singleton raises TypeError on #new --- test/t/class.rb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'test') diff --git a/test/t/class.rb b/test/t/class.rb index 13845a49f..c558c6437 100644 --- a/test/t/class.rb +++ b/test/t/class.rb @@ -30,13 +30,9 @@ assert('Class#initialize_copy', '15.2.3.3.2') do end assert('Class#new', '15.2.3.3.3') do - # at the moment no exception on singleton class - #e1 = nil - #begin - # class1 = e1.singleton_class.new - #rescue => e1 - # e2 = e1 - #end + assert_raise(TypeError, 'Singleton should raise TypeError') do + "a".singleton_class.new + end class TestClass def initialize args, &block -- cgit v1.2.3