diff options
| author | Daniel Bovensiepen <[email protected]> | 2013-06-09 11:21:51 +0800 |
|---|---|---|
| committer | Daniel Bovensiepen <[email protected]> | 2013-06-09 11:21:51 +0800 |
| commit | c9caea64c81a2679ea7c832173aa3e30aa931f3e (patch) | |
| tree | 8550bf598238104c6490d15ad2db20d4c103ea75 /test | |
| parent | 16424a14dc3b1a70ef8ebe3923c3dbd482e77c93 (diff) | |
| download | mruby-c9caea64c81a2679ea7c832173aa3e30aa931f3e.tar.gz mruby-c9caea64c81a2679ea7c832173aa3e30aa931f3e.zip | |
Singleton raises TypeError on #new
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/class.rb | 10 |
1 files changed, 3 insertions, 7 deletions
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 |
