summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-24 10:45:28 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-24 10:45:28 +0000
commitffb7aaebc24ee9db3ac6c976a0536e52b91735c7 (patch)
tree920197a7cfaa27e73ac48abb3b01b4c14387f182 /parse.y
parent76e08be894986d30da745649e2978f18f7e8cb0e (diff)
* parse.y (yycompile): Always prepare a new array for each file's
SCRIPT_LINES__ storage, instead of appending source lines every time a file is re-loaded; submitted by Rocky Bernstein in #18517. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y7
1 files changed, 2 insertions, 5 deletions
diff --git a/parse.y b/parse.y
index 8fd4607..37a61df 100644
--- a/parse.y
+++ b/parse.y
@@ -2601,11 +2601,8 @@ yycompile(f, line)
hash = rb_const_get(rb_cObject, rb_intern("SCRIPT_LINES__"));
if (TYPE(hash) == T_HASH) {
fname = rb_str_new2(f);
- ruby_debug_lines = rb_hash_aref(hash, fname);
- if (NIL_P(ruby_debug_lines)) {
- ruby_debug_lines = rb_ary_new();
- rb_hash_aset(hash, fname, ruby_debug_lines);
- }
+ ruby_debug_lines = rb_ary_new();
+ rb_hash_aset(hash, fname, ruby_debug_lines);
}
if (line > 1) {
VALUE str = rb_str_new(0,0);