From 592599d99636c63e335ebae1e0ad6f07aa7028bf Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 29 Mar 2016 16:06:24 +0000 Subject: merge revision(s) 54128: [Backport #12137] * proc.c (proc_binding): proc from symbol can not make a binding. [ruby-core:74100] [Bug #12137] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_symbol.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/ruby/test_symbol.rb') diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb index 8960bec0d1..2133573fc3 100644 --- a/test/ruby/test_symbol.rb +++ b/test/ruby/test_symbol.rb @@ -176,6 +176,15 @@ class TestSymbol < Test::Unit::TestCase end; end + def test_to_proc_binding + assert_separately([], <<~"end;", timeout: 1) # do + bug12137 = '[ruby-core:74100] [Bug #12137]' + assert_raise(ArgumentError, bug12137) { + :succ.to_proc.binding + } + end; + end + def test_call o = Object.new def o.foo(x, y); x + y; end -- cgit v1.2.3