ruby-changes:24031
From: nobu <ko1@a...>
Date: Thu, 14 Jun 2012 12:04:02 +0900 (JST)
Subject: [ruby-changes:24031] nobu:r36082 (trunk): eval.c: set nil if nothing done
nobu 2012-06-14 12:03:52 +0900 (Thu, 14 Jun 2012) New Revision: 36082 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36082 Log: eval.c: set nil if nothing done * eval.c (ruby_eval_main_internal): set nil to the result if nothing executed. Modified files: trunk/eval.c Index: eval.c =================================================================== --- eval.c (revision 36081) +++ eval.c (revision 36082) @@ -273,7 +273,10 @@ volatile VALUE retval; rb_thread_t *th = GET_THREAD(); - if (!iseqval) return 0; + if (!iseqval) { + *result = Qnil; + return 0; + } PUSH_TAG(); if ((state = EXEC_TAG()) == 0) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/