Request for newer Ruby version - better error message

L

Leslie Viljoen

I have this line in my program:

@sigList << {:imei => imei, :misdn => sim, :date => time[0..9], :batch
=> batch[1..3], :serial => serial}

I get this error:

D:/Work/Ruby/Massage/merge.rb:138:in `getSigMDB': undefined method
`[]' for nil:NilClass (NoMethodError)

I think this would be better:

D:/Work/Ruby/Massage/merge.rb:138:in `getSigMDB': undefined method
`[]' for nil:NilClass (NoMethodError) accessing object "time"





Les


--
Man's unfailing capacity to believe what he prefers to be true rather
than what the evidence shows to be likely and possible has always
astounded me. We long for a caring Universe which will save us from
our childish mistakes, and in the face of mountains of evidence to the
contrary we will pin all our hopes on the slimmest of doubts. God has
not been proven not to exist, therefore he must exist.

- Prokhor Zakharov
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

true.to_i 3
Rails vs. Asp.Net politics 21

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top