Because that's syntactically invalid. That isn't a supported syntax for passing a block to a method.
Ruby's syntax allows for one special block argument to each method, apart from the regular arguments. The argument is defined differently (via the { |args| ... } syntax) and (optionally) accepted differently through a final &variable parameter:
def my_method(arg1, arg2, &block)
block.call("ok1")
# or, a special syntax for calling the &block:
yield "ok!"
end
my_method(value_for_arg_1, value_for_arg_2) do |arg|
# when invoked by my_method, arg will be "ok!"
end
You can pass the block as part of the argument list, but again, a specific syntax is required:
my_block = Proc.new { puts "I'm a proc" }
my_method(value1, value2, &my_block)
The above &my_block is required only if you intend to pass the proc through as the &block parameter; you can pass an arbitrary number of procs through without using &, but they aren't callable via yield.