Project

General

Profile

Bug #871 » test.rb

Test code that works on Ruby 1.8, segfaults on 1.9.1-p2 - csirac2 (Paul Harvey), 12/14/2008 03:41 PM

 
class SandBox
def abc(*args)
yield(*args)
end
define_method :xyz do
|*args, &block|
puts 'About to call the block:'
block.call(*args)
end
end
puts 'SandBox.new.abc:'
SandBox.new.abc(1,2,3){|*args| p args} # => [1, 2, 3]
puts 'SandBox.new.xyz:'
SandBox.new.xyz(1,2,3){|*args| p args} # => [1, 2, 3]
(1-1/2)