summaryrefslogtreecommitdiffhomepage
path: root/test/t/proc.rb
diff options
context:
space:
mode:
authorFelix Jones <[email protected]>2017-02-16 13:33:46 +0000
committerFelix Jones <[email protected]>2017-02-16 13:33:46 +0000
commitd83aad8d570e4bbffa3bd3ce64e210f78afa425f (patch)
tree5389a87c135b1bdf3e23a1ba02e02400b7cf80fc /test/t/proc.rb
parent70aa6dc38d75dd6b1e2c76f290bc576e36e36ea3 (diff)
parentb165708c8deba00685f9a27926c554aaa7f3b0fb (diff)
downloadmruby-d83aad8d570e4bbffa3bd3ce64e210f78afa425f.tar.gz
mruby-d83aad8d570e4bbffa3bd3ce64e210f78afa425f.zip
Merge branch 'master' into android.rake-ndk-clang
Diffstat (limited to 'test/t/proc.rb')
-rw-r--r--test/t/proc.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/t/proc.rb b/test/t/proc.rb
index 888b7d56a..ef4566e66 100644
--- a/test/t/proc.rb
+++ b/test/t/proc.rb
@@ -136,6 +136,18 @@ assert('Proc#return_does_not_break_self') do
assert_equal c, c.block.call
end
+assert('call Proc#initialize if defined') do
+ a = []
+ c = Class.new(Proc) do
+ define_method(:initialize) do
+ a << :ok
+ end
+ end
+
+ assert_kind_of c, c.new{}
+ assert_equal [:ok], a
+end
+
assert('&obj call to_proc if defined') do
pr = Proc.new{}
def mock(&b)