ruby-changes:22199
From: nagachika <ko1@a...>
Date: Mon, 9 Jan 2012 23:39:03 +0900 (JST)
Subject: [ruby-changes:22199] nagachika:r34248 (trunk): * ext/readline/readline.c (readline_attempted_completion_function):
nagachika 2012-01-09 23:38:52 +0900 (Mon, 09 Jan 2012) New Revision: 34248 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34248 Log: * ext/readline/readline.c (readline_attempted_completion_function): fix typos. Modified files: trunk/ChangeLog trunk/ext/readline/readline.c Index: ChangeLog =================================================================== --- ChangeLog (revision 34247) +++ ChangeLog (revision 34248) @@ -1,3 +1,8 @@ +Mon Jan 9 23:37:43 2012 CHIKANAGA Tomoyuki <nagachika00@g...> + + * ext/readline/readline.c (readline_attempted_completion_function): + fix typos. + Mon Jan 9 20:55:34 2012 Narihiro Nakamura <authornari@g...> * gc.c : don't embed struct heaps_slot to a heap block because it Index: ext/readline/readline.c =================================================================== --- ext/readline/readline.c (revision 34247) +++ ext/readline/readline.c (revision 34248) @@ -670,13 +670,13 @@ if (TYPE(ary) != T_ARRAY) ary = rb_Array(ary); matches = RARRAY_LEN(ary); - if (matches == NULL) rb_mem_error(); + if (matches == NULL) rb_memerror(); result = (char**)malloc((matches + 2)*sizeof(char*)); - if (result == NULL) rb_raise(rb_eNoMemError, "%s"); + if (result == NULL) rb_raise(rb_eNoMemError, "failed to allocate memory"); for (i = 0; i < matches; i++) { temp = rb_obj_as_string(RARRAY_PTR(ary)[i]); result[i + 1] = (char*)malloc(RSTRING_LEN(temp) + 1); - if (result[i + 1] == NULL) rb_mem_error(); + if (result[i + 1] == NULL) rb_memerror(); strcpy(result[i + 1], RSTRING_PTR(temp)); } result[matches + 1] = NULL; @@ -709,7 +709,7 @@ i++; } result[0] = (char*)malloc(low + 1); - if (result[0] == NULL) rb_mem_error(); + if (result[0] == NULL) rb_memerror(); strncpy(result[0], result[1], low); result[0][low] = '\0'; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/