Ruby Array Issue - can't convert String into Integer

ruby, ruby-1.9.3

Solution

As juanpastas mentions, `Array::new(size,obj)` expects a number and an object. You can see this in the tutorial you linked to:

names = Array.new(4, "mac")

`names` is now an array with `"mac"` four times.

If your intention is to create an array with these two items:

pullTags = Array.[nameTag, designsTag]
# which is equivalent to
pullTags = Array[nameTag, designsTag]
# which are the more verbose versions of
pullTags = [nameTag, designsTag]

See [](*args).

Problem

Can't understand what the issue with this ``` nameTag = "div[class='designer_about'] a" designsTag = "li[class='span-2']" pullTags = Array.new(nameTag, designsTag) ``` Error: ``` designers_list_mirraw.rb:8:in `initialize': can't convert String into Integer (TypeError) from designers_list_mirraw.rb:8:in `new' from designers_list_mirraw.rb:8:in `<main>' ``` I am new to ruby

Original source