diff options
Diffstat (limited to 'ext/readline')
-rw-r--r-- | ext/readline/readline.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 0772d58bcf..2f460ea3e0 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -191,11 +191,9 @@ readline_s_set_completion_append_character(self, str) VALUE self, str; { #ifdef READLINE_21_OR_LATER - if (NIL_P(str)) { + if (NIL_P(str) || !StringValuePtr(str) || !RSTRING(str)->len) { rl_completion_append_character = '\0'; } else { - StringValue(str); - rl_completion_append_character = RSTRING(str)->ptr[0]; } |