From 33a75edd3cf6062796043ae75747b4b191db3789 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 10 Jan 2019 06:01:32 +0000 Subject: proc.c: check if callable * proc.c: check the argument at composition, expect a Proc, Method, or callable object. [ruby-core:90591] [Bug #15428] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_proc.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/ruby/test_proc.rb') diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb index 8e8f719892..4abe0aa1bb 100644 --- a/test/ruby/test_proc.rb +++ b/test/ruby/test_proc.rb @@ -1474,10 +1474,10 @@ class TestProc < Test::Unit::TestCase def test_compose_with_noncallable f = proc {|x| x * 2} - assert_raise(NoMethodError) { + assert_raise(TypeError) { (f << 5).call(2) } - assert_raise(NoMethodError) { + assert_raise(TypeError) { (f >> 5).call(2) } end -- cgit v1.2.3