mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merge revision(s) edf01d4e82: [Backport #18772]
Treat NULL fake string as an empty string And the NULL string must be of size 0. --- string.c | 5 +++++ 1 file changed, 5 insertions(+)
This commit is contained in:
parent
6ac4449fce
commit
9733f4d0f0
2 changed files with 8 additions and 3 deletions
5
string.c
5
string.c
|
|
@ -414,6 +414,11 @@ setup_fake_str(struct RString *fake_str, const char *name, long len, int encidx)
|
|||
fake_str->basic.flags = T_STRING|RSTRING_NOEMBED|STR_NOFREE|STR_FAKESTR;
|
||||
/* SHARED to be allocated by the callback */
|
||||
|
||||
if (!name) {
|
||||
RUBY_ASSERT_ALWAYS(len == 0);
|
||||
name = "";
|
||||
}
|
||||
|
||||
ENCODING_SET_INLINED((VALUE)fake_str, encidx);
|
||||
|
||||
RBASIC_SET_CLASS_RAW((VALUE)fake_str, rb_cString);
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@
|
|||
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
|
||||
#define RUBY_VERSION_TEENY 5
|
||||
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
|
||||
#define RUBY_PATCHLEVEL 210
|
||||
#define RUBY_PATCHLEVEL 211
|
||||
|
||||
#define RUBY_RELEASE_YEAR 2022
|
||||
#define RUBY_RELEASE_MONTH 6
|
||||
#define RUBY_RELEASE_DAY 18
|
||||
#define RUBY_RELEASE_MONTH 7
|
||||
#define RUBY_RELEASE_DAY 25
|
||||
|
||||
#include "ruby/version.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue