ruby-changes:22210
From: naruse <ko1@a...>
Date: Tue, 10 Jan 2012 15:14:54 +0900 (JST)
Subject: [ruby-changes:22210] naruse:r34259 (trunk): * ext/readline/readline.c (readline_attempted_completion_function):
naruse 2012-01-10 15:14:42 +0900 (Tue, 10 Jan 2012) New Revision: 34259 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34259 Log: * ext/readline/readline.c (readline_attempted_completion_function): use rb_memerror(). Modified files: trunk/ChangeLog trunk/ext/readline/readline.c Index: ChangeLog =================================================================== --- ChangeLog (revision 34258) +++ ChangeLog (revision 34259) @@ -1,3 +1,8 @@ +Tue Jan 10 15:13:58 2012 NARUSE, Yui <naruse@r...> + + * ext/readline/readline.c (readline_attempted_completion_function): + use rb_memerror(). + Tue Jan 10 12:49:42 2012 NARUSE, Yui <naruse@r...> * gc.c: in fact, i686-linux doesn't need to define _XOPEN_SOURCE 600. Index: ext/readline/readline.c =================================================================== --- ext/readline/readline.c (revision 34258) +++ ext/readline/readline.c (revision 34259) @@ -672,7 +672,7 @@ matches = RARRAY_LEN(ary); if (matches == 0) return NULL; result = (char**)malloc((matches + 2)*sizeof(char*)); - if (result == NULL) rb_raise(rb_eNoMemError, "failed to allocate memory"); + if (result == NULL) rb_memerror(); for (i = 0; i < matches; i++) { temp = rb_obj_as_string(RARRAY_PTR(ary)[i]); result[i + 1] = (char*)malloc(RSTRING_LEN(temp) + 1); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/