From: Dirk Detering Date: 2002-06-13T20:20:11+09:00 Subject: Re: procs and blocks Hello, I'm new to ruby, coming from Python (et al). Therefore my question: Jean-Hugues ROBERT schrieb: > The main drawback is that optional parameters become mandatory when > one want to use Proc object instead of block: > def err( msg = "Err", b = nil, &sb ) > b = sb if sb > b( msg) > end > a = Proc.new do |x| print x end > err do |x| print x end > err "Hello" do |x| print x end > err "Hello", a > err( , a) # Not in Ruby syntax... This seems to indicate me that 'named parameters' are missing, which are possible in Python (and do attract me)? With that the last line would read: err (b=a) Ok, in Ruby there should be an alternative syntax, as this one causes another result (and is supposed to). Bye Det