Bug #1246: Segfault with Symbol#to_proc and yield without argument
http://redmine.ruby-lang.org/issues/show/1246

Author: Michael Fellinger
Status: Open, Priority: Normal
Category: core
ruby -v: ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

Ruby 1.8.7 should raise an ArgumentError instead of segfaulting:

sigma ~ % ruby -ve 'def a; yield; end; a(&:p)' 
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
-e:1: [BUG] Segmentation fault

sigma ~ % ruby19 -ve 'def a; yield; end; a(&:p)'
ruby 1.9.2dev (2009-02-13 trunk 22277) [x86_64-linux]
-e:1:in `a': no receiver given (ArgumentError)
	from -e:1:in `<main>'


----------------------------------------
http://redmine.ruby-lang.org