summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--error.c11
-rw-r--r--regex.c1
3 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index a884e91d243..ba64069ab42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
Fri Nov 10 16:15:53 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * error.c: T_SYMBOL was misplaced my T_UNDEF.
+
* parse.y (yylex): eval("^") caused infinite loop.
Thu Nov 9 14:22:13 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
diff --git a/error.c b/error.c
index 540e57dd613..34eae0d6b0c 100644
--- a/error.c
+++ b/error.c
@@ -196,13 +196,13 @@ static struct types {
T_FILE, "File",
T_TRUE, "true",
T_FALSE, "false",
- T_UNDEF, "Symbol", /* :symbol */
- T_UNDEF, "undef", /* internal use: #undef */
+ T_SYMBOL, "Symbol", /* :symbol */
T_DATA, "Data", /* internal use: wrapped C pointers */
T_MATCH, "Match", /* data of $~ */
T_VARMAP, "Varmap", /* internal use: dynamic variables */
T_SCOPE, "Scope", /* internal use: variable scope */
T_NODE, "Node", /* internal use: syntax tree node */
+ T_UNDEF, "undef", /* internal use: #undef; should not happen */
-1, 0,
};
@@ -212,9 +212,12 @@ rb_check_type(x, t)
int t;
{
struct types *type = builtin_types;
- int tt = TYPE(x);
- if (tt != t) {
+ if (x == Qundef) {
+ rb_bug("undef leaked to the Ruby space");
+ }
+
+ if (TYPE(x) != t) {
while (type->type >= 0) {
if (type->type == t) {
char *etype;
diff --git a/regex.c b/regex.c
index 3287fc32072..d4c1c2a915a 100644
--- a/regex.c
+++ b/regex.c
@@ -3766,7 +3766,6 @@ re_match(bufp, string_arg, size, pos, regs)
case start_nowidth:
PUSH_FAILURE_POINT(0, d);
- printf("%d > %d\n", stackp - stackb, RE_DUP_MAX);
if (stackp - stackb > RE_DUP_MAX) {
FREE_AND_RETURN(stackb,(-2));
}