• cremno's avatar
    fix arity of lambdas with optional arguments · f0eaf9ea
    cremno authored
    From the CRuby 2.2.2 Proc#arity documentation:
    
    If the block has optional arguments, returns -n-1, where n is the number
    of mandatory arguments, with the exception for blocks that are not
    lambdas and have only a finite number of optional arguments; in this
    latter case, returns n.
    f0eaf9ea
proc.rb 3.67 KB