diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-05 06:34:58 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-05 06:34:58 +0000 |
commit | 7e0b9e8fc3a57dd7bb7c8e8ddeed79276b40ef00 (patch) | |
tree | 97f824b17fa185bfab39946a89776ea0479d7ccd /test/ruby | |
parent | 1d354095c6c0eaff39f48e000ed04d6c18b1fe15 (diff) | |
download | ruby-7e0b9e8fc3a57dd7bb7c8e8ddeed79276b40ef00.tar.gz |
proc.c: set ep properly
* proc.c (proc_new): link ep to calling block.
[ruby-core:70980] [Bug #11566]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_symbol.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb index cb6ba90698..3d1f45a927 100644 --- a/test/ruby/test_symbol.rb +++ b/test/ruby/test_symbol.rb @@ -117,18 +117,29 @@ class TestSymbol < Test::Unit::TestCase ary_ids = ary.collect{|x| x.object_id } assert_equal ary_ids, ary.collect(&:object_id) end + end + def test_to_proc_yield assert_ruby_status([], <<-"end;", timeout: 5.0) GC.stress = true true.tap(&:itself) end; + end + def test_to_proc_new_proc assert_ruby_status([], <<-"end;", timeout: 5.0) GC.stress = true 2.times {Proc.new(&:itself)} end; end + def test_to_proc_no_method + assert_separately([], <<-"end;", timeout: 5.0) + bug11566 = '[ruby-core:70980] [Bug #11566]' + assert_raise(NoMethodError, bug11566) {Proc.new(&:foo).(1)} + end; + end + def test_call o = Object.new def o.foo(x, y); x + y; end |