Skip to content

Commit

Permalink
* parse.y (dyna_var_lookup): should not alter dvar->val not to
Browse files Browse the repository at this point in the history
  destroy living value.  [ruby-core:10076]

* parse.y (dyna_init): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@11583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
shyouhei committed Jan 27, 2007
1 parent 3728b21 commit 1f77ea8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
@@ -1,3 +1,10 @@
Sat Jan 27 15:20:11 2007 Yukihiro Matsumoto <matz@ruby-lang.org>

* parse.y (dyna_var_lookup): should not alter dvar->val not to
destroy living value. [ruby-core:10076]

* parse.y (dyna_init): ditto.

Wed Jan 24 18:05:39 2007 Yukihiro Matsumoto <matz@ruby-lang.org>

* misc/ruby-mode.el (ruby-font-lock-syntactic-keywords): fix
Expand Down
1 change: 0 additions & 1 deletion eval.c
Expand Up @@ -5624,7 +5624,6 @@ method_missing(obj, id, argc, argv, call_status)
MEMCPY(nargv+1, argv, VALUE, argc);
MEMCPY(nargv+1+argc, RARRAY(tmp)->ptr, VALUE, RARRAY(tmp)->len);
argc += RARRAY(tmp)->len;

}
else {
nargv = ALLOCA_N(VALUE, argc+1);
Expand Down
6 changes: 4 additions & 2 deletions parse.y
Expand Up @@ -5738,6 +5738,8 @@ top_local_setup()
local_pop();
}

#define DVAR_USED FL_USER6

static VALUE
dyna_var_lookup(id)
ID id;
Expand All @@ -5746,7 +5748,7 @@ dyna_var_lookup(id)

while (vars) {
if (vars->id == id) {
vars->val = Qtrue;
FL_SET(vars, DVAR_USED);
return Qtrue;
}
vars = vars->next;
Expand Down Expand Up @@ -5788,7 +5790,7 @@ dyna_init(node, pre)

if (!node || !post || pre == post) return node;
for (var = 0; post != pre && post->id; post = post->next) {
if (RTEST(post->val)) {
if (FL_TEST(post, DVAR_USED)) {
var = NEW_DASGN_CURR(post->id, var);
}
}
Expand Down
8 changes: 4 additions & 4 deletions version.h
@@ -1,15 +1,15 @@
#define RUBY_VERSION "1.8.5"
#define RUBY_RELEASE_DATE "2007-01-24"
#define RUBY_RELEASE_DATE "2007-01-27"
#define RUBY_VERSION_CODE 185
#define RUBY_RELEASE_CODE 20070124
#define RUBY_PATCHLEVEL 16
#define RUBY_RELEASE_CODE 20070127
#define RUBY_PATCHLEVEL 17

#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 5
#define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 1
#define RUBY_RELEASE_DAY 24
#define RUBY_RELEASE_DAY 27

RUBY_EXTERN const char ruby_version[];
RUBY_EXTERN const char ruby_release_date[];
Expand Down

0 comments on commit 1f77ea8

Please sign in to comment.