Rename the wrong variable name `beg` to `len`

This commit is contained in:
Shugo Maeda 2022-02-23 11:23:33 +09:00
parent 68847794bf
commit 63401b1384
No known key found for this signature in database
GPG Key ID: 2DFE34085E97CE47
1 changed files with 3 additions and 3 deletions

View File

@ -6333,8 +6333,8 @@ rb_str_byteslice(int argc, VALUE *argv, VALUE str)
{
if (argc == 2) {
long beg = NUM2LONG(argv[0]);
long end = NUM2LONG(argv[1]);
return str_byte_substr(str, beg, end, TRUE);
long len = NUM2LONG(argv[1]);
return str_byte_substr(str, beg, len, TRUE);
}
rb_check_arity(argc, 1, 2);
return str_byte_aref(str, argv[0]);