diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-16 11:03:38 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-16 11:03:38 +0000 |
commit | f2026f85224053305535f012a0ad22cdfd789386 (patch) | |
tree | 05cf79a222cab2b30c9aa181b71bae4c5fa6f5cd /test | |
parent | 7898ba5e16f1ba6df3489fc25760220a93c477d1 (diff) | |
download | ruby-f2026f85224053305535f012a0ad22cdfd789386.tar.gz |
proc.c: fail symbol proc binding
* 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/trunk@54128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_symbol.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb index 9c51e26200..8bb9902317 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 |