diff --git a/ChangeLog b/ChangeLog index 0dc77ee653..04b2ba30e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Nov 19 02:39:31 2008 Nobuyoshi Nakada + + * error.c (Init_syserr): moved function definition itself from + template/known_errors.inc.tmpl. + Wed Nov 19 01:10:52 2008 Masatoshi SEKI * lib/drb/drb.rb (DRbConn::alive?): fixed NoMethodError problem diff --git a/error.c b/error.c index 3248335b96..c28a855ea7 100644 --- a/error.c +++ b/error.c @@ -1157,7 +1157,11 @@ rb_check_frozen(VALUE obj) if (OBJ_FROZEN(obj)) rb_error_frozen(rb_obj_classname(obj)); } +void Init_syserr(void) +{ + rb_eNOERROR = set_syserr(0, "NOERROR"); #include "known_errors.inc" +} static void err_append(const char *s) diff --git a/template/known_errors.inc.tmpl b/template/known_errors.inc.tmpl index 2a569bda12..23bca21362 100644 --- a/template/known_errors.inc.tmpl +++ b/template/known_errors.inc.tmpl @@ -5,8 +5,6 @@ */ % error_names = ARGF.read.split(/\s+/) -void Init_syserr(void) { - rb_eNOERROR = set_syserr(0, "NOERROR"); % error_names.each do |name| #ifdef <%=name%> set_syserr(<%=name%>, "<%=name%>"); @@ -14,4 +12,3 @@ void Init_syserr(void) { set_syserr(0, "<%=name%>"); #endif % end -}