summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--parse.y7
2 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 18e1b0af2d..e050b5cada 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Mon Mar 24 19:44:53 2008 Akinori MUSHA <knu@iDaemons.org>
+
+ * 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.
+
Mon Mar 24 10:25:54 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in: sitearch should use target_cpu. [ruby-core:15986]
diff --git a/parse.y b/parse.y
index 8fd4607d3a..37a61df98a 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);