p'=====================Now About Lambda'proc_obj_by_lambda_without_block=lambda{}proc_obj_by_lambda_without_block=->{}proc_obj_by_lambda=lambdado|str|"Hello #{str}"end# p proc_obj_by_lambda# p proc_obj_by_lambda.callpproc_obj_by_lambda.call('Vinay')pproc_obj_by_lambda.('Vinay')pproc_obj_by_lambda['Vinay']# p proc_obj_by_lambda.call('Vinay', 'Brijesh')################### Difference between proc and lambda: 1 #########################defreturn_from_procprok=proc{p'i am in proc block'}prok.call()return'i am proc return value'enddefreturn_from_lambdalamda=proc{p'i am in lambda block'}lamda.call()return'i am lambda return value'endreturn_from_procreturn_from_lambda################### Difference between proc and lambda: 2 #########################prok=proc{|a,b|"HEllo#{a}===and==#{b}"}prok.callprok.call('Ajay')prok.call('Ajay','Vijay')prok.call('Ajay','Vijay','Sanjay')stabby_lambda=->(a,b){"HEllo#{a}===and==#{b}"}stabby_lambda.callstabby_lambda.call('Ajay')stabby_lambda.call('Ajay','Vijay')stabby_lambda.call('Ajay','Vijay','Sanjay')