aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--file.c5
-rw-r--r--hash.c1
-rw-r--r--intern.h1
-rw-r--r--parse.y3
5 files changed, 14 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 2a761f3f86..2ee94254e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Mon Sep 25 11:26:25 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * hash.c (recursive_hash): remove unused local variable.
+
+ * parse.y (parser_yylex): ditto.
+
+ * parse.y (rb_gc_mark_symbols): fix unmatched prototype .
+
+ * file.c (rb_get_path): check NUL byte in the path string.
+
Mon Sep 25 08:14:43 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* array.c (rb_ary_shift): should clear shifting top element.
diff --git a/file.c b/file.c
index a8df504ae1..a9864f5703 100644
--- a/file.c
+++ b/file.c
@@ -111,11 +111,10 @@ rb_get_path(VALUE obj)
to_path = rb_intern("to_path");
}
if (rb_respond_to(obj, to_path)) {
- obj = rb_funcall(obj, to_path, 0, 0);
+ tmp = rb_funcall(obj, to_path, 0, 0);
}
- tmp = obj;
- StringValueCStr(tmp);
exit:
+ StringValueCStr(tmp);
if (obj != tmp) {
rb_check_safe_obj(tmp);
}
diff --git a/hash.c b/hash.c
index 11a6bfb847..4c2360e788 100644
--- a/hash.c
+++ b/hash.c
@@ -1416,7 +1416,6 @@ static VALUE
recursive_hash(VALUE hash, VALUE dummy, int recur)
{
int hval;
- VALUE n;
if (recur) {
return LONG2FIX(0);
diff --git a/intern.h b/intern.h
index 3c00a2bd2b..5b2ce7d73e 100644
--- a/intern.h
+++ b/intern.h
@@ -401,6 +401,7 @@ int rb_is_local_id(ID);
int rb_is_junk_id(ID);
int rb_symname_p(const char*);
int rb_sym_interned_p(VALUE);
+void rb_gc_mark_symbols(void);
VALUE rb_backref_get(void);
void rb_backref_set(VALUE);
VALUE rb_lastline_get(void);
diff --git a/parse.y b/parse.y
index f5835dffec..cb3bbdc29b 100644
--- a/parse.y
+++ b/parse.y
@@ -6029,7 +6029,6 @@ parser_yylex(struct parser_params *parser)
return tOP_ASGN;
}
if (c == '>') {
- enum lex_state_e state = lex_state;
lex_state = EXPR_ARG;
return tLAMBDA;
}
@@ -8275,7 +8274,7 @@ Init_sym(void)
}
void
-rb_gc_mark_symbols(int lev)
+rb_gc_mark_symbols(void)
{
rb_mark_tbl(global_symbols.id_sym);
}