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 | 3660a7b38b17fa9c1d97971cd62eb883caeb210d (patch) | |
tree | a49f1ca0bb1b070c525b5ba80a8dc644f10ecc62 /test/ruby | |
parent | 44c193383dc148bad840b12065666ef41908102c (diff) | |
download | ruby-3660a7b38b17fa9c1d97971cd62eb883caeb210d.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/ruby')
-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 |