Howdy.
This morning I was tracking a long-standing bug in one of my “programs”
and arrived at improving its performance. Under some conditions,
however, I was confronted with an undefined method error for an object,
that I do not call the said method on... 8-/
In the end, I found an if-clause with a missing '&&' operator.
In IRB, it looks like this:
-------------
irb(main):001:0> value = "egalomat"
"egalomat"
irb(main):002:0> value ! value.empty?
NoMethodError: undefined method `value' for main:Object
from (irb):2
from /usr/bin/irb:11:in `<main>'
-------------
May I call the NoMethodError as dumb as my original programming-error?
Sure, there are reasons, and how could the interpreter ever “guess”,
what is really happening. However, this situation costs a lot of time to resolve. Maybe it is like this: “The dumber the error the dumber the message”. Shall I wait for
“WhateverError: You sure, that programming is right for you?”
Happy new year.
--
GnuPG brainpoolP512r1/5C2A258D 2015-10-02 [expires: 2017-10-01]
sub brainpoolP512r1/53461AFA 2015-10-02 [expires: 2017-10-01]
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)