b = lambda { puts "this is the block" } callBlock &b
要么
b.call
带参数:
def call_block_name yield "Dave" yield "Mary" end b = lambda { |s| puts "this is block #{s}" } call_block_names &b
和
b.call("sam")