Changeset 803

Show
Ignore:
Timestamp:
11/28/08 08:06:00 (7 months ago)
Author:
raggi
Message:

Allow for older ruby builds where RARRAY_LEN is not defined

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ext/rubymain.cpp

    r802 r803  
    464464static VALUE t_invoke_popen (VALUE self, VALUE cmd) 
    465465{ 
    466         int len = RARRAY_LEN(cmd); 
     466        // 1.8.7+ 
     467        #ifdef RARRAY_LEN 
     468                int len = RARRAY_LEN(cmd); 
     469        #else 
     470                int len = RARRAY (cmd)->len; 
     471        #endif 
    467472        if (len > 98) 
    468473                rb_raise (rb_eRuntimeError, "too many arguments to popen");