diff options
| author | mirichi <[email protected]> | 2013-06-14 20:01:03 +0900 |
|---|---|---|
| committer | mirichi <[email protected]> | 2013-06-14 20:01:03 +0900 |
| commit | a5f63e486473595d67601851f00b6bb96b377a8d (patch) | |
| tree | 8550bf598238104c6490d15ad2db20d4c103ea75 /test | |
| parent | 4b2bdbe2cc0e3b1b0f6916bdc308933f17f74537 (diff) | |
| parent | dbc93621c94b9b2d2b437cde40d8efec7337a64d (diff) | |
| download | mruby-a5f63e486473595d67601851f00b6bb96b377a8d.tar.gz mruby-a5f63e486473595d67601851f00b6bb96b377a8d.zip | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/class.rb | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/test/t/class.rb b/test/t/class.rb index 72214a2fc..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 @@ -304,3 +300,10 @@ assert('Class Undef 2') do result1 == true and result2 == true end +assert('Var undef') do + assert_raise(NameError) do + a=1 + undef a + end +end + |
