diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-15 16:33:06 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-15 16:33:06 +0000 |
| commit | 661907c72619210158cce755047e6378f20b4c4f (patch) | |
| tree | 0d09c3d6e0c284122bb8a501a18953726740adcc /ruby.c | |
| parent | 740bbaed0efbfe727d7ddd627803a8cb7d603af2 (diff) | |
merges r21571 from trunk into ruby_1_9_1.
* ruby.c (process_options): decrement parse_in_eval to recognize
parsing main or normal eval script.
* compile.c (rb_parse_in_main): return 1 if parsing main script.
(if parse_in_eval is negative value, it means main script)
* parse.y (yycompile0): check rb_parse_in_main() to accumulate
script text. Bug #848 [ruby-core:20450]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@21576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
| -rw-r--r-- | ruby.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1319,10 +1319,10 @@ process_options(VALUE arg) } #define PREPARE_PARSE_MAIN(expr) do { \ - th->parse_in_eval++; \ + th->parse_in_eval--; \ th->base_block = &env->block; \ expr; \ - th->parse_in_eval--; \ + th->parse_in_eval++; \ th->base_block = 0; \ } while (0) |
