My understanding is that a block implicitly attached to a method must be yielded; it cannot be called. So I'm trying to understand why this works:
def execute_code
proc.call
end
execute_code { "Why does this work?" } # => "Why does this work?"
Attaching a block to this code executes successfully.
Any insight? I haven't found any documentation hinting that an implicit block is automatically converted to a proc object and assigned to the variable proc.
Ruby 2.5.3