[ruby] Fix doc comments for bool parameter default value

Documentation comments now use `true` and `false` for bool parameter
default values, instead of `True` and `False` (which are the Python
names and wrong for Ruby!)
This commit is contained in:
Olly Betts 2024-10-19 15:44:42 +13:00
parent 500d3e1470
commit e528260b83
2 changed files with 8 additions and 3 deletions

View File

@ -7,6 +7,11 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
Version 4.3.0 (in progress)
===========================
2024-10-19: olly
[ruby] Documentation comments now use `true` and `false` for bool
parameter default values, instead of `True` and `False` (which are
the Python names and wrong for Ruby!)
2024-10-16: wsfulton
#874 Add nested classes to the parse tree dumped out by -xml.

View File

@ -779,7 +779,7 @@ private:
SwigType *resolved_type = SwigType_typedef_resolve_all(type);
if (Equal(resolved_type, "bool")) {
Delete(resolved_type);
return NewString(*Char(numval) == '0' ? "False" : "True");
return NewString(*Char(numval) == '0' ? "false" : "true");
}
Delete(resolved_type);
if (SwigType_ispointer(type) && Equal(v, "0"))
@ -791,9 +791,9 @@ private:
return SwigType_ispointer(type) ? NewString("nil") : NewString("0");
// FIXME: TRUE and FALSE are not standard and could be defined in other ways
if (Equal(v, "TRUE"))
return NewString("True");
return NewString("true");
if (Equal(v, "FALSE"))
return NewString("False");
return NewString("false");
}
return 0;
}