ruby-changes:13146
From: nobu <ko1@a...>
Date: Sun, 13 Sep 2009 19:38:54 +0900 (JST)
Subject: [ruby-changes:13146] Ruby:r24897 (trunk): * ruby.c (load_file_internal): no need to define DATA when error.
nobu 2009-09-13 19:38:36 +0900 (Sun, 13 Sep 2009) New Revision: 24897 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24897 Log: * ruby.c (load_file_internal): no need to define DATA when error. Modified files: trunk/ChangeLog trunk/ruby.c Index: ChangeLog =================================================================== --- ChangeLog (revision 24896) +++ ChangeLog (revision 24897) @@ -1,3 +1,7 @@ +Sun Sep 13 19:38:34 2009 Nobuyoshi Nakada <nobu@r...> + + * ruby.c (load_file_internal): no need to define DATA when error. + Sun Sep 13 18:48:43 2009 Nobuyoshi Nakada <nobu@r...> * configure.in (XLDFLAGS): link startup code with ObjC support. Index: ruby.c =================================================================== --- ruby.c (revision 24896) +++ ruby.c (revision 24897) @@ -1584,7 +1584,7 @@ rb_funcall(f, set_encoding, 2, rb_enc_from_encoding(enc), rb_str_new_cstr("-")); tree = rb_parser_compile_file(parser, fname, f, line_start); rb_funcall(f, set_encoding, 1, rb_parser_encoding(parser)); - if (script && rb_parser_end_seen_p(parser)) { + if (script && tree && rb_parser_end_seen_p(parser)) { rb_define_global_const("DATA", f); } else if (f != rb_stdin) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/