diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-15 04:37:26 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-15 04:37:26 +0000 |
commit | c2e8fb0f34999739cff9c9e2d637346079b9365f (patch) | |
tree | a49f1ca0bb1b070c525b5ba80a8dc644f10ecc62 /test | |
parent | d0e86105829192d982016d5e8badea950a76b6dd (diff) | |
download | ruby-c2e8fb0f34999739cff9c9e2d637346079b9365f.tar.gz |
proc.c: proc without env
* proc.c (rb_sym_to_proc): move from string.c and create a Proc
with no environments. [ruby-core:71088] [Bug #11594]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_symbol.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb index 1329ea22ab..07b75b0024 100644 --- a/test/ruby/test_symbol.rb +++ b/test/ruby/test_symbol.rb @@ -147,6 +147,14 @@ class TestSymbol < Test::Unit::TestCase end; end + def test_to_proc_call_with_symbol_proc + first = 1 + bug11594 = "[ruby-core:71088] [Bug #11594] corrupted the first local variable" + # symbol which does not have a Proc + ->(&blk) {}.call(&:test_to_proc_call_with_symbol_proc) + assert_equal(1, first, bug11594) + end + def test_call o = Object.new def o.foo(x, y); x + y; end |