Joined September 2012
·
Posted to
For is almost a lump of syntactic sugar in ruby!
over 1 year
ago
@richoh thank you again. I just updated it. Is there something wrong?
Posted to
For is almost a lump of syntactic sugar in ruby!
over 1 year
ago
@richoh It's ok now?
Posted to
For is almost a lump of syntactic sugar in ruby!
over 1 year
ago
@richoh I think I have known what your meaning is. I forget to mention the different between them. Thank your very much. I'll fix it ~
Posted to
For is almost a lump of syntactic sugar in ruby!
over 1 year
ago
@richoh . I don't want to mislead people. I just read the Loops part in the book <Programming Ruby>(1.9,3rd) at Page 162. It said that the only built-in Ruby looping primitives were while
and until
, for
is almost a lump of syntactic sugar. And you can use for
loop only if your class define a each
method
Achievements
227 Karma
7,973 Total ProTip Views

Epidexipteryx
Have at least one original repo where C++ is the dominant language

Kona
Have at least one original repo where CoffeeScript is the dominant language

Komodo Dragon
Have at least one original repo where Java is the dominant language

Bear
Have at least one original repo where Objective-C is the dominant language

Altruist
Increase developer well-being by sharing at least 20 open source projects

Mongoose 3
Have at least three original repos where Ruby is the dominant language

Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos

Forked
Have a project valued enough to be forked by someone else

Charity
Fork and commit to someone's open source project in need

Mongoose
Have at least one original repo where Ruby is the dominant language

Cub
Have at least one original jQuery or Prototype open source repo
Thanks for
IronMan.prototype.constructor = IronMan; // fixing prototype pointer.
, which helps me a lot :)