summaryrefslogtreecommitdiff
path: root/test/ruby/test_symbol.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-06 06:38:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-06 06:38:08 +0000
commitceddb498682549c2904f9ffbeffb8ae7102e2d5f (patch)
tree37c5bf178da5201c97caf0ebbba9421bced68e2e /test/ruby/test_symbol.rb
parent334710c155ad19cfd947ce6bcd7127b97cbe37da (diff)
vm_args.c: wrap symbol ifunc
* vm_args.c (args_setup_block_parameter): wrap a symbol in ifunc by a proc as a block parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_symbol.rb')
-rw-r--r--test/ruby/test_symbol.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb
index 3d1f45a927..1329ea22ab 100644
--- a/test/ruby/test_symbol.rb
+++ b/test/ruby/test_symbol.rb
@@ -140,6 +140,13 @@ class TestSymbol < Test::Unit::TestCase
end;
end
+ def test_to_proc_arg
+ assert_separately([], <<-"end;", timeout: 5.0)
+ def (obj = Object.new).proc(&b) b; end
+ assert_same(:itself.to_proc, obj.proc(&:itself))
+ end;
+ end
+
def test_call
o = Object.new
def o.foo(x, y); x + y; end