summaryrefslogtreecommitdiff
path: root/test/ruby/test_symbol.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-16 11:03:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-16 11:03:38 +0000
commit6c7fd3b5cf97ad1a19f9f82e3c7c61f3422778c8 (patch)
tree05cf79a222cab2b30c9aa181b71bae4c5fa6f5cd /test/ruby/test_symbol.rb
parent50591a768de9e2381789a8aeed1bc2c654c18e83 (diff)
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/ruby/test_symbol.rb')
-rw-r--r--test/ruby/test_symbol.rb9
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