I'm glad it helped. It's not about declaring a type of object. `[]` is a
syntactic sugar for `Array.new`. It creates a new empty array. So `data =
[]` (or `data = Array.new`) create a new array and assigns it to `data`.
--
Greg Navis
I help tech companies to scale Heroku-hosted Rails apps.
Free, biweekly scalability newsletter for SaaS CEOs
<http://www.gregnavis.com/newsletter/>

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAA6WWt81B6fAp_3ErX7ctB42kKCPMNi3bOHEgz7Mv3L2tCAjvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 6 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJun 3, '16 at 7:16p
activeJun 3, '16 at 7:49p
posts6
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase