Commit 5aa746f
Fix utf16_string_value_ptr() for TruffleRuby
* TruffleRuby uses TruffleString which requires all UTF-16 strings to
always have an even bytesize.
* The code here ensures the UTF-16 string always ends up with 2 \x00
bytes, so append them explicitly to have an even bytesize instead of
relying on RSTRING_PTR() adding the second \x00 byte.
* Fixes truffleruby/truffleruby#27041 parent 28832a1 commit 5aa746f
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
0 commit comments