summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eval.c2
-rw-r--r--gc.c4
-rw-r--r--lib/pstore.rb5
-rw-r--r--regex.c4
4 files changed, 7 insertions, 8 deletions
diff --git a/eval.c b/eval.c
index b1f01f958d..b822f5620d 100644
--- a/eval.c
+++ b/eval.c
@@ -4127,7 +4127,7 @@ stack_length(p)
alloca(0);
# define STACK_END (&stack_end)
#else
-# if defined(__GNUC__) && defined(__i386__)
+# if defined(__GNUC__) && (defined(__i386__) || defined(__m68k__))
VALUE *stack_end = __builtin_frame_address(0);
# else
VALUE *stack_end = alloca(1);
diff --git a/gc.c b/gc.c
index a0e4ce6404..d526a4df60 100644
--- a/gc.c
+++ b/gc.c
@@ -943,7 +943,7 @@ rb_gc()
alloca(0);
# define STACK_END (&stack_end)
#else
-# if defined(__GNUC__) && defined(__i386__)
+# if defined(__GNUC__) && (defined(__i386__) || defined(__m68k__))
VALUE *stack_end = __builtin_frame_address(0);
# else
VALUE *stack_end = alloca(1);
@@ -1023,7 +1023,7 @@ Init_stack(addr)
#if defined(__human68k__)
extern void *_SEND;
rb_gc_stack_start = _SEND;
-#elif defined(__GNUC__) && defined(__i386__)
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__m68k__))
rb_gc_stack_start = __builtin_frame_address(2);
#else
VALUE start;
diff --git a/lib/pstore.rb b/lib/pstore.rb
index b3e1df8284..27ca0404e8 100644
--- a/lib/pstore.rb
+++ b/lib/pstore.rb
@@ -41,11 +41,10 @@ class PStore
def [](name)
in_transaction
- value = @table[name]
- if value == nil
+ if @table.key? name
raise PStore::Error, format("undefined root name `%s'", name)
end
- value
+ @table[name]
end
def []=(name, value)
in_transaction
diff --git a/regex.c b/regex.c
index 9268b31f9b..d8cbfc0990 100644
--- a/regex.c
+++ b/regex.c
@@ -1439,8 +1439,7 @@ re_compile_pattern(pattern, size, bufp)
}
range_retry:
if (range && had_char_class) {
- FREE_AND_RETURN(stackb, "invalid regular expression; can't use character class as a end value of range");
- goto invalid_pattern;
+ FREE_AND_RETURN(stackb, "invalid regular expression; can't use character class as an end value of range");
}
PATFETCH(c);
@@ -1463,6 +1462,7 @@ re_compile_pattern(pattern, size, bufp)
PATFETCH_MBC(c);
had_mbchar++;
}
+ had_char_class = 0;
/* \ escapes characters when inside [...]. */
if (c == '\\') {