• Yukihiro "Matz" Matsumoto's avatar
    Changed the behavior of mrb_range_beg_len(); close #3411 · 5e1d9233
    Yukihiro "Matz" Matsumoto authored
    The new API is:
    
    int mrb_range_beg_len(mrb, range, &beg, &len, len, trunc)
    
    The new argument `trunc` is a boolean value that specifies
    whether the function truncates the range. The new return value
    is an integer instead of a boolean, that is:
    
     0: not a range
     1: range with proper edges
     2: out of range
    
    To get the old behavior, you have to rewrite:
    
      mrb_range_beg_len(mrb, range, &beg, &len, len)
    
    to:
    
      mrn_range_beg_len(mrb, range, &beg, &len, len, TRUE) == 1
    
    [Breaking Change]
    5e1d9233
kernel.c 6.26 KB