diff options
| author | ksss <[email protected]> | 2016-12-21 15:17:05 +0900 |
|---|---|---|
| committer | ksss <[email protected]> | 2016-12-21 15:17:05 +0900 |
| commit | 3cba13c249457cfb318c9d7d4456d99003442139 (patch) | |
| tree | 147f9912382cc1ccf5dcba8c1b5e3ae19919cc56 /test | |
| parent | 987daa64e387810e6871b9573bed97ae37d89a72 (diff) | |
| download | mruby-3cba13c249457cfb318c9d7d4456d99003442139.tar.gz mruby-3cba13c249457cfb318c9d7d4456d99003442139.zip | |
Proc shouldn't have `initialize` method
Fix #3356
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/proc.rb | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/test/t/proc.rb b/test/t/proc.rb index 29530e8dd..888b7d56a 100644 --- a/test/t/proc.rb +++ b/test/t/proc.rb @@ -46,17 +46,6 @@ assert('Proc#arity', '15.2.17.4.2') do assert_equal(-1, g) end -assert('Proc#arity with unitialized Proc') do - begin - Proc.alias_method(:original_initialize, :initialize) - Proc.remove_method(:initialize) - assert_equal 0, Proc.new{|a, b, c| 1}.arity - ensure - Proc.alias_method(:initialize, :original_initialize) - Proc.remove_method(:original_initialize) - end -end - assert('Proc#call', '15.2.17.4.3') do a = 0 b = Proc.new { a += 1 } @@ -163,19 +152,3 @@ assert('&obj call to_proc if defined') do assert_raise(TypeError){ mock(&(Object.new)) } end - -assert('initialize_copy works when initialize is removed') do - begin - Proc.alias_method(:old_initialize, :initialize) - Proc.remove_method(:initialize) - - a = Proc.new {} - b = Proc.new {} - assert_nothing_raised do - a.initialize_copy(b) - end - ensure - Proc.alias_method(:initialize, :old_initialize) - Proc.remove_method(:old_initialize) - end -end |
