Why syntax with curly braces works as expected:
class SomeClass
include Parser::Http.new { |agent|
# PASSED: This block was passed to Http::new
}
end
While one with do...end passed to wrong target method?
class OtherClass
include Parser::Http.new do |agent|
# FAILED: This block was passed to Module::include
end
end
How to make this both syntaxes work the same?