aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_symbol.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_symbol.rb')
-rw-r--r--test/ruby/test_symbol.rb8
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