When you call method_missing
with first parameter as 'string'
instead of :symbol
you get this cryptic error message:
BasicObject.send(:method_missing, 'any-method')
ArgumentError: no id given
from (pry):3:in `method_missing'
When you look at the source code for method_missing
static VALUE
rb_method_missing(int argc, const VALUE *argv, VALUE obj)
{
rb_thread_t *th = GET_THREAD();
raise_method_missing(th, argc, argv, obj, th->method_missing_reason);
UNREACHABLE;
}
there is nothing with error message ArgumentError: no id given
.
Where it comes from?