S
Shea Martin
I think I know the answer to this already, but...
Is there a what to make a block parameter mandatory?
<code>
def no_block( p_str )
puts "#{p_str}"
end
def block( &p_block )
puts "#{p_block}"
end
no_block #this will cause an exception
block #this doesn't, but is still missing parameter?
</code>
I know, I could just raise my own exception if p_block == nil, just
wondering why the difference? Or am I wrong?
Thanks,
~S
Is there a what to make a block parameter mandatory?
<code>
def no_block( p_str )
puts "#{p_str}"
end
def block( &p_block )
puts "#{p_block}"
end
no_block #this will cause an exception
block #this doesn't, but is still missing parameter?
</code>
I know, I could just raise my own exception if p_block == nil, just
wondering why the difference? Or am I wrong?
Thanks,
~S