Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #3449

Re: who can eplain deeply the ruby's methods?

From savin max <mafei.198@gmail.com>
Newsgroups comp.lang.ruby
Subject Re: who can eplain deeply the ruby's methods?
Date 2011-04-24 22:10 -0500
Organization Service de news de lacave.net
Message-ID <41787478075d1b2ca71a41f057bbeba3@ruby-forum.com> (permalink)
References <999670eb7a464b9d106f84fb7385d075@ruby-forum.com> <BANLkTik5+tZF74DiU1mhd5ikkCANgUh__g@mail.gmail.com> <e66077c212ee61d83ca98cea7e0fc6a6@ruby-forum.com> <BANLkTikXkRcQ30Cm2uaaLwZQDMtv=sAPVA@mail.gmail.com>

Show all headers | View raw


Stu wrote in post #994785:
>
> *.each example with a simple hash and multidimensional array :
>
>>> {one: 1, two:2}.each {|x,y| p x; p y}
> :one
> 1
> :two
> 2
>  => {:one=>1, :two=>2}
>
>>> [[:one,1],[:two,2]].each{|x,y| p x; p y}
> :one
> 1
> :two
> 2
>  => [[:one, 1], [:two, 2]]
>
> A better example would be to put both the array and hash into a
> variable where one wouldn't even have to know what the variable data
> type was  but knew they could parse it without worry of implementation
> details or test with a million + one conditionals to figure out how to
> deal with the data.

I have just read your questions at this place, i think you are a deep 
thinking person.

thank you!~

-- 
Posted via http://www.ruby-forum.com/.

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

who can eplain deeply the ruby's methods? savin max <mafei.198@gmail.com> - 2011-04-24 00:57 -0500
  Re: who can eplain deeply the ruby's methods? Stu <stu@rubyprogrammer.net> - 2011-04-24 03:46 -0500
    Re: who can eplain deeply the ruby's methods? Stu <stu@rubyprogrammer.net> - 2011-04-24 03:58 -0500
    Re: who can eplain deeply the ruby's methods? savin max <mafei.198@gmail.com> - 2011-04-24 08:18 -0500
      Re: who can eplain deeply the ruby's methods? Stu <stu@rubyprogrammer.net> - 2011-04-24 15:53 -0500
        Re: who can eplain deeply the ruby's methods? savin max <mafei.198@gmail.com> - 2011-04-24 22:10 -0500
  Re: who can eplain deeply the ruby's methods? 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-25 19:35 -0500
  Re: who can eplain deeply the ruby's methods? 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-25 19:57 -0500
    Re: who can eplain deeply the ruby's methods? savin max <mafei.198@gmail.com> - 2011-04-26 05:06 -0500

csiph-web