You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Bar
include Contracts::Builtin
include Contracts::Core
Contract String, Maybe[Integer], Func[Any => Any] => Any
def self.contract_foo(a, b=nil, &blk)
puts [a, b, blk].to_json
end
end
[26] development (main)> Bar.contract_foo "a" do
[26] development (main)* end
ParamContractError: Contract violation for argument 2 of 2:
Expected: (Integer or nil),
Actual: #<Proc:0x0055dbc44fc388@(pry):31>
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: