summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-10 08:19:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-10 08:19:14 +0000
commit9f1fb0a17febc59356d58cef5e98db61a3c03550 (patch)
tree14c3bf6cd585b859d030ec8d41e6b6e16b0e01e7 /test
parentec336fb40e4df0c8615e584fbefb5e9e572cb9ec (diff)
proc.c: proc without block
* proc.c (proc_new): promoted lambda/proc/Proc.new with no block in a method called with a block to a warning/error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_proc.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb
index 4abe0aa1bb..10ae02849d 100644
--- a/test/ruby/test_proc.rb
+++ b/test/ruby/test_proc.rb
@@ -424,14 +424,14 @@ class TestProc < Test::Unit::TestCase
1.times { b = lambda }
b
end
- assert_equal(:foo, o.foo { :foo }.call)
+ assert_raise(ArgumentError) {o.foo { :foo }.call}
def o.foo(&b)
b = nil
1.times { b = lambda }
b
end
- assert_equal(:foo, o.foo { :foo }.call)
+ assert_raise(ArgumentError) {o.foo { :foo }.call}
end
def test_arity2