Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #3706
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!talisker.lacave.net!lacave.net!not-for-mail |
|---|---|
| From | Brian Candler <b.candler@pobox.com> |
| Newsgroups | comp.lang.ruby |
| Subject | Re: calling methods, beginner help |
| Date | Fri, 29 Apr 2011 13:19:26 -0500 |
| Organization | Service de news de lacave.net |
| Lines | 26 |
| Message-ID | <bfdfa23b1836c337e45d26cf02457fdb@ruby-forum.com> (permalink) |
| References | <626238bd776ed0898a473c7a16e02fb5@ruby-forum.com> <5aa298eaa7c92eb99aeadefbca7a9cc6@ruby-forum.com> <efd4233bb963bf4f26a8d05e360e6858@ruby-forum.com> <6680776a9ca2187c2ac75ee95d5b5b2f@ruby-forum.com> |
| NNTP-Posting-Host | bristol.highgroove.com |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | talisker.lacave.net 1304101384 16005 65.111.164.187 (29 Apr 2011 18:23:04 GMT) |
| X-Complaints-To | abuse@lacave.net |
| NNTP-Posting-Date | Fri, 29 Apr 2011 18:23:04 +0000 (UTC) |
| In-Reply-To | <6680776a9ca2187c2ac75ee95d5b5b2f@ruby-forum.com> |
| X-Received-From | This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway |
| X-Mail-Count | 382391 |
| X-Ml-Name | ruby-talk |
| X-Rubymirror | Yes |
| X-Ruby-Talk | <bfdfa23b1836c337e45d26cf02457fdb@ruby-forum.com> |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.ruby:3706 |
Show key headers only | View raw
Ronnie Aa wrote in post #995728:
> With procedures I mean this:
>
> http://www.ruby-doc.org/core/classes/Proc.html.
>
> 'Proc' is a abbreviation of procedure isn't it?
No, it's a Proc :-) A Proc object can either be a block crystallised
into an object, or a lambda. It carries the semantics of either.
$ irb --simple-prompt
>> def foo(&blk); blk; end
=> nil
>> foo { puts "hello" }
=> #<Proc:0x00007fdbc6eceba0@(irb):2>
>> lambda { puts "hello" }
=> #<Proc:0x00007fdbc6ec4f10@(irb):3>
You probably don't want to concern yourself with the differences, but
the gory details are here:
http://innig.net/software/ruby/closures-in-ruby.rb
--
Posted via http://www.ruby-forum.com/.
Back to comp.lang.ruby | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
calling methods, beginner help Ronnie Aa <liquid98@gmail.com> - 2011-04-28 12:06 -0500
Re: calling methods, beginner help Markus Schirp <mbj@seonic.net> - 2011-04-28 12:14 -0500
Re: calling methods, beginner help 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-28 12:23 -0500
Re: calling methods, beginner help Ronnie Aa <liquid98@gmail.com> - 2011-04-28 12:44 -0500
Re: calling methods, beginner help Markus Schirp <mbj@seonic.net> - 2011-04-28 13:03 -0500
Re: calling methods, beginner help 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-28 13:03 -0500
Re: calling methods, beginner help Brian Candler <b.candler@pobox.com> - 2011-04-28 15:29 -0500
Re: calling methods, beginner help Ronnie Aa <liquid98@gmail.com> - 2011-04-28 13:40 -0500
Re: calling methods, beginner help Ronnie Aa <liquid98@gmail.com> - 2011-04-28 16:05 -0500
Re: calling methods, beginner help Brian Candler <b.candler@pobox.com> - 2011-04-29 03:02 -0500
Re: calling methods, beginner help Ronnie Aa <liquid98@gmail.com> - 2011-04-29 04:27 -0500
Re: calling methods, beginner help Brian Candler <b.candler@pobox.com> - 2011-04-29 13:19 -0500
Re: calling methods, beginner help Stu <stu@rubyprogrammer.net> - 2011-04-29 15:24 -0500
csiph-web