summaryrefslogtreecommitdiff
path: root/test/ruby/test_symbol.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-29 16:06:24 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-29 16:06:24 +0000
commit592599d99636c63e335ebae1e0ad6f07aa7028bf (patch)
tree8a81154356a070baed732ba98a93fb5a826d76ce /test/ruby/test_symbol.rb
parent6ead2416ebf449d77aa8b39a55da08084cd0c2d9 (diff)
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
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 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