rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: "Iñaki Baz Castillo" <ibc@aliax.net>
To: rack-devel@googlegroups.com
Subject: Re: "run Proc.new" using "do ... end" fails ("{ }" required)
Date: Fri, 16 Oct 2009 20:15:01 +0200	[thread overview]
Message-ID: <200910162015.01223.ibc@aliax.net> (raw)
In-Reply-To: <245fb4700910161102n4daa30b2q375f5a398c2f1f15@mail.gmail.com>


El Viernes, 16 de Octubre de 2009, Yehuda Katz escribió:
> This is normal Ruby semantics.
> Consider:
> 
> method_name another_method do
> 
> end
> 
> In this case, the "do" is bound to method_name. Now consider:
> 
> method_name another_method {
> 
> }
> 
> In this case, the {} is bound to another_method. Proc.new is just a normal
> method, so the above applies.

Great explanation. Thanks a lot.



-- 
Iñaki Baz Castillo <ibc@aliax.net>

      reply	other threads:[~2009-10-16 18:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-16 17:48 "run Proc.new" using "do ... end" fails ("{ }" required) Iñaki Baz Castillo
2009-10-16 18:02 ` Yehuda Katz
2009-10-16 18:15   ` Iñaki Baz Castillo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200910162015.01223.ibc@aliax.net \
    --to=rack-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).