Rename the wrong variable name beg
to len
This commit is contained in:
parent
68847794bf
commit
63401b1384
6
string.c
6
string.c
@ -6332,9 +6332,9 @@ static VALUE
|
|||||||
rb_str_byteslice(int argc, VALUE *argv, VALUE str)
|
rb_str_byteslice(int argc, VALUE *argv, VALUE str)
|
||||||
{
|
{
|
||||||
if (argc == 2) {
|
if (argc == 2) {
|
||||||
long beg = NUM2LONG(argv[0]);
|
long beg = NUM2LONG(argv[0]);
|
||||||
long end = NUM2LONG(argv[1]);
|
long len = NUM2LONG(argv[1]);
|
||||||
return str_byte_substr(str, beg, end, TRUE);
|
return str_byte_substr(str, beg, len, TRUE);
|
||||||
}
|
}
|
||||||
rb_check_arity(argc, 1, 2);
|
rb_check_arity(argc, 1, 2);
|
||||||
return str_byte_aref(str, argv[0]);
|
return str_byte_aref(str, argv[0]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user