Ruby on Rails Thursday, August 29, 2013

The arity should be -1, not 2. See the docs here: http://www.ruby-doc.org/core-1.9.3/Method.html#method-i-arity

I read the pickaxe book about three years ago, when I first started with Ruby 1.9.2. It was quite beginner friendly, and very useful. I haven't read more recent editions.

-- 
Dheeraj Kumar

On Friday 30 August 2013 at 3:32 AM, Alex Froelich wrote:

Dheeraj Kumar wrote in post #1120004:
Could you paste your test?

--
Dheeraj Kumar

The code for the number of arguments and the part which is failing is


it "requires two arguments" do
method(:array_sum).arity.should eq 2
end


Thanks Dheeraj. Quick question about the pick axe book. Have you given
a version a read back in the day? I am just wondering how beginner
friendly it is.

--

--
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.

--
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/CCE02DE6380149D1AD2EDED407E82B13%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment