const_missing_nesting.diff

Patch that provides the nesting to const_missing if arity != 1 - Yehuda Katz, 02/13/2010 08:53 AM

Download (621 Bytes)

View differences:

variable.c
1357 1357
static VALUE
1358 1358
const_missing(VALUE klass, ID id)
1359 1359
{
1360
    return rb_funcall(klass, rb_intern("const_missing"), 1, ID2SYM(id));
1360
  ID const_missing_id = rb_intern("const_missing");
1361
  int arity = rb_obj_method_arity(klass, const_missing_id);
1362
  
1363
  if(arity == 1)
1364
    return rb_funcall(klass, const_missing_id, 1, ID2SYM(id));
1365
  else
1366
    return rb_funcall(klass, const_missing_id, 2, ID2SYM(id), rb_funcall(rb_cModule, rb_intern("nesting"), 0));
1361 1367
}
1362 1368

  
1363 1369